Search in sources :

Example 1 with FeatureTypeType

use of net.opengis.wfs.v_1_1_0.FeatureTypeType in project ddf by codice.

the class TestWfsSource method getWfsSource.

public WfsSource getWfsSource(final String schema, final FilterCapabilities filterCapabilities, final String srsName, final int numFeatures, final boolean throwExceptionOnDescribeFeatureType, boolean prefix, int numReturned) throws WfsException, SecurityServiceException {
    mockFactory = mock(SecureCxfClientFactory.class);
    when(mockFactory.getClient()).thenReturn(mockWfs);
    // GetCapabilities Response
    when(mockWfs.getCapabilities(any(GetCapabilitiesRequest.class))).thenReturn(mockCapabilites);
    when(mockFeatureCollection.getMembers()).thenAnswer(new Answer<List<Metacard>>() {

        @Override
        public List<Metacard> answer(InvocationOnMock invocation) {
            // Create as many metacards as there are features
            List<Metacard> metacards = new ArrayList<Metacard>(numFeatures);
            for (int i = 0; i < numFeatures; i++) {
                MetacardImpl mc = new MetacardImpl();
                mc.setId("ID_" + String.valueOf(i + 1));
                metacards.add(mc);
            }
            return metacards;
        }
    });
    if (numReturned != NULL_NUM_RETURNED) {
        when(mockFeatureCollection.getNumberReturned()).thenReturn(BigInteger.valueOf(numReturned));
    } else {
        when(mockFeatureCollection.getNumberReturned()).thenReturn(null);
    }
    when(mockWfs.getFeature(any(GetFeatureType.class))).thenReturn(mockFeatureCollection);
    mockCapabilites.setFilterCapabilities(filterCapabilities);
    when(mockAvailabilityTask.isAvailable()).thenReturn(true);
    mockCapabilites.setFeatureTypeList(new FeatureTypeListType());
    for (int ii = 0; ii < numFeatures; ii++) {
        FeatureTypeType feature = new FeatureTypeType();
        QName qName;
        if (prefix) {
            qName = new QName("http://example.com", SAMPLE_FEATURE_NAME + ii, "Prefix" + ii);
        } else {
            qName = new QName("http://example.com", SAMPLE_FEATURE_NAME + ii);
        }
        feature.setName(qName);
        feature.setDefaultCRS(GeospatialUtil.EPSG_4326_URN);
        mockCapabilites.getFeatureTypeList().getFeatureType().add(feature);
    }
    XmlSchema xmlSchema = null;
    if (StringUtils.isNotBlank(schema)) {
        XmlSchemaCollection schemaCollection = new XmlSchemaCollection();
        WfsUriResolver wfsUriResolver = new WfsUriResolver();
        wfsUriResolver.setGmlNamespace(Wfs20Constants.GML_3_2_NAMESPACE);
        wfsUriResolver.setWfsNamespace(Wfs20Constants.WFS_2_0_NAMESPACE);
        schemaCollection.setSchemaResolver(wfsUriResolver);
        xmlSchema = schemaCollection.read(new StreamSource(new ByteArrayInputStream(schema.getBytes())));
    }
    if (throwExceptionOnDescribeFeatureType) {
        when(mockWfs.describeFeatureType(any(DescribeFeatureTypeRequest.class))).thenThrow(new WfsException(""));
    } else {
        when(mockWfs.describeFeatureType(any(DescribeFeatureTypeRequest.class))).thenReturn(xmlSchema);
    }
    WfsSource wfsSource = new WfsSource(new GeotoolsFilterAdapterImpl(), mockContext, mockAvailabilityTask, mockFactory, encryptionService);
    wfsSource.setFeatureCollectionReader(mockReader);
    return wfsSource;
}
Also used : GetCapabilitiesRequest(org.codice.ddf.spatial.ogc.wfs.v2_0_0.catalog.common.GetCapabilitiesRequest) FeatureTypeType(net.opengis.wfs.v_2_0_0.FeatureTypeType) FeatureTypeListType(net.opengis.wfs.v_2_0_0.FeatureTypeListType) SecureCxfClientFactory(org.codice.ddf.cxf.SecureCxfClientFactory) QName(javax.xml.namespace.QName) StreamSource(javax.xml.transform.stream.StreamSource) XmlSchemaCollection(org.apache.ws.commons.schema.XmlSchemaCollection) MetacardImpl(ddf.catalog.data.impl.MetacardImpl) Metacard(ddf.catalog.data.Metacard) XmlSchema(org.apache.ws.commons.schema.XmlSchema) ByteArrayInputStream(java.io.ByteArrayInputStream) WfsException(org.codice.ddf.spatial.ogc.wfs.catalog.common.WfsException) InvocationOnMock(org.mockito.invocation.InvocationOnMock) WfsUriResolver(org.codice.ddf.spatial.ogc.wfs.catalog.source.WfsUriResolver) List(java.util.List) ArrayList(java.util.ArrayList) DescribeFeatureTypeRequest(org.codice.ddf.spatial.ogc.wfs.v2_0_0.catalog.common.DescribeFeatureTypeRequest) GeotoolsFilterAdapterImpl(ddf.catalog.filter.proxy.adapter.GeotoolsFilterAdapterImpl) GetFeatureType(net.opengis.wfs.v_2_0_0.GetFeatureType)

