use of org.n52.shetland.ogc.sos.gda.GetDataAvailabilityRequest in project arctic-sea by 52North.
the class GetDataAvailabilityV20XmlDecoder method parseGetDataAvailability.
/**
* Parse the GetDataAvailability XML request
*
* @param xml
* GetDataAvailability XML request
* @return {@code GetDataAvailabilityRequest}
* @throws OwsExceptionReport
* If the document could no be parsed
*/
private GetDataAvailabilityRequest parseGetDataAvailability(GetDataAvailabilityDocument xml) throws DecodingException {
GetDataAvailabilityRequest request = new GetDataAvailabilityRequest();
GetDataAvailabilityType gdat = xml.getGetDataAvailability();
request.setNamespace(XmlHelper.getNamespace(xml));
request.setResponseFormat(XmlHelper.getNamespace(xml));
request.setService(gdat.getService());
request.setVersion(gdat.getVersion());
if (CollectionHelper.isNotNullOrEmpty(gdat.getObservedPropertyArray())) {
for (String s : gdat.getObservedPropertyArray()) {
request.addObservedProperty(s);
}
}
if (CollectionHelper.isNotNullOrEmpty(gdat.getProcedureArray())) {
for (String s : gdat.getProcedureArray()) {
request.addProcedure(s);
}
}
if (CollectionHelper.isNotNullOrEmpty(gdat.getFeatureOfInterestArray())) {
for (String s : gdat.getFeatureOfInterestArray()) {
request.addFeatureOfInterest(s);
}
}
if (CollectionHelper.isNotNullOrEmpty(gdat.getOfferingArray())) {
for (String s : gdat.getOfferingArray()) {
request.addOffering(s);
}
}
if (CollectionHelper.isNotNullOrEmpty(gdat.getResponseFormatArray())) {
for (String s : gdat.getResponseFormatArray()) {
request.setResponseFormat(s);
}
}
request.setExtensions(parseExtensibleRequest(gdat));
return request;
}
use of org.n52.shetland.ogc.sos.gda.GetDataAvailabilityRequest in project arctic-sea by 52North.
the class GetDataAvailabilityXmlDecoder method parseGetDataAvailability.
/**
* Parse the GetDataAvailability XML request
*
* @param xml
* GetDataAvailability XML request
* @return {@code GetDataAvailabilityRequest}
* @throws DecodingException
* If the document could no be parsed
*/
private GetDataAvailabilityRequest parseGetDataAvailability(GetDataAvailabilityDocument xml) throws DecodingException {
GetDataAvailabilityRequest request = new GetDataAvailabilityRequest();
GetDataAvailabilityType gdat = xml.getGetDataAvailability();
String namespace = XmlHelper.getNamespace(xml);
request.setNamespace(namespace);
request.setResponseFormat(namespace);
request.setService(gdat.getService());
request.setVersion(gdat.getVersion());
if (CollectionHelper.isNotNullOrEmpty(gdat.getObservedPropertyArray())) {
for (String s : gdat.getObservedPropertyArray()) {
request.addObservedProperty(s);
}
}
if (CollectionHelper.isNotNullOrEmpty(gdat.getProcedureArray())) {
for (String s : gdat.getProcedureArray()) {
request.addProcedure(s);
}
}
if (CollectionHelper.isNotNullOrEmpty(gdat.getFeatureOfInterestArray())) {
for (String s : gdat.getFeatureOfInterestArray()) {
request.addFeatureOfInterest(s);
}
}
if (CollectionHelper.isNotNullOrEmpty(gdat.getOfferingArray())) {
for (String s : gdat.getOfferingArray()) {
request.addOffering(s);
}
}
request.setExtensions(parseExtensibleRequest(gdat));
return request;
}
Aggregations