Search in sources :

Example 1 with FeatureCollectionMessageBodyReaderWfs10

use of org.codice.ddf.spatial.ogc.wfs.v1_0_0.catalog.source.reader.FeatureCollectionMessageBodyReaderWfs10 in project ddf by codice.

the class WfsSource method initProviders.

private List<? extends Object> initProviders() {
    // We need to tell the JAXBElementProvider to marshal the GetFeatureType
    // class as an element because it is missing the @XmlRootElement Annotation
    JAXBElementProvider<GetFeatureType> provider = new JAXBElementProvider<GetFeatureType>();
    Map<String, String> jaxbClassMap = new HashMap<String, String>();
    // Ensure a namespace is used when the GetFeature request is generated
    String expandedName = new QName(Wfs10Constants.WFS_NAMESPACE, Wfs10Constants.GET_FEATURE).toString();
    jaxbClassMap.put(GetFeatureType.class.getName(), expandedName);
    provider.setJaxbElementClassMap(jaxbClassMap);
    provider.setMarshallAsJaxbElement(true);
    featureCollectionReader = new FeatureCollectionMessageBodyReaderWfs10();
    return Arrays.asList(provider, new WfsResponseExceptionMapper(), new XmlSchemaMessageBodyReaderWfs10(), featureCollectionReader);
}
Also used : JAXBElementProvider(org.apache.cxf.jaxrs.provider.JAXBElementProvider) XmlSchemaMessageBodyReaderWfs10(org.codice.ddf.spatial.ogc.wfs.v1_0_0.catalog.source.reader.XmlSchemaMessageBodyReaderWfs10) HashMap(java.util.HashMap) QName(javax.xml.namespace.QName) FeatureCollectionMessageBodyReaderWfs10(org.codice.ddf.spatial.ogc.wfs.v1_0_0.catalog.source.reader.FeatureCollectionMessageBodyReaderWfs10) GetFeatureType(ogc.schema.opengis.wfs.v_1_0_0.GetFeatureType)

Aggregations

HashMap (java.util.HashMap)1 QName (javax.xml.namespace.QName)1 GetFeatureType (ogc.schema.opengis.wfs.v_1_0_0.GetFeatureType)1 JAXBElementProvider (org.apache.cxf.jaxrs.provider.JAXBElementProvider)1 FeatureCollectionMessageBodyReaderWfs10 (org.codice.ddf.spatial.ogc.wfs.v1_0_0.catalog.source.reader.FeatureCollectionMessageBodyReaderWfs10)1 XmlSchemaMessageBodyReaderWfs10 (org.codice.ddf.spatial.ogc.wfs.v1_0_0.catalog.source.reader.XmlSchemaMessageBodyReaderWfs10)1