diff --git a/bindings/register/src/main/java/org/n52/sos/binding/RegisterBinding.java b/bindings/register/src/main/java/org/n52/sos/binding/RegisterBinding.java index a9957fd3f1..304fcf351f 100644 --- a/bindings/register/src/main/java/org/n52/sos/binding/RegisterBinding.java +++ b/bindings/register/src/main/java/org/n52/sos/binding/RegisterBinding.java @@ -55,6 +55,7 @@ import org.n52.shetland.ogc.gml.CodeWithAuthority; import org.n52.shetland.ogc.om.OmConstants; import org.n52.shetland.ogc.ows.OWSConstants; +import org.n52.shetland.ogc.ows.exception.CodedException; import org.n52.shetland.ogc.ows.exception.MissingParameterValueException; import org.n52.shetland.ogc.ows.exception.NoApplicableCodeException; import org.n52.shetland.ogc.ows.exception.OwsExceptionReport; @@ -148,14 +149,7 @@ private OwsServiceRequest parseRequest(HttpServletRequest req) throws OwsExcepti Object object = decode(req); if (object != null) { SosProcedureDescription procDesc = null; - if (object instanceof SosProcedureDescription) { - procDesc = (SosProcedureDescription) object; - } else if (object instanceof AbstractFeature) { - procDesc = new SosProcedureDescription((AbstractFeature) object); - } else { - throw new NoApplicableCodeException().withMessage("The requested type '{}' is not supported!", - object.getClass().getName()); - } + procDesc = getSosProcedureDescription(object); InsertSensorRequest request = new InsertSensorRequest(); request.setRequestContext(getRequestContext(req)); @@ -182,50 +176,12 @@ private OwsServiceRequest parseRequest(HttpServletRequest req) throws OwsExcepti request.setProcedureDescriptionFormat(procDesc.getDescriptionFormat()); // observable properties // get from parameter or from sml:output - List observableProperties = checkForObservablePropertyParameter(procDesc, parameters); - if (!observableProperties.isEmpty()) { - request.setObservableProperty(observableProperties); - } else if (procDesc.getProcedureDescription() instanceof AbstractSensorML) { - request.setObservableProperty(getObservablePropertyFromAbstractSensorML( - (AbstractSensorML) procDesc.getProcedureDescription())); - } else if (isTypeRequest) { - request.setObservableProperty(Lists.newArrayList("not_defined")); - } else { - throw new NoApplicableCodeException().withMessage( - "The sensor description does not contain sml:outputs which is used to " - + "fetch the possible observableProperties! " - + "Please add an sml:ouput section or define the observableProperties" - + " via 'observableProperty' URL parameter!'"); - } + setRequestObservableProperty(parameters, procDesc, request, isTypeRequest); // metadata if (!isTypeRequest) { SosInsertionMetadata metadata = new SosInsertionMetadata(); - List featureOfInterestTypes = checkForFeatureOfInterestTypeParameter(procDesc, parameters); - if (!featureOfInterestTypes.isEmpty()) { - metadata.setFeatureOfInterestTypes(featureOfInterestTypes); - } else { - metadata.setFeatureOfInterestTypes(supportedTypeRepository.getFeatureOfInterestTypesAsString()); - } - List observationTypes = checkForObservationTypeParameter(procDesc, parameters); - if (!observationTypes.isEmpty()) { - metadata.setObservationTypes(observationTypes); - } else if (procDesc.getProcedureDescription() instanceof AbstractProcess - && ((AbstractProcess) procDesc.getProcedureDescription()).isSetOutputs()) { - metadata.setObservationTypes(getObservationTypeFrom( - ((AbstractProcess) procDesc.getProcedureDescription()).getOutputs())); - } else if (procDesc.getProcedureDescription() instanceof SensorML - && ((SensorML) procDesc.getProcedureDescription()).isWrapper()) { - Set obsTyp = Sets.newHashSet(); - for (AbstractProcess abstractProcess : ((SensorML) procDesc.getProcedureDescription()) - .getMembers()) { - if (abstractProcess.isSetOutputs()) { - obsTyp.addAll(getObservationTypeFrom(abstractProcess.getOutputs())); - } - } - metadata.setObservationTypes(obsTyp); - } else { - metadata.setObservationTypes(supportedTypeRepository.getObservationTypesAsString()); - } + setMetadataFeatureOfInterestTypes(parameters, procDesc, metadata); + setMetadataObservationTypes(parameters, procDesc, metadata); request.setMetadata(metadata); } return request; @@ -233,6 +189,69 @@ private OwsServiceRequest parseRequest(HttpServletRequest req) throws OwsExcepti throw new InvalidRequestException().withMessage("The requested sensor description null is not supported!"); } + private void setMetadataObservationTypes(Map parameters, SosProcedureDescription procDesc, SosInsertionMetadata metadata) throws OwsExceptionReport { + List observationTypes = checkForObservationTypeParameter(procDesc, parameters); + if (!observationTypes.isEmpty()) { + metadata.setObservationTypes(observationTypes); + } else if (procDesc.getProcedureDescription() instanceof AbstractProcess + && ((AbstractProcess) procDesc.getProcedureDescription()).isSetOutputs()) { + metadata.setObservationTypes(getObservationTypeFrom( + ((AbstractProcess) procDesc.getProcedureDescription()).getOutputs())); + } else if (procDesc.getProcedureDescription() instanceof SensorML + && ((SensorML) procDesc.getProcedureDescription()).isWrapper()) { + Set obsTyp = Sets.newHashSet(); + for (AbstractProcess abstractProcess : ((SensorML) procDesc.getProcedureDescription()) + .getMembers()) { + if (abstractProcess.isSetOutputs()) { + obsTyp.addAll(getObservationTypeFrom(abstractProcess.getOutputs())); + } + } + metadata.setObservationTypes(obsTyp); + } else { + metadata.setObservationTypes(supportedTypeRepository.getObservationTypesAsString()); + } + } + + private void setMetadataFeatureOfInterestTypes(Map parameters, SosProcedureDescription procDesc, SosInsertionMetadata metadata) throws OwsExceptionReport { + List featureOfInterestTypes = checkForFeatureOfInterestTypeParameter(procDesc, parameters); + if (!featureOfInterestTypes.isEmpty()) { + metadata.setFeatureOfInterestTypes(featureOfInterestTypes); + } else { + metadata.setFeatureOfInterestTypes(supportedTypeRepository.getFeatureOfInterestTypesAsString()); + } + } + + private void setRequestObservableProperty(Map parameters, SosProcedureDescription procDesc, InsertSensorRequest request, boolean isTypeRequest) throws OwsExceptionReport { + List observableProperties = checkForObservablePropertyParameter(procDesc, parameters); + if (!observableProperties.isEmpty()) { + request.setObservableProperty(observableProperties); + } else if (procDesc.getProcedureDescription() instanceof AbstractSensorML) { + request.setObservableProperty(getObservablePropertyFromAbstractSensorML( + (AbstractSensorML) procDesc.getProcedureDescription())); + } else if (isTypeRequest) { + request.setObservableProperty(Lists.newArrayList("not_defined")); + } else { + throw new NoApplicableCodeException().withMessage( + "The sensor description does not contain sml:outputs which is used to " + + "fetch the possible observableProperties! " + + "Please add an sml:ouput section or define the observableProperties" + + " via 'observableProperty' URL parameter!'"); + } + } + + private static SosProcedureDescription getSosProcedureDescription(Object object) throws CodedException { + SosProcedureDescription procDesc; + if (object instanceof SosProcedureDescription) { + procDesc = (SosProcedureDescription) object; + } else if (object instanceof AbstractFeature) { + procDesc = new SosProcedureDescription((AbstractFeature) object); + } else { + throw new NoApplicableCodeException().withMessage("The requested type '{}' is not supported!", + object.getClass().getName()); + } + return procDesc; + } + private String getServiceParameterValue(Map map) { final String service = getParameterValue(OWSConstants.RequestParams.service, map); if (Strings.isNullOrEmpty(service)) { diff --git a/coding/kvp/src/main/java/org/n52/sos/decode/kvp/AbstractSosKvpDecoder.java b/coding/kvp/src/main/java/org/n52/sos/decode/kvp/AbstractSosKvpDecoder.java index 3ac7823c4c..f13d7954b6 100644 --- a/coding/kvp/src/main/java/org/n52/sos/decode/kvp/AbstractSosKvpDecoder.java +++ b/coding/kvp/src/main/java/org/n52/sos/decode/kvp/AbstractSosKvpDecoder.java @@ -295,7 +295,7 @@ private TemporalFilter createTemporalFilter(String name, String value, String op } private TemporalFilter createTemporalFilter(String name, String value, TimeOperator timeOperator, - String valueReference) throws DecodingException { + String valueReference) throws DecodingException { String[] times = value.split("/"); final Time time; if (times.length == 1 && timeOperator != TimeOperator.TM_During) { @@ -355,8 +355,8 @@ protected SpatialFilter decodeSpatialFilter(String name, List parameterV double[] coordinates = values.stream().mapToDouble(Double::valueOf).toArray(); geometry = factory.createPolygon(new Coordinate[] { new Coordinate(coordinates[0], coordinates[1]), - new Coordinate(coordinates[0], coordinates[3]), new Coordinate(coordinates[2], coordinates[3]), - new Coordinate(coordinates[2], coordinates[1]), new Coordinate(coordinates[0], coordinates[1]) }); + new Coordinate(coordinates[0], coordinates[3]), new Coordinate(coordinates[2], coordinates[3]), + new Coordinate(coordinates[2], coordinates[1]), new Coordinate(coordinates[0], coordinates[1]) }); return new SpatialFilter(SpatialOperator.BBOX, geometry, valueReference); } diff --git a/coding/kvp/src/main/java/org/n52/sos/decode/kvp/CreateTemporalFilter.java b/coding/kvp/src/main/java/org/n52/sos/decode/kvp/CreateTemporalFilter.java new file mode 100644 index 0000000000..038ff68b4a --- /dev/null +++ b/coding/kvp/src/main/java/org/n52/sos/decode/kvp/CreateTemporalFilter.java @@ -0,0 +1,20 @@ +package org.n52.sos.decode.kvp; + +import org.n52.shetland.ogc.filter.TemporalFilter; +import org.n52.svalbard.decode.exception.DecodingException; + +import java.util.List; + +public interface CreateTemporalFilter { + + TemporalFilter decodeTemporalFilter(String name, List parameterValues) throws DecodingException; + + TemporalFilter createTemporalFilter(String name, String value, String operator, String valueReference) throws DecodingException; + + TemporalFilter createTemporalFilter(String value, String name, String valueReference) + throws DecodingException; + + public TemporalFilter decodeTemporalFilter(); + + TemporalFilter createTemporalFilter(); +} \ No newline at end of file diff --git a/coding/kvp/src/main/java/org/n52/sos/decode/kvp/ParameterValuesSizeEqualThree.java b/coding/kvp/src/main/java/org/n52/sos/decode/kvp/ParameterValuesSizeEqualThree.java new file mode 100644 index 0000000000..48be65cef5 --- /dev/null +++ b/coding/kvp/src/main/java/org/n52/sos/decode/kvp/ParameterValuesSizeEqualThree.java @@ -0,0 +1,52 @@ +package org.n52.sos.decode.kvp; + +import org.n52.shetland.ogc.filter.FilterConstants; +import org.n52.shetland.ogc.filter.TemporalFilter; +import org.n52.svalbard.decode.exception.DecodingException; + +import java.util.List; + +public class ParameterValuesSizeEqualThree implements CreateTemporalFilter{ + public TemporalFilter pmtValueSizeThree(String name, List parameterValues) throws DecodingException { + return createTemporalFilter(name, + parameterValues.get(2), + parameterValues.get(1), + parameterValues.get(0)); + } + + @Override + public TemporalFilter decodeTemporalFilter(String name, List parameterValues) throws DecodingException { + return null; + } + + @Override + public TemporalFilter createTemporalFilter(String name, String value, String operator, String valueReference) + throws DecodingException { + FilterConstants.TimeOperator timeOperator; + try { + timeOperator = FilterConstants.TimeOperator.from(operator); + } catch (IllegalArgumentException e1) { + try { + timeOperator = FilterConstants.TimeOperator.from(FilterConstants.TimeOperator2.from(operator)); + } catch (IllegalArgumentException e2) { + throw new DecodingException(name, "Unsupported operator '%s'!", operator); + } + } + return createTemporalFilter(name, value, String.valueOf(timeOperator), valueReference); + } + + @Override + public TemporalFilter createTemporalFilter(String value, String name, String valueReference) throws DecodingException { + return null; + } + + @Override + public TemporalFilter decodeTemporalFilter() { + return null; + } + + @Override + public TemporalFilter createTemporalFilter() { + return null; + } +} diff --git a/coding/kvp/src/main/java/org/n52/sos/decode/kvp/ParameterValuesSizeEqualTwo.java b/coding/kvp/src/main/java/org/n52/sos/decode/kvp/ParameterValuesSizeEqualTwo.java new file mode 100644 index 0000000000..28ccd119ff --- /dev/null +++ b/coding/kvp/src/main/java/org/n52/sos/decode/kvp/ParameterValuesSizeEqualTwo.java @@ -0,0 +1,47 @@ +package org.n52.sos.decode.kvp; + + +import org.n52.shetland.ogc.filter.FilterConstants; +import org.n52.shetland.ogc.filter.TemporalFilter; +import org.n52.svalbard.decode.exception.DecodingException; + +import java.util.List; + +class ParameterValuesSizeEqualTwo implements CreateTemporalFilter { + public TemporalFilter pmtValueSizeTwo(String name, List parameterValues) throws DecodingException { + return createTemporalFilter(parameterValues.get(1), name, parameterValues.get(0)); + } + + @Override + public TemporalFilter decodeTemporalFilter(String name, List parameterValues) throws DecodingException { + return null; + } + + @Override + public TemporalFilter createTemporalFilter(String name, String value, String operator, String valueReference) throws DecodingException { + return null; + } + + @Override + public TemporalFilter createTemporalFilter(String value, String name, String valueReference) + throws DecodingException { + switch (value.split("/").length) { + case 1: + return createTemporalFilter(name, value, String.valueOf(FilterConstants.TimeOperator.TM_Equals), valueReference); + case 2: + return createTemporalFilter(name, value, String.valueOf(FilterConstants.TimeOperator.TM_During), valueReference); + default: + throw new DecodingException(name, "The paramter value '%s' is invalid!", value); + } + } + + @Override + public TemporalFilter decodeTemporalFilter() { + return null; + } + + @Override + public TemporalFilter createTemporalFilter() { + return null; + } +} diff --git a/converter/eprtr/src/main/java/org/n52/sos/converter/AssessConfidential.java b/converter/eprtr/src/main/java/org/n52/sos/converter/AssessConfidential.java new file mode 100644 index 0000000000..b476ea5ba3 --- /dev/null +++ b/converter/eprtr/src/main/java/org/n52/sos/converter/AssessConfidential.java @@ -0,0 +1,38 @@ +package org.n52.sos.converter; + +import org.n52.shetland.ogc.om.NamedValue; +import org.n52.shetland.ogc.om.ParameterHolder; + +import java.util.List; + +import static org.n52.sos.converter.EprtrConverter.CONFIDENTIAL_CODE; +import static org.n52.sos.converter.EprtrConverter.CONFIDENTIAL_INDICATOR; + +public class AssessConfidential { + + EprtrConverter eprtrConverter = new EprtrConverter(); + + boolean containsConfidentialCode(List> parameters) { + for (NamedValue namedValue : parameters) { + if (namedValue.getName().getHref().equalsIgnoreCase(CONFIDENTIAL_CODE)) { + return true; + } + } + return false; + } + + boolean containsConfidentialIndicator(List> parameters) { + for (NamedValue namedValue : parameters) { + if (namedValue.getName().getHref().equalsIgnoreCase(CONFIDENTIAL_INDICATOR)) { + return true; + } + } + return false; + } + + String getConfidentialIndicator(String confidentialCode, ParameterHolder parameterHolder) { + String confidentialIndicator = eprtrConverter.getParameter(parameterHolder, CONFIDENTIAL_INDICATOR); + return confidentialIndicator != null && !confidentialIndicator.isEmpty() ? confidentialIndicator + : confidentialCode != null && !confidentialCode.isEmpty() ? "true" : "false"; + } +} diff --git a/converter/eprtr/src/main/java/org/n52/sos/converter/EprtrConverter.java b/converter/eprtr/src/main/java/org/n52/sos/converter/EprtrConverter.java index 195163e66f..34de6ff3a0 100644 --- a/converter/eprtr/src/main/java/org/n52/sos/converter/EprtrConverter.java +++ b/converter/eprtr/src/main/java/org/n52/sos/converter/EprtrConverter.java @@ -118,11 +118,11 @@ public class EprtrConverter implements RequestResponseModifier { private static final String CITY_NAME = "CityName"; private static final String POSTCODE_CODE = "PostcodeCode"; private static final String COUNTRY_ID = "CountryID"; - private static final String CONFIDENTIAL_INDICATOR = "ConfidentialIndicator"; + static final String CONFIDENTIAL_INDICATOR = "ConfidentialIndicator"; private static final String METHOD_BASIS_CODE = "MethodBasisCode"; private static final String ACCIDENTIAL_QUANTITY = "AccidentialQuantity"; private static final String MEDIUM_CODE = "MediumCode"; - private static final String CONFIDENTIAL_CODE = "ConfidentialCode"; + static final String CONFIDENTIAL_CODE = "ConfidentialCode"; private static final String POLLUTANT_RELEASE = "PollutantRelease"; private static final String POLLUTANT_TRANSFER = "PollutantTransfer"; private static final String WASTE_TRANSFER = "WasteTransfer"; @@ -130,7 +130,7 @@ public class EprtrConverter implements RequestResponseModifier { private static final Set REQUEST_RESPONSE_MODIFIER_KEYS = getKey(); - private static final ObservationMergeIndicator INDICATOR = + static final ObservationMergeIndicator INDICATOR = new ObservationMergeIndicator().setFeatureOfInterest(true).setProcedure(true); private DecoderRepository decoderRepository; @@ -180,7 +180,8 @@ public OwsServiceResponse modifyResponse(OwsServiceRequest request, OwsServiceRe throws OwsExceptionReport { if (response instanceof GetObservationResponse) { if (mergeForEprtr()) { - return mergeObservations((GetObservationResponse) response); + MergeObservation mergeObservation = new MergeObservation(); + return mergeObservation.mergeObservations((GetObservationResponse) response); } else { return checkGetObservationFeatures((GetObservationResponse) response); } @@ -191,43 +192,44 @@ public OwsServiceResponse modifyResponse(OwsServiceRequest request, OwsServiceRe return response; } - private OwsServiceResponse mergeObservations(GetObservationResponse response) throws OwsExceptionReport { - response.setObservationCollection( - ObservationStream.of(mergeObservations(mergeStreamingData(response.getObservationCollection())))); - checkObservationFeatures(response.getObservationCollection()); - return response; - } - private List mergeObservations(List observations) throws OwsExceptionReport { - if (CollectionHelper.isNotEmpty(observations)) { - final List mergedObservations = new LinkedList(); - int obsIdCounter = 1; - for (final OmObservation sosObservation : observations) { - if (checkForProcedure(sosObservation)) { - if (mergedObservations.isEmpty()) { - if (!sosObservation.isSetGmlID()) { - sosObservation.setObservationID(Integer.toString(obsIdCounter++)); - } - mergedObservations.add(convertObservation(sosObservation)); - } else { - boolean combined = false; - for (final OmObservation combinedSosObs : mergedObservations) { - if (checkForMerge(combinedSosObs, sosObservation, INDICATOR)) { - mergeValues(combinedSosObs, convertObservation(sosObservation)); - combined = true; - break; - } - } - if (!combined) { - mergedObservations.add(convertObservation(sosObservation)); - } - } - } - } - return mergedObservations; - } - return Lists.newArrayList(observations); - } +// private OwsServiceResponse mergeObservations(GetObservationResponse response) throws OwsExceptionReport { +// response.setObservationCollection( +// ObservationStream.of(mergeObservations(mergeStreamingData(response.getObservationCollection())))); +// checkObservationFeatures(response.getObservationCollection()); +// return response; +// } + +// private List mergeObservations(List observations) throws OwsExceptionReport { +// if (CollectionHelper.isNotEmpty(observations)) { +// final List mergedObservations = new LinkedList(); +// int obsIdCounter = 1; +// for (final OmObservation sosObservation : observations) { +// if (checkForProcedure(sosObservation)) { +// if (mergedObservations.isEmpty()) { +// if (!sosObservation.isSetGmlID()) { +// sosObservation.setObservationID(Integer.toString(obsIdCounter++)); +// } +// mergedObservations.add(convertObservation(sosObservation)); +// } else { +// boolean combined = false; +// for (final OmObservation combinedSosObs : mergedObservations) { +// if (checkForMerge(combinedSosObs, sosObservation, INDICATOR)) { +// mergeValues(combinedSosObs, convertObservation(sosObservation)); +// combined = true; +// break; +// } +// } +// if (!combined) { +// mergedObservations.add(convertObservation(sosObservation)); +// } +// } +// } +// } +// return mergedObservations; +// } +// return Lists.newArrayList(observations); +// } private OwsServiceResponse checkGetObservationFeatures(GetObservationResponse response) throws NoSuchElementException, OwsExceptionReport { @@ -236,7 +238,7 @@ private OwsServiceResponse checkGetObservationFeatures(GetObservationResponse re return response; } - private List checkObservationFeatures(ObservationStream observationStream) + List checkObservationFeatures(ObservationStream observationStream) throws NoSuchElementException, OwsExceptionReport { List processed = new LinkedList<>(); while (observationStream != null && observationStream.hasNext()) { @@ -262,11 +264,12 @@ private OwsServiceResponse checkFeatures(GetFeatureOfInterestResponse response) private void checkFeature(AbstractFeature abstractFeature) { if (abstractFeature instanceof AbstractSamplingFeature) { AbstractSamplingFeature asf = (AbstractSamplingFeature) abstractFeature; + AssessConfidential assessConfidential = new AssessConfidential(); if (asf.isSetParameter() && isPrtr(asf.getParameters()) - && !containsConfidentialIndicator(asf.getParameters())) { + && !assessConfidential.containsConfidentialIndicator(asf.getParameters())) { NamedValue confidentialIndicator = new NamedValue<>(); confidentialIndicator.setName(new ReferenceType(CONFIDENTIAL_INDICATOR)); - if (containsConfidentialCode(asf.getParameters())) { + if (assessConfidential.containsConfidentialCode(asf.getParameters())) { confidentialIndicator.setValue(new BooleanValue(true)); } else { confidentialIndicator.setValue(new BooleanValue(false)); @@ -278,34 +281,38 @@ private void checkFeature(AbstractFeature abstractFeature) { private boolean isPrtr(List> parameters) { for (NamedValue namedValue : parameters) { - if (namedValue.getName().getHref().equalsIgnoreCase(METHOD_BASIS_CODE) - || namedValue.getName().getHref().equalsIgnoreCase(ACCIDENTIAL_QUANTITY) - || namedValue.getName().getHref().equalsIgnoreCase(MEDIUM_CODE)) { + if (isNameValueEqualsIgnoreCase(namedValue)) { return true; } } return false; } - private boolean containsConfidentialCode(List> parameters) { - for (NamedValue namedValue : parameters) { - if (namedValue.getName().getHref().equalsIgnoreCase(CONFIDENTIAL_CODE)) { - return true; - } - } - return false; + private static boolean isNameValueEqualsIgnoreCase(NamedValue namedValue) { + return namedValue.getName().getHref().equalsIgnoreCase(METHOD_BASIS_CODE) + || namedValue.getName().getHref().equalsIgnoreCase(ACCIDENTIAL_QUANTITY) + || namedValue.getName().getHref().equalsIgnoreCase(MEDIUM_CODE); } - private boolean containsConfidentialIndicator(List> parameters) { - for (NamedValue namedValue : parameters) { - if (namedValue.getName().getHref().equalsIgnoreCase(CONFIDENTIAL_INDICATOR)) { - return true; - } - } - return false; - } +// private boolean containsConfidentialCode(List> parameters) { +// for (NamedValue namedValue : parameters) { +// if (namedValue.getName().getHref().equalsIgnoreCase(CONFIDENTIAL_CODE)) { +// return true; +// } +// } +// return false; +// } - private List mergeStreamingData(ObservationStream observationStream) throws OwsExceptionReport { +// private boolean containsConfidentialIndicator(List> parameters) { +// for (NamedValue namedValue : parameters) { +// if (namedValue.getName().getHref().equalsIgnoreCase(CONFIDENTIAL_INDICATOR)) { +// return true; +// } +// } +// return false; +// } + + List mergeStreamingData(ObservationStream observationStream) throws OwsExceptionReport { List processed = new LinkedList<>(); while (observationStream.hasNext()) { OmObservation observation = observationStream.next(); @@ -321,10 +328,11 @@ private List mergeStreamingData(ObservationStream observationStre return processed; } - private boolean checkForProcedure(OmObservation sosObservation) { - return POLLUTANT_RELEASE.equals(sosObservation.getObservationConstellation().getProcedureIdentifier()) + boolean checkForProcedure(OmObservation sosObservation) { + boolean isPollution = POLLUTANT_RELEASE.equals(sosObservation.getObservationConstellation().getProcedureIdentifier()) || POLLUTANT_TRANSFER.equals(sosObservation.getObservationConstellation().getProcedureIdentifier()) || WASTE_TRANSFER.equals(sosObservation.getObservationConstellation().getProcedureIdentifier()); + return isPollution; } private boolean checkForProcedure(OmObservation observation, OmObservation observationToAdd) { @@ -332,7 +340,7 @@ private boolean checkForProcedure(OmObservation observation, OmObservation obser .equals(observationToAdd.getObservationConstellation().getProcedure()); } - private OmObservation convertObservation(OmObservation sosObservation) throws OwsExceptionReport { + OmObservation convertObservation(OmObservation sosObservation) throws OwsExceptionReport { if (POLLUTANT_RELEASE.equals(sosObservation.getObservationConstellation().getProcedureIdentifier())) { SweDataArrayValue value = new SweDataArrayValue(); value.setValue(getPollutantReleaseArray(sosObservation.getValue().getValue().getUnit())); @@ -372,6 +380,7 @@ private OmObservation convertObservation(OmObservation sosObservation) throws Ow private List createPollutantReleaseBlock(OmObservation sosObservation) { List values = new LinkedList<>(); + AssessConfidential assessConfidential = new AssessConfidential(); values.add(getYear(sosObservation.getPhenomenonTime())); // MediumCode values.add(getMediumCode(sosObservation.getObservationConstellation())); @@ -382,7 +391,7 @@ private List createPollutantReleaseBlock(OmObservation sosObservation) { values.add(JavaHelper.asString(sosObservation.getValue().getValue().getValue())); values.add(getParameter(sosObservation.getParameterHolder(), ACCIDENTIAL_QUANTITY)); String confidentialCode = getParameter(sosObservation.getParameterHolder(), CONFIDENTIAL_CODE); - values.add(getConfidentialIndicator(confidentialCode, sosObservation.getParameterHolder())); + values.add(assessConfidential.getConfidentialIndicator(confidentialCode, sosObservation.getParameterHolder())); values.add(confidentialCode); values.add(getParameter(sosObservation.getParameterHolder(), REMARK_TEXT)); return values; @@ -420,13 +429,14 @@ private SweDataArray getPollutantReleaseArray(String unit) { private List createPollutantTransferBlock(OmObservation sosObservation) { List values = new LinkedList<>(); + AssessConfidential assessConfidential = new AssessConfidential(); values.add(getYear(sosObservation.getPhenomenonTime())); values.add(sosObservation.getObservationConstellation().getObservablePropertyIdentifier()); values.add(getParameter(sosObservation.getParameterHolder(), METHOD_BASIS_CODE)); values.add(getParameter(sosObservation.getParameterHolder(), METHOD_USED)); values.add(JavaHelper.asString(sosObservation.getValue().getValue().getValue())); String confidentialCode = getParameter(sosObservation.getParameterHolder(), CONFIDENTIAL_CODE); - values.add(getConfidentialIndicator(confidentialCode, sosObservation.getParameterHolder())); + values.add(assessConfidential.getConfidentialIndicator(confidentialCode, sosObservation.getParameterHolder())); values.add(confidentialCode); values.add(getParameter(sosObservation.getParameterHolder(), REMARK_TEXT)); return values; @@ -453,6 +463,7 @@ private SweDataArray getPollutantTransferArray(String unit) { private List createWasteTransferBlock(OmObservation sosObservation) throws OwsExceptionReport { List values = new LinkedList<>(); + AssessConfidential assessConfidential = new AssessConfidential(); values.add(getYear(sosObservation.getPhenomenonTime())); values.add(sosObservation.getObservationConstellation().getObservablePropertyIdentifier()); values.add(getWasteTreatmentCode(sosObservation.getObservationConstellation().getOfferings())); @@ -460,18 +471,18 @@ private List createWasteTransferBlock(OmObservation sosObservation) thro values.add(getParameter(sosObservation.getParameterHolder(), METHOD_BASIS_CODE)); values.add(getParameter(sosObservation.getParameterHolder(), METHOD_USED)); String confidentialCode = getParameter(sosObservation.getParameterHolder(), CONFIDENTIAL_CODE); - values.add(getConfidentialIndicator(confidentialCode, sosObservation.getParameterHolder())); + values.add(assessConfidential.getConfidentialIndicator(confidentialCode, sosObservation.getParameterHolder())); values.add(confidentialCode); values.add(getParameter(sosObservation.getParameterHolder(), REMARK_TEXT)); values.add(getWasteHandlerPartyParameter(sosObservation.getParameterHolder(), WASTE_HANDLER_PARTY)); return values; } - private String getConfidentialIndicator(String confidentialCode, ParameterHolder parameterHolder) { - String confidentialIndicator = getParameter(parameterHolder, CONFIDENTIAL_INDICATOR); - return confidentialIndicator != null && !confidentialIndicator.isEmpty() ? confidentialIndicator - : confidentialCode != null && !confidentialCode.isEmpty() ? "true" : "false"; - } +// private String getConfidentialIndicator(String confidentialCode, ParameterHolder parameterHolder) { +// String confidentialIndicator = getParameter(parameterHolder, CONFIDENTIAL_INDICATOR); +// return confidentialIndicator != null && !confidentialIndicator.isEmpty() ? confidentialIndicator +// : confidentialCode != null && !confidentialCode.isEmpty() ? "true" : "false"; +// } private SweDataArray getWasteTransferArray(String unit) { SweDataRecord record = new SweDataRecord(); @@ -530,7 +541,7 @@ private String getYear(Time phenomenonTime) { return Integer.toString(((TimeInstant) phenomenonTime).getValue().getYear()); } - private String getParameter(ParameterHolder holder, String name) { + String getParameter(ParameterHolder holder, String name) { Object parameterObject = getParameterObject(holder, name); return parameterObject != null ? parameterObject.toString() : ""; } @@ -587,7 +598,7 @@ private SweTextEncoding getEncoding() { return encoding; } - private void mergeValues(OmObservation combinedSosObs, OmObservation sosObservation) { + void mergeValues(OmObservation combinedSosObs, OmObservation sosObservation) { SweDataArray combinedValue = (SweDataArray) combinedSosObs.getValue().getValue().getValue(); SweDataArray value = (SweDataArray) sosObservation.getValue().getValue().getValue(); if (value.isSetValues()) { diff --git a/converter/eprtr/src/main/java/org/n52/sos/converter/MergeObservation.java b/converter/eprtr/src/main/java/org/n52/sos/converter/MergeObservation.java new file mode 100644 index 0000000000..27ea547ec4 --- /dev/null +++ b/converter/eprtr/src/main/java/org/n52/sos/converter/MergeObservation.java @@ -0,0 +1,56 @@ +package org.n52.sos.converter; + +import com.google.common.collect.Lists; +import org.n52.shetland.ogc.om.ObservationStream; +import org.n52.shetland.ogc.om.OmObservation; +import org.n52.shetland.ogc.ows.exception.OwsExceptionReport; +import org.n52.shetland.ogc.ows.service.OwsServiceResponse; +import org.n52.shetland.ogc.sos.response.GetObservationResponse; +import org.n52.shetland.util.CollectionHelper; + +import java.util.LinkedList; +import java.util.List; + +import static org.n52.sos.converter.EprtrConverter.INDICATOR; + +public class MergeObservation { + + EprtrConverter eprtrConverter = new EprtrConverter(); + OwsServiceResponse mergeObservations(GetObservationResponse response) throws OwsExceptionReport { + response.setObservationCollection( + ObservationStream.of(mergeObservations(eprtrConverter.mergeStreamingData(response.getObservationCollection())))); + eprtrConverter.checkObservationFeatures(response.getObservationCollection()); + return response; + } + + private List mergeObservations(List observations) throws OwsExceptionReport { + if (CollectionHelper.isNotEmpty(observations)) { + final List mergedObservations = new LinkedList(); + int obsIdCounter = 1; + for (final OmObservation sosObservation : observations) { + if (eprtrConverter.checkForProcedure(sosObservation)) { + if (mergedObservations.isEmpty()) { + if (!sosObservation.isSetGmlID()) { + sosObservation.setObservationID(Integer.toString(obsIdCounter++)); + } + mergedObservations.add(eprtrConverter.convertObservation(sosObservation)); + } else { + boolean combined = false; + for (final OmObservation combinedSosObs : mergedObservations) { + if (eprtrConverter.checkForMerge(combinedSosObs, sosObservation, INDICATOR)) { + eprtrConverter.mergeValues(combinedSosObs, eprtrConverter.convertObservation(sosObservation)); + combined = true; + break; + } + } + if (!combined) { + mergedObservations.add(eprtrConverter.convertObservation(sosObservation)); + } + } + } + } + return mergedObservations; + } + return Lists.newArrayList(observations); + } +} diff --git a/core/api/pom.xml b/core/api/pom.xml index bfb47be3b2..6ab738a889 100644 --- a/core/api/pom.xml +++ b/core/api/pom.xml @@ -178,6 +178,10 @@ hamcrest test + + org.n52.sensorweb-server.db-model + db-model-entities + diff --git a/core/api/src/main/java/org/n52/sos/request/operator/AbstractRequestOperator.java b/core/api/src/main/java/org/n52/sos/request/operator/AbstractRequestOperator.java index 3320a34060..a7bddace1c 100644 --- a/core/api/src/main/java/org/n52/sos/request/operator/AbstractRequestOperator.java +++ b/core/api/src/main/java/org/n52/sos/request/operator/AbstractRequestOperator.java @@ -379,7 +379,7 @@ public OwsServiceResponse receiveRequest(OwsServiceRequest abstractRequest) thro preProcessRequest(request); checkForModifierAndProcess(request); checkParameters(request); - A response = receive(request); + A response = receiveSensorDescription(request); this.serviceEventBus.submit(new ResponseEvent(response)); postProcessResponse(response); return checkForModifierAndProcess(request, response); @@ -461,7 +461,7 @@ private OwsServiceResponse checkForModifierAndProcess(OwsServiceRequest request, return response; } - protected abstract A receive(Q request) throws OwsExceptionReport; + protected abstract A receiveSensorDescription(Q request) throws OwsExceptionReport; protected abstract void checkParameters(Q request) throws OwsExceptionReport; diff --git a/core/api/src/main/java/org/n52/sos/request/operator/BatchRequestOperator.java b/core/api/src/main/java/org/n52/sos/request/operator/BatchRequestOperator.java index 519f4e2b9d..631c746f88 100644 --- a/core/api/src/main/java/org/n52/sos/request/operator/BatchRequestOperator.java +++ b/core/api/src/main/java/org/n52/sos/request/operator/BatchRequestOperator.java @@ -54,7 +54,7 @@ public BatchRequestOperator() { } @Override - protected BatchResponse receive(BatchRequest request) throws OwsExceptionReport { + protected BatchResponse receiveSensorDescription(BatchRequest request) throws OwsExceptionReport { for (OwsServiceRequest r : request) { r.setRequestContext(request.getRequestContext()); } diff --git a/core/api/src/main/java/org/n52/sos/util/GeometryHandler.java b/core/api/src/main/java/org/n52/sos/util/GeometryHandler.java index 220c0ec54b..59b13a4c7e 100644 --- a/core/api/src/main/java/org/n52/sos/util/GeometryHandler.java +++ b/core/api/src/main/java/org/n52/sos/util/GeometryHandler.java @@ -44,6 +44,7 @@ import org.geotools.util.factory.Hints; import org.locationtech.jts.geom.Envelope; import org.locationtech.jts.geom.Geometry; +import org.locationtech.jts.io.ParseException; import org.n52.faroe.ConfigurationError; import org.n52.faroe.Validation; import org.n52.faroe.annotation.Configurable; @@ -51,6 +52,7 @@ import org.n52.iceland.util.Range; import org.n52.janmayen.lifecycle.Constructable; import org.n52.janmayen.lifecycle.Destroyable; +import org.n52.series.db.beans.HibernateRelations; import org.n52.shetland.ogc.filter.SpatialFilter; import org.n52.shetland.ogc.ows.exception.CodedException; import org.n52.shetland.ogc.ows.exception.InvalidParameterValueException; @@ -551,8 +553,8 @@ public Geometry getFilterForNonSpatialDatasource(SpatialFilter filter) throws Ow return switchCoordinateAxisFromToDatasourceIfNeeded(filter.getGeometry()); default: throw new InvalidParameterValueException("spatialFilter", filter.getOperator().name()); - // Sos2Constants.GetObservationParams.spatialFilter = - // "spatialFilter" + // Sos2Constants.GetObservationParams.spatialFilter = + // "spatialFilter" } } @@ -694,7 +696,7 @@ public Geometry transform(Geometry geometry, int targetSRID) throws OwsException * If an error occurs */ private Geometry transform(final Geometry geometry, final int targetSRID, - final CoordinateReferenceSystem sourceCRS, final CoordinateReferenceSystem targetCRS) + final CoordinateReferenceSystem sourceCRS, final CoordinateReferenceSystem targetCRS) throws OwsExceptionReport { if (sourceCRS.equals(targetCRS)) { return geometry; @@ -844,4 +846,28 @@ private ConfigurationError createException(String entry, Throwable ex) { FeatureQuerySettingsProvider.EPSG_CODES_WITH_NORTHING_FIRST, entry), ex); } + public Geometry createGeometry(final HibernateRelations.HasCoordinate coodinates) + throws OwsExceptionReport { + if (coodinates.isSetLongLat()) { + int epsg = getStorageEPSG(); + if (coodinates.isSetSrid()) { + epsg = coodinates.getSrid(); + } + final String wktString = getWktString(coodinates.getLon(), coodinates.getLat(), epsg); + Geometry geom; + try { + geom = JTSHelper.createGeometryFromWKT(wktString, epsg); + } catch (ParseException e) { + throw new NoApplicableCodeException().causedBy(e); + } + if (coodinates.isSetAlt()) { + geom.getCoordinate().z = JavaHelper.asDouble(coodinates.getAlt()); + if (geom.getSRID() == getStorage3DEPSG()) { + geom.setSRID(getStorage3DEPSG()); + } + } + return geom; + } + return null; + } } diff --git a/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/util/HibernateGeometryCreator.java b/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/util/HibernateGeometryCreator.java index c422ebf6fd..97571b3c98 100644 --- a/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/util/HibernateGeometryCreator.java +++ b/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/util/HibernateGeometryCreator.java @@ -27,43 +27,9 @@ */ package org.n52.sos.ds.hibernate.util; -import org.locationtech.jts.geom.Geometry; -import org.locationtech.jts.io.ParseException; -import org.n52.series.db.beans.HibernateRelations.HasCoordinate; -import org.n52.shetland.ogc.ows.exception.NoApplicableCodeException; -import org.n52.shetland.ogc.ows.exception.OwsExceptionReport; -import org.n52.shetland.util.JTSHelper; -import org.n52.shetland.util.JavaHelper; -import org.n52.sos.util.GeometryHandler; - public class HibernateGeometryCreator { public HibernateGeometryCreator() { } - public Geometry createGeometry(final HasCoordinate coodinates, GeometryHandler geometryHandler) - throws OwsExceptionReport { - if (coodinates.isSetLongLat()) { - int epsg = geometryHandler.getStorageEPSG(); - if (coodinates.isSetSrid()) { - epsg = coodinates.getSrid(); - } - final String wktString = geometryHandler.getWktString(coodinates.getLon(), coodinates.getLat(), epsg); - Geometry geom; - try { - geom = JTSHelper.createGeometryFromWKT(wktString, epsg); - } catch (ParseException e) { - throw new NoApplicableCodeException().causedBy(e); - } - if (coodinates.isSetAlt()) { - geom.getCoordinate().z = JavaHelper.asDouble(coodinates.getAlt()); - if (geom.getSRID() == geometryHandler.getStorage3DEPSG()) { - geom.setSRID(geometryHandler.getStorage3DEPSG()); - } - } - return geom; - } - return null; - } - } diff --git a/operations/aqd-v10/src/main/java/org/n52/sos/request/operator/AqdDescribeSensorOperatorV10.java b/operations/aqd-v10/src/main/java/org/n52/sos/request/operator/AqdDescribeSensorOperatorV10.java index b9c654175b..acbfe104ab 100644 --- a/operations/aqd-v10/src/main/java/org/n52/sos/request/operator/AqdDescribeSensorOperatorV10.java +++ b/operations/aqd-v10/src/main/java/org/n52/sos/request/operator/AqdDescribeSensorOperatorV10.java @@ -46,7 +46,7 @@ public AqdDescribeSensorOperatorV10() { } @Override - public DescribeSensorResponse receive(DescribeSensorRequest request) throws OwsExceptionReport { + public DescribeSensorResponse receiveSensorDescription(DescribeSensorRequest request) throws OwsExceptionReport { return (DescribeSensorResponse) changeResponseServiceVersion(getOperationHandler() .getSensorDescription((DescribeSensorRequest) changeRequestServiceVersion(request))); } diff --git a/operations/aqd-v10/src/main/java/org/n52/sos/request/operator/AqdGetCapabilitiesOperatorV10.java b/operations/aqd-v10/src/main/java/org/n52/sos/request/operator/AqdGetCapabilitiesOperatorV10.java index ed6db2039b..f58103a041 100644 --- a/operations/aqd-v10/src/main/java/org/n52/sos/request/operator/AqdGetCapabilitiesOperatorV10.java +++ b/operations/aqd-v10/src/main/java/org/n52/sos/request/operator/AqdGetCapabilitiesOperatorV10.java @@ -67,7 +67,7 @@ public AqdGetCapabilitiesOperatorV10() { } @Override - public GetCapabilitiesResponse receive(GetCapabilitiesRequest request) throws OwsExceptionReport { + public GetCapabilitiesResponse receiveSensorDescription(GetCapabilitiesRequest request) throws OwsExceptionReport { return modifyCapabilities((GetCapabilitiesResponse) changeResponseServiceVersion( getOperationHandler().getCapabilities((GetCapabilitiesRequest) changeRequestServiceVersion(request)))); } diff --git a/operations/aqd-v10/src/main/java/org/n52/sos/request/operator/AqdGetObservationOperatorV10.java b/operations/aqd-v10/src/main/java/org/n52/sos/request/operator/AqdGetObservationOperatorV10.java index 8ba75ad82b..47298b777b 100644 --- a/operations/aqd-v10/src/main/java/org/n52/sos/request/operator/AqdGetObservationOperatorV10.java +++ b/operations/aqd-v10/src/main/java/org/n52/sos/request/operator/AqdGetObservationOperatorV10.java @@ -79,7 +79,7 @@ public AqdGetObservationOperatorV10() { } @Override - public GetObservationResponse receive(GetObservationRequest request) throws OwsExceptionReport { + public GetObservationResponse receiveSensorDescription(GetObservationRequest request) throws OwsExceptionReport { ReportObligationType flow = ReportObligations.getFlow(request.getExtensions()); checkReportingHeader(flow); checkRequestForFlowAndTemporalFilter(request, flow); diff --git a/operations/core-v100/src/main/java/org/n52/sos/request/operator/SosDescribeSensorOperatorV100.java b/operations/core-v100/src/main/java/org/n52/sos/request/operator/SosDescribeSensorOperatorV100.java index fede09261b..c7e841bdaa 100644 --- a/operations/core-v100/src/main/java/org/n52/sos/request/operator/SosDescribeSensorOperatorV100.java +++ b/operations/core-v100/src/main/java/org/n52/sos/request/operator/SosDescribeSensorOperatorV100.java @@ -67,7 +67,7 @@ public Set getConformanceClasses(String service, String version) { } @Override - public DescribeSensorResponse receive(DescribeSensorRequest sosRequest) throws OwsExceptionReport { + public DescribeSensorResponse receiveSensorDescription(DescribeSensorRequest sosRequest) throws OwsExceptionReport { DescribeSensorResponse response = getOperationHandler().getSensorDescription(sosRequest); response.setOutputFormat(MediaType.normalizeString(sosRequest.getProcedureDescriptionFormat())); return response; diff --git a/operations/core-v100/src/main/java/org/n52/sos/request/operator/SosGetCapabilitiesOperatorV100.java b/operations/core-v100/src/main/java/org/n52/sos/request/operator/SosGetCapabilitiesOperatorV100.java index 5db0b571d2..013cbb613c 100644 --- a/operations/core-v100/src/main/java/org/n52/sos/request/operator/SosGetCapabilitiesOperatorV100.java +++ b/operations/core-v100/src/main/java/org/n52/sos/request/operator/SosGetCapabilitiesOperatorV100.java @@ -62,7 +62,7 @@ public Set getConformanceClasses(String service, String version) { } @Override - public GetCapabilitiesResponse receive(GetCapabilitiesRequest sosRequest) throws OwsExceptionReport { + public GetCapabilitiesResponse receiveSensorDescription(GetCapabilitiesRequest sosRequest) throws OwsExceptionReport { return getOperationHandler().getCapabilities(sosRequest); } diff --git a/operations/core-v100/src/main/java/org/n52/sos/request/operator/SosGetFeatureOfInterestOperatorV100.java b/operations/core-v100/src/main/java/org/n52/sos/request/operator/SosGetFeatureOfInterestOperatorV100.java index be38fcda1d..1953d2885c 100644 --- a/operations/core-v100/src/main/java/org/n52/sos/request/operator/SosGetFeatureOfInterestOperatorV100.java +++ b/operations/core-v100/src/main/java/org/n52/sos/request/operator/SosGetFeatureOfInterestOperatorV100.java @@ -82,7 +82,7 @@ public Set getConformanceClasses(String service, String version) { } @Override - protected GetFeatureOfInterestResponse receive(GetFeatureOfInterestRequest request) throws OwsExceptionReport { + protected GetFeatureOfInterestResponse receiveSensorDescription(GetFeatureOfInterestRequest request) throws OwsExceptionReport { return getOperationHandler().getFeatureOfInterest(request); } } diff --git a/operations/core-v100/src/main/java/org/n52/sos/request/operator/SosGetObservationByIdOperatorV100.java b/operations/core-v100/src/main/java/org/n52/sos/request/operator/SosGetObservationByIdOperatorV100.java index aee8aeb73a..aab29ef3e6 100644 --- a/operations/core-v100/src/main/java/org/n52/sos/request/operator/SosGetObservationByIdOperatorV100.java +++ b/operations/core-v100/src/main/java/org/n52/sos/request/operator/SosGetObservationByIdOperatorV100.java @@ -104,7 +104,7 @@ public Set getConformanceClasses(String service, String version) { } @Override - protected GetObservationByIdResponse receive(GetObservationByIdRequest sosRequest) throws OwsExceptionReport { + protected GetObservationByIdResponse receiveSensorDescription(GetObservationByIdRequest sosRequest) throws OwsExceptionReport { GetObservationByIdResponse sosResponse = getOperationHandler().getObservationById(sosRequest); setObservationResponseResponseFormatAndContentType(sosRequest, sosResponse); return sosResponse; diff --git a/operations/core-v100/src/main/java/org/n52/sos/request/operator/SosGetObservationOperatorV100.java b/operations/core-v100/src/main/java/org/n52/sos/request/operator/SosGetObservationOperatorV100.java index 2ac94055b8..943999a194 100644 --- a/operations/core-v100/src/main/java/org/n52/sos/request/operator/SosGetObservationOperatorV100.java +++ b/operations/core-v100/src/main/java/org/n52/sos/request/operator/SosGetObservationOperatorV100.java @@ -92,7 +92,7 @@ public Set getConformanceClasses(String service, String version) { } @Override - public GetObservationResponse receive(GetObservationRequest sosRequest) throws OwsExceptionReport { + public GetObservationResponse receiveSensorDescription(GetObservationRequest sosRequest) throws OwsExceptionReport { GetObservationResponse sosResponse = getOperationHandler().getObservation(sosRequest); if (sosRequest.isSetResponseFormat()) { setObservationResponseResponseFormatAndContentType(sosRequest, sosResponse); diff --git a/operations/core-v20/src/main/java/org/n52/sos/request/operator/SosDescribeSensorOperatorV20.java b/operations/core-v20/src/main/java/org/n52/sos/request/operator/SosDescribeSensorOperatorV20.java index 7e92ff8a3a..2fdbb40402 100644 --- a/operations/core-v20/src/main/java/org/n52/sos/request/operator/SosDescribeSensorOperatorV20.java +++ b/operations/core-v20/src/main/java/org/n52/sos/request/operator/SosDescribeSensorOperatorV20.java @@ -152,7 +152,7 @@ public Set getConformanceClasses(String service, String version) { } @Override - public DescribeSensorResponse receive(DescribeSensorRequest request) throws OwsExceptionReport { + public DescribeSensorResponse receiveSensorDescription(DescribeSensorRequest request) throws OwsExceptionReport { return getOperationHandler().getSensorDescription(request); // TODO check if sensor description position/location/observedArea // should be transformed (CRS support) diff --git a/operations/core-v20/src/main/java/org/n52/sos/request/operator/SosGetCapabilitiesOperatorV20.java b/operations/core-v20/src/main/java/org/n52/sos/request/operator/SosGetCapabilitiesOperatorV20.java index c1f7e2bf9b..067d08ce63 100644 --- a/operations/core-v20/src/main/java/org/n52/sos/request/operator/SosGetCapabilitiesOperatorV20.java +++ b/operations/core-v20/src/main/java/org/n52/sos/request/operator/SosGetCapabilitiesOperatorV20.java @@ -65,7 +65,7 @@ public Set getConformanceClasses(String service, String version) { } @Override - public GetCapabilitiesResponse receive(GetCapabilitiesRequest request) throws OwsExceptionReport { + public GetCapabilitiesResponse receiveSensorDescription(GetCapabilitiesRequest request) throws OwsExceptionReport { return getOperationHandler().getCapabilities(request); } diff --git a/operations/core-v20/src/main/java/org/n52/sos/request/operator/SosGetObservationOperatorV20.java b/operations/core-v20/src/main/java/org/n52/sos/request/operator/SosGetObservationOperatorV20.java index 1ecc206142..b401ebad12 100644 --- a/operations/core-v20/src/main/java/org/n52/sos/request/operator/SosGetObservationOperatorV20.java +++ b/operations/core-v20/src/main/java/org/n52/sos/request/operator/SosGetObservationOperatorV20.java @@ -99,7 +99,7 @@ public Set getConformanceClasses(String service, String version) { } @Override - public GetObservationResponse receive(GetObservationRequest request) throws OwsExceptionReport { + public GetObservationResponse receiveSensorDescription(GetObservationRequest request) throws OwsExceptionReport { final GetObservationResponse sosResponse = getOperationHandler().getObservation(request); setObservationResponseResponseFormatAndContentType(request, sosResponse); return sosResponse; diff --git a/operations/enhanced-v20/src/main/java/org/n52/sos/request/operator/SosGetFeatureOfInterestOperatorV20.java b/operations/enhanced-v20/src/main/java/org/n52/sos/request/operator/SosGetFeatureOfInterestOperatorV20.java index eb21ebb079..ffbe02da7c 100644 --- a/operations/enhanced-v20/src/main/java/org/n52/sos/request/operator/SosGetFeatureOfInterestOperatorV20.java +++ b/operations/enhanced-v20/src/main/java/org/n52/sos/request/operator/SosGetFeatureOfInterestOperatorV20.java @@ -69,7 +69,7 @@ public Set getConformanceClasses(String service, String version) { } @Override - public GetFeatureOfInterestResponse receive(GetFeatureOfInterestRequest request) throws OwsExceptionReport { + public GetFeatureOfInterestResponse receiveSensorDescription(GetFeatureOfInterestRequest request) throws OwsExceptionReport { return getOperationHandler().getFeatureOfInterest(request); } diff --git a/operations/enhanced-v20/src/main/java/org/n52/sos/request/operator/SosGetObservationByIdOperatorV20.java b/operations/enhanced-v20/src/main/java/org/n52/sos/request/operator/SosGetObservationByIdOperatorV20.java index e4b25a99c9..f35ea9f6ac 100644 --- a/operations/enhanced-v20/src/main/java/org/n52/sos/request/operator/SosGetObservationByIdOperatorV20.java +++ b/operations/enhanced-v20/src/main/java/org/n52/sos/request/operator/SosGetObservationByIdOperatorV20.java @@ -67,7 +67,7 @@ public Set getConformanceClasses(String service, String version) { } @Override - public GetObservationByIdResponse receive(GetObservationByIdRequest sosRequest) throws OwsExceptionReport { + public GetObservationByIdResponse receiveSensorDescription(GetObservationByIdRequest sosRequest) throws OwsExceptionReport { if (!sosRequest.isSetResponseFormat()) { sosRequest.setResponseFormat(getActiveProfile().getObservationResponseFormat()); } diff --git a/operations/extensions-v20/src/main/java/org/n52/sos/request/operator/DeleteObservationRequestOperator.java b/operations/extensions-v20/src/main/java/org/n52/sos/request/operator/DeleteObservationRequestOperator.java index 8c8367d850..383760b922 100644 --- a/operations/extensions-v20/src/main/java/org/n52/sos/request/operator/DeleteObservationRequestOperator.java +++ b/operations/extensions-v20/src/main/java/org/n52/sos/request/operator/DeleteObservationRequestOperator.java @@ -60,7 +60,7 @@ public DeleteObservationRequestOperator() { } @Override - public DeleteObservationResponse receive(DeleteObservationRequest request) throws OwsExceptionReport { + public DeleteObservationResponse receiveSensorDescription(DeleteObservationRequest request) throws OwsExceptionReport { DeleteObservationResponse response = getOperationHandler().deleteObservation(request); return response; } @@ -133,19 +133,19 @@ protected void checkParameters(DeleteObservationRequest sosRequest) throws OwsEx */ private void checkOfferingId(final Set offeringIds) throws OwsExceptionReport { if (offeringIds != null) { - final Set offerings = getCache().getOfferings(); + final Set stringSet = getCache().getOfferings(); final CompositeOwsException exceptions = new CompositeOwsException(); for (final String offeringId : offeringIds) { if (offeringId == null || offeringId.isEmpty()) { exceptions.add(new MissingOfferingParameterException()); } else if (offeringId.contains(SosConstants.SEPARATOR_4_OFFERINGS)) { final String[] offArray = offeringId.split(SosConstants.SEPARATOR_4_OFFERINGS); - if (!offerings.contains(offArray[0]) + if (!stringSet.contains(offArray[0]) || !getCache().getProceduresForOffering(offArray[0]).contains(offArray[1])) { exceptions.add(new InvalidOfferingParameterException(offeringId)); } - } else if (!offerings.contains(offeringId)) { + } else if (!stringSet.contains(offeringId)) { exceptions.add(new InvalidOfferingParameterException(offeringId)); } } diff --git a/operations/extensions-v20/src/main/java/org/n52/sos/request/operator/DeleteResultTemplateOperator.java b/operations/extensions-v20/src/main/java/org/n52/sos/request/operator/DeleteResultTemplateOperator.java index f6e01407c5..1f66a39337 100644 --- a/operations/extensions-v20/src/main/java/org/n52/sos/request/operator/DeleteResultTemplateOperator.java +++ b/operations/extensions-v20/src/main/java/org/n52/sos/request/operator/DeleteResultTemplateOperator.java @@ -64,7 +64,7 @@ public DeleteResultTemplateOperator() { } @Override - public DeleteResultTemplateResponse receive(DeleteResultTemplateRequest request) throws OwsExceptionReport { + public DeleteResultTemplateResponse receiveSensorDescription(DeleteResultTemplateRequest request) throws OwsExceptionReport { DeleteResultTemplateResponse response = getOperationHandler().deleteResultTemplates(request); getServiceEventBus().submit(new ResultTemplatesDeletion(request, response)); return response; diff --git a/operations/extensions-v20/src/main/java/org/n52/sos/request/operator/GetDataAvailabilityOperator.java b/operations/extensions-v20/src/main/java/org/n52/sos/request/operator/GetDataAvailabilityOperator.java index e3866224c1..48b2b0ce3b 100644 --- a/operations/extensions-v20/src/main/java/org/n52/sos/request/operator/GetDataAvailabilityOperator.java +++ b/operations/extensions-v20/src/main/java/org/n52/sos/request/operator/GetDataAvailabilityOperator.java @@ -101,7 +101,7 @@ public Set getConformanceClasses(String service, String version) { } @Override - public GetDataAvailabilityResponse receive(GetDataAvailabilityRequest sosRequest) throws OwsExceptionReport { + public GetDataAvailabilityResponse receiveSensorDescription(GetDataAvailabilityRequest sosRequest) throws OwsExceptionReport { return getOperationHandler().getDataAvailability(sosRequest); } diff --git a/operations/extensions-v20/src/main/java/org/n52/sos/request/operator/InsertFeatureOfInterestOperator.java b/operations/extensions-v20/src/main/java/org/n52/sos/request/operator/InsertFeatureOfInterestOperator.java index 2bfca50d46..d972d067cc 100644 --- a/operations/extensions-v20/src/main/java/org/n52/sos/request/operator/InsertFeatureOfInterestOperator.java +++ b/operations/extensions-v20/src/main/java/org/n52/sos/request/operator/InsertFeatureOfInterestOperator.java @@ -89,7 +89,7 @@ public InsertFeatureOfInterestOperator() { } @Override - public InsertFeatureOfInterestResponse receive(InsertFeatureOfInterestRequest request) throws OwsExceptionReport { + public InsertFeatureOfInterestResponse receiveSensorDescription(InsertFeatureOfInterestRequest request) throws OwsExceptionReport { InsertFeatureOfInterestResponse response = getOperationHandler().insertFeatureOfInterest(request); getServiceEventBus().submit(new FeatureInsertion(request, response)); return response; diff --git a/operations/resultHandling-v20/src/main/java/org/n52/sos/request/operator/SosGetResultOperatorV20.java b/operations/resultHandling-v20/src/main/java/org/n52/sos/request/operator/SosGetResultOperatorV20.java index cf62742746..bd8302baba 100644 --- a/operations/resultHandling-v20/src/main/java/org/n52/sos/request/operator/SosGetResultOperatorV20.java +++ b/operations/resultHandling-v20/src/main/java/org/n52/sos/request/operator/SosGetResultOperatorV20.java @@ -63,7 +63,7 @@ public Set getConformanceClasses(String service, String version) { } @Override - public GetResultResponse receive(GetResultRequest request) throws OwsExceptionReport { + public GetResultResponse receiveSensorDescription(GetResultRequest request) throws OwsExceptionReport { return getOperationHandler().getResult(request); } diff --git a/operations/resultHandling-v20/src/main/java/org/n52/sos/request/operator/SosGetResultTemplateOperatorV20.java b/operations/resultHandling-v20/src/main/java/org/n52/sos/request/operator/SosGetResultTemplateOperatorV20.java index d853ea2506..5ec88ef2bc 100644 --- a/operations/resultHandling-v20/src/main/java/org/n52/sos/request/operator/SosGetResultTemplateOperatorV20.java +++ b/operations/resultHandling-v20/src/main/java/org/n52/sos/request/operator/SosGetResultTemplateOperatorV20.java @@ -69,7 +69,7 @@ public Set getConformanceClasses(String service, String version) { } @Override - public GetResultTemplateResponse receive(GetResultTemplateRequest request) throws OwsExceptionReport { + public GetResultTemplateResponse receiveSensorDescription(GetResultTemplateRequest request) throws OwsExceptionReport { return getOperationHandler().getResultTemplate(request); } diff --git a/operations/resultHandling-v20/src/main/java/org/n52/sos/request/operator/SosInsertResultOperatorV20.java b/operations/resultHandling-v20/src/main/java/org/n52/sos/request/operator/SosInsertResultOperatorV20.java index 1b24a39fe8..cb70732635 100644 --- a/operations/resultHandling-v20/src/main/java/org/n52/sos/request/operator/SosInsertResultOperatorV20.java +++ b/operations/resultHandling-v20/src/main/java/org/n52/sos/request/operator/SosInsertResultOperatorV20.java @@ -70,7 +70,7 @@ public Set getConformanceClasses(String service, String version) { } @Override - public InsertResultResponse receive(InsertResultRequest request) throws OwsExceptionReport { + public InsertResultResponse receiveSensorDescription(InsertResultRequest request) throws OwsExceptionReport { InsertResultResponse response = getOperationHandler().insertResult(request); getServiceEventBus().submit(new ResultInsertion(request, response)); return response; diff --git a/operations/resultHandling-v20/src/main/java/org/n52/sos/request/operator/SosInsertResultTemplateOperatorV20.java b/operations/resultHandling-v20/src/main/java/org/n52/sos/request/operator/SosInsertResultTemplateOperatorV20.java index a2fd88987a..745c020770 100644 --- a/operations/resultHandling-v20/src/main/java/org/n52/sos/request/operator/SosInsertResultTemplateOperatorV20.java +++ b/operations/resultHandling-v20/src/main/java/org/n52/sos/request/operator/SosInsertResultTemplateOperatorV20.java @@ -93,7 +93,7 @@ public Set getConformanceClasses(String service, String version) { } @Override - public InsertResultTemplateResponse receive(InsertResultTemplateRequest request) throws OwsExceptionReport { + public InsertResultTemplateResponse receiveSensorDescription(InsertResultTemplateRequest request) throws OwsExceptionReport { InsertResultTemplateResponse response = getOperationHandler().insertResultTemplate(request); getServiceEventBus().submit(new ResultTemplateInsertion(request, response)); return response; diff --git a/operations/transactional-v20/src/main/java/org/n52/sos/request/operator/SosDeleteSensorOperatorV20.java b/operations/transactional-v20/src/main/java/org/n52/sos/request/operator/SosDeleteSensorOperatorV20.java index 1187f0bf98..54b4bcabdc 100644 --- a/operations/transactional-v20/src/main/java/org/n52/sos/request/operator/SosDeleteSensorOperatorV20.java +++ b/operations/transactional-v20/src/main/java/org/n52/sos/request/operator/SosDeleteSensorOperatorV20.java @@ -71,7 +71,7 @@ public Set getConformanceClasses(String service, String version) { } @Override - public DeleteSensorResponse receive(DeleteSensorRequest request) throws OwsExceptionReport { + public DeleteSensorResponse receiveSensorDescription(DeleteSensorRequest request) throws OwsExceptionReport { DeleteSensorResponse response = getOperationHandler().deleteSensor(request); getServiceEventBus().submit(new SensorDeletion(request, response)); return response; diff --git a/operations/transactional-v20/src/main/java/org/n52/sos/request/operator/SosInsertObservationOperatorV20.java b/operations/transactional-v20/src/main/java/org/n52/sos/request/operator/SosInsertObservationOperatorV20.java index 90d80d1ffc..fb1f8ce4fa 100644 --- a/operations/transactional-v20/src/main/java/org/n52/sos/request/operator/SosInsertObservationOperatorV20.java +++ b/operations/transactional-v20/src/main/java/org/n52/sos/request/operator/SosInsertObservationOperatorV20.java @@ -83,7 +83,7 @@ public Set getConformanceClasses(String service, String version) { } @Override - public InsertObservationResponse receive(final InsertObservationRequest request) throws OwsExceptionReport { + public InsertObservationResponse receiveSensorDescription(final InsertObservationRequest request) throws OwsExceptionReport { InsertObservationResponse response = getOperationHandler().insertObservation(request); getServiceEventBus().submit(new ObservationInsertion(request, response)); return response; diff --git a/operations/transactional-v20/src/main/java/org/n52/sos/request/operator/SosInsertSensorOperatorV20.java b/operations/transactional-v20/src/main/java/org/n52/sos/request/operator/SosInsertSensorOperatorV20.java index 83b28b5561..da57dc0c04 100644 --- a/operations/transactional-v20/src/main/java/org/n52/sos/request/operator/SosInsertSensorOperatorV20.java +++ b/operations/transactional-v20/src/main/java/org/n52/sos/request/operator/SosInsertSensorOperatorV20.java @@ -116,7 +116,7 @@ public Metadata getSosOperationDefinition() { } @Override - public InsertSensorResponse receive(InsertSensorRequest request) throws OwsExceptionReport { + public InsertSensorResponse receiveSensorDescription(InsertSensorRequest request) throws OwsExceptionReport { InsertSensorResponse response = getOperationHandler().insertSensor(request); getServiceEventBus().submit(new SensorInsertion(request, response)); return response; diff --git a/operations/transactional-v20/src/main/java/org/n52/sos/request/operator/SosUpdateSensorDescriptionOperatorV20.java b/operations/transactional-v20/src/main/java/org/n52/sos/request/operator/SosUpdateSensorDescriptionOperatorV20.java index 71827a3538..49d18ecb8f 100644 --- a/operations/transactional-v20/src/main/java/org/n52/sos/request/operator/SosUpdateSensorDescriptionOperatorV20.java +++ b/operations/transactional-v20/src/main/java/org/n52/sos/request/operator/SosUpdateSensorDescriptionOperatorV20.java @@ -70,7 +70,7 @@ public Set getConformanceClasses(String service, String version) { } @Override - public UpdateSensorResponse receive(UpdateSensorRequest request) throws OwsExceptionReport { + public UpdateSensorResponse receiveSensorDescription(UpdateSensorRequest request) throws OwsExceptionReport { UpdateSensorResponse response = getOperationHandler().updateSensorDescription(request); getServiceEventBus().submit(new SensorModification(request, response)); return response; diff --git a/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1.info b/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1.info new file mode 100644 index 0000000000..d0dbdbd002 --- /dev/null +++ b/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1.info @@ -0,0 +1,3 @@ +1679409775581 +WEB-INF/classes(?:$|/.+) +WEB-INF/(?:[^/]+/)*?[^/]*?\.xml, WEB-INF/(?:[^/]+/)*?series-hibernate\.cfg\.xml, WEB-INF/classes/application\.properties \ No newline at end of file diff --git a/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/config-extension-resultTime.json b/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/config-extension-resultTime.json new file mode 100644 index 0000000000..bc47a11694 --- /dev/null +++ b/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/config-extension-resultTime.json @@ -0,0 +1,3 @@ +[ + "1" +] \ No newline at end of file diff --git a/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/config-general.json b/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/config-general.json new file mode 100644 index 0000000000..76d891ff81 --- /dev/null +++ b/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/config-general.json @@ -0,0 +1,18 @@ +{ + "timeformat": "YYYY-MM-dd, HH:mm", + "generalizing_algorithm": "lttb", + "noDataGapThreshold": 5, + "outputTimezone" : "UTC", + "expandWithNextValuesBeyondInterval": true, + "cache" : { + "stations": 1440, + "categories": 1440, + "features": 1440, + "offerings": 1440, + "phenomena": 1440, + "procedures": 1440, + "services": 1440, + "datasets": 2, + "data": 0 + } +} \ No newline at end of file diff --git a/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/config-license.txt b/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/config-license.txt new file mode 100644 index 0000000000..4a46b9ea23 --- /dev/null +++ b/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/config-license.txt @@ -0,0 +1 @@ +http://special-licensing.lic/ \ No newline at end of file diff --git a/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/config-rendering-hints.json b/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/config-rendering-hints.json new file mode 100644 index 0000000000..df4b1628c8 --- /dev/null +++ b/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/config-rendering-hints.json @@ -0,0 +1,27 @@ + +{ + "phenomenonStyles": { + "60000": { + "style": { + "chartType": "line", + "properties": { + "interval": "byHour", + "width": 2, + "color": "#0000ff" + } + } + } + }, + "datasetStyles": { + "70000": { + "style": { + "chartType": "bar", + "properties": { + "interval": "byDay", + "width": 0.8, + "color": "#ff00ff" + } + } + } + } +} \ No newline at end of file diff --git a/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/config-status-intervals.json b/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/config-status-intervals.json new file mode 100644 index 0000000000..3d87fc318e --- /dev/null +++ b/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/config-status-intervals.json @@ -0,0 +1,33 @@ +{ + "phenomenonIntervals": { + "60000": { + "statusIntervals": { + "50 - 100 Percent": { + "upper": 100.0, + "lower": 90.0, + "color": "#0000FF" + }, + "0 - 49 Percent": { + "upper": 10.0, + "lower": 0.0, + "color": "#FF0000" + } + } + } + }, + "datasetIntervals": { + "70000": { + "statusIntervals": { + "over 20": { + "lower": 20.0, + "color": "#FF0000" + }, + "0 - 10": { + "upper": 5.0, + "lower": 0.0, + "color": "#0000FF" + } + } + } + } +} diff --git a/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/config-task-prerendering.json b/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/config-task-prerendering.json new file mode 100644 index 0000000000..3c655ea3e7 --- /dev/null +++ b/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/config-task-prerendering.json @@ -0,0 +1,68 @@ +{ + "generalConfig": { + "outputPath": "/tmp/generated/prerendered", + "width": "800", + "height": "500", + "language": "de", + "grid": true, + "generalize": false + }, + "phenomenonStyles": [ + { + "id": "70000", + "title": "Dataset 7 from phenomenonStyles config (without legend)", + "chartQualifier": "phenomenonStyles_without_legend", + "interval": [ + "lastWeek", + "lastMonth" + ], + "style": { + "chartType": "line", + "properties": { + "color": "#00ffff", + "lineType": "solid", + "width": 2 + } + } + }, + { + "id": "70000", + "title": "Dataset 7 from phenomenonStyles config (with legend)", + "chartQualifier": "phenomenonStyles_with_legend", + "interval": [ + "lastWeek", + "lastMonth" + ], + "config": { + "legend": true + }, + "style": { + "chartType": "line", + "properties": { + "color": "#00ffff", + "lineType": "solid", + "width": 2 + } + } + } + ], + "datasetStyles": [ + { + "id": "60000", + "title": "Dataset 6 from seriesStyles config (without legend)", + "chartQualifier": "datasetStyles_with_legend", + "interval": [ + "lastWeek", + "lastMonth" + ], + "style": { + "chartType": "bar", + "properties": { + "interval": "byDay", + "width": 0.8, + "color": "#0000ff" + } + } + } + ] +} \ No newline at end of file diff --git a/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/dataset-io-factory.properties b/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/dataset-io-factory.properties new file mode 100644 index 0000000000..6663ce307b --- /dev/null +++ b/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/dataset-io-factory.properties @@ -0,0 +1,7 @@ +boolean=org.n52.io.type.bool.BooleanIoFactory +quantity=org.n52.io.type.quantity.QuantityIoFactory +text=org.n52.io.type.text.TextIoFactory +count=org.n52.io.type.count.CountIoFactory +category=org.n52.io.type.category.CategoryIoFactory +profile=org.n52.io.type.profile.ProfileIoFactory +trajectory=org.n52.io.type.trajectory.TrajectoryIoFactory \ No newline at end of file diff --git a/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/gnu-gplv2.html b/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/gnu-gplv2.html new file mode 100644 index 0000000000..6e5e39a7b2 --- /dev/null +++ b/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/gnu-gplv2.html @@ -0,0 +1,331 @@ + + + + + + +
+

GNU GENERAL PUBLIC LICENSE

+ +

Version 2, June 1991

+ +
+

Copyright (C) 1989, 1991 Free Software Foundation, Inc.

+

59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

+

Everyone is permitted to copy and distribute verbatim copies of this license + document, but changing it is not allowed.

+

Review this license online at + http://www.gnu.org/licenses/gpl-2.0.html

+
+
+ +
+ +

Preamble

+ +
+

The licenses for most software are designed to take away your + freedom to share and change it. By contrast, the GNU General Public + License is intended to guarantee your freedom to share and change free + software--to make sure the software is free for all its users. This + General Public License applies to most of the Free Software + Foundation's software and to any other program whose authors commit to + using it. (Some other Free Software Foundation software is covered by + the GNU Library General Public License instead.) You can apply it to + your programs, too.

+ +

When we speak of free software, we are referring to freedom, not + price. Our General Public Licenses are designed to make sure that you + have the freedom to distribute copies of free software (and charge for + this service if you wish), that you receive source code or can get it + if you want it, that you can change the software or use pieces of it + in new free programs; and that you know you can do these things.

+ +

To protect your rights, we need to make restrictions that forbid + anyone to deny you these rights or to ask you to surrender the rights. + These restrictions translate to certain responsibilities for you if you + distribute copies of the software, or if you modify it.

+ +

For example, if you distribute copies of such a program, whether + gratis or for a fee, you must give the recipients all the rights that + you have. You must make sure that they, too, receive or can get the + source code. And you must show them these terms so they know their + rights.

+ +

We protect your rights with two steps: (1) copyright the software, and + (2) offer you this license which gives you legal permission to copy, + distribute and/or modify the software.

+ +

Also, for each author's protection and ours, we want to make certain + that everyone understands that there is no warranty for this free + software. If the software is modified by someone else and passed on, we + want its recipients to know that what they have is not the original, so + that any problems introduced by others will not reflect on the original + authors' reputations.

+ +

Finally, any free program is threatened constantly by software + patents. We wish to avoid the danger that redistributors of a free + program will individually obtain patent licenses, in effect making the + program proprietary. To prevent this, we have made it clear that any + patent must be licensed for everyone's free use or not licensed at all.

+ +

The precise terms and conditions for copying, distribution and + modification follow.

+ +
+ +

GNU General Public License

+

Terms And Conditions For Copying, Distribution And Modification

+ +
    + +
  1. This License applies to any program or other work which contains + a notice placed by the copyright holder saying it may be distributed + under the terms of this General Public License. The "Program", below, + refers to any such program or work, and a "work based on the Program" + means either the Program or any derivative work under copyright law: + that is to say, a work containing the Program or a portion of it, + either verbatim or with modifications and/or translated into another + language. (Hereinafter, translation is included without limitation in + the term "modification".) Each licensee is addressed as "you".

    + +

    Activities other than copying, distribution and modification are not + covered by this License; they are outside its scope. The act of + running the Program is not restricted, and the output from the Program + is covered only if its contents constitute a work based on the + Program (independent of having been made by running the Program). + Whether that is true depends on what the Program does.

    +
  2. + +
  3. You may copy and distribute verbatim copies of the Program's + source code as you receive it, in any medium, provided that you + conspicuously and appropriately publish on each copy an appropriate + copyright notice and disclaimer of warranty; keep intact all the + notices that refer to this License and to the absence of any warranty; + and give any other recipients of the Program a copy of this License + along with the Program.

    + +

    You may charge a fee for the physical act of transferring a copy, and + you may at your option offer warranty protection in exchange for a fee.

    +
  4. + +
  5. You may modify your copy or copies of the Program or any portion + of it, thus forming a work based on the Program, and copy and + distribute such modifications or work under the terms of Section 1 + above, provided that you also meet all of these conditions:

    +
      +
    1. You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change.

    2. + +
    3. You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License.

    4. + +
    5. If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.)

    6. +
    + +

    These requirements apply to the modified work as a whole. If + identifiable sections of that work are not derived from the Program, + and can be reasonably considered independent and separate works in + themselves, then this License, and its terms, do not apply to those + sections when you distribute them as separate works. But when you + distribute the same sections as part of a whole which is a work based + on the Program, the distribution of the whole must be on the terms of + this License, whose permissions for other licensees extend to the + entire whole, and thus to each and every part regardless of who wrote it.

    + +

    Thus, it is not the intent of this section to claim rights or contest + your rights to work written entirely by you; rather, the intent is to + exercise the right to control the distribution of derivative or

    + +

    In addition, mere aggregation of another work not based on the Program + with the Program (or with a work based on the Program) on a volume of + a storage or distribution medium does not bring the other work under + the scope of this License.

    +
  6. + +
  7. You may copy and distribute the Program (or a work based on it, + under Section 2) in object code or executable form under the terms of + Sections 1 and 2 above provided that you also do one of the following: + +
      +
    1. Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or,

      +
    2. + +
    3. Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium

      +
    4. + +
    5. Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.)

      +
    6. +
    + +

    The source code for a work means the preferred form of the work for + making modifications to it. For an executable work, complete source + code means all the source code for all modules it contains, plus any + associated interface definition files, plus the scripts used to + control compilation and installation of the executable. However, as a + special exception, the source code distributed need not include + anything that is normally distributed (in either source or binary + form) with the major components (compiler, kernel, and so on) of the + operating system on which the executable runs, unless that component + itself accompanies the executable.

    + +

    If distribution of executable or object code is made by offering + access to copy from a designated place, then offering equivalent + access to copy the source code from the same place counts as + distribution of the source code, even though third parties are not + compelled to copy the source along with the object code.

    +
  8. + +
  9. You may not copy, modify, sublicense, or distribute the Program + except as expressly provided under this License. Any attempt + otherwise to copy, modify, sublicense or distribute the Program is + void, and will automatically terminate your rights under this License. + However, parties who have received copies, or rights, from you under + this License will not have their licenses terminated so long as such + parties remain in full compliance.

    +
  10. + +
  11. You are not required to accept this License, since you have not + signed it. However, nothing else grants you permission to modify or + distribute the Program or its derivative works. These actions are + prohibited by law if you do not accept this License. Therefore, by + modifying or distributing the Program (or any work based on the + Program), you indicate your acceptance of this License to do so, and + all its terms and conditions for copying, distributing or modifying + the Program or works based on it.

    +
  12. + +
  13. Each time you redistribute the Program (or any work based on the + Program), the recipient automatically receives a license from the + original licensor to copy, distribute or modify the Program subject to + these terms and conditions. You may not impose any further + restrictions on the recipients' exercise of the rights granted herein. + You are not responsible for enforcing compliance by third parties to + this License.

    +
  14. + +
  15. If, as a consequence of a court judgment or allegation of patent + infringement or for any other reason (not limited to patent issues), + conditions are imposed on you (whether by court order, agreement or + otherwise) that contradict the conditions of this License, they do not + excuse you from the conditions of this License. If you cannot + distribute so as to satisfy simultaneously your obligations under this + License and any other pertinent obligations, then as a consequence you + may not distribute the Program at all. For example, if a patent + license would not permit royalty-free redistribution of the Program by + all those who receive copies directly or indirectly through you, then + the only way you could satisfy both it and this License would be to + refrain entirely from distribution of the Program.

    + +

    If any portion of this section is held invalid or unenforceable under + any particular circumstance, the balance of the section is intended to + apply and the section as a whole is intended to apply in other + circumstances.

    + +

    It is not the purpose of this section to induce you to infringe any + patents or other property right claims or to contest validity of any + such claims; this section has the sole purpose of protecting the + integrity of the free software distribution system, which is + implemented by public license practices. Many people have made + generous contributions to the wide range of software distributed + through that system in reliance on consistent application of that + system; it is up to the author/donor to decide if he or she is willing + to distribute software through any other system and a licensee cannot + impose that choice.

    + +

    This section is intended to make thoroughly clear what is believed to + be a consequence of the rest of this License.

    +
  16. + +
  17. If the distribution and/or use of the Program is restricted in + certain countries either by patents or by copyrighted interfaces, the + original copyright holder who places the Program under this License + may add an explicit geographical distribution limitation excluding + those countries, so that distribution is permitted only in or among + countries not thus excluded. In such case, this License incorporates + the limitation as if written in the body of this License.

    +
  18. + +
  19. The Free Software Foundation may publish revised and/or new versions + of the General Public License from time to time. Such new versions will + be similar in spirit to the present version, but may differ in detail to + address new problems or concerns.

    + +

    Each version is given a distinguishing version number. If the Program + specifies a version number of this License which applies to it and "any + later version", you have the option of following the terms and conditions + either of that version or of any later version published by the Free + Software Foundation. If the Program does not specify a version number of + this License, you may choose any version ever published by the Free Software + Foundation.

    +
  20. + +
  21. If you wish to incorporate parts of the Program into other free + programs whose distribution conditions are different, write to the author + to ask for permission. For software which is copyrighted by the Free + Software Foundation, write to the Free Software Foundation; we sometimes + make exceptions for this. Our decision will be guided by the two goals + of preserving the free status of all derivatives of our free software and + of promoting the sharing and reuse of software generally.

    +
  22. + +

    NO WARRANTY

    + +
  23. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY + FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN + OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES + PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED + OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS + TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE + PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, + REPAIR OR CORRECTION.

    +
  24. + +
  25. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING + WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR + REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, + INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING + OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED + TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY + YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER + PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE + POSSIBILITY OF SUCH DAMAGES.

    +
  26. + +

    END OF TERMS AND CONDITIONS

    + +
+ + + +
+ + + + diff --git a/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/gnu-gplv2.txt b/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/gnu-gplv2.txt new file mode 100644 index 0000000000..5b6e7c66c2 --- /dev/null +++ b/webapp/overlays/org.n52.sensorweb-server.dao-impl.dao-impl-webapp-4.0.1/WEB-INF/classes/gnu-gplv2.txt @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License.