- All Superinterfaces:
Comparable<GenericName>
,GenericName
,LocalName
A local name that references an object type is some schema.
Can be used as the name of a record type,
the name of a feature type,
the name of data quality result type
or the name of a field (or member) type among other usages.
Implementation should define explicitly the mapping to Java classes by overriding the
Mapping to classes in the Java language
It is sometimes useful to establish a bidirectional mapping betweenTypeName
and Java Class
.
For types defined by an OGC/ISO standard, the type name should be the
UML identifier
in the "OGC" namespace.
That namespace is consistent with the
data type URN standard values,
also shown below for information purpose.
Java class | Scoped type name | Data type URN standard values |
---|---|---|
Boolean | OGC:Boolean | urn:ogc:def:dataType:OGC:1.1:boolean |
Integer | OGC:Integer | urn:ogc:def:dataType:OGC:1.1:nonNegativeInteger |
Float | OGC:Real | |
Double | OGC:Real | |
BigDecimal | OGC:Decimal | |
String | OGC:CharacterString | urn:ogc:def:dataType:OGC:1.1:string |
InternationalString | OGC:FreeText | |
Locale | OGC:PT_Locale | |
ZonedDateTime | OGC:DateTime | |
URI | OGC:URI | urn:ogc:def:dataType:OGC:1.1:anyURI |
Metadata | OGC:MD_Metadata |
toJavaType()
method.
It avoids the need to assume any particular convention.- Since:
- 2.1
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the Java type represented by this name.toString()
Returns the local name of the type as aString
.Methods inherited from interface org.opengis.util.GenericName
compareTo, push, scope, toFullyQualifiedName, toInternationalString
Methods inherited from interface org.opengis.util.LocalName
depth, getParsedNames, head, tip
-
Method Details
-
toString
Returns the local name of the type as aString
. The local name is the name without namespace, for example"Integer"
.Fully qualified name
The fully qualified name may use different separator between path components depending what the name represents. For example if thisTypeName
is part of an URN, then it will use the':'
separator as in"[schema]:[type]"
. But if thisTypeName
is the name of a class, then the fully qualified name will use the'.'
separator as in"[package].[class]"
. -
toJavaType
Returns the Java type represented by this name. For example, the"OGC:Integer"
type name may be mapped to theInteger
Java class. The mapping may be defined by the convention documented in class javadoc, but not necessarily. Implementations can use their own convention.- Returns:
- the Java type (usually a
Class
) for this type name. - Since:
- 3.1
- See Also:
Departure from OGC/ISO standard for closer integration with the Java environment
Added for allowing implementations to define their own mapping to a class in the Java programming language.
-