use of org.codice.ddf.spatial.ogc.wfs.v2_0_0.catalog.source.reader.XmlSchemaMessageBodyReaderWfs20 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 Wfs20JaxbElementProvider<>();
Map<String, String> jaxbClassMap = new HashMap<String, String>();
// Ensure a namespace is used when the GetFeature request is generated
String expandedName = new QName(Wfs20Constants.WFS_2_0_NAMESPACE, Wfs20Constants.GET_FEATURE).toString();
jaxbClassMap.put(GetFeatureType.class.getName(), expandedName);
provider.setJaxbElementClassMap(jaxbClassMap);
provider.setMarshallAsJaxbElement(true);
featureCollectionReader = new FeatureCollectionMessageBodyReaderWfs20();
return Arrays.asList(provider, new XmlSchemaMessageBodyReaderWfs20(), featureCollectionReader);
}
Aggregations