Search in sources :

Example 1 with GetFeatureOfInterestRequest

use of org.n52.shetland.ogc.sos.request.GetFeatureOfInterestRequest in project arctic-sea by 52North.

the class SosDecoderv20 method parseGetFeatureOfInterest.

// private SwesExtensions parseSwesExtensions(final XmlObject[]
// extensionArray) throws OwsExceptionReport
// {
// final SwesExtensions extensions = new SwesExtensions();
// for (final XmlObject xbSwesExtension : extensionArray) {
// 
// final Object obj = CodingHelper.decodeXmlElement(xbSwesExtension);
// if (obj instanceof SwesExtension<?>) {
// extensions.addSwesExtension((SwesExtension<?>) obj);
// }
// }
// return extensions;
// }
/**
 * parses the passes XmlBeans document and creates a SOS
 * getFeatureOfInterest request
 *
 * @param getFoiDoc
 *            XmlBeans document representing the getFeatureOfInterest
 *            request
 * @return Returns SOS getFeatureOfInterest request
 *
 * @throws DecodingException
 *             * if validation of the request failed
 */
private OwsServiceRequest parseGetFeatureOfInterest(final GetFeatureOfInterestDocument getFoiDoc) throws DecodingException {
    final GetFeatureOfInterestRequest getFoiRequest = new GetFeatureOfInterestRequest();
    final GetFeatureOfInterestType getFoiType = getFoiDoc.getGetFeatureOfInterest();
    getFoiRequest.setService(getFoiType.getService());
    getFoiRequest.setVersion(getFoiType.getVersion());
    getFoiRequest.setFeatureIdentifiers(Arrays.asList(getFoiType.getFeatureOfInterestArray()));
    getFoiRequest.setObservedProperties(Arrays.asList(getFoiType.getObservedPropertyArray()));
    getFoiRequest.setProcedures(Arrays.asList(getFoiType.getProcedureArray()));
    getFoiRequest.setSpatialFilters(parseSpatialFilters4GetFeatureOfInterest(getFoiType.getSpatialFilterArray()));
    getFoiRequest.setExtensions(parseExtensibleRequest(getFoiType));
    return getFoiRequest;
}
Also used : GetFeatureOfInterestRequest(org.n52.shetland.ogc.sos.request.GetFeatureOfInterestRequest) GetFeatureOfInterestType(net.opengis.sos.x20.GetFeatureOfInterestType)

Example 2 with GetFeatureOfInterestRequest

use of org.n52.shetland.ogc.sos.request.GetFeatureOfInterestRequest in project arctic-sea by 52North.

the class GetFeatureOfInterestRequestDecoder method decodeRequest.

@Override
protected GetFeatureOfInterestRequest decodeRequest(JsonNode node) throws DecodingException {
    GetFeatureOfInterestRequest req = new GetFeatureOfInterestRequest();
    req.setFeatureIdentifiers(decodeFeatureOfInterests(node));
    req.setProcedures(decodeProcedures(node));
    req.setObservedProperties(decodeObservedProperties(node));
    req.setSpatialFilters(decodeSpatialFilters(node));
    req.setTemporalFilters(decodeTemporalFilters(node));
    return req;
}
Also used : GetFeatureOfInterestRequest(org.n52.shetland.ogc.sos.request.GetFeatureOfInterestRequest)

Example 3 with GetFeatureOfInterestRequest

use of org.n52.shetland.ogc.sos.request.GetFeatureOfInterestRequest in project arctic-sea by 52North.

the class SosDecoderv100 method parseGetFeatureOfInterest.

/**
 * parses the passes XmlBeans document and creates a SOS
 * getFeatureOfInterest request
 *
 * @param getFoiDoc
 *            XmlBeans document representing the getFeatureOfInterest
 *            request
 * @return Returns SOS getFeatureOfInterest request
 *
 * @throws DecodingException
 *             * if validation of the request failed
 */
private OwsServiceRequest parseGetFeatureOfInterest(GetFeatureOfInterestDocument getFoiDoc) throws DecodingException {
    GetFeatureOfInterestRequest getFoiRequest = new GetFeatureOfInterestRequest();
    GetFeatureOfInterest getFoi = getFoiDoc.getGetFeatureOfInterest();
    getFoiRequest.setService(getFoi.getService());
    getFoiRequest.setVersion(getFoi.getVersion());
    getFoiRequest.setFeatureIdentifiers(Arrays.asList(getFoi.getFeatureOfInterestIdArray()));
    getFoiRequest.setSpatialFilters(parseSpatialFilters4GetFeatureOfInterest(getFoi.getLocation()));
    return getFoiRequest;
}
Also used : GetFeatureOfInterest(net.opengis.sos.x10.GetFeatureOfInterestDocument.GetFeatureOfInterest) GetFeatureOfInterestRequest(org.n52.shetland.ogc.sos.request.GetFeatureOfInterestRequest)

Aggregations

GetFeatureOfInterestRequest (org.n52.shetland.ogc.sos.request.GetFeatureOfInterestRequest)3 GetFeatureOfInterest (net.opengis.sos.x10.GetFeatureOfInterestDocument.GetFeatureOfInterest)1 GetFeatureOfInterestType (net.opengis.sos.x20.GetFeatureOfInterestType)1