Example 2 with FeatureTypeType

use of net.opengis.wfs.v_1_1_0.FeatureTypeType in project ddf by codice.

the class WfsSource method buildFeatureFilters.

private void buildFeatureFilters(List<FeatureTypeType> featureTypes, List<String> supportedSpatialOperators, List<QName> supportedGeometryOperands) {
    ExtendedWfs wfs = factory.getClient();
    // Use local Map for metacardtype registrations and once they are populated with latest
    // MetacardTypes, then do actual registration
    Map<String, FeatureMetacardType> mcTypeRegs = new HashMap<>();
    this.featureTypeFilters.clear();
    for (FeatureTypeType featureTypeType : featureTypes) {
        String ftSimpleName = featureTypeType.getName().getLocalPart();
        if (StringUtils.isNotBlank(forcedFeatureType) && !StringUtils.equals(forcedFeatureType, ftSimpleName)) {
            continue;
        }
        if (mcTypeRegs.containsKey(ftSimpleName)) {
            LOGGER.debug("WfsSource {}: MetacardType {} is already registered - skipping to next metacard type", getId(), ftSimpleName);
            continue;
        }
        LOGGER.debug("ftName: {}", ftSimpleName);
        try {
            XmlSchema schema = wfs.describeFeatureType(new DescribeFeatureTypeRequest(featureTypeType.getName()));
            if (schema == null) {
                schema = wfs.describeFeatureType(new DescribeFeatureTypeRequest(new QName(featureTypeType.getName().getNamespaceURI(), featureTypeType.getName().getLocalPart(), "")));
            }
            if (schema != null) {
                FeatureMetacardType featureMetacardType = createFeatureMetacardTypeRegistration(featureTypeType, ftSimpleName, schema);
                MetacardMapper metacardMapper = getMetacardMapper(featureTypeType.getName());
                this.featureTypeFilters.put(featureMetacardType.getFeatureType(), new WfsFilterDelegate(featureMetacardType, metacardMapper, supportedSpatialOperators, supportedGeometryOperands, getCoordinateStrategy(), wildcardChar, singleChar, escapeChar));
                mcTypeRegs.put(ftSimpleName, featureMetacardType);
                ((WfsMetadataImpl<FeatureTypeType>) wfsMetadata).addEntry(featureTypeType);
            }
        } catch (WfsException | IllegalArgumentException wfse) {
            LOGGER.debug(WFS_ERROR_MESSAGE, wfse);
        } catch (WebApplicationException wae) {
            LOGGER.debug(handleWebApplicationException(wae), wae);
        }
    }
    registerFeatureMetacardTypes(mcTypeRegs);
    if (featureTypeFilters.isEmpty()) {
        LOGGER.debug("Wfs Source {}: No Feature Type schemas validated.", getId());
    }
    LOGGER.debug("Wfs Source {}: Number of validated Features = {}", getId(), featureTypeFilters.size());
}
Also used : FeatureTypeType(net.opengis.wfs.v_1_1_0.FeatureTypeType) WebApplicationException(javax.ws.rs.WebApplicationException) HashMap(java.util.HashMap) QName(javax.xml.namespace.QName) WfsMetadataImpl(org.codice.ddf.spatial.ogc.wfs.catalog.common.WfsMetadataImpl) XmlSchema(org.apache.ws.commons.schema.XmlSchema) WfsException(org.codice.ddf.spatial.ogc.wfs.catalog.common.WfsException) DescribeFeatureTypeRequest(org.codice.ddf.spatial.ogc.wfs.v110.catalog.common.DescribeFeatureTypeRequest) FeatureMetacardType(org.codice.ddf.spatial.ogc.wfs.catalog.common.FeatureMetacardType) MetacardMapper(org.codice.ddf.spatial.ogc.wfs.catalog.mapper.MetacardMapper)

