/** * Get valid FOI identifiers for SOS 2.0 * * @param featureIDs FOI identifiers to test * @param version SOS version * * @return valid FOI identifiers */ public static Collection<String> getFeatureIDs(final Collection<String> featureIDs, final String version) { if (Sos2Constants.SERVICEVERSION.equals(version)) { return featureIDs.stream() .filter(featureID -> checkFeatureOfInterestIdentifierForSosV2(featureID, version)) .collect(toList()); } return featureIDs; }
public AbstractFeature createFeature(FeatureEntity f) throws OwsExceptionReport { final CodeWithAuthority identifier = getIdentifier(f); if (!SosHelper.checkFeatureOfInterestIdentifierForSosV2(f.getIdentifier(), getContext().getVersion())) { identifier.setValue(null); } final AbstractFeature absFeat = getFeatureType(identifier); addNameAndDescription(getContext().getRequestedLanguage(), f, absFeat); if (absFeat instanceof AbstractSamplingFeature) { AbstractSamplingFeature absSampFeat = (AbstractSamplingFeature) absFeat; absSampFeat.setGeometry(createGeometryFrom(f)); absSampFeat.setFeatureType(f.getFeatureType().getFormat()); absSampFeat.setUrl(f.getUrl()); if (f.isSetXml()) { absSampFeat.setXml(f.getXml()); } addParameter(absSampFeat, f); final Set<FeatureEntity> parentFeatures = f.getParents(); if (parentFeatures != null && !parentFeatures.isEmpty()) { final List<AbstractFeature> sampledFeatures = new ArrayList<AbstractFeature>(parentFeatures.size()); for (final AbstractFeatureEntity parentFeature : parentFeatures) { sampledFeatures.add(new HibernateFeatureVisitor(getContext()).visit(parentFeature)); } absSampFeat.setSampledFeatures(sampledFeatures); } } return absFeat; }
public AbstractFeature createFeature(FeatureEntity f) throws OwsExceptionReport { final CodeWithAuthority identifier = getIdentifier(f); if (!SosHelper.checkFeatureOfInterestIdentifierForSosV2(f.getIdentifier(), getContext().getVersion())) { identifier.setValue(null); } final AbstractFeature absFeat = getFeatureType(identifier); addNameAndDescription(getContext().getRequestedLanguage(), f, absFeat); if (absFeat instanceof AbstractSamplingFeature) { AbstractSamplingFeature absSampFeat = (AbstractSamplingFeature) absFeat; absSampFeat.setGeometry(createGeometryFrom(f)); absSampFeat.setFeatureType(f.getFeatureType().getFormat()); absSampFeat.setUrl(f.getUrl()); if (f.isSetXml()) { absSampFeat.setXml(f.getXml()); } addParameter(absSampFeat, f); final Set<FeatureEntity> parentFeatures = f.getParents(); if (parentFeatures != null && !parentFeatures.isEmpty()) { final List<AbstractFeature> sampledFeatures = new ArrayList<AbstractFeature>(parentFeatures.size()); for (final AbstractFeatureEntity parentFeature : parentFeatures) { sampledFeatures.add(new HibernateFeatureVisitor(getContext()).visit(parentFeature)); } absSampFeat.setSampledFeatures(sampledFeatures); } } return absFeat; }
&& SosHelper.checkFeatureOfInterestIdentifierForSosV2(sampFeat.getIdentifierCodeWithAuthority().getValue(), Sos2Constants.SERVICEVERSION)) { XmlObject xmlObject = CodingHelper.encodeObjectToXml(GmlConstants.NS_GML_32, sampFeat.getIdentifierCodeWithAuthority());
xbSamplingFeature.setId(sampFeat.getGmlId()); if (sampFeat.isSetIdentifier() && SosHelper.checkFeatureOfInterestIdentifierForSosV2(sampFeat.getIdentifierCodeWithAuthority().getValue(), Sos1Constants.SERVICEVERSION)) { sampFeat.getIdentifierCodeWithAuthority().setCodeSpace("uniquID");
EnvironmentalMonitoringFacilityEntity emf = (EnvironmentalMonitoringFacilityEntity) f; final CodeWithAuthority identifier = getContext().getDaoFactory().getFeatureDAO().getIdentifier(emf); if (!SosHelper.checkFeatureOfInterestIdentifierForSosV2(emf.getIdentifier(), getContext().getVersion())) { identifier.setValue(null);
EnvironmentalMonitoringFacilityEntity emf = (EnvironmentalMonitoringFacilityEntity) f; final CodeWithAuthority identifier = getContext().getDaoFactory().getFeatureDAO().getIdentifier(emf); if (!SosHelper.checkFeatureOfInterestIdentifierForSosV2(emf.getIdentifier(), getContext().getVersion())) { identifier.setValue(null);