Closed desruisseaux closed 2 years ago
For the record, a Java interface derived verbatim from ISO 19157 would be like below (slightly simplified):
/**
* Data quality parameter.
*
* @version 3.1
* @since 3.1
*/
@UML(identifier="DQM_Parameter", specification=ISO_19157)
public interface Parameter {
/**
* Name of the data quality parameter.
*/
@UML(identifier="name", obligation=MANDATORY, specification=ISO_19157)
InternationalString getName();
/**
* Definition of the data quality parameter.
*/
@UML(identifier="definition", obligation=MANDATORY, specification=ISO_19157)
InternationalString getDefinition();
/**
* Description of the data quality parameter.
*/
@UML(identifier="description", obligation=OPTIONAL, specification=ISO_19157)
Description getDescription();
/**
* Value type of the data quality parameter.
*/
@UML(identifier="valueType", obligation=MANDATORY, specification=ISO_19157)
TypeName getValueType();
/**
* Structure of the data quality parameter.
*/
@UML(identifier="valueStructure", obligation=OPTIONAL, specification=ISO_19157)
ValueStructure getValueStructure();
}
We still have an open issue about DQM_Description
. In current version, the extendedDescription
property (a BrowseGraphic
) is lost. This is tracked in separated issue #78.
Regarding whether to omit ValueStructure
, current version keeps it despite the fact that it now appears at only one location. If we omitted that property, it would have to be replaced by some method returning a Class<?>
. So it would not really simplify the Measure
interface. Keeping ValueStructure
does the same functionality in a more controlled way (the set of valid types is more explicit).
ISO 19157 defines a
DQM_Parameter
class (added in #44), which duplicates the parameter classes provided by other standards:CC_OperationParameter
SV_Parameter
(referenced byOperationMetadata.getParameters()
)DQM_Parameter
(referenced only inMeasure.getParameters()
)GeoAPI tries to consolidate all parameters API in a single
org.opengis.parameter
package. If we apply this consolidation to ISO 19157 as well, then theSV_Parameter
class should be omitted in favour oforg.opengis.parameter.ParameterDescriptor
(I didn't found the parameter value anywhere in ISO 19157). The mapping would be:ParameterDescriptor
getName()
InternationalString
→Identifier
getName().getDescription()
getDescription()
Description
→InternationalString
getValueClass()
RecordType
→Class<?>
The
valueStructure
attribute may be omitted because in an object-oriented language, we rather expect thevalueType
to be the structure, for exampleorg.opengis.referencing.operation.Matrix
.