|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.uniba.euromath.document.IdDomMapper
public final class IdDomMapper
Contains functions that maps nodes from 'ID' level to 'DOM' level and backwards.
Field Summary | |
---|---|
(package private) DomCore |
doc
The document reference. |
Constructor Summary | |
---|---|
IdDomMapper(DomCore doc)
Package-internal constructor. |
Method Summary | |
---|---|
DomPointer |
getEndBoundary(Element parent,
int index)
Returns the pointer pointing after the last DOM-level node that makes up the ID-level index. |
DomPointer |
getEndBoundary(Node node)
Returns the pointer pointing after the last DOM-level node that makes up the ID-level index where given node belongs. |
static int |
getIdIndexFromNode(Node node)
Determines the index of the node in the ID-level document. |
Node |
getNextIdNode(Node node)
Returns next node that is not part of ID-level node which contains given node. |
Node |
getNextNode(Node node)
Returns next non-entity node sibling. |
DomPointer |
getNextNodePtr(DomPointer ptr)
Returns next non-entity node. |
Node |
getNodeFromIdIndex(Node parent,
int index)
Computes and returns the node in DOM level that would have given index in ID level. |
NodeListID |
getNodeList(Node node)
Provides mapping functions more specific to given node. |
static Node |
getPrevIdNode(Node node)
Returns previous node that is not part of ID-level node which contains given node. |
static Node |
getPrevNode(Node node)
Returns previous non-entity node. |
DomPointer |
getStartBoundary(Element parent,
int index)
Returns the pointer pointing onto the first DOM-level node that makes up the ID-level index. |
DomPointer |
getStartBoundary(Node node)
Returns the pointer pointing onto the first DOM-level node that makes up the ID-level index where given node belongs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
final DomCore doc
Constructor Detail |
---|
IdDomMapper(DomCore doc)
doc
- the document instance.Method Detail |
---|
public Node getNodeFromIdIndex(Node parent, int index)
parent
- the DOM-level node. It may be element or document node.index
- the index of the node in ID level.
index
. If the
ID-level index spans over multiple DOM-level nodes then the first
DOM-level node is returned. If the index is invalid then
null
is returned.public static int getIdIndexFromNode(Node node)
node
- the node from DOM-level document. In case of entity reference
the function shall check for ID-level index of first id-capable node
contained in this entity reference.
public static Node getPrevNode(Node node)
null
.
node
- the node.
null
.public Node getNextNode(Node node)
null
.
node
- the node.
null
.public Node getNextIdNode(Node node)
null
.
node
- the DOM-level node
getNextNode
function, otherwise it search for first
non-text DOM-level node.public static Node getPrevIdNode(Node node)
null
.
node
- the DOM-level node
getPrevNode
function, otherwise it search for first
non-text DOM-level node.public DomPointer getNextNodePtr(DomPointer ptr)
null
.
ptr
- the pointer to node.
null
.public DomPointer getStartBoundary(Element parent, int index)
parent
- the parent from the DOM-level.index
- the index of an ID-level node.
public DomPointer getStartBoundary(Node node)
node
- the DOM-level node
public DomPointer getEndBoundary(Element parent, int index)
parent
- the parent from the DOM-level.index
- the index of the ID-level node.
public DomPointer getEndBoundary(Node node)
node
- the DOM-level node
public NodeListID getNodeList(Node node)
node
- the node
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |