Search in sources :

Example 1 with AbstractMetaData

use of org.n52.shetland.ogc.gml.AbstractMetaData in project arctic-sea by 52North.

the class AbstractOmEncoderv20 method setMetaDataProperty.

private void setMetaDataProperty(OmObservation sosObservation, OMObservationType xbObservation) throws EncodingException {
    if (sosObservation.isSetMetaDataProperty()) {
        for (AbstractMetaData abstractMetaData : sosObservation.getMetaDataProperty()) {
            XmlObject encodeObject = encodeGML(abstractMetaData);
            XmlObject substituteElement = XmlHelper.substituteElement(xbObservation.addNewMetaDataProperty().addNewAbstractMetaData(), encodeObject);
            substituteElement.set(encodeObject);
        }
    }
}
Also used : XmlObject(org.apache.xmlbeans.XmlObject) AbstractMetaData(org.n52.shetland.ogc.gml.AbstractMetaData)

Example 2 with AbstractMetaData

use of org.n52.shetland.ogc.gml.AbstractMetaData in project arctic-sea by 52North.

the class SamplingEncoderv20 method setMetaDataProperty.

protected void setMetaDataProperty(SFSamplingFeatureType sfssft, AbstractSamplingFeature sampFeat) throws EncodingException {
    if (sampFeat.isSetMetaDataProperty()) {
        for (AbstractMetaData abstractMetaData : sampFeat.getMetaDataProperty()) {
            XmlObject encodeObject = encodeObjectToXml(GmlConstants.NS_GML_32, abstractMetaData);
            XmlObject substituteElement = XmlHelper.substituteElement(sfssft.addNewMetaDataProperty().addNewAbstractMetaData(), encodeObject);
            substituteElement.set(encodeObject);
        }
    }
}
Also used : XmlObject(org.apache.xmlbeans.XmlObject) AbstractMetaData(org.n52.shetland.ogc.gml.AbstractMetaData)

Example 3 with AbstractMetaData

use of org.n52.shetland.ogc.gml.AbstractMetaData in project arctic-sea by 52North.

the class AbstractOmV20XmlStreamWriter method writeMetaDataProperty.

protected void writeMetaDataProperty(List<AbstractMetaData> metaDataProperty) throws XMLStreamException, EncodingException {
    for (AbstractMetaData abstractMetaData : metaDataProperty) {
        Object o = getEncoder(GmlConstants.NS_GML_32, abstractMetaData).encode(abstractMetaData, EncodingContext.of(XmlBeansEncodingFlags.DOCUMENT));
        if (o != null && o instanceof XmlObject) {
            start(GmlConstants.QN_OM_20_META_DATA_PROPERTY_32);
            rawText(((XmlObject) o).xmlText(getXmlOptions()));
            end(GmlConstants.QN_OM_20_META_DATA_PROPERTY_32);
        }
    }
}
Also used : XmlObject(org.apache.xmlbeans.XmlObject) XmlObject(org.apache.xmlbeans.XmlObject) AbstractMetaData(org.n52.shetland.ogc.gml.AbstractMetaData)

Example 4 with AbstractMetaData

use of org.n52.shetland.ogc.gml.AbstractMetaData in project arctic-sea by 52North.

the class SamplingEncoderv100 method setMetaDataProperty.

private void setMetaDataProperty(SamplingFeatureType sft, AbstractSamplingFeature sampFeat) throws EncodingException {
    if (sampFeat.isSetMetaDataProperty()) {
        for (AbstractMetaData abstractMetaData : sampFeat.getMetaDataProperty()) {
            XmlObject encodeObject = encodeObjectToXml(GmlConstants.NS_GML, abstractMetaData);
            sft.addNewMetaDataProperty().set(encodeObject);
        // XmlObject substituteElement = XmlHelper.substituteElement(
        // sft.addNewMetaDataProperty().addNewAbstractMetaData(),
        // encodeObject);
        // substituteElement.set(encodeObject);
        }
    }
}
Also used : XmlObject(org.apache.xmlbeans.XmlObject) AbstractMetaData(org.n52.shetland.ogc.gml.AbstractMetaData)

Aggregations

XmlObject (org.apache.xmlbeans.XmlObject)4 AbstractMetaData (org.n52.shetland.ogc.gml.AbstractMetaData)4