de.vc.xml

## Class AbstractNodeWithAttributes

- java.lang.Object
- - de.vc.xml.AbstractNode
  - - de.vc.xml.AbstractNodeWithAttributes

- All Implemented Interfaces:
    Node, NodeElement, java.io.Serializable, java.lang.Cloneable
  Direct Known Subclasses:
    DefaultNode, FormattingObject

      public abstract class AbstractNodeWithAttributes
      extends AbstractNode

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `MAP_TYPE_FLYWEIGHT`
    `static int` | `MAP_TYPE_HASH`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `AbstractNodeWithAttributes(java.lang.String tag)`
    `protected` | `AbstractNodeWithAttributes(java.lang.String tag, Node parent)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `clone()` Clones this element.
    `protected java.lang.Object` | `doGetAttribute(java.lang.String key)` Do implement this Method.
    `protected boolean` | `doSetAttribute(java.lang.String key, java.lang.Object value)` Do implement this Method.
    `java.util.Map<java.lang.String,java.lang.Object>` | `getAttributeMap()` Gets a map of all defined attributes.
    `static int` | `getDefaultMapType()` Gets the default type of attribute-map.
    `java.util.Set<java.lang.String>` | `getDefinedAttributes()`
    `static void` | `setDefaultMapType(int mapType)` Sets the default type of attribute-map.

    - ### Methods inherited from class de.vc.xml.AbstractNode

      `addAttributeChangeListener, addElements, addElements, clearEqualAttributes, clearInheratedAttribute, clearInheratedAttributes, clearValue, contains, contains, copyAttributes, createID, findFirstNodeWithText, findNode, findNodesWithText, fire, fireSaxEvents, firstElement, getAttrAsBoolean, getAttrAsInteger, getAttrAsString, getAttrAsString, getAttribute, getAttribute, getAttributeMap, getContentText, getContentText, getDefinedAttributes, getElements, getElements, getElements, getElements, getFirstElement, getIndex, getLocalName, getNamespacePrefix, getNamespacePrefixes, getNamespaceURI, getParent, getParent, getParent, getParentOrThis, getQName, getRoot, hasEqualAttrs, indexOf, isEmpty, lastElement, liftInheritedAttribute, removeAttributeChangeListener, setAttribute, setAttributes, setAttrIfNotNull, setEnableAttributeChangeEvent, setNamespace, setParent, setQName, setUndefinedAttributes, writeTo, writeTo, writeTo, writeTo`

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

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface de.vc.xml.Node

      `addElement, addElement, removeElement, removeElement, replaceElement, setElement`

- - ### Field Detail

    - #### MAP_TYPE_HASH

          public static final int MAP_TYPE_HASH

      See Also:
        Constant Field Values

    - #### MAP_TYPE_FLYWEIGHT

          public static final int MAP_TYPE_FLYWEIGHT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### AbstractNodeWithAttributes

          public AbstractNodeWithAttributes(java.lang.String tag)

    - #### AbstractNodeWithAttributes

          protected AbstractNodeWithAttributes(java.lang.String tag,
                                    Node parent)

  - ### Method Detail

    - #### setDefaultMapType

          public static final void setDefaultMapType(int mapType)

      Sets the default type of attribute-map. By default attributes are stored in a HashMap.
      Parameters:
        `mapType` - Map type.

    - #### getDefaultMapType

          public static final int getDefaultMapType()

      Gets the default type of attribute-map.
      Returns:
        int

    - #### clone

          public java.lang.Object clone()
                                 throws java.lang.CloneNotSupportedException

      Description copied from interface: `NodeElement`
      Clones this element. Should return a deep copy!
      Specified by:
        `clone` in interface `NodeElement`
      Overrides:
        `clone` in class `AbstractNode`
      Returns:
        Clone.
      Throws:
        `java.lang.CloneNotSupportedException`

    - #### getDefinedAttributes

          public java.util.Set<java.lang.String> getDefinedAttributes()

    - #### getAttributeMap

          public java.util.Map<java.lang.String,java.lang.Object> getAttributeMap()

      Description copied from class: `AbstractNode`
      Gets a map of all defined attributes.
      Specified by:
        `getAttributeMap` in interface `Node`
      Specified by:
        `getAttributeMap` in class `AbstractNode`
      Returns:
        Map of attributes.

    - #### doGetAttribute

          protected java.lang.Object doGetAttribute(java.lang.String key)

      Description copied from class: `AbstractNode`
      Do implement this Method.
      Specified by:
        `doGetAttribute` in class `AbstractNode`
      Parameters:
        `key` - Name of attribute, always lower case.
      Returns:
        Value.

    - #### doSetAttribute

          protected boolean doSetAttribute(java.lang.String key,
                               java.lang.Object value)

      Description copied from class: `AbstractNode`
      Do implement this Method. A ValueChangeEvent is fired after setting new value (if enabled).
      Specified by:
        `doSetAttribute` in class `AbstractNode`
      Parameters:
        `key` - Name of attribute, always lower case.
        `value` - New value.
      Returns:
        true, if value was successfully setted.

© 2003-2011 by Sascha Schmidt (vision-cloud.de). All Rights Reserved.