You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since a sustainable harmonisation of the mostly heterogeneous borehole encoding is still not implemented satisfyingly, interoperability can be achieved by providing interfaces (mappings) of the legacy formats to a suitable representation, which can be used by any client. This however, largely depends on well-designed data models. The following code snippet (Java) illustrates this problem: To retrieve a lithology-name from a GeoSciML material fragment, four tests concerning the presence of elements are necessary, whereas BML and SWE require none, which is due to the fact that especially in SWE, structure and content is clearly separated and also that cardinalities are implemented properly.
Optional getMaterial(CompositionPartPropertyType composition) {
String title = null;
CompositionPartType.Material material = composition.getCompositionPart().getMaterial();
// first test
if (material == null) {
return Optional.ofNullable(NULL_MATERIAL);
}
CompoundMaterialType compoundMaterial = material.getCompoundMaterial();
RockMaterialType rockMaterial = (RockMaterialType) material.getCompoundMaterial();
// second test
if (rockMaterial == null) {
return Optional.ofNullable(NULL_MATERIAL);
}
ReferenceType lithology = rockMaterial.getLithology();
// third & fourth test
if ((lithology != null) && (title = lithology.getTitle()) != null) {
// finally, return the lithology name, which is the title in a GML Reference Type!!!
return Optional.ofNullable(title);
}
return Optional.ofNullable(NULL_MATERIAL);
}
The text was updated successfully, but these errors were encountered:
Since a sustainable harmonisation of the mostly heterogeneous borehole encoding is still not implemented satisfyingly, interoperability can be achieved by providing interfaces (mappings) of the legacy formats to a suitable representation, which can be used by any client. This however, largely depends on well-designed data models. The following code snippet (Java) illustrates this problem: To retrieve a lithology-name from a GeoSciML material fragment, four tests concerning the presence of elements are necessary, whereas BML and SWE require none, which is due to the fact that especially in SWE, structure and content is clearly separated and also that cardinalities are implemented properly.
Optional getMaterial(CompositionPartPropertyType composition) {
String title = null;
CompositionPartType.Material material = composition.getCompositionPart().getMaterial();
}
The text was updated successfully, but these errors were encountered: