Class DataHolder

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable
    Direct Known Subclasses:
    Document, DocumentList, Property

    public abstract class DataHolder
    extends java.lang.Object
    implements java.io.Serializable, java.lang.Cloneable
    This class represents the root class for all objects that can hold information and therefore data. In particular its Document, DocumentList and Property.
    Since:
    1.0
    Version:
    $Id: $Id
    Author:
    lrosenberg
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected DataHolder​(java.lang.String anId)
      Creates a new DataHolder object with the given id.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object clone()
      clone.
      java.lang.String getId()
      Returns the name of this DataHolder.
      abstract long getSizeInBytes()
      The 'size' of a DataHolder is needed for the quota calculation.
      The size of an atomic DataHolder like a Property should be the real amount of bytes it uses, whether the size of complex objects should be cumulated.
      The overhead for administration shouldn't be counted (i.e.
      int hashCode()
      protected void setId​(java.lang.String anId)
      Sets the name of this DataHolder to the given value.
      Warning: Only use this method, if you know what you do.
      net.anotheria.util.xml.XMLNode toXMLNode()
      toXMLNode.
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DataHolder

        protected DataHolder​(java.lang.String anId)
        Creates a new DataHolder object with the given id.
        Parameters:
        anId - a String object.
    • Method Detail

      • getId

        public java.lang.String getId()
        Returns the name of this DataHolder.
        Returns:
        the name of this DataHolder object.
      • setId

        protected void setId​(java.lang.String anId)
        Sets the name of this DataHolder to the given value.
        Warning: Only use this method, if you know what you do.
        Parameters:
        anId - a String object.
      • getSizeInBytes

        public abstract long getSizeInBytes()
        The 'size' of a DataHolder is needed for the quota calculation.
        The size of an atomic DataHolder like a Property should be the real amount of bytes it uses, whether the size of complex objects should be cumulated.
        The overhead for administration shouldn't be counted (i.e. the size of an IntProperty is the amount of bytes needed to store the int value itself, not the amount of bytes needed to store the DataHolder object).
        Returns:
        a long.
      • clone

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

        clone.

        Overrides:
        clone in class java.lang.Object
        Returns:
        a Object object.
        Throws:
        java.lang.CloneNotSupportedException - if any.
      • toXMLNode

        public net.anotheria.util.xml.XMLNode toXMLNode()

        toXMLNode.

        Returns:
        a XMLNode object.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object