|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.uniba.euromath.gene.controller.NamespacePath
public final class NamespacePath
Stack of all namespaces from root namespace (bottom item) to the namespace of the parent nametree (topmost item). This is the 'namespace path' from the root of the result document to the result, where currently executing transformation will place its result. If this list is empty then the exporter is producing a root part.
If the coordinator has requested the stream or object result then this argument is an empty list.
When a namespace is added multiple times into the path, it is pushed only
virtually: pop()
may return multiple namespaces, but the
list addressed by the topmost(int)
remains distinctive (no same
neighbour namespaces). For example, path.push(path.topmost())
will not increase size()
.
Constructor Summary | |
---|---|
NamespacePath()
Constructs an empty path. |
|
NamespacePath(NamespacePath other)
Copy-constructor. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
String |
getRoot()
Returns the root namespace. |
int |
hashCode()
|
boolean |
isEmpty()
Tests if this stack is empty. |
String |
pop()
Removes the topmost namespace and returns is as the value of this function. |
String |
push(String namespace)
Pushes a namespace onto the top of this stack. |
int |
size()
Returns the length of the path. |
String |
topmost()
Looks at the topmost namespace without removing it from the stack. |
String |
topmost(int i)
Looks at the i-th topmost namespace without removing it from the stack. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NamespacePath()
public NamespacePath(NamespacePath other)
other
- copy this path.Method Detail |
---|
public boolean isEmpty()
true
if the stack is empty.public String topmost()
NoSuchElementException
- if path is empty.public String topmost(int i)
i
- index into the namespace path, 1
is the topmost,
2
is the second topmost etc.
NoSuchElementException
- if i
points beyond root
namespace.public String pop()
NoSuchElementException
- if path is empty.public String push(String namespace)
namespace
- new topmost namespace.
namespace
argument.public int size()
public String getRoot()
NoSuchElementException
- if path is empty.public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |