|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hydrateframework.gen.schema.SchemaElementBase
org.hydrateframework.gen.schema.Family
public class Family
Include
element
<Family name="TestFamilyFail" namespace="org.hydrateframework.model.test">
<Include file="Include.xml"/>
<Enumeration .../>
<Class .../>
<Relationship .../>
<XMLSChema .../>
</Family>
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.hydrateframework.gen.schema.SchemaElement |
---|
SchemaElement.HighlightType |
Field Summary | |
---|---|
protected java.util.List<ClassDef> |
classDefs
|
protected java.lang.String |
comment
|
protected java.lang.String |
name
|
protected java.lang.String |
namespace
|
protected java.util.List<Relationship> |
relationships
|
protected java.lang.String |
revision
|
protected java.lang.String |
tablespace
|
protected java.util.Map<java.lang.String,Type> |
types
|
protected java.net.URL |
url
|
Fields inherited from class org.hydrateframework.gen.schema.SchemaElementBase |
---|
ATTR_MANDATORY, ATTR_MANDATORYNOOVR, ATTR_NOOVR, ATTR_OPTIONAL, ATTR_OPTIONALNOOVR, BOOL_FALSE, BOOL_NOT, BOOL_NOTSET, BOOL_TRUE, NAME, valid |
Constructor Summary | |
---|---|
Family()
|
Method Summary | |
---|---|
void |
addClassDef(java.lang.String name,
ClassDef classDef)
|
void |
addEnumeration(java.lang.String name,
Enumeration enm)
|
void |
addType(java.lang.String name,
Type type)
|
ClassDef |
findClassDef(java.lang.String name)
|
Relationship |
findRelationship(java.lang.String name)
|
Type |
findType(java.lang.String name)
|
XMLSchema |
findXMLSchema(java.lang.String name)
|
java.lang.Class |
getAttributeClass()
|
java.lang.Class |
getClassDefClass()
|
ClassDef[] |
getClassDefs()
Get a list of class definitions that have been declared to be part of this family. |
java.lang.String |
getComment()
|
java.lang.Class |
getComparatorClass()
|
java.lang.String |
getDataService()
|
java.lang.String |
getDefaultTablespace()
Return the name of the default tablespace for this family or null if there is no default set |
java.lang.Class |
getEnumerationClass()
|
Enumeration[] |
getEnumerations()
Get a list of enumerations that are part of this family. |
protected java.lang.String |
getFamilyElementName()
|
SchemaElement.HighlightType |
getHighlightType()
|
java.util.List<Family> |
getIncludedFamilies()
Get a list of families that were included into this family |
Family |
getIncludedIn()
Get the family that this family has been included in. |
ClassDef[] |
getInUseClassDefs(int inContext)
Get a list of class definitions that have been declared to be part of this family and Are in use in the given context. |
java.lang.String |
getJavaDir()
return the name of the directory in which java classes would be put corresponding to the package for this family. |
java.lang.String |
getJavaName()
|
java.lang.String |
getJavaPackageName()
Return the dot-separated package name to use for java objects. |
java.lang.Class |
getKeyClass()
|
java.lang.Class |
getMethodClass()
|
java.lang.String |
getName()
Get the name of the family. |
NamingPolicy |
getNamingPolicy()
|
java.awt.Point |
getNextDefPosition()
|
SchemaElementBase |
getOverrides()
|
java.lang.String |
getProperty(java.lang.String name)
|
java.lang.Class |
getRelationshipClass()
|
Relationship[] |
getRelationships()
Get a list of relationships that have been declared to be part of this family. |
java.lang.String |
getRevision()
|
Type[] |
getTypes()
Get a list of types (that is class definitions and enumerations) that were declared to be part of this family. |
java.net.URL |
getURL()
Get the file that was/is to be used to store information about this family. |
java.lang.Class |
getXMLSchemaClass()
|
java.lang.Class |
getXMLSchemaElementClass()
|
XMLSchema[] |
getXMLSchemas()
Get a list of XML Schemas that are part of this family. |
boolean |
isValid(java.lang.StringBuffer reason)
Determine if the schema element just read is valid. |
void |
notifyUpdate(SchemaElement element)
Notify a schema element that the schema element it is overriding has changed |
SchemaElement |
override(Family family)
Override the schema element from ain included file. |
boolean |
readFromURL(java.net.URL url)
Read a family definition from a file. |
boolean |
readFromXmlDoc(java.util.Stack<java.lang.String> readContext,
org.w3c.dom.Element elem)
Read the element from the DOM model |
void |
readTypes(java.util.Stack<java.lang.String> readContext,
org.w3c.dom.Element elem)
Read all types that are active in this family and create the overrides |
void |
reloadFile()
|
void |
resolve()
|
void |
setIncludedIn(Family family)
If this is not a top level family - in other words it has been included in another file, set the family object that it has been included in. |
void |
setName(java.lang.String name)
|
void |
setProperties(java.util.Properties props)
|
void |
setURL(java.net.URL url)
Set the file to be used to store information about this family. |
boolean |
shouldWrite()
|
java.lang.String |
toString()
|
java.lang.String |
toSummary()
|
void |
writeToXmlDoc(SAXWriter wrt)
Notify the contentHandler of the state of this class |
Methods inherited from class org.hydrateframework.gen.schema.SchemaElementBase |
---|
addBoolAttribute, addEnumAttribute, addIntAttribute, addListAttribute, addStringAttribute, isValidIdentifier, newElement, printAttrWarning, printWarning, readBoolAttribute, readEnumAttribute, readIntAttribute, readListAttribute, readStringAttribute, refEquals, supersedes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.net.URL url
protected java.lang.String name
protected java.lang.String namespace
protected java.lang.String tablespace
protected java.lang.String comment
protected java.lang.String revision
protected java.util.Map<java.lang.String,Type> types
protected java.util.List<ClassDef> classDefs
protected java.util.List<Relationship> relationships
Constructor Detail |
---|
public Family()
Method Detail |
---|
public SchemaElementBase getOverrides()
getOverrides
in class SchemaElementBase
public java.lang.String toSummary()
public NamingPolicy getNamingPolicy()
public java.lang.String getJavaPackageName()
public java.lang.String getComment()
public java.lang.String getRevision()
public java.lang.String getDefaultTablespace()
public java.lang.String getJavaDir()
public Relationship[] getRelationships()
public ClassDef[] getClassDefs()
public ClassDef[] getInUseClassDefs(int inContext)
public Type[] getTypes()
public Enumeration[] getEnumerations()
public XMLSchema[] getXMLSchemas()
public void setURL(java.net.URL url)
file
- the file to be used.public java.net.URL getURL()
public void setName(java.lang.String name)
public java.lang.String getName()
public java.lang.String getJavaName()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getDataService()
public java.awt.Point getNextDefPosition()
public boolean readFromURL(java.net.URL url)
file
- the file to read
public void reloadFile()
public void setIncludedIn(Family family)
family
- the family object that this family has been
included in.public Family getIncludedIn()
public java.util.List<Family> getIncludedFamilies()
public Type findType(java.lang.String name)
public ClassDef findClassDef(java.lang.String name)
public void addType(java.lang.String name, Type type)
public void addClassDef(java.lang.String name, ClassDef classDef)
public void addEnumeration(java.lang.String name, Enumeration enm)
public void readTypes(java.util.Stack<java.lang.String> readContext, org.w3c.dom.Element elem)
public boolean readFromXmlDoc(java.util.Stack<java.lang.String> readContext, org.w3c.dom.Element elem)
SchemaElement
readContext
- the context within the XML of the read operation. This is used
to help pinpoint the source of an error.elem
- the DOM element to use to initialize this class.public XMLSchema findXMLSchema(java.lang.String name)
public Relationship findRelationship(java.lang.String name)
protected java.lang.String getFamilyElementName()
public void writeToXmlDoc(SAXWriter wrt) throws org.xml.sax.SAXException
contentHandler
- the content handler to notify of events.
org.xml.sax.SAXException
public void resolve()
public void notifyUpdate(SchemaElement element)
SchemaElement
element
- the overridden schema element.public SchemaElement override(Family family)
SchemaElement
SchemaElement.notifyUpdate(SchemaElement)
method when this element changes.
family
- the family in which the overridden element is to be created
public boolean isValid(java.lang.StringBuffer reason)
SchemaElement
reason
- the reason for the failure (or warning) if any should be appended to this string buffer.
public boolean shouldWrite()
public void setProperties(java.util.Properties props)
public java.lang.String getProperty(java.lang.String name)
public java.lang.Class getClassDefClass()
public java.lang.Class getAttributeClass()
public java.lang.Class getComparatorClass()
public java.lang.Class getEnumerationClass()
public java.lang.Class getKeyClass()
public java.lang.Class getMethodClass()
public java.lang.Class getRelationshipClass()
public java.lang.Class getXMLSchemaClass()
public java.lang.Class getXMLSchemaElementClass()
public SchemaElement.HighlightType getHighlightType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |