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