|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@UML(identifier="NameSpace", specification=ISO_19103) public interface Namespace
A set of 0 or more names, with no duplicates.
A namespace contains Name
objects. Each name usually corresponds to
the name of a type. The namespace uri of each name (getURI()
is the same as the uri of the Namespace object containing it (getURI()
.
//create namespace for gml Namespace namespace = new NamespaceImpl( "http://www.opengis.net/gml" ); //add some names namespace.add( new NameImpl( "http://www.opengis.net/gml", "PointType" ) ); namespace.add( new NameImpl( "http://www.opengis.net/gml", "LineStringType" ) ); namespace.add( new NameImpl( "http://www.opengis.net/gml", "PolygonType" ) ); namespace.add( new NameImpl( "http://www.opengis.net/gml", "AbstractFeatureType" );
One allowance ISO_19103 allows for is having a Namespace located inside another namespace. You may certaintly do this by constructing a facility similar to Schema in which namespaces may be looked up via a Name with the same URI as the one used here.
We are simply not dictating the lookup mechanism, or a backpointer to a containing namespace (note the two solutions are in conflict and we would like to offer application the freedom to back this interface onto a facility such as JNDI used in their own application).
Method Summary | |
---|---|
String |
getURI()
The namespace uri of this namespace. |
Name |
lookup(String name)
Looks up a name in the namespace. |
Methods inherited from interface Set |
---|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Method Detail |
---|
String getURI()
This value can never be null
.
Name lookup(String name)
Since all Name objects in the namespace share the same uri as the namespace itself, only the local part of the name is specified.
This method returns null
if no such name exists.
name
- The local part of the name to look up.
null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |