use of net.opengis.sos.x20.GetFeatureOfInterestResponseType in project arctic-sea by 52North.
the class GetFeatureOfInterestResponseDocumentDecoder method decode.
@Override
@SuppressFBWarnings("NP_LOAD_OF_KNOWN_NULL_VALUE")
public GetFeatureOfInterestResponse decode(GetFeatureOfInterestResponseDocument gfoird) throws DecodingException {
if (gfoird != null) {
GetFeatureOfInterestResponse response = new GetFeatureOfInterestResponse();
setService(response);
setVersions(response);
GetFeatureOfInterestResponseType gfoirt = gfoird.getGetFeatureOfInterestResponse();
response.setExtensions(parseExtensibleResponse(gfoirt));
response.setAbstractFeature(parseFeatures(gfoirt));
return response;
}
throw new UnsupportedDecoderInputException(this, gfoird);
}
use of net.opengis.sos.x20.GetFeatureOfInterestResponseType in project arctic-sea by 52North.
the class GetFeatureOfInterestResponseEncoder method create.
@Override
protected XmlObject create(GetFeatureOfInterestResponse response) throws EncodingException {
GetFeatureOfInterestResponseDocument document = GetFeatureOfInterestResponseDocument.Factory.newInstance(getXmlOptions());
GetFeatureOfInterestResponseType xbGetFoiResponse = document.addNewGetFeatureOfInterestResponse();
AbstractFeature feature = response.getAbstractFeature();
if (feature instanceof FeatureCollection) {
for (AbstractFeature f : (FeatureCollection) feature) {
addFeatureOfInterest(f, xbGetFoiResponse);
}
} else if (feature instanceof SamplingFeature) {
addFeatureOfInterest(feature, xbGetFoiResponse);
}
XmlHelper.makeGmlIdsUnique(document.getDomNode());
return document;
}
Aggregations