use of org.isotc211.x2005.gmd.DQResultPropertyType in project arctic-sea by 52North.
the class Iso19139GmdEncoder method encodeGmdConformanceResult.
private void encodeGmdConformanceResult(DQResultPropertyType xbResult, GmdConformanceResult gmdConformanceResult) {
DQConformanceResultType dqConformanceResultType = (DQConformanceResultType) xbResult.addNewAbstractDQResult().substitute(QN_GMD_CONFORMANCE_RESULT, DQConformanceResultType.type);
if (gmdConformanceResult.isSetPassNilReason()) {
dqConformanceResultType.addNewPass().setNilReason(gmdConformanceResult.getPassNilReason().name());
} else {
dqConformanceResultType.addNewPass().setBoolean(gmdConformanceResult.isPass());
}
dqConformanceResultType.addNewExplanation().setCharacterString(gmdConformanceResult.getSpecification().getExplanation());
encodeCiCitation(dqConformanceResultType.addNewSpecification(), gmdConformanceResult.getSpecification().getCitation());
}
use of org.isotc211.x2005.gmd.DQResultPropertyType in project arctic-sea by 52North.
the class Iso19139GmdEncoder method encodeGmdDomainConsistency.
private XmlObject encodeGmdDomainConsistency(GmdDomainConsistency element, EncodingContext additionalValues) throws EncodingException {
if (additionalValues.has(XmlBeansEncodingFlags.DOCUMENT)) {
DQDomainConsistencyDocument document = DQDomainConsistencyDocument.Factory.newInstance(getXmlOptions());
DQResultPropertyType addNewResult = document.addNewDQDomainConsistency().addNewResult();
encodeGmdDomainConsistency(addNewResult, element);
return document;
} else if (additionalValues.has(XmlBeansEncodingFlags.PROPERTY_TYPE)) {
DQDomainConsistencyPropertyType propertyType = DQDomainConsistencyPropertyType.Factory.newInstance(getXmlOptions());
DQResultPropertyType addNewResult = propertyType.addNewDQDomainConsistency().addNewResult();
encodeGmdDomainConsistency(addNewResult, element);
return propertyType;
} else {
DQDomainConsistencyType type = DQDomainConsistencyType.Factory.newInstance(getXmlOptions());
DQResultPropertyType addNewResult = type.addNewResult();
encodeGmdDomainConsistency(addNewResult, element);
return type;
}
}
use of org.isotc211.x2005.gmd.DQResultPropertyType in project arctic-sea by 52North.
the class Iso19139GmdEncoder method encodeGmdQuantitativeResult.
private void encodeGmdQuantitativeResult(DQResultPropertyType xbResult, GmdQuantitativeResult gmdQuantitativeResult) {
DQQuantitativeResultType dqQuantitativeResultType = (DQQuantitativeResultType) xbResult.addNewAbstractDQResult().substitute(QN_GMD_QUANTITATIVE_RESULT, DQQuantitativeResultType.type);
GmlBaseUnit unit = gmdQuantitativeResult.getUnit();
UnitOfMeasurePropertyType valueUnit = dqQuantitativeResultType.addNewValueUnit();
BaseUnitType xbBaseUnit = (BaseUnitType) valueUnit.addNewUnitDefinition().substitute(QN_GML_BASE_UNIT, BaseUnitType.type);
CodeType xbCatalogSymbol = xbBaseUnit.addNewCatalogSymbol();
xbCatalogSymbol.setCodeSpace(unit.getCatalogSymbol().getCodeSpace().toString());
xbCatalogSymbol.setStringValue(unit.getCatalogSymbol().getValue());
xbBaseUnit.setId(unit.getId());
xbBaseUnit.addNewUnitsSystem().setHref(unit.getUnitSystem());
xbBaseUnit.addNewIdentifier().setCodeSpace(unit.getIdentifier());
if (gmdQuantitativeResult.isSetValueNilReason()) {
dqQuantitativeResultType.addNewValue().setNilReason(gmdQuantitativeResult.getValueNilReason().name());
} else {
XmlCursor cursor = dqQuantitativeResultType.addNewValue().addNewRecord().newCursor();
cursor.toNextToken();
cursor.insertChars(gmdQuantitativeResult.getValue());
cursor.dispose();
}
}
Aggregations