Search in sources :

Example 1 with SosInsertionCapabilities

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

the class GetCapabilitiesResponseEncoder method createInsertionCapabilities.

private XmlObject createInsertionCapabilities(SosInsertionCapabilities caps) {
    InsertionCapabilitiesDocument doc = InsertionCapabilitiesDocument.Factory.newInstance(getXmlOptions());
    InsertionCapabilitiesType xbCaps = doc.addNewInsertionCapabilities();
    caps.getFeatureOfInterestTypes().stream().filter(foiType -> !foiType.equals(SosConstants.NOT_DEFINED)).forEachOrdered(foiType -> xbCaps.addFeatureOfInterestType(foiType));
    caps.getObservationTypes().stream().filter(oType -> !oType.equals(SosConstants.NOT_DEFINED)).forEachOrdered(oType -> xbCaps.addObservationType(oType));
    caps.getProcedureDescriptionFormats().stream().filter(pdf -> !pdf.equals(SosConstants.NOT_DEFINED)).forEachOrdered(pdf -> xbCaps.addProcedureDescriptionFormat(pdf));
    caps.getSupportedEncodings().stream().filter(se -> !se.equals(SosConstants.NOT_DEFINED)).forEachOrdered(se -> xbCaps.addSupportedEncoding(se));
    return doc;
}
Also used : Extension(org.n52.shetland.ogc.ows.extension.Extension) SosInsertionCapabilities(org.n52.shetland.ogc.sos.SosInsertionCapabilities) StringBasedExtension(org.n52.shetland.ogc.ows.extension.StringBasedExtension) SosOffering(org.n52.shetland.ogc.sos.SosOffering) GetCapabilitiesResponse(org.n52.shetland.ogc.ows.service.GetCapabilitiesResponse) XmlCursor(org.apache.xmlbeans.XmlCursor) W3CConstants(org.n52.shetland.w3c.W3CConstants) LoggerFactory(org.slf4j.LoggerFactory) SosConstants(org.n52.shetland.ogc.sos.SosConstants) ContentsType(net.opengis.sos.x20.ContentsType) OwsCapabilities(org.n52.shetland.ogc.ows.OwsCapabilities) OwsCapabilitiesExtension(org.n52.shetland.ogc.ows.OwsCapabilitiesExtension) CapabilitiesDocument(net.opengis.sos.x20.CapabilitiesDocument) SosCapabilities(org.n52.shetland.ogc.sos.SosCapabilities) Contents(net.opengis.sos.x20.CapabilitiesType.Contents) XmlObject(org.apache.xmlbeans.XmlObject) CodeType(org.n52.shetland.ogc.gml.CodeType) FeatureRelationshipType(net.opengis.swes.x20.FeatureRelationshipType) Sos2Constants(org.n52.shetland.ogc.sos.Sos2Constants) EncodingException(org.n52.svalbard.encode.exception.EncodingException) Logger(org.slf4j.Logger) SosObservationOfferingExtension(org.n52.shetland.ogc.sos.extension.SosObservationOfferingExtension) Collection(java.util.Collection) Set(java.util.Set) InsertionCapabilitiesDocument(net.opengis.sos.x20.InsertionCapabilitiesDocument) Sets(com.google.common.collect.Sets) ObservationOfferingType(net.opengis.sos.x20.ObservationOfferingType) XmlException(org.apache.xmlbeans.XmlException) CapabilitiesType(net.opengis.sos.x20.CapabilitiesType) GmlConstants(org.n52.shetland.ogc.gml.GmlConstants) InsertionCapabilitiesType(net.opengis.sos.x20.InsertionCapabilitiesType) SchemaLocation(org.n52.shetland.w3c.SchemaLocation) Offering(net.opengis.swes.x20.AbstractContentsType.Offering) TimePeriod(org.n52.shetland.ogc.gml.time.TimePeriod) OwsOperationsMetadata(org.n52.shetland.ogc.ows.OwsOperationsMetadata) SosObservationOffering(org.n52.shetland.ogc.sos.SosObservationOffering) InsertionCapabilitiesType(net.opengis.sos.x20.InsertionCapabilitiesType) InsertionCapabilitiesDocument(net.opengis.sos.x20.InsertionCapabilitiesDocument)

Aggregations

Sets (com.google.common.collect.Sets)1 Collection (java.util.Collection)1 Set (java.util.Set)1 CapabilitiesDocument (net.opengis.sos.x20.CapabilitiesDocument)1 CapabilitiesType (net.opengis.sos.x20.CapabilitiesType)1 Contents (net.opengis.sos.x20.CapabilitiesType.Contents)1 ContentsType (net.opengis.sos.x20.ContentsType)1 InsertionCapabilitiesDocument (net.opengis.sos.x20.InsertionCapabilitiesDocument)1 InsertionCapabilitiesType (net.opengis.sos.x20.InsertionCapabilitiesType)1 ObservationOfferingType (net.opengis.sos.x20.ObservationOfferingType)1 Offering (net.opengis.swes.x20.AbstractContentsType.Offering)1 FeatureRelationshipType (net.opengis.swes.x20.FeatureRelationshipType)1 XmlCursor (org.apache.xmlbeans.XmlCursor)1 XmlException (org.apache.xmlbeans.XmlException)1 XmlObject (org.apache.xmlbeans.XmlObject)1 CodeType (org.n52.shetland.ogc.gml.CodeType)1 GmlConstants (org.n52.shetland.ogc.gml.GmlConstants)1 TimePeriod (org.n52.shetland.ogc.gml.time.TimePeriod)1 OwsCapabilities (org.n52.shetland.ogc.ows.OwsCapabilities)1 OwsCapabilitiesExtension (org.n52.shetland.ogc.ows.OwsCapabilitiesExtension)1