Package schema2template.template
Class SourceCodeBaseClass
- java.lang.Object
-
- schema2template.template.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 Summary
Constructors Modifier Constructor Description protected
SourceCodeBaseClass(String baseName, SortedSet<PuzzlePiece> childElementsOfBaseClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(SourceCodeBaseClass o)
boolean
equals(Object o)
PuzzlePieceSet
getBaseAttributes()
Returns the attribute Definitions which are shared by all subclasses of this JavaBaseClassPuzzlePieceSet
getBaseElements()
Returns the element Definitions which are shared by all subclasses of this JavaBaseClassPuzzlePieceSet
getChildElementsOfBaseClass()
Returns the element Definitions which are subclassing this JavaBaseClassString
getLocalName()
String
getNamespacePrefix()
String
getQName()
int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
SourceCodeBaseClass
protected SourceCodeBaseClass(String baseName, SortedSet<PuzzlePiece> childElementsOfBaseClass)
-
-
Method Detail
-
compareTo
public int compareTo(SourceCodeBaseClass o)
- Specified by:
compareTo
in interfaceComparable<SourceCodeBaseClass>
-
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
-
-