Example 3 with FeatureTypeType

use of net.opengis.wfs.v_1_1_0.FeatureTypeType in project ddf by codice.

the class WfsSource method createFeatureMetacardTypeRegistration.

private FeatureMetacardType createFeatureMetacardTypeRegistration(FeatureTypeType featureTypeType, String ftName, XmlSchema schema) {
    MetacardTypeEnhancer metacardTypeEnhancer = metacardTypeEnhancers.stream().filter(me -> me.getFeatureName() != null).filter(me -> me.getFeatureName().equalsIgnoreCase(ftName)).findAny().orElse(FeatureMetacardType.DEFAULT_METACARD_TYPE_ENHANCER);
    FeatureMetacardType ftMetacard = new FeatureMetacardType(schema, featureTypeType.getName(), nonQueryableProperties != null ? Arrays.stream(nonQueryableProperties).collect(toSet()) : new HashSet<>(), Wfs11Constants.GML_3_1_1_NAMESPACE, metacardTypeEnhancer);
    Dictionary<String, Object> props = new DictionaryMap<>();
    props.put(Metacard.CONTENT_TYPE, new String[] { ftName });
    LOGGER.debug("WfsSource {}: Registering MetacardType: {}", getId(), ftName);
    return ftMetacard;
}
Also used : SortByType(net.opengis.filter.v_1_1_0.SortByType) Arrays(java.util.Arrays) WfsMetadata(org.codice.ddf.spatial.ogc.wfs.featuretransformer.WfsMetadata) XmlSchemaMessageBodyReaderWfs11(org.codice.ddf.spatial.ogc.wfs.v110.catalog.source.reader.XmlSchemaMessageBodyReaderWfs11) StringUtils(org.apache.commons.lang3.StringUtils) MediaType(javax.ws.rs.core.MediaType) MarkableStreamInterceptor(org.codice.ddf.spatial.ogc.wfs.catalog.source.MarkableStreamInterceptor) ContentTypeImpl(ddf.catalog.data.impl.ContentTypeImpl) Map(java.util.Map) WfsFeatureCollection(org.codice.ddf.spatial.ogc.wfs.catalog.WfsFeatureCollection) BigInteger(java.math.BigInteger) JAXBElementProvider(org.apache.cxf.jaxrs.provider.JAXBElementProvider) ClientBuilderFactory(org.codice.ddf.cxf.client.ClientBuilderFactory) AvailabilityTask(org.codice.ddf.spatial.ogc.catalog.common.AvailabilityTask) ServiceReference(org.osgi.framework.ServiceReference) SSLHandshakeException(javax.net.ssl.SSLHandshakeException) Set(java.util.Set) DescribeFeatureTypeRequest(org.codice.ddf.spatial.ogc.wfs.v110.catalog.common.DescribeFeatureTypeRequest) StandardCharsets(java.nio.charset.StandardCharsets) Serializable(java.io.Serializable) IOUtils(org.apache.commons.io.IOUtils) MetacardMapper(org.codice.ddf.spatial.ogc.wfs.catalog.mapper.MetacardMapper) AvailabilityCommand(org.codice.ddf.spatial.ogc.catalog.common.AvailabilityCommand) WebApplicationException(javax.ws.rs.WebApplicationException) QName(javax.xml.namespace.QName) Dictionary(java.util.Dictionary) ResourceResponse(ddf.catalog.operation.ResourceResponse) SpatialOperatorType(net.opengis.filter.v_1_1_0.SpatialOperatorType) FilterAdapter(ddf.catalog.filter.FilterAdapter) Resource(ddf.catalog.resource.Resource) ArrayList(java.util.ArrayList) QueryRequest(ddf.catalog.operation.QueryRequest) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) WfsMetadataImpl(org.codice.ddf.spatial.ogc.wfs.catalog.common.WfsMetadataImpl) ConnectException(java.net.ConnectException) Result(ddf.catalog.data.Result) ResultTypeType(net.opengis.wfs.v_1_1_0.ResultTypeType) DictionaryMap(org.codice.ddf.configuration.DictionaryMap) SortOrder(org.opengis.filter.sort.SortOrder) ContentType(ddf.catalog.data.ContentType) Properties(java.util.Properties) StringWriter(java.io.StringWriter) IOException(java.io.IOException) Query(ddf.catalog.operation.Query) Paths(java.nio.file.Paths) ScheduledFuture(java.util.concurrent.ScheduledFuture) QueryType(net.opengis.wfs.v_1_1_0.QueryType) UnsupportedQueryException(ddf.catalog.source.UnsupportedQueryException) GetFeatureType(net.opengis.wfs.v_1_1_0.GetFeatureType) LoggerFactory(org.slf4j.LoggerFactory) MetacardMapperImpl(org.codice.ddf.spatial.ogc.wfs.catalog.mapper.impl.MetacardMapperImpl) WfsMetacardTypeRegistry(org.codice.ddf.spatial.ogc.wfs.catalog.metacardtype.registry.WfsMetacardTypeRegistry) URI(java.net.URI) Collectors.toSet(java.util.stream.Collectors.toSet) PropertyNameType(net.opengis.filter.v_1_1_0.PropertyNameType) FeatureTypeType(net.opengis.wfs.v_1_1_0.FeatureTypeType) WfsException(org.codice.ddf.spatial.ogc.wfs.catalog.common.WfsException) InvalidSyntaxException(org.osgi.framework.InvalidSyntaxException) Predicate(java.util.function.Predicate) SourceResponseImpl(ddf.catalog.operation.impl.SourceResponseImpl) ResultImpl(ddf.catalog.data.impl.ResultImpl) ClientBuilder(org.codice.ddf.cxf.client.ClientBuilder) SourceMonitor(ddf.catalog.source.SourceMonitor) Collectors(java.util.stream.Collectors) JAXBException(javax.xml.bind.JAXBException) BundleContext(org.osgi.framework.BundleContext) CatalogTransformerException(ddf.catalog.transform.CatalogTransformerException) List(java.util.List) ObjectFactory(net.opengis.wfs.v_1_1_0.ObjectFactory) Response(javax.ws.rs.core.Response) FeatureMetacardType(org.codice.ddf.spatial.ogc.wfs.catalog.common.FeatureMetacardType) ResourceResponseImpl(ddf.catalog.operation.impl.ResourceResponseImpl) Entry(java.util.Map.Entry) FilterType(net.opengis.filter.v_1_1_0.FilterType) SecureCxfClientFactory(org.codice.ddf.cxf.client.SecureCxfClientFactory) WFSCapabilitiesType(net.opengis.wfs.v_1_1_0.WFSCapabilitiesType) FeatureTransformationService(org.codice.ddf.spatial.ogc.wfs.featuretransformer.FeatureTransformationService) GetCapabilitiesRequest(org.codice.ddf.spatial.ogc.wfs.v110.catalog.common.GetCapabilitiesRequest) LAT_LON_ORDER(org.codice.ddf.libs.geo.util.GeospatialUtil.LAT_LON_ORDER) Marshaller(javax.xml.bind.Marshaller) HashMap(java.util.HashMap) SortOrderType(net.opengis.filter.v_1_1_0.SortOrderType) HashSet(java.util.HashSet) SortBy(org.opengis.filter.sort.SortBy) MetadataTransformer(org.codice.ddf.spatial.ogc.catalog.MetadataTransformer) Constants(ddf.catalog.Constants) Metacard(ddf.catalog.data.Metacard) EncryptionService(ddf.security.encryption.EncryptionService) ResourceImpl(ddf.catalog.resource.impl.ResourceImpl) XmlSchema(org.apache.ws.commons.schema.XmlSchema) SortPropertyType(net.opengis.filter.v_1_1_0.SortPropertyType) JAXBContext(javax.xml.bind.JAXBContext) AbstractWfsSource(org.codice.ddf.spatial.ogc.wfs.catalog.common.AbstractWfsSource) QueryImpl(ddf.catalog.operation.impl.QueryImpl) Wfs11Constants(org.codice.ddf.spatial.ogc.wfs.v110.catalog.common.Wfs11Constants) Logger(org.slf4j.Logger) MetacardTypeEnhancer(org.codice.ddf.spatial.ogc.wfs.catalog.MetacardTypeEnhancer) TimeUnit(java.util.concurrent.TimeUnit) SourceResponse(ddf.catalog.operation.SourceResponse) ContentTypeFilterDelegate(org.codice.ddf.spatial.ogc.catalog.common.ContentTypeFilterDelegate) Collections(java.util.Collections) InputStream(java.io.InputStream) MetacardTypeEnhancer(org.codice.ddf.spatial.ogc.wfs.catalog.MetacardTypeEnhancer) FeatureMetacardType(org.codice.ddf.spatial.ogc.wfs.catalog.common.FeatureMetacardType) HashSet(java.util.HashSet) DictionaryMap(org.codice.ddf.configuration.DictionaryMap)

