Package schema2template.template
Class SourceCodeBaseClass
java.lang.Object
schema2template.template.SourceCodeBaseClass
- All Implemented Interfaces:
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 Summary
ModifierConstructorDescriptionprotected
SourceCodeBaseClass
(String baseName, SortedSet<PuzzlePiece> childElementsOfBaseClass) -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
Returns the attribute Definitions which are shared by all subclasses of this JavaBaseClassReturns the element Definitions which are shared by all subclasses of this JavaBaseClassReturns the element Definitions which are subclassing this JavaBaseClassgetQName()
int
hashCode()
toString()
-
Constructor Details
-
SourceCodeBaseClass
-
-
Method Details
-
compareTo
- Specified by:
compareTo
in interfaceComparable<SourceCodeBaseClass>
-
equals
-
hashCode
public int hashCode() -
getLocalName
-
getQName
-
getNamespacePrefix
-
toString
-
getChildElementsOfBaseClass
Returns the element Definitions which are subclassing this JavaBaseClass- Returns:
- subclasses
-
getBaseAttributes
Returns the attribute Definitions which are shared by all subclasses of this JavaBaseClass- Returns:
- attributes
-
getBaseElements
Returns the element Definitions which are shared by all subclasses of this JavaBaseClass- Returns:
- elements
-