Qizx/open API

net.axyana.qizxopen.dm
Interface FONIDocument

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
IDocument

public interface FONIDocument
extends java.rmi.Remote

Fully-Ordered Node Identification Document. A representation of XML Documents where nodes are accessed by integer handles whose values are guaranteed to be in document order (i.e. node N1 before node N2 <=> handle(N1) < handle(N2) )

Such a representation is suitable for documents that are built in one operation such as parsing and never modified.

The interface is very close to the XPath/XQuery/XSLT Data Model.

The handle value 0 is reserved and represents a null or absent node.


Method Summary
 int estimateMemorySize()
          Cache management.
 int getAttrCount(int nodeId)
          Returns the number of attributes of an element (not guaranteed to be efficient).
 int getAttribute(int nodeId, int nameId)
          Gets an attribute node by name.
 java.lang.String getBaseURI()
          Returns the URI of the document.
 char[] getCharValue(int nodeId, int reserve)
          Specially meant for indexing: gets the string value of a text node.
 int getDefinedNSCount(int nodeId)
          Returns the number of NS defined on this node.
 int getDocumentId()
           
 QName getElementName(int nameId)
          Gets the QName of an element node by the internal id.
 int getElementNameCount()
          Gets the total number of element names.
 int getFirstChild(int nodeId)
           
 int getFirstNSNode(int nodeId, boolean inScope)
          Returns the first namespace node of a node.
 long getIntegerValue(int nodeId)
          Gets an integer value from an atome of type ATOM_INT.
 int getKind(int nodeId)
          Returns one of the kinds DOCUMENT, ELEMENT, TEXT, PROCESSING_INSTRUCTION, COMMENT, ATTRIBUTE, NAMESPACE, ATOM_XX.
 QName getName(int nodeId)
          Gets the name of a Node.
 int getNameId(int nodeId)
          Gets the name-id of a real Node.
 int getNextSibling(int nodeId)
           
 int getNodeAfter(int nodeId)
          Gets the node that is next in document order but not contained.
 int getNodeNext(int nodeId)
          Gets the node that is next in document order.
 int getNodeSpan(int nodeId)
           
 QName getOtherName(int nameId)
          Gets the QName of a non-element node by the internal id.
 int getOtherNameCount()
          Gets the total number of non-element node names.
 int getParent(int nodeId)
           
 int getRootNode()
          Returns the handle of the document node.
 java.lang.String getStringValue(int nodeId)
          Gets the string value for any node but Attributes and Namespaces.
 java.lang.Object getValue(int nodeId)
          Gets an atomic value from a leaf node.
 int internElementName(QName name)
          Gets the internal id of an element name.
 int internOtherName(QName name)
          Gets the internal id of a non-element node name.
 boolean isExported()
           
 char[] pnGetCharValue(int nodeId, int reserve)
          Specially meant for indexing: gets the string value of a "pseudo-node" (attribute or NS).
 QName pnGetName(int nodeId)
          Gets the name of a pseudo Node Attribute / Namespace.
 int pnGetNameId(int nodeId)
          Gets the name-id of a pseudo-node Attribute / Namespace.
 int pnGetNext(int nodeId)
          Returns the next pseudo-node (attribute or NS).
 java.lang.String pnGetStringValue(int nodeId)
          Gets the string value for pseudo-nodes Attributes and Namespaces.
 void setDocumentId(int docId)
           
 RemoteByteInput transmitNode(Node node)
           
 

Method Detail

getRootNode

public int getRootNode()
                throws java.rmi.RemoteException
Returns the handle of the document node.

Throws:
java.rmi.RemoteException

getKind

public int getKind(int nodeId)
            throws java.rmi.RemoteException
Returns one of the kinds DOCUMENT, ELEMENT, TEXT, PROCESSING_INSTRUCTION, COMMENT, ATTRIBUTE, NAMESPACE, ATOM_XX.

Throws:
java.rmi.RemoteException

getName

public QName getName(int nodeId)
              throws java.rmi.RemoteException
Gets the name of a Node.

Throws:
java.rmi.RemoteException

pnGetName

public QName pnGetName(int nodeId)
                throws java.rmi.RemoteException
Gets the name of a pseudo Node Attribute / Namespace.

Throws:
java.rmi.RemoteException

getNameId

public int getNameId(int nodeId)
              throws java.rmi.RemoteException
Gets the name-id of a real Node. All names are represented by an index in a name table.

Throws:
java.rmi.RemoteException

pnGetNameId

public int pnGetNameId(int nodeId)
                throws java.rmi.RemoteException
Gets the name-id of a pseudo-node Attribute / Namespace.

Throws:
java.rmi.RemoteException

getParent

public int getParent(int nodeId)
              throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

getNextSibling

public int getNextSibling(int nodeId)
                   throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

getNodeSpan

