use of org.n52.shetland.ogc.ows.OwsAcceptVersions 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);
}
Aggregations