Overview | Package | Class | Tree | Deprecated | Index | Help
| Qizx/Open v0.3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.xfra.qizxopen.dm
Class FONIDM.BaseNode

    java.lang.Object
      |
      +--net.xfra.qizxopen.dm.FONIDM.BaseNode

All Implemented Interfaces:
  Node

Enclosing class:
  FONIDM

public class FONIDM.BaseNode
extends java.lang.Object
implements Node

Field Summary

Fields inherited from interface net.xfra.qizxopen.dm.Node
`ATTRIBUTE, COMMENT, DOCUMENT, ELEMENT, NAMESPACE, PROCESSING_INSTRUCTION, TEXT, TYPE_BINARY, TYPE_BOOLEAN, TYPE_DATETIME, TYPE_DOUBLE, TYPE_INTEGER, TYPE_NODE, TYPE_STRING`

Constructor Summary
`FONIDM.BaseNode(int id)`

Method Summary
`void` | `addAttribute(Node attribute)`
`void` | `addChild(Node child)`
`void` | `addText(java.lang.String value)` Adds text inside the node.
`NodeSequence` | `ancestors(NodeTest nodeTest)` Returns an iterator on ancestors that match the node test.
`NodeSequence` | `ancestorsOrSelf(NodeTest nodeTest)`
`Node` | `attribute(QName name)` get attribute by name.
`NodeSequence` | `attributes()` Accessor dm:attributes.
`NodeSequence` | `attributes(NodeTest nodeTest)`
`NodeSequence` | `children()` Accessor dm:children.
`NodeSequence` | `children(NodeTest nodeTest)`
`int` | `compareStringValues(Node node, java.text.Collator collator)`
`boolean` | `contains(Node node)` Returns true if this node is an ancestor of the node, or the node itself.
`boolean` | `deepEqual(Node node, java.text.Collator collator)`
`NodeSequence` | `descendants(NodeTest nodeTest)`
`NodeSequence` | `descendantsOrSelf(NodeTest nodeTest)`
`int` | `docPosition()` Returns an arbitrary value that is stable on the whole document (for order comparison).
`Node` | `document()` Returns the document node if any, else the top-level node.
`boolean` | `equals(java.lang.Object that)`
`NodeSequence` | `following(NodeTest nodeTest)`
`NodeSequence` | `followingSiblings(NodeTest nodeTest)`
`int` | `getAtomType()` returns the real type of the atom value: TYPE_STRING, TYPE_BINARY, etc.
`java.lang.Object` | `getAtomValue()` Returns the real value of the atom: byte[], Boolean, Date, Double, Long, String.
`java.lang.String` | `getBaseURI()` Accessor dm:base-uri().
`char[]` | `getChars()` get text as char array (atomic nodes only).
`int` | `getDefinedNSCount()` Number of Namespaces defined on this node.
`int` | `getDocId()`
`java.lang.String` | `getDocumentURI()`
`double` | `getDoubleValue()` Returns the double value (attempts to convert).
`long` | `getIntegerValue()` Returns the integer value (attempts to convert).
`int` | `getNature()` Returns a numeric node kind: DOCUMENT, ELEMENT etc.
`int` | `getNodeDepth()`
`int` | `getNodeId()`
`java.lang.String` | `getNodeKind()` Accessor dm:node-kind().
`QName` | `getNodeName()` Accessor dm:node-name().
`int` | `getNodeSpan()`
`java.lang.String` | `getNsPrefix(java.lang.String nsuri)` Returns a matching prefix for the Namespace by looking up the namespace nodes.
`java.lang.String` | `getNsUri(java.lang.String prefix)` Returns a matching Namespace for the prefix by looking up the namespace nodes.
`java.lang.Object` | `getOwner()`
`java.lang.String` | `getStringValue()` Accessor dm:string-value().
`int` | `hashCode()`
`boolean` | `isElement()` Convenience: quick test of elements.
`NodeSequence` | `namespaces(boolean inScope)` Accessor dm:namespaces().
`int` | `orderCompare(Node node)` Returns -1 if this node is strictly before the argument node in document order, 0 if nodes are identical, 1 if after the argument node.
`Node` | `parent()` Accessor dm:parent().
`NodeSequence` | `parent(NodeTest nodeTest)` Returns a sequence of length 1 (if the parent matches the nodeTest) else 0.
`NodeSequence` | `preceding(NodeTest nodeTest)` Preceding nodes in document order.
`NodeSequence` | `precedingSiblings(NodeTest nodeTest)` Preceding siblings in document order.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### FONIDM.BaseNode

    public FONIDM.BaseNode(int id)

