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 and Description
    --- | ---
    `static String` | `ENTRY`
    `static String` | `KEY`
    `static String` | `MAP`
    `static String` | `NAME`
    `static String` | `NODE`
    `boolean` | `removed`
    `static String` | `TYPE`
    `static String` | `VALUE`

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

      `attributes, children, defxmlns, name, xmlns`

  - ### Constructor Summary

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

  - ### Method Summary

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

    - #### 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 Detail

    - #### 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 Detail

    - #### 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)

Copyright © 2004–2019 "Tigase, Inc.". All rights reserved.