Search in sources :

Example 1 with AbstractRole

use of org.n52.shetland.iso.gco.AbstractRole in project arctic-sea by 52North.

the class Iso19139GcoEncoder method encode.

@Override
public XmlObject encode(Object element, EncodingContext additionalValues) throws EncodingException, UnsupportedEncoderInputException {
    XmlObject encodedObject = null;
    if (element instanceof AbstractRole) {
        encodedObject = encodeRole((AbstractRole) element);
    } else {
        throw new UnsupportedEncoderInputException(this, element);
    }
    XmlHelper.validateDocument(encodedObject, EncodingException::new);
    return encodedObject;
}
Also used : EncodingException(org.n52.svalbard.encode.exception.EncodingException) XmlObject(org.apache.xmlbeans.XmlObject) AbstractRole(org.n52.shetland.iso.gco.AbstractRole) UnsupportedEncoderInputException(org.n52.svalbard.encode.exception.UnsupportedEncoderInputException)

Aggregations

XmlObject (org.apache.xmlbeans.XmlObject)1 AbstractRole (org.n52.shetland.iso.gco.AbstractRole)1 EncodingException (org.n52.svalbard.encode.exception.EncodingException)1 UnsupportedEncoderInputException (org.n52.svalbard.encode.exception.UnsupportedEncoderInputException)1