Package tigase.xml.db

## Class DBElement

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

- All Implemented Interfaces:
    `java.lang.Cloneable`, `java.lang.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 java.lang.String` | `ENTRY` |
    `static java.lang.String` | `KEY` |
    `static java.lang.String` | `MAP` |
    `static java.lang.String` | `NAME` |
    `static java.lang.String` | `NODE` |
    `boolean` | `removed` |
    `static java.lang.String` | `TYPE` |
    `static java.lang.String` | `VALUE` |

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

      `attributes, children, defxmlns, name, xmlns`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DBElement​(java.lang.String argName)` |
    `DBElement​(java.lang.String argName, java.lang.String attname, java.lang.String attvalue)` |
    `DBElement​(java.lang.String argName, java.lang.String argCData, java.lang.StringBuilder[] att_names, java.lang.StringBuilder[] att_values)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `DBElement` | `buildNodesTree​(java.lang.String nodePath)` |
    `java.lang.String` | `childrenFormatedString​(int indent, int step)` |
    `DBElement` | `findEntry​(java.lang.String key)` |
    `DBElement` | `findNode​(java.lang.String nodePath)` |
    `java.lang.String` | `formatedString​(int indent, int step)` |
    `DBElement` | `getEntry​(java.lang.String key)` |
    `double[]` | `getEntryDoubleArrValue​(java.lang.String key, double[] def)` |
    `double` | `getEntryDoubleValue​(java.lang.String key, double def)` |
    `int[]` | `getEntryIntArrValue​(java.lang.String key, int[] def)` |
    `int` | `getEntryIntValue​(java.lang.String key, int def)` |
    `java.lang.String[]` | `getEntryKeys()` |
    `java.lang.String[]` | `getEntryStringArrValue​(java.lang.String key, java.lang.String[] def)` |
    `java.lang.String` | `getEntryStringValue​(java.lang.String key, java.lang.String def)` |
    `java.lang.Object` | `getEntryValue​(java.lang.String key, java.lang.Object def)` |
    `DBElement` | `getSubnode​(java.lang.String name)` |
    `DBElement` | `getSubnodePath​(java.lang.String nodePath)` |
    `java.lang.String[]` | `getSubnodes()` |
    `DBElement` | `newSubnode​(java.lang.String name)` |
    `void` | `removeEntry​(java.lang.String key)` |
    `void` | `removeNode​(java.lang.String nodePath)` |
    `void` | `setEntry​(java.lang.String key, java.lang.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 Detail

    - #### ENTRY

          public static final java.lang.String ENTRY

      See Also:
        Constant Field Values

    - #### KEY

          public static final java.lang.String KEY

      See Also:
        Constant Field Values

    - #### MAP

          public static final java.lang.String MAP

      See Also:
        Constant Field Values

    - #### NAME

          public static final java.lang.String NAME

      See Also:
        Constant Field Values

    - #### NODE

          public static final java.lang.String NODE

      See Also:
        Constant Field Values

    - #### TYPE

          public static final java.lang.String TYPE

      See Also:
        Constant Field Values

    - #### VALUE

          public static final java.lang.String VALUE

      See Also:
        Constant Field Values

    - #### removed

          public boolean removed

  - ### Constructor Detail

    - #### DBElement

          public DBElement​(java.lang.String argName)

    - #### DBElement

          public DBElement​(java.lang.String argName,
                           java.lang.String attname,
                           java.lang.String attvalue)

    - #### DBElement

          public DBElement​(java.lang.String argName,
                           java.lang.String argCData,
                           java.lang.StringBuilder[] att_names,
                           java.lang.StringBuilder[] att_values)

  - ### Method Detail

    - #### formatedString

          public final java.lang.String formatedString​(int indent,
                                                       int step)

    - #### childrenFormatedString

          public final java.lang.String childrenFormatedString​(int indent,
                                                               int step)

    - #### getSubnode

          public final DBElement getSubnode​(java.lang.String name)

    - #### getSubnodes

          public final java.lang.String[] getSubnodes()

    - #### findNode

          public final DBElement findNode​(java.lang.String nodePath)

    - #### removeNode

          public final void removeNode​(java.lang.String nodePath)

    - #### getSubnodePath

          public final DBElement getSubnodePath​(java.lang.String nodePath)

    - #### buildNodesTree

          public final DBElement buildNodesTree​(java.lang.String nodePath)

    - #### newSubnode

          public final DBElement newSubnode​(java.lang.String name)

    - #### findEntry

          public final DBElement findEntry​(java.lang.String key)

    - #### removeEntry

          public final void removeEntry​(java.lang.String key)

    - #### getEntryKeys

          public final java.lang.String[] getEntryKeys()

    - #### getEntry

          public final DBElement getEntry​(java.lang.String key)

    - #### setEntry

          public final void setEntry​(java.lang.String key,
                                     java.lang.Object value)

    - #### getEntryStringValue

          public final java.lang.String getEntryStringValue​(java.lang.String key,
                                                            java.lang.String def)

    - #### getEntryStringArrValue

          public final java.lang.String[] getEntryStringArrValue​(java.lang.String key,
                                                                 java.lang.String[] def)

    - #### getEntryIntValue

          public final int getEntryIntValue​(java.lang.String key,
                                            int def)

    - #### getEntryIntArrValue

          public final int[] getEntryIntArrValue​(java.lang.String key,
                                                 int[] def)

    - #### getEntryDoubleValue

          public final double getEntryDoubleValue​(java.lang.String key,
                                                  double def)

    - #### getEntryDoubleArrValue

          public final double[] getEntryDoubleArrValue​(java.lang.String key,
                                                       double[] def)

    - #### getEntryValue

          public final java.lang.Object getEntryValue​(java.lang.String key,
                                                      java.lang.Object def)