Example 4 with FeatureTypeType

use of net.opengis.wfs.v_1_1_0.FeatureTypeType in project ddf by codice.

the class WfsSourceTest method setUpMocks.

private void setUpMocks(final List<String> supportedGeos, final String srsName, final int results, final int hits) throws WfsException {
    SecureCxfClientFactory<ExtendedWfs> mockFactory = mock(SecureCxfClientFactory.class);
    when(mockFactory.getClient()).thenReturn(mockWfs);
    clientBuilderFactory = mock(ClientBuilderFactory.class);
    ClientBuilder<ExtendedWfs> clientBuilder = new ClientBuilderImpl<ExtendedWfs>(mock(OAuthSecurity.class), mock(SamlSecurity.class), mock(SecurityLogger.class), mock(SecurityManager.class)) {

        @Override
        public SecureCxfClientFactory<ExtendedWfs> build() {
            return mockFactory;
        }
    };
    when(clientBuilderFactory.<ExtendedWfs>getClientBuilder()).thenReturn(clientBuilder);
    // GetCapabilities Response
    when(mockWfs.getCapabilities(any(GetCapabilitiesRequest.class))).thenReturn(mockCapabilities);
    mockCapabilities.setFilterCapabilities(new FilterCapabilities());
    mockCapabilities.getFilterCapabilities().setSpatialCapabilities(new SpatialCapabilitiesType());
    mockCapabilities.getFilterCapabilities().getSpatialCapabilities().setSpatialOperators(new SpatialOperatorsType());
    if (CollectionUtils.isNotEmpty(supportedGeos)) {
        mockCapabilities.getFilterCapabilities().getSpatialCapabilities().getSpatialOperators().getSpatialOperator().addAll(supportedGeos.stream().map(opName -> {
            SpatialOperatorType spatialOperatorType = new SpatialOperatorType();
            spatialOperatorType.setName(SpatialOperatorNameType.fromValue(opName));
            return spatialOperatorType;
        }).collect(Collectors.toList()));
    }
    mockCapabilities.getFilterCapabilities().getSpatialCapabilities().setGeometryOperands(new GeometryOperandsType());
    mockCapabilities.getFilterCapabilities().getSpatialCapabilities().getGeometryOperands().getGeometryOperand().addAll(Arrays.asList(Wfs11Constants.POLYGON, Wfs11Constants.POINT));
    sampleFeatures = new ArrayList<>();
    mockCapabilities.setFeatureTypeList(new FeatureTypeListType());
    for (int ii = 0; ii < results; ii++) {
        FeatureTypeType feature = new FeatureTypeType();
        QName qName;
        if (ii == 0) {
            qName = new QName("SampleFeature" + ii);
        } else {
            qName = new QName("http://example.com", "SampleFeature" + ii, "Prefix" + ii);
        }
        sampleFeatures.add(qName);
        feature.setName(qName);
        if (null != srsName) {
            feature.setDefaultSRS(srsName);
        }
        mockCapabilities.getFeatureTypeList().getFeatureType().add(feature);
    }
    List<Metacard> metacards = new ArrayList<>(results);
    for (int i = 0; i < results; i++) {
        MetacardImpl mc = new MetacardImpl();
        mc.setId("ID_" + (i + 1));
        metacards.add(mc);
    }
    when(mockWfs.getFeature(withResultType(ResultTypeType.HITS))).thenReturn(new WfsFeatureCollectionImpl(hits));
    when(mockWfs.getFeature(withResultType(ResultTypeType.RESULTS))).thenReturn(new WfsFeatureCollectionImpl(results, metacards));
    final ScheduledFuture<?> mockAvailabilityPollFuture = mock(ScheduledFuture.class);
    doReturn(mockAvailabilityPollFuture).when(mockScheduler).scheduleWithFixedDelay(any(), anyInt(), anyInt(), any());
    source = new WfsSource(clientBuilderFactory, encryptionService, mockScheduler);
    source.setId(WFS_ID);
    source.setFilterAdapter(new GeotoolsFilterAdapterImpl());
    source.setContext(mockContext);
    source.setWfsMetacardTypeRegistry(mockWfsMetacardTypeRegistry);
    source.setMetacardTypeEnhancers(Collections.emptyList());
    source.setMetacardMappers(metacardMappers);
    source.setPollInterval(10);
    source.setWfsUrl(SAMPLE_WFS_URL);
    source.setSupportsStartIndex(false);
    source.setForceAllGeometryOperands(forceAllGeometryOperands);
    source.init();
}
Also used : SecurityManager(ddf.security.service.SecurityManager) ClientBuilderFactory(org.codice.ddf.cxf.client.ClientBuilderFactory) ArrayList(java.util.ArrayList) SpatialCapabilitiesType(net.opengis.filter.v_1_1_0.SpatialCapabilitiesType) FilterCapabilities(net.opengis.filter.v_1_1_0.FilterCapabilities) SpatialOperatorsType(net.opengis.filter.v_1_1_0.SpatialOperatorsType) WfsFeatureCollectionImpl(org.codice.ddf.spatial.ogc.wfs.catalog.common.WfsFeatureCollectionImpl) GeometryOperandsType(net.opengis.filter.v_1_1_0.GeometryOperandsType) GetCapabilitiesRequest(org.codice.ddf.spatial.ogc.wfs.v110.catalog.common.GetCapabilitiesRequest) ClientBuilderImpl(org.codice.ddf.cxf.client.impl.ClientBuilderImpl) FeatureTypeType(net.opengis.wfs.v_1_1_0.FeatureTypeType) FeatureTypeListType(net.opengis.wfs.v_1_1_0.FeatureTypeListType) QName(javax.xml.namespace.QName) OAuthSecurity(org.codice.ddf.cxf.oauth.OAuthSecurity) SpatialOperatorType(net.opengis.filter.v_1_1_0.SpatialOperatorType) MetacardImpl(ddf.catalog.data.impl.MetacardImpl) Metacard(ddf.catalog.data.Metacard) SamlSecurity(org.codice.ddf.security.jaxrs.SamlSecurity) GeotoolsFilterAdapterImpl(ddf.catalog.filter.proxy.adapter.GeotoolsFilterAdapterImpl) SecurityLogger(ddf.security.audit.SecurityLogger)

