Search in sources :

Example 1 with OwsSections

use of org.n52.shetland.ogc.ows.OwsSections in project arctic-sea by 52North.

the class OwsEncoderv110 method encode.

@Override
public XmlObject encode(Object element, EncodingContext additionalValues) throws EncodingException {
    if (element instanceof OwsServiceIdentification) {
        return encodeServiceIdentification((OwsServiceIdentification) element);
    } else if (element instanceof OwsServiceProvider) {
        return encodeServiceProvider((OwsServiceProvider) element);
    } else if (element instanceof OwsOperationsMetadata) {
        return encodeOperationsMetadata((OwsOperationsMetadata) element);
    } else if (element instanceof OwsExceptionReport) {
        if (isEncodeExceptionsOnly(additionalValues) && !((OwsExceptionReport) element).getExceptions().isEmpty()) {
            return encodeOwsException(((OwsExceptionReport) element).getExceptions().get(0));
        }
        return encodeOwsExceptionReport((OwsExceptionReport) element);
    } else if (element instanceof OwsMetadata) {
        MetadataType metadataType = MetadataType.Factory.newInstance(getXmlOptions());
        encodeOwsMetadata((OwsMetadata) element, metadataType);
        return metadataType;
    } else if (element instanceof OwsDomain) {
        DomainType domainType = DomainType.Factory.newInstance(getXmlOptions());
        encodeOwsDomain((OwsDomain) element, domainType);
        return domainType;
    } else if (element instanceof OwsAcceptVersions) {
        return encodeAcceptVersions((OwsAcceptVersions) element);
    } else if (element instanceof OwsSections) {
        return encodeSections((OwsSections) element);
    }
    throw new UnsupportedEncoderInputException(this, element);
}
Also used : OwsDomain(org.n52.shetland.ogc.ows.OwsDomain) DomainType(net.opengis.ows.x11.DomainType) OwsOperationsMetadata(org.n52.shetland.ogc.ows.OwsOperationsMetadata) OwsMetadata(org.n52.shetland.ogc.ows.OwsMetadata) OwsSections(org.n52.shetland.ogc.ows.OwsSections) OwsServiceProvider(org.n52.shetland.ogc.ows.OwsServiceProvider) MetadataType(net.opengis.ows.x11.MetadataType) DomainMetadataType(net.opengis.ows.x11.DomainMetadataType) OwsServiceIdentification(org.n52.shetland.ogc.ows.OwsServiceIdentification) OwsExceptionReport(org.n52.shetland.ogc.ows.exception.OwsExceptionReport) OwsAcceptVersions(org.n52.shetland.ogc.ows.OwsAcceptVersions) UnsupportedEncoderInputException(org.n52.svalbard.encode.exception.UnsupportedEncoderInputException)

Aggregations

DomainMetadataType (net.opengis.ows.x11.DomainMetadataType)1 DomainType (net.opengis.ows.x11.DomainType)1 MetadataType (net.opengis.ows.x11.MetadataType)1 OwsAcceptVersions (org.n52.shetland.ogc.ows.OwsAcceptVersions)1 OwsDomain (org.n52.shetland.ogc.ows.OwsDomain)1 OwsMetadata (org.n52.shetland.ogc.ows.OwsMetadata)1 OwsOperationsMetadata (org.n52.shetland.ogc.ows.OwsOperationsMetadata)1 OwsSections (org.n52.shetland.ogc.ows.OwsSections)1 OwsServiceIdentification (org.n52.shetland.ogc.ows.OwsServiceIdentification)1 OwsServiceProvider (org.n52.shetland.ogc.ows.OwsServiceProvider)1 OwsExceptionReport (org.n52.shetland.ogc.ows.exception.OwsExceptionReport)1 UnsupportedEncoderInputException (org.n52.svalbard.encode.exception.UnsupportedEncoderInputException)1