Method Detail

### getOwner

    public java.lang.Object getOwner()

### getDocId

    public int getDocId()

### getNodeId

    public int getNodeId()

### getNodeKind

    public java.lang.String getNodeKind()

  Description copied from interface: `Node`
  Accessor dm:node-kind().

  Specified by:
    `getNodeKind` in interface `Node`
  Returns:
    the node kind as a string: "element", "attribute" etc.

### getNodeName

    public QName getNodeName()

  Description copied from interface: `Node`
  Accessor dm:node-name().

  Specified by:
    `getNodeName` in interface `Node`
  Returns:
    null if the node has no name (document, text, comment, pi).

### parent

    public Node parent()

  Description copied from interface: `Node`
  Accessor dm:parent().

  Specified by:
    `parent` in interface `Node`
  Returns:
    null if the node has no parent.

### getStringValue

    public java.lang.String getStringValue()

  Description copied from interface: `Node`
  Accessor dm:string-value().

  Specified by:
    `getStringValue` in interface `Node`

### getDocumentURI

    public java.lang.String getDocumentURI()

  Specified by:
    `getDocumentURI` in interface `Node`

### getBaseURI

    public java.lang.String getBaseURI()

  Description copied from interface: `Node`
  Accessor dm:base-uri().

  Specified by:
    `getBaseURI` in interface `Node`

### children

    public NodeSequence children()

  Description copied from interface: `Node`
  Accessor dm:children. Only for Document and Elements: other kinds yields an empty sequence.

  Specified by:
    `children` in interface `Node`

### attributes

    public NodeSequence attributes()

  Description copied from interface: `Node`
  Accessor dm:attributes. Only for Elements: other kinds yields an empty sequence.

  Specified by:
    `attributes` in interface `Node`

### getDefinedNSCount

    public int getDefinedNSCount()

  Description copied from interface: `Node`
  Number of Namespaces defined on this node.

  Specified by:
    `getDefinedNSCount` in interface `Node`

### namespaces

    public NodeSequence namespaces(boolean inScope)

  Description copied from interface: `Node`
  Accessor dm:namespaces(). Returns namespaces visible by this node. On non-element nodes, always returns the empty sequence.

  Specified by:
    `namespaces` in interface `Node`
  Parameters:
    `inScope` - if true, return the closure of in-scope namespaces, else namespaces defined specifically on this node.

### docPosition

    public int docPosition()

  Description copied from interface: `Node`
  Returns an arbitrary value that is stable on the whole document (for order comparison).

  Specified by:
    `docPosition` in interface `Node`

### getNature

    public int getNature()

  Description copied from interface: `Node`
  Returns a numeric node kind: DOCUMENT, ELEMENT etc.

  Specified by:
    `getNature` in interface `Node`

### isElement

    public boolean isElement()

  Description copied from interface: `Node`
  Convenience: quick test of elements.

  Specified by:
    `isElement` in interface `Node`

### document

    public Node document()

  Description copied from interface: `Node`
  Returns the document node if any, else the top-level node.

  Specified by:
    `document` in interface `Node`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### attribute

    public Node attribute(QName name)

  Description copied from interface: `Node`
  get attribute by name.

  Specified by:
    `attribute` in interface `Node`

### getNsPrefix

    public java.lang.String getNsPrefix(java.lang.String nsuri)

  Description copied from interface: `Node`
  Returns a matching prefix for the Namespace by looking up the namespace nodes.

  Specified by:
    `getNsPrefix` in interface `Node`
  Returns:
    null if none is found, the first suitable prefix otherwise.

### getNsUri

    public java.lang.String getNsUri(java.lang.String prefix)

  Description copied from interface: `Node`
  Returns a matching Namespace for the prefix by looking up the namespace nodes.

  Specified by:
    `getNsUri` in interface `Node`
  Returns:
    null if none is found, the first suitable namespace URI otherwise.

### orderCompare

    public int orderCompare(Node node)

  Description copied from interface: `Node`
  Returns -1 if this node is strictly before the argument node in document order, 0 if nodes are identical, 1 if after the argument node. If the two nodes belong to different documents, returns an arbitrary but stable "order of documents".

  Specified by:
    `orderCompare` in interface `Node`