Example 5 with FeatureTypeType

use of net.opengis.wfs.v_1_1_0.FeatureTypeType in project ddf by codice.

the class XStreamWfs11FeatureTransformer method apply.

@Override
public Optional<Metacard> apply(InputStream document, WfsMetadata<FeatureTypeType> metadata) {
    XStream xStream = new XStream(new WstxDriver());
    xStream.addPermission(NoTypePermission.NONE);
    xStream.allowTypeHierarchy(Metacard.class);
    xStream.setClassLoader(this.getClass().getClassLoader());
    xStream.registerConverter(new GmlGeometryConverter());
    xStream.registerConverter(new GmlEnvelopeConverter());
    xStream.alias(metadata.getActiveFeatureMemberNodeName(), Metacard.class);
    FeatureTypeType featureType = null;
    for (FeatureTypeType ft : metadata.getDescriptors()) {
        if (ft.getName() != null && metadata.getActiveFeatureMemberNodeName().equals(ft.getName().getLocalPart())) {
            featureType = ft;
        }
    }
    lookupFeatureConverter(metadata, featureType).ifPresent(xStream::registerConverter);
    Metacard metacard = null;
    try {
        metacard = (Metacard) xStream.fromXML(document);
    } catch (XStreamException e) {
        LOGGER.trace("Failed to parse FeatureMember into Metacard", e);
    }
    return Optional.ofNullable(metacard);
}
Also used : WstxDriver(com.thoughtworks.xstream.io.xml.WstxDriver) FeatureTypeType(net.opengis.wfs.v_1_1_0.FeatureTypeType) Metacard(ddf.catalog.data.Metacard) XStreamException(com.thoughtworks.xstream.XStreamException) GmlGeometryConverter(org.codice.ddf.spatial.ogc.wfs.catalog.converter.impl.GmlGeometryConverter) XStream(com.thoughtworks.xstream.XStream) GmlEnvelopeConverter(org.codice.ddf.spatial.ogc.wfs.catalog.converter.impl.GmlEnvelopeConverter)

