Search in sources :

Example 1 with IdentifierListPropertyType

use of net.opengis.sensorml.x20.IdentifierListPropertyType in project arctic-sea by 52North.

the class SensorMLDecoderV20 method parseIdentifications.

private void parseIdentifications(DescribedObject describedObject, IdentifierListPropertyType[] identificationArray) {
    for (final IdentifierListPropertyType ilpt : identificationArray) {
        if (ilpt.isSetIdentifierList() && CollectionHelper.isNotNullOrEmpty(ilpt.getIdentifierList().getIdentifier2Array())) {
            for (final Identifier i : ilpt.getIdentifierList().getIdentifier2Array()) {
                if (i.getTerm() != null) {
                    final SmlIdentifier identifier = new SmlIdentifier();
                    parseTerm(i.getTerm(), identifier);
                    describedObject.addIdentifier(identifier);
                    if (isIdentificationProcedureIdentifier(identifier)) {
                        describedObject.setIdentifier(identifier.getValue());
                    }
                }
            }
        }
    }
}
Also used : Identifier(net.opengis.sensorml.x20.IdentifierListType.Identifier) SmlIdentifier(org.n52.shetland.ogc.sensorML.elements.SmlIdentifier) IdentifierListPropertyType(net.opengis.sensorml.x20.IdentifierListPropertyType) SmlIdentifier(org.n52.shetland.ogc.sensorML.elements.SmlIdentifier)

Example 2 with IdentifierListPropertyType

use of net.opengis.sensorml.x20.IdentifierListPropertyType in project arctic-sea by 52North.

the class SensorMLEncoderv20 method createIdentification.

/**
 * Creates the valueentification section of the SensorML description.
 *
 * @param identifications
 *            SOS valueentifications
 *
 * @return XML Identification array
 */
protected IdentifierListPropertyType[] createIdentification(final List<SmlIdentifier> identifications) {
    final IdentifierListPropertyType xbIdentification = IdentifierListPropertyType.Factory.newInstance(getXmlOptions());
    final IdentifierListType xbIdentifierList = xbIdentification.addNewIdentifierList();
    identifications.forEach(sosSMLIdentifier -> createTerm(xbIdentifierList.addNewIdentifier2().addNewTerm(), sosSMLIdentifier));
    return new IdentifierListPropertyType[] { xbIdentification };
}
Also used : IdentifierListType(net.opengis.sensorml.x20.IdentifierListType) IdentifierListPropertyType(net.opengis.sensorml.x20.IdentifierListPropertyType)

Aggregations

IdentifierListPropertyType (net.opengis.sensorml.x20.IdentifierListPropertyType)2 IdentifierListType (net.opengis.sensorml.x20.IdentifierListType)1 Identifier (net.opengis.sensorml.x20.IdentifierListType.Identifier)1 SmlIdentifier (org.n52.shetland.ogc.sensorML.elements.SmlIdentifier)1