use of org.n52.shetland.ogc.om.features.FeatureCollection in project arctic-sea by 52North.
the class SamplingEncoderv100 method createFeatureCollection.
private XmlObject createFeatureCollection(FeatureCollection sosFeatureCollection) throws EncodingException {
SamplingFeatureCollectionDocument xbSampFeatCollDoc = SamplingFeatureCollectionDocument.Factory.newInstance(getXmlOptions());
SamplingFeatureCollectionType xbSampFeatColl = xbSampFeatCollDoc.addNewSamplingFeatureCollection();
xbSampFeatColl.setId("sfc_" + Long.toString(new DateTime().getMillis()));
for (AbstractFeature sosAbstractFeature : sosFeatureCollection.getMembers().values()) {
SamplingFeaturePropertyType xbFeatMember = xbSampFeatColl.addNewMember();
xbFeatMember.set(createFeature(sosAbstractFeature));
}
return xbSampFeatCollDoc;
}
Aggregations