Search in sources :

Example 1 with CodeWithAuthorityType

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

the class GmlEncoderv321 method createCodeWithAuthorityType.

private CodeWithAuthorityType createCodeWithAuthorityType(CodeWithAuthority sosCodeWithAuthority) throws EncodingException {
    if (!sosCodeWithAuthority.isSetValue()) {
        throw missingValueParameter(CodeWithAuthorityType.class.getName());
    }
    CodeWithAuthorityType codeWithAuthority = CodeWithAuthorityType.Factory.newInstance(getXmlOptions());
    codeWithAuthority.setStringValue(sosCodeWithAuthority.getValue());
    codeWithAuthority.setCodeSpace(Optional.ofNullable(sosCodeWithAuthority.getCodeSpace()).filter(Predicates.not(String::isEmpty)).orElse(OGCConstants.UNKNOWN));
    return codeWithAuthority;
}
Also used : CodeWithAuthorityType(net.opengis.gml.x32.CodeWithAuthorityType)

Aggregations

CodeWithAuthorityType (net.opengis.gml.x32.CodeWithAuthorityType)1