Class Document

All Implemented Interfaces:
ICompositeElement, IDocument, IElement, Serializable

public class Document extends CompositeElement implements IDocument
This class defines the root element of a runtime document.
Since:
6.0
Author:
O. Kerpershoek
See Also:
  • Constructor Details

    • Document

      public Document(String name)
      Constructs the document model with the specified name.
      Parameters:
      name - The name of the document.
    • Document

      public Document(String name, String description)
      Constructs the document model with the specified name and description.
      Parameters:
      name - The name of the document.
      description - The description of the document.
    • Document

      public Document(DocumentDefinition definition)
      Constructs the document model from a document definition.
      Parameters:
      definition - The definition that should be used to create the model from.
    • Document

      public Document(String name, String description, Element[] elements)
      Constructs the document model with the specified name and contents.
      Parameters:
      name - The name of the document.
      description - The description of the document.
      elements - The contents of the document.
    • Document

      protected Document(Document other, boolean duplicateContents)
  • Method Details

    • getDescription

      public String getDescription()
      This method returns the description of the document.
      Specified by:
      getDescription in interface IDocument
      Returns:
      the description of the document, may be null.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class CompositeElement
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class CompositeElement
    • duplicate

      public Element duplicate()
      Description copied from interface: IElement
      This method should clone the element and return the cloned element. The duplicate method should usually make a deep copy of the element, with the exception of members that are not mutable (and thus can safely be shared between multiple copies). The properties of an element are considered to be non-mutable, and will thus by default be copied.
      Specified by:
      duplicate in interface IElement
      Returns:
      The cloned (duplicate) element.