public int getNodeSpan(int nodeId)
                throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

getNodeNext

public int getNodeNext(int nodeId)
                throws java.rmi.RemoteException
Gets the node that is next in document order. (first child if non-atomic, otherwise returns getNodeAfter()).

Throws:
java.rmi.RemoteException

getNodeAfter

public int getNodeAfter(int nodeId)
                 throws java.rmi.RemoteException
Gets the node that is next in document order but not contained. It is the following sibling if any, else the parent's following sibling, recursively.

Throws:
java.rmi.RemoteException

getFirstChild

public int getFirstChild(int nodeId)
                  throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

getAttrCount

public int getAttrCount(int nodeId)
                 throws java.rmi.RemoteException
Returns the number of attributes of an element (not guaranteed to be efficient).

Throws:
java.rmi.RemoteException

getAttribute

public int getAttribute(int nodeId,
                        int nameId)
                 throws java.rmi.RemoteException
Gets an attribute node by name. If nameId < 0, returns the 1st attribute.

Throws:
java.rmi.RemoteException

pnGetNext

public int pnGetNext(int nodeId)
              throws java.rmi.RemoteException
Returns the next pseudo-node (attribute or NS).

Throws:
java.rmi.RemoteException

getStringValue

public java.lang.String getStringValue(int nodeId)
                                throws java.rmi.RemoteException
Gets the string value for any node but Attributes and Namespaces.

Throws:
java.rmi.RemoteException

pnGetStringValue

public java.lang.String pnGetStringValue(int nodeId)
                                  throws java.rmi.RemoteException
Gets the string value for pseudo-nodes Attributes and Namespaces.

Throws:
java.rmi.RemoteException

getCharValue

public char[] getCharValue(int nodeId,
                           int reserve)
                    throws java.rmi.RemoteException
Specially meant for indexing: gets the string value of a text node. Returns the value into a char array, reserving chars (at head if reserve > 0).

Throws:
java.rmi.RemoteException

pnGetCharValue

public char[] pnGetCharValue(int nodeId,
                             int reserve)
                      throws java.rmi.RemoteException
Specially meant for indexing: gets the string value of a "pseudo-node" (attribute or NS). Returns the value into a char array, possibly reserving leading chars.

Throws:
java.rmi.RemoteException

getValue

public java.lang.Object getValue(int nodeId)
                          throws java.rmi.RemoteException
Gets an atomic value from a leaf node.

Throws:
java.rmi.RemoteException

getIntegerValue

public long getIntegerValue(int nodeId)
                     throws java.rmi.RemoteException
Gets an integer value from an atome of type ATOM_INT.

Throws:
java.rmi.RemoteException

getDefinedNSCount

public int getDefinedNSCount(int nodeId)
                      throws java.rmi.RemoteException
Returns the number of NS defined on this node.

Throws:
java.rmi.RemoteException

getFirstNSNode

public int getFirstNSNode(int nodeId,
                          boolean inScope)
                   throws java.rmi.RemoteException
Returns the first namespace node of a node. Use pnGetNext to iterate.

Throws:
java.rmi.RemoteException

getElementNameCount

public int getElementNameCount()
                        throws java.rmi.RemoteException
Gets the total number of element names.

Throws:
java.rmi.RemoteException

getElementName

public QName getElementName(int nameId)
                     throws java.rmi.RemoteException
Gets the QName of an element node by the internal id.

Throws:
java.rmi.RemoteException

internElementName

public int internElementName(QName name)
                      throws java.rmi.RemoteException
Gets the internal id of an element name.

Throws:
java.rmi.RemoteException

getOtherNameCount

public int getOtherNameCount()
                      throws java.rmi.RemoteException
Gets the total number of non-element node names.

Throws:
java.rmi.RemoteException

getOtherName

public QName getOtherName(int nameId)
                   throws java.rmi.RemoteException
Gets the QName of a non-element node by the internal id.

Throws:
java.rmi.RemoteException

internOtherName

public int internOtherName(QName name)
                    throws java.rmi.RemoteException
Gets the internal id of a non-element node name.

Throws:
java.rmi.RemoteException

getBaseURI

public java.lang.String getBaseURI()
                            throws java.rmi.RemoteException
Returns the URI of the document.

Throws:
java.rmi.RemoteException

estimateMemorySize

public int estimateMemorySize()
                       throws java.rmi.RemoteException
Cache management.

Throws:
java.rmi.RemoteException

getDocumentId

public int getDocumentId()
                  throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

setDocumentId

public void setDocumentId(int docId)
                   throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

isExported

public boolean isExported()
                   throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

transmitNode

public RemoteByteInput transmitNode(Node node)
                             throws DataModelException,
                                    java.io.IOException
Throws:
DataModelException
java.io.IOException

© 2005 Axyana Software