Search in sources :

Example 1 with GenericMetaDataDocument

use of net.opengis.gml.x32.GenericMetaDataDocument in project arctic-sea by 52North.

the class GmlEncoderv321 method createGenericMetaData.

private XmlObject createGenericMetaData(GenericMetaData element, EncodingContext ctx) throws EncodingException {
    GenericMetaDataDocument gmdd = GenericMetaDataDocument.Factory.newInstance(getXmlOptions());
    GenericMetaDataType gmdt = gmdd.addNewGenericMetaData();
    if (element.getContent() instanceof HasDefaultEncoding && ((HasDefaultEncoding<?>) element.getContent()).isSetDefaultElementEncoding()) {
        // TODO check
        gmdt.set(encodeObjectToXml(((HasDefaultEncoding<?>) element.getContent()).getDefaultElementEncoding(), element.getContent(), new EncodingContext().with(XmlBeansEncodingFlags.PROPERTY_TYPE, true)));
    }
    if (ctx.has(XmlBeansEncodingFlags.DOCUMENT)) {
        return gmdd;
    }
    return gmdt;
}
Also used : GenericMetaDataDocument(net.opengis.gml.x32.GenericMetaDataDocument) GenericMetaDataType(net.opengis.gml.x32.GenericMetaDataType) HasDefaultEncoding(org.n52.shetland.ogc.HasDefaultEncoding)

Aggregations

GenericMetaDataDocument (net.opengis.gml.x32.GenericMetaDataDocument)1 GenericMetaDataType (net.opengis.gml.x32.GenericMetaDataType)1 HasDefaultEncoding (org.n52.shetland.ogc.HasDefaultEncoding)1