Package tigase.xml.db

# Class DBElement

java.lang.Object
tigase.xml.Element
tigase.xml.db.DBElement

All Implemented Interfaces:
  `Cloneable`, `Comparable<Element>`, `XMLNodeIfc<Element>`

public class DBElement extends Element
`DBElement` class extends `tigase.xml.Element`. It adds some extra functionality useful for data base operations like searching for some specific nodes, add data entries, remove data, and all other common operations not directly related to pure XML processing. Pure XML processing is of course implemented in `tigase.xml.Element`. The are also some methods which make it easier to save XML tree from memory to disk file in a form which is easier to read by a human.

Created: Tue Oct 26 22:01:47 2004

Version:
  $Rev$
Author:
  Artur Hefczyc

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class tigase.xml.Element

  `Element.Matcher<T>, Element.XMLIdentityHashMap<K,V>`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `ENTRY`
  `static final String`
  `KEY`
  `static final String`
  `MAP`
  `static final String`
  `NAME`
  `static final String`
  `NODE`
  `boolean`
  `removed`
  `static final String`
  `TYPE`
  `static final String`
  `VALUE`

  ### Fields inherited from class tigase.xml.Element

  `attributes, children, defxmlns, name, xmlns`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DBElement(String argName)`
  `DBElement(String argName, String attname, String attvalue)`
  `DBElement(String argName, String argCData, StringBuilder[] att_names, StringBuilder[] att_values)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final DBElement`
  `buildNodesTree(String nodePath)`
  `final String`
  `childrenFormatedString(int indent, int step)`
  `final DBElement`
  `findEntry(String key)`
  `final DBElement`
  `findNode(String nodePath)`
  `final String`
  `formatedString(int indent, int step)`
  `final DBElement`
  `getEntry(String key)`
  `final double[]`
  `getEntryDoubleArrValue(String key, double[] def)`
  `final double`
  `getEntryDoubleValue(String key, double def)`
  `final int[]`
  `getEntryIntArrValue(String key, int[] def)`
  `final int`
  `getEntryIntValue(String key, int def)`
  `final String[]`
  `getEntryKeys()`
  `final String[]`
  `getEntryStringArrValue(String key, String[] def)`
  `final String`
  `getEntryStringValue(String key, String def)`
  `final Object`
  `getEntryValue(String key, Object def)`
  `final DBElement`
  `getSubnode(String name)`
  `final DBElement`
  `getSubnodePath(String nodePath)`
  `final String[]`
  `getSubnodes()`
  `final DBElement`
  `newSubnode(String name)`
  `final void`
  `removeEntry(String key)`
  `final void`
  `removeNode(String nodePath)`
  `final void`
  `setEntry(String key, Object value)`

  ### Methods inherited from class tigase.xml.Element

  `addAttribute, addAttributes, addCData, addChild, addChildren, cdataToString, childrenToString, childrenToString, childrenToStringPretty, childrenToStringSecure, childrenToStringSecure, clone, compareTo, equals, findChild, findChild, findChild, findChildren, findChildStaticStr, flatMapChildren, forEachChild, getAttribute, getAttribute, getAttribute, getAttributes, getAttributeStaticStr, getAttributeStaticStr, getCData, getCData, getCData, getCDataStaticStr, getChild, getChild, getChildAttribute, getChildAttributeStaticStr, getChildCData, getChildCData, getChildCData, getChildCDataStaticStr, getChildren, getChildren, getChildren, getChildren, getChildrenStaticStr, getChildStaticStr, getChildStaticStr, getName, getXMLNS, getXMLNS, getXMLNS, getXMLNSStaticStr, hashCode, main, map, mapChildren, mapChildren, matches, removeAttribute, removeChild, setAttribute, setAttributes, setAttributes, setAttributes, setAttributeStaticStr, setCData, setChildren, setDefXMLNS, setName, setXMLNS, toString, toString, toStringNoChildren, toStringPretty, toStringSecure, toStringSecure, withAttribute, withElement, withElement, withElement`

  ### Methods inherited from class java.lang.Object

  `finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### ENTRY

    public static final String ENTRY
    See Also:
      - Constant Field Values

  - ### KEY

    public static final String KEY
    See Also:
      - Constant Field Values

  - ### MAP

    public static final String MAP
    See Also:
      - Constant Field Values

  - ### NAME

    public static final String NAME
    See Also:
      - Constant Field Values

  - ### NODE

    public static final String NODE
    See Also:
      - Constant Field Values

  - ### TYPE

    public static final String TYPE
    See Also:
      - Constant Field Values

  - ### VALUE

    public static final String VALUE
    See Also:
      - Constant Field Values

  - ### removed

    public boolean removed

- ## Constructor Details

  - ### DBElement

    public DBElement(String argName)

  - ### DBElement

    public DBElement(String argName, String attname, String attvalue)

  - ### DBElement

    public DBElement(String argName, String argCData, StringBuilder[] att_names, StringBuilder[] att_values)

- ## Method Details

  - ### formatedString

    public final String formatedString(int indent, int step)

  - ### childrenFormatedString

    public final String childrenFormatedString(int indent, int step)

  - ### getSubnode

    public final DBElement getSubnode(String name)

  - ### getSubnodes

    public final String[] getSubnodes()

  - ### findNode

    public final DBElement findNode(String nodePath)

  - ### removeNode

    public final void removeNode(String nodePath)

  - ### getSubnodePath

    public final DBElement getSubnodePath(String nodePath)

  - ### buildNodesTree

    public final DBElement buildNodesTree(String nodePath)

  - ### newSubnode

    public final DBElement newSubnode(String name)

  - ### findEntry

    public final DBElement findEntry(String key)

  - ### removeEntry

    public final void removeEntry(String key)

  - ### getEntryKeys

    public final String[] getEntryKeys()

  - ### getEntry

    public final DBElement getEntry(String key)

  - ### setEntry

    public final void setEntry(String key, Object value)

  - ### getEntryStringValue

    public final String getEntryStringValue(String key, String def)

  - ### getEntryStringArrValue

    public final String[] getEntryStringArrValue(String key, String[] def)

  - ### getEntryIntValue

    public final int getEntryIntValue(String key, int def)

  - ### getEntryIntArrValue

    public final int[] getEntryIntArrValue(String key, int[] def)

  - ### getEntryDoubleValue

    public final double getEntryDoubleValue(String key, double def)

  - ### getEntryDoubleArrValue

    public final double[] getEntryDoubleArrValue(String key, double[] def)

  - ### getEntryValue

    public final Object getEntryValue(String key, Object def)