Details
Description
The following methods:
Citation.getIdentifiers()
Citation.getIdentifierTypes()
both return a Collection<String>. It make it hard to use them together (for example searching an identifier of a specific type). A more convenient return type would be Map<String,String> where the keys are the identifier types (e.g. "Universal Product Code (UPC)") and the values are the identifiers for the corresponding types.
A Map<String,String> return type would work only if there is only one identifier for each identifier type.
A more generic (and probably more powerfull) solution would be to replace:
Collection<String> getIdentifiers();
by
Collection<Identifier> getIdentifiers();
But it is not clear for me why the ISO 19115 specification was not that way in the first place. I guess there is a reason...
Yet an other (and lessdisruptive) solution would be to keep the current methods, but replace Collection<String> by List<String>. It would make the identifier-identifier type pairs easier to use, but would not be as useful than Map<String,String> or Set<Identifier>.
Reference:
http://geoapi.sourceforge.net/2.0/javadoc/org/opengis/metadata/citation/Citation.html#getIdentifiers()
Issue Links
- relates to
-
GEO-93
Synchronize Metadata package with latest ISO19115 specification
-
The getIdentifierTypes() method has been deprecated, since it has been removed from latest versions of ISO 19115.