Aggregations

QName (javax.xml.namespace.QName)8 XmlSchema (org.apache.ws.commons.schema.XmlSchema)7 ArrayList (java.util.ArrayList)6 FeatureTypeType (net.opengis.wfs.v_1_1_0.FeatureTypeType)6 WfsException (org.codice.ddf.spatial.ogc.wfs.catalog.common.WfsException)6 Metacard (ddf.catalog.data.Metacard)5 MetacardImpl (ddf.catalog.data.impl.MetacardImpl)4 GeotoolsFilterAdapterImpl (ddf.catalog.filter.proxy.adapter.GeotoolsFilterAdapterImpl)4 HashMap (java.util.HashMap)4 List (java.util.List)4 WebApplicationException (javax.ws.rs.WebApplicationException)4 FeatureMetacardType (org.codice.ddf.spatial.ogc.wfs.catalog.common.FeatureMetacardType)4 FeatureTypeType (net.opengis.wfs.v_2_0_0.FeatureTypeType)3 FeatureTypeType (ogc.schema.opengis.wfs_capabilities.v_1_0_0.FeatureTypeType)3 SecurityLogger (ddf.security.audit.SecurityLogger)2 ByteArrayInputStream (java.io.ByteArrayInputStream)2 StreamSource (javax.xml.transform.stream.StreamSource)2 SpatialOperatorType (net.opengis.filter.v_1_1_0.SpatialOperatorType)2 XmlSchemaCollection (org.apache.ws.commons.schema.XmlSchemaCollection)2 ClientBuilderFactory (org.codice.ddf.cxf.client.ClientBuilderFactory)2