Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.document
Class DocumentData

    java.lang.Object
      com.bea.document.DocumentData

Direct Known Subclasses:
  BooleanDocumentData, NodeSetDocumentData, NumberDocumentData, RTreeDocumentData, StringDocumentData

public class DocumentData
extends Object

A representation of data within a document. All data within a document must be in one of several pre-defined data types. These are:
TYPE_BOOLEAN - boolean data type having values true or false
TYPE_NODESET - a set of nodes as defined by the org.w3c.dom.NodeList.
TYPE_NULL - null data
TYPE_NUMBER - floating point data (implemented as double)
TYPE_RTREEFRAG - document fragment
TYPE_STRING - Unicode string (java.lang.String)
TYPE_UNKNOWN - Unknown type
For example, calling IDocument.getDocumentData(String path) with a path that refers to the root of a document, you will get a NodeSetDocumentData return value that contains the root element of the document. You can call toNodeSet() on this object to return a org.w3c.dom..NodeList which you can use to iterate over the single returned element.
You may create instances of the sublasses of this class, for use in IDocument methods such as addDocumentData().

See Also:
  `IDocument.addDocumentData(String, DocumentData)`

Field Summary
`static int` | `TYPE_BOOLEAN`
`static int` | `TYPE_NODESET`
`static int` | `TYPE_NULL`
`static int` | `TYPE_NUMBER`
`static int` | `TYPE_RTREEFRAG`
`static int` | `TYPE_STRING`
`static int` | `TYPE_UNKNOWN`

Constructor Summary
`DocumentData()`
`DocumentData(weblogic.apache.xpath.objects.XObject xobj)`

Method Summary
`static DocumentData` | `createDocumentData(weblogic.apache.xpath.objects.XObject xobj)`
`String` | `dump()` Create a string describing this document data (: ).
`String` | `dump(boolean includeType)` Create a string describing this document data (: ).
`boolean` | `equals(DocumentData data)` Tell if two objects are functionally equal.
`int` | `getType()` Get the type for this document data.
`boolean` | `greaterThan(DocumentData data)` Tell if this object is greater than the other.
`boolean` | `greaterThanOrEqual(DocumentData data)` Tell if this object is greater than or equal to the other.
`boolean` | `lessThan(DocumentData data)` Tell if this object is less than the other.
`boolean` | `lessThanOrEqual(DocumentData data)` Tell if this object is less than or equal to the other.
`boolean` | `toBoolean()` Cast this document data to a boolean.
`NodeIterator` | `toNodeIterator()` Cast this document data to a list that represents the nodes contained within it.
`NodeList` | `toNodeSet()` Cast this document data to a list that represents the nodes contained within it.
`double` | `toNumber()` Cast this data to a number (double)
`Object` | `toObject()` Return a java object that's closest to the represenation that should be handed to an extension.
`DocumentFragment` | `toRtree()` Cast this document data to a document fragment
`String` | `toStr()` Cast this document data to a string.
`String` | `toXML()` Create a string describing this document data.

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

Field Detail

### TYPE_BOOLEAN

    public static final int TYPE_BOOLEAN

See Also:
  Constant Field Values

### TYPE_NODESET

    public static final int TYPE_NODESET

See Also:
  Constant Field Values

### TYPE_NULL

    public static final int TYPE_NULL

See Also:
  Constant Field Values

### TYPE_NUMBER

    public static final int TYPE_NUMBER

See Also:
  Constant Field Values

### TYPE_RTREEFRAG

    public static final int TYPE_RTREEFRAG

See Also:
  Constant Field Values

### TYPE_STRING

    public static final int TYPE_STRING

See Also:
  Constant Field Values

### TYPE_UNKNOWN

    public static final int TYPE_UNKNOWN

See Also:
  Constant Field Values

Constructor Detail

### DocumentData

    public DocumentData()

### DocumentData

    public DocumentData(weblogic.apache.xpath.objects.XObject xobj)

Method Detail

### createDocumentData

    public static DocumentData createDocumentData(weblogic.apache.xpath.objects.XObject xobj)
                                           throws TransformerException

  Throws:
    `TransformerException`

### getType

    public int getType()

  Get the type for this document data.

### toBoolean

    public boolean toBoolean()
                      throws DocumentException

  Cast this document data to a boolean.

  Throws:
    `DocumentException`

### toNodeSet

    public NodeList toNodeSet()
                       throws DocumentException

  Cast this document data to a list that represents the nodes contained within it.

  Throws:
    `DocumentException`

### toNodeIterator

    public NodeIterator toNodeIterator()
                                throws DocumentException

  Cast this document data to a list that represents the nodes contained within it.

  Throws:
    `DocumentException`

### toNumber

    public double toNumber()
                    throws DocumentException

  Cast this data to a number (double)

  Throws:
    `DocumentException`

### toRtree

    public DocumentFragment toRtree()
                             throws DocumentException

  Cast this document data to a document fragment

  Throws:
    `DocumentException`

### toStr

    public String toStr()
                 throws DocumentException

  Cast this document data to a string. If this DocumentData is of type TYPE_NODESET, this string will represent only the text content of Node objects in the nodeset. This means you will see only the text, and none of the XML markup for the nodes. To get a true XML representation, use toXML().

  Throws:
    `DocumentException`

### toXML

    public String toXML()

  Create a string describing this document data. This method is similar to the toStr() method, except that nodeset type data will be rendered with XML markup intact.

### dump

    public String dump()

  Create a string describing this document data (: ).

### dump

    public String dump(boolean includeType)

  Create a string describing this document data (: ). ':' will be omitted if includeType is false.

  Parameters:
    `includeType` -
  Returns:
    String representation of the data

### equals

    public boolean equals(DocumentData data)
                   throws DocumentException

  Tell if two objects are functionally equal.

  Throws:
    `DocumentException`

### greaterThan

    public boolean greaterThan(DocumentData data)
                        throws DocumentException

  Tell if this object is greater than the other.

  Throws:
    `DocumentException`

### greaterThanOrEqual

    public boolean greaterThanOrEqual(DocumentData data)
                               throws DocumentException

  Tell if this object is greater than or equal to the other.

  Throws:
    `DocumentException`

### lessThan

    public boolean lessThan(DocumentData data)
                     throws DocumentException

  Tell if this object is less than the other.

  Throws:
    `DocumentException`

### lessThanOrEqual

    public boolean lessThanOrEqual(DocumentData data)
                            throws DocumentException

  Tell if this object is less than or equal to the other.

  Throws:
    `DocumentException`

### toObject

    public Object toObject()

  Return a java object that's closest to the represenation that should be handed to an extension.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD