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;
}
Aggregations