use of org.n52.shetland.ogc.sos.ifoi.InsertFeatureOfInterestRequest in project arctic-sea by 52North.
the class InsertFeatureOfInterestDecoder method parseInsertFeatureOfInterest.
private InsertFeatureOfInterestRequest parseInsertFeatureOfInterest(InsertFeatureOfInterestDocument ifoid) throws DecodingException {
InsertFeatureOfInterestRequest request = null;
InsertFeatureOfInterestType ifoit = ifoid.getInsertFeatureOfInterest();
if (ifoit != null) {
request = new InsertFeatureOfInterestRequest();
request.setVersion(ifoit.getVersion());
request.setService(ifoit.getService());
if (CollectionHelper.isNotNullOrEmpty(ifoit.getFeatureMemberArray())) {
parseFeatureMember(ifoit, request);
}
} else {
throw new DecodingException("Received XML document is not valid. Set log level to debug to get more details");
}
return request;
}
use of org.n52.shetland.ogc.sos.ifoi.InsertFeatureOfInterestRequest in project arctic-sea by 52North.
the class InsertFeatureOfInterestDecoder method decode.
public InsertFeatureOfInterestRequest decode(XmlObject xmlObject) throws DecodingException {
LOGGER.debug(String.format("REQUESTTYPE: %s", xmlObject != null ? xmlObject.getClass() : "null recevied"));
// XmlHelper.validateDocument(xmlObject);
if (xmlObject instanceof InsertFeatureOfInterestDocument) {
InsertFeatureOfInterestDocument ifoid = (InsertFeatureOfInterestDocument) xmlObject;
InsertFeatureOfInterestRequest decodedRequest = parseInsertFeatureOfInterest(ifoid);
LOGGER.debug(String.format("Decoded request: %s", decodedRequest));
return decodedRequest;
} else {
throw new UnsupportedDecoderInputException(this, xmlObject);
}
}
Aggregations