Object
AbstractIdentifiedType
- All Implemented Interfaces:
Serializable
,Deprecable
- Direct Known Subclasses:
AbstractOperation
,DefaultAssociationRole
,DefaultAttributeType
,DefaultFeatureType
Identification and description information inherited by property types and feature types.
Warning:
This class is expected to implement a GeoAPI
IdentifiedType
interface in a future version.
When such interface will be available, most references to AbstractIdentifiedType
in the API
will be replaced by references to the IdentifiedType
interface.- Since:
- 0.5
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Key for the"definition"
property to be given to the constructor.static final String
Key for the"deprecated"
property to be given to the constructor.static final String
Key for the"description"
property to be given to the constructor.static final String
Key for the"designation"
property to be given to the constructor.static final String
Key for the"name"
property to be given to the constructor. -
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractIdentifiedType
(Map<String, ?> identification) Constructs a type from the given properties. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares this type with the given object for equality.Returns a concise definition of the element.Returns optional information beyond that required for concise definition of the element.Returns a natural language designator for the element.final GenericName
getName()
Returns the name of this type.Returns comments on or information about this type.int
Returns a hash code value for this type.boolean
Returnstrue
if this type is deprecated.
-
Field Details
-
NAME_KEY
Key for the"name"
property to be given to the constructor. This is used for setting the value to be returned bygetName()
.- See Also:
-
DEFINITION_KEY
Key for the"definition"
property to be given to the constructor. This is used for setting the value to be returned bygetDefinition()
.- See Also:
-
DESIGNATION_KEY
Key for the"designation"
property to be given to the constructor. This is used for setting the value to be returned bygetDesignation()
.- See Also:
-
DESCRIPTION_KEY
Key for the"description"
property to be given to the constructor. This is used for setting the value to be returned bygetDescription()
.- See Also:
-
DEPRECATED_KEY
Key for the"deprecated"
property to be given to the constructor. This is used for setting the value to be returned byisDeprecated()
.If this property is set to
true
, then the value associated toDESCRIPTION_KEY
should give the replacement (e.g. "superceded by …").- Since:
- 0.8
- See Also:
-
-
Constructor Details
-
AbstractIdentifiedType
Constructs a type from the given properties. Keys are strings from the table below. The map given in argument shall contain an entry at least for the "name". Other entries listed in the table below are optional.Recognized map entries Map key Value type Returned by "name" GenericName
orString
getName()
"definition" InternationalString
orString
getDefinition()
"designation" InternationalString
orString
getDesignation()
"description" InternationalString
orString
getDescription()
"deprecated" Boolean
isDeprecated()
"locale" Locale
(none) Localization
All localizable attributes like"definition"
may have a language and country code suffix. For example, the"definition_fr"
property stands for remarks in French and the"definition_fr_CA"
property stands for remarks in French Canadian. They are convenience properties for building theInternationalString
value.The
"locale"
property applies only in case of exception for formatting the error message, and is used only on a best effort basis. The locale is discarded after successful construction since localizations are applied by theInternationalString.toString(Locale)
method.- Parameters:
identification
- the name and other information to be given to this identified type.- Throws:
IllegalArgumentException
- if a property has an invalid value.
-
-
Method Details
-
getName
Returns the name of this type. The namespace can be either explicit (scoped name) or implicit (local name).For feature types, the name is mandatory and shall be unique in the unit processing the data (e.g. a
DataStore
reading a file).API design note
This method is final because it is invoked (indirectly) by subclass constructors, and invoking a user-overrideable method at construction time is not recommended. Furthermore, this attribute is often used as the primary key forIdentifiedType
instances and need some guarantees about its stability.- Returns:
- the type name.
-
getDefinition
Returns a concise definition of the element.- Returns:
- concise definition of the element.
-
getDesignation
Returns a natural language designator for the element. This can be used as an alternative to the name in user interfaces.- Returns:
- natural language designator for the element, or
null
if none.
-
getDescription
Returns optional information beyond that required for concise definition of the element. The description may assist in understanding the element scope and application.If this type is deprecated, then the description should give indication about the replacement (e.g. "superceded by …").
- Returns:
- information beyond that required for concise definition of the element, or
null
if none.
-
getRemarks
Returns comments on or information about this type. The default implementation performs the following choice:- If this type is deprecated, returns the description. The description of deprecated types should give indication about the replacement (e.g. "superceded by …").
- Otherwise returns
null
since remarks are not part of the ISO 19109 feature model.
- Specified by:
getRemarks
in interfaceDeprecable
- Returns:
- the remarks, or
null
if none. - Since:
- 0.8
-
isDeprecated
public boolean isDeprecated()Returnstrue
if this type is deprecated. If this method returnstrue
, then the remarks should give indication about the replacement (e.g. "superceded by …").- Specified by:
isDeprecated
in interfaceDeprecable
- Returns:
- whether this type is deprecated.
- Since:
- 0.8
-
hashCode
public int hashCode()Returns a hash code value for this type. -
equals
Compares this type with the given object for equality.
-