|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IdentifiedObject
The interface for all Geotk objects having identifiers. Identifiers are String in
a namespace identified by a Citation. The namespace can be some organization like
EPSG for Coordinate Reference System objects, or a
well-known acronym like ISBN for International Standard Book Number.
When an identified object is marshalled in a ISO 19139 compliant XML document, some identifiers
are handled in a special way: they appear as gml:id, gco:uuid or xlink:href
attributes of the XML element. Those identifiers can be specified using the IdentifierSpace
enum values as below:
IdentifiedObject object = ...; object.getIdentifierMap().put(IdentifierSpace.ID, "myID");
Relationship with GeoAPI
Identifiers exist also in some (not all) GeoAPI objects. Some GeoAPI objects
(Instrument, Platform,
Operation, Processing,
etc.) have an explicit single identifier attribute, while other GeoAPI objects
(Citation, Objective,
referencing IdentifiedObject, etc.) allow an arbitrary
number of identifiers. However GeoAPI does not define explicit methods for handling the id,
uuid or href attributes, since they are specific to XML marshalling (they do not
appear in OGC/ISO abstract specifications). This IdentifiedObject interface provides a
way to handle those identifiers.
Note that GeoAPI defines a similar interface, also named IdentifiedObject.
However that GeoAPI interface is not of general use, since it contains methods like
toWKT() that are specific to referencing
or geometric objects. In addition, the GeoAPI interface defines some attributes
(name,
alias,
remarks) that are not needed
for the purpose of handling XML id, uuid or href attributes.
IdentifierSpace,
MetadataEntity,
ObjectLinker.newIdentifiedObject(Class, Identifier[])
| utility/geotk-xml-base (download) | View source code for this class |
| Method Summary | |
|---|---|
IdentifierMap |
getIdentifierMap()
A map view of identifiers. |
Collection<? extends Identifier> |
getIdentifiers()
Returns all identifiers associated to this object. |
XLink |
getXLink()
Deprecated. Replaced by getIdentifierMap().getSpecialized(IdentifierSpace.XLINK). |
void |
setXLink(XLink link)
Deprecated. Replaced by getIdentifierMap().putSpecialized(IdentifierSpace.XLINK, link). |
| Method Detail |
|---|
Collection<? extends Identifier> getIdentifiers()
href, role, arcrole, title,
show and actuate attributes)Note that XML ID attribute are actually unique only in the scope of the XML document being processed.
DefaultCitation,
DefaultObjective,
AbstractIdentifiedObjectIdentifierMap getIdentifierMap()
There is usually a one-to-one relationship between the map entries and the identifier elements, but not always:
The map view may contain less entries, because the map interface allows only one
entry per authority. If the identifier collection contains
many identifiers for the same authority, then only the first occurrence is visible through
this Map view.
The map view may also contain more entries than the identifier collection. For example the Citation
interface defines separated attributes for ISBN, ISSN and other identifiers. This map
view may choose to unify all those attributes in a single view.
The map supports put operations if and only if this
IdentifiedObject is modifiable.
@Deprecated XLink getXLink()
getIdentifierMap().getSpecialized(IdentifierSpace.XLINK).
xlink attributes associated to this identified object,
or null if none. The xlink attributes are often processed in a
special way. See MetadataEntity
for an example applicable to ISO 19139 document.
xlink attributes, or null if none.
@Deprecated
void setXLink(XLink link)
throws UnsupportedOperationException
getIdentifierMap().putSpecialized(IdentifierSpace.XLINK, link).
xlink attributes for this identified object. Callers should define
one or many XLink attributes (href, role, arcrole,
title, show and actuate) before to invoke this method.
link - XML xlink attributes, or null if none.
UnsupportedOperationException - if this object is unmodifiable.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||