public class DefaultTypeName extends DefaultLocalName implements TypeName
DefaultTypeNamecan be instantiated by any of the following methods:
TypeName. When an UML identifier from an OGC standard exists for a given
Class, Apache SIS uses that identifier prefixed by the
"OGC"namespace. Note that this is not a standard practice. A more standard practice would be to use the definition identifiers in OGC namespace (last column in the table below), but the set of data type identifiers defined by OGC is currently small and is sometime not an exact match.
|Java class||Type name (unofficial)||Definition identifier in OGC namespace|
| || |
| || ||urn:ogc:def:dataType:OGC::string|
| || ||urn:ogc:def:dataType:OGC::anyURI|
| || ||urn:ogc:def:dataType:OGC::boolean|
| || ||urn:ogc:def:dataType:OGC::nonNegativeInteger|
| || |
| || |
| || |
| || |
|Unknown Java class|
toClass()instead than parsing the name.
CharSequencearguments given to the constructor are also immutable. Subclasses shall make sure that any overridden methods remain safe to call from multiple threads and do not change any public
|Modifier||Constructor and Description|
Constructs a type name from the given character sequence.
|Modifier and Type||Method and Description|
Returns a SIS type name implementation with the values of the given arbitrary implementation.
Returns the Java class associated to this type name.
castOrCopy, compareTo, depth, equals, getParsedNames, head, scope, tip, toInternationalString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
push, scope, toFullyQualifiedName, toInternationalString
protected DefaultTypeName(NameSpace scope, CharSequence name)
scope- The scope of this name, or
nullfor a global scope.
name- The local name (never
public static DefaultTypeName castOrCopy(TypeName object)
null, then this method returns
DefaultTypeName, then it is returned unchanged.
DefaultTypeNameinstance is created with the same values than the given name.
object- The object to get as a SIS implementation, or
nullif the argument was null.
public Class<?> toClass() throws UnknownNameException
"OGC"scope (see above), then the corresponding class is returned.
nullis returned. No exception is thrown because names in the global namespace could be anything, so we can not be sure that the given name was wrong.
nullis returned, since this method can not check the validity of names in other namespaces.
nullif there is no mapping from this name to a Java class.
UnknownNameException- if a mapping from this name to a Java class was expected to exist (typically because of the scope) but the operation failed.
Copyright © 2010–2016 The Apache Software Foundation. All rights reserved.