### contains

    public boolean contains(Node node)

  Description copied from interface: `Node`
  Returns true if this node is an ancestor of the node, or the node itself.

  Specified by:
    `contains` in interface `Node`

### getNodeSpan

    public int getNodeSpan()

### getNodeDepth

    public int getNodeDepth()

### equals

    public boolean equals(java.lang.Object that)

  Overrides:
    `equals` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### deepEqual

    public boolean deepEqual(Node node,
                             java.text.Collator collator)

### compareStringValues

    public int compareStringValues(Node node,
                                   java.text.Collator collator)

  Specified by:
    `compareStringValues` in interface `Node`

### ancestors

    public NodeSequence ancestors(NodeTest nodeTest)

  Description copied from interface: `Node`
  Returns an iterator on ancestors that match the node test.

  Specified by:
    `ancestors` in interface `Node`
  Parameters:
    `nodeTest` - concrete classes are BaseNodeTest(node-kind?, nsuri?, ncname?), UnionNodeTest, DocumentTest.

### ancestorsOrSelf

    public NodeSequence ancestorsOrSelf(NodeTest nodeTest)

  Specified by:
    `ancestorsOrSelf` in interface `Node`

### parent

    public NodeSequence parent(NodeTest nodeTest)

  Description copied from interface: `Node`
  Returns a sequence of length 1 (if the parent matches the nodeTest) else 0.

  Specified by:
    `parent` in interface `Node`

### children

    public NodeSequence children(NodeTest nodeTest)

  Specified by:
    `children` in interface `Node`

### descendants

    public NodeSequence descendants(NodeTest nodeTest)

  Specified by:
    `descendants` in interface `Node`

### descendantsOrSelf

    public NodeSequence descendantsOrSelf(NodeTest nodeTest)

  Specified by:
    `descendantsOrSelf` in interface `Node`

### attributes

    public NodeSequence attributes(NodeTest nodeTest)

  Specified by:
    `attributes` in interface `Node`

### followingSiblings

    public NodeSequence followingSiblings(NodeTest nodeTest)

  Specified by:
    `followingSiblings` in interface `Node`

### precedingSiblings

    public NodeSequence precedingSiblings(NodeTest nodeTest)

  Description copied from interface: `Node`
  Preceding siblings in document order.

  Specified by:
    `precedingSiblings` in interface `Node`

### following

    public NodeSequence following(NodeTest nodeTest)

  Specified by:
    `following` in interface `Node`

### preceding

    public NodeSequence preceding(NodeTest nodeTest)

  Description copied from interface: `Node`
  Preceding nodes in document order.

  Specified by:
    `preceding` in interface `Node`

### addChild

    public void addChild(Node child)

### addAttribute

    public void addAttribute(Node attribute)

### addText

    public void addText(java.lang.String value)

  Description copied from interface: `Node`
  Adds text inside the node. For an element, creates a text child node if necessary.

  Specified by:
    `addText` in interface `Node`

### getChars

    public char[] getChars()

  Description copied from interface: `Node`
  get text as char array (atomic nodes only).

  Specified by:
    `getChars` in interface `Node`

### getAtomValue

    public java.lang.Object getAtomValue()

  Description copied from interface: `Node`
  Returns the real value of the atom: byte[], Boolean, Date, Double, Long, String.

  Specified by:
    `getAtomValue` in interface `Node`

### getAtomType

    public int getAtomType()

  Description copied from interface: `Node`
  returns the real type of the atom value: TYPE_STRING, TYPE_BINARY, etc.

  Specified by:
    `getAtomType` in interface `Node`

### getIntegerValue

    public long getIntegerValue()
                         throws DataModelException

  Description copied from interface: `Node`
  Returns the integer value (attempts to convert).

  Specified by:
    `getIntegerValue` in interface `Node`
  Throws:
    `DataModelException` - if not convertible to integer.

### getDoubleValue

    public double getDoubleValue()
                          throws DataModelException

  Description copied from interface: `Node`
  Returns the double value (attempts to convert).

  Specified by:
    `getDoubleValue` in interface `Node`
  Throws:
    `DataModelException` - if not convertible to double.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright Xavier FRANC 2003-2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD