private OwsDomain getSpatialFilterParameter(String service, String version) { Enum<?> name = Sos2Constants.GetObservationParams.spatialFilter; return getEnvelopeParameter(name, SosHelper.getFeatureIDs(getCache().getFeaturesOfInterest(), version)); }
protected OwsDomain getFeatureOfInterestParameter(String service, String version) { return getFeatureOfInterestParameter(service, version, SosHelper.getFeatureIDs(getCache().getFeaturesOfInterest(), version)); }
protected OwsDomain getPublishedFeatureOfInterestParameter(String service, String version) { return getFeatureOfInterestParameter(service, version, SosHelper.getFeatureIDs(getCache().getPublishedFeatureOfInterest(), version)); }
@Override protected Set<OwsDomain> getOperationParameters(String service, String version) throws OwsExceptionReport { Collection<String> featureIDs = SosHelper.getFeatureIDs(getCache().getFeaturesOfInterest(), version); // TODO constraint srid Enum<?> parameterName = Sos2Constants.GetFeatureOfInterestParams.spatialFilter; if (version.equals(Sos1Constants.SERVICEVERSION)) { parameterName = Sos1Constants.GetFeatureOfInterestParams.location; } return new HashSet<>(Arrays.asList(getQueryableProcedureParameter(service, version), getFeatureOfInterestParameter(service, version), getObservablePropertyParameter(service, version), getEnvelopeParameter(parameterName, featureIDs))); } }
/** * Get featureOfInterests for procedure and version * * @return Collection with featureOfInterests * * @throws OwsExceptionReport If an error occurs */ private Collection<String> getFeatureOfInterestIDs() throws OwsExceptionReport { Set<String> features = Sets.newHashSet(); // add cache map for proc/fois and get fois for proc for (String offering : getCache().getOfferingsForProcedure(getIdentifier())) { // don't include features for offerings which this procedure is a // hidden child of if (!getCache().getHiddenChildProceduresForOffering(offering).contains(getIdentifier())) { features.addAll(getCache().getFeaturesOfInterestForOffering(offering)); } } return SosHelper.getFeatureIDs(features, getVersion()); }
@Override protected void setOperationsMetadata(OwsOperation operation, String service, String version) throws OwsExceptionReport { addQueryableProcedureParameter(operation); //addPublishedProcedureParameter(operation); addPublishedObservablePropertyParameter(operation); addPublishedFeatureOfInterestParameter(operation, version); addOfferingParameter(operation); operation.addAnyParameterValue(ResultFilterConstants.METADATA_RESULT_FILTER); final Collection<String> featureIDs = SosHelper.getFeatureIDs(getCache().getFeaturesOfInterest(), version); SosEnvelope envelope = null; if (featureIDs != null && !featureIDs.isEmpty()) { envelope = getCache().getGlobalEnvelope(); } if (envelope != null && envelope.isSetEnvelope()) { operation.addRangeParameterValue(Sos2Constants.GetObservationParams.spatialFilter, SosHelper.getMinMaxFromEnvelope(envelope.getEnvelope())); } else { operation.addAnyParameterValue(Sos2Constants.GetObservationParams.spatialFilter); } }