Class SourceCodeBaseClass

  • All Implemented Interfaces:
    Comparable<SourceCodeBaseClass>

    public class SourceCodeBaseClass
    extends Object
    implements Comparable<SourceCodeBaseClass>
    This calss encapsulates the name of the java base class, which is a Java super class where shared attributes and elements are being moved to. This class also offers functionality to find the common attributes and elements via getBaseElements() and getBaseAttributes(). The base class feature (its existence) is enabled by adding the attribute "base" one or more XML element named in the grammar-additions.xml The base attributes holds the name of the base class feature is stated like an XML node with a prefix. Like for the elements the prefix will become a subfolder within "org.odftoolkit.odfdom.dom.element" as the base functionality is being placed aside of the element class. The additional attribute "extends" for XML elements (and attributes) defines an additional super class, which will be added to the XML class or if base exists within the base class. The class path of the "extends" have to be a fully qualified Java package name, as the Class can be anywhere. All elements with the same base class have to have the same extends super class as all share these two as parent classes and there is no multiple inheritance in Java.

    Convention: Unique key is the hash of the name of the baseClass. This hash is used for compareTo(o) equals(o) and hashCode().

    • Constructor Detail

    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getLocalName

        public String getLocalName()
      • getQName

        public String getQName()
      • getNamespacePrefix

        public String getNamespacePrefix()
      • getChildElementsOfBaseClass

        public PuzzlePieceSet getChildElementsOfBaseClass()
        Returns the element Definitions which are subclassing this JavaBaseClass
        Returns:
        subclasses
      • getBaseAttributes

        public PuzzlePieceSet getBaseAttributes()
        Returns the attribute Definitions which are shared by all subclasses of this JavaBaseClass
        Returns:
        attributes
      • getBaseElements

        public PuzzlePieceSet getBaseElements()
        Returns the element Definitions which are shared by all subclasses of this JavaBaseClass
        Returns:
        elements