org.hydrateframework.gen.schema
Class XMLSchema.XMLSchemaElement

java.lang.Object
  extended by org.hydrateframework.gen.schema.SchemaElementBase
      extended by org.hydrateframework.gen.schema.XMLSchema.XMLSchemaElement
All Implemented Interfaces:
SchemaElement
Enclosing class:
XMLSchema

public static class XMLSchema.XMLSchemaElement
extends SchemaElementBase


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.hydrateframework.gen.schema.SchemaElement
SchemaElement.HighlightType
 
Field Summary
protected  Family family
           
protected  XMLSchema.XMLSchemaElement overriddenBy
           
protected  XMLSchema.XMLSchemaElement overrides
           
 
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, log, NAME, valid
 
Constructor Summary
XMLSchema.XMLSchemaElement(Family family, boolean rootElement)
           
XMLSchema.XMLSchemaElement(Family family, java.lang.Boolean rootElement)
           
XMLSchema.XMLSchemaElement(Family family, boolean rootElement, XMLSchema.XMLSchemaElement override)
           
 
Method Summary
 boolean coerceToNotSet()
           
 java.lang.String getAsMember()
           
 ClassDef[] getClassDefs()
           
 XMLSchema.XMLSchemaElement[] getElements()
           
 java.lang.String[] getFailIfNotPop()
           
 Family getFamily()
           
 java.lang.String getFullName()
           
 SchemaElement.HighlightType getHighlightType()
           
 java.util.Collection<java.lang.String> getIncludedAttributes()
           
protected  java.util.Collection<java.lang.String> getIncludedAttributes(int inUseContext)
           
 java.lang.String getJavaAttrName()
           
 java.lang.String getJavaClsName()
           
 java.lang.String getJavaVarName()
           
 Key getKey()
           
 java.lang.String getKeyName()
           
 Relationship.Reference getMember()
           
 java.lang.String getMemberAttrName()
           
 java.lang.String getName()
           
 SchemaElementBase getOverrides()
           
 ClassDef getRootClassDef(java.lang.String className)
           
 boolean isCollection()
           
 boolean isFlattened()
           
 boolean isInUse()
           
 boolean isKeyOnly()
           
 boolean isValid()
           
 boolean isValid(java.lang.StringBuffer reason)
          Determine if the schema element just read is valid.
 Relationship.Reference lookInClassHierarchy(ClassDef classDef)
           
 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.
protected  void readAttrs(java.util.Stack<java.lang.String> readContext, org.w3c.dom.Element elem)
           
 boolean readFromXmlDoc(java.util.Stack<java.lang.String> readContext, org.w3c.dom.Element elem)
          Read the element from the DOM model
 void resolve()
           
 void resolve(ClassDef inClassDef, XMLSchema.XMLSchemaElement parent)
           
 boolean shouldCheckDb()
           
 boolean shouldWrite()
           
 java.lang.String toSummary()
           
protected  void writeAttrs(java.util.List<SAXWriter.Attr> attrs)
           
 void writeToXmlDoc(SAXWriter wrt)
          Write out this schema element to the SAX Handler
 
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, toString, wait, wait, wait
 

Field Detail

family

protected Family family

overriddenBy

protected XMLSchema.XMLSchemaElement overriddenBy

overrides

protected XMLSchema.XMLSchemaElement overrides
Constructor Detail

XMLSchema.XMLSchemaElement

public XMLSchema.XMLSchemaElement(Family family,
                                  java.lang.Boolean rootElement)

XMLSchema.XMLSchemaElement

public XMLSchema.XMLSchemaElement(Family family,
                                  boolean rootElement)

XMLSchema.XMLSchemaElement

public XMLSchema.XMLSchemaElement(Family family,
                                  boolean rootElement,
                                  XMLSchema.XMLSchemaElement override)
Method Detail

getOverrides

public SchemaElementBase getOverrides()
Specified by:
getOverrides in class SchemaElementBase

toSummary

public java.lang.String toSummary()

isInUse

public boolean isInUse()

isValid

public boolean isValid()

getMemberAttrName

public java.lang.String getMemberAttrName()

getFamily

public Family getFamily()

getIncludedAttributes

public java.util.Collection<java.lang.String> getIncludedAttributes()

getIncludedAttributes

protected java.util.Collection<java.lang.String> getIncludedAttributes(int inUseContext)

readAttrs

protected void readAttrs(java.util.Stack<java.lang.String> readContext,
                         org.w3c.dom.Element elem)

readFromXmlDoc

public boolean readFromXmlDoc(java.util.Stack<java.lang.String> readContext,
                              org.w3c.dom.Element elem)
Description copied from interface: SchemaElement
Read the element from the DOM model

Parameters:
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.

writeAttrs

protected void writeAttrs(java.util.List<SAXWriter.Attr> attrs)

writeToXmlDoc

public void writeToXmlDoc(SAXWriter wrt)
                   throws org.xml.sax.SAXException
Description copied from interface: SchemaElement
Write out this schema element to the SAX Handler

Throws:
org.xml.sax.SAXException

resolve

public void resolve()

lookInClassHierarchy

public Relationship.Reference lookInClassHierarchy(ClassDef classDef)

resolve

public void resolve(ClassDef inClassDef,
                    XMLSchema.XMLSchemaElement parent)

isFlattened

public boolean isFlattened()

isKeyOnly

public boolean isKeyOnly()

isCollection

public boolean isCollection()

shouldCheckDb

public boolean shouldCheckDb()

getElements

public XMLSchema.XMLSchemaElement[] getElements()

getClassDefs

public ClassDef[] getClassDefs()

getRootClassDef

public ClassDef getRootClassDef(java.lang.String className)

getKeyName

public java.lang.String getKeyName()

getAsMember

public java.lang.String getAsMember()

getJavaVarName

public java.lang.String getJavaVarName()

getJavaAttrName

public java.lang.String getJavaAttrName()

getJavaClsName

public java.lang.String getJavaClsName()

getMember

public Relationship.Reference getMember()

getKey

public Key getKey()

coerceToNotSet

public boolean coerceToNotSet()

getFailIfNotPop

public java.lang.String[] getFailIfNotPop()

getName

public java.lang.String getName()

getFullName

public java.lang.String getFullName()

isValid

public boolean isValid(java.lang.StringBuffer reason)
Description copied from interface: SchemaElement
Determine if the schema element just read is valid.

Parameters:
reason - the reason for the failure (or warning) if any should be appended to this string buffer.
Returns:
true if the element is valid, false otherwise.

notifyUpdate

public void notifyUpdate(SchemaElement element)
Description copied from interface: SchemaElement
Notify a schema element that the schema element it is overriding has changed

Parameters:
element - the overridden schema element.

override

public SchemaElement override(Family family)
Description copied from interface: SchemaElement
Override the schema element from ain included file. The implementation of this method should make a new SchemaElement, that knows that it is overriding this element. It should also remember the identity of the schema element that has overridden it (i.e. the element it returns so that it can notify it via the SchemaElement.notifyUpdate(SchemaElement) method when this element changes.

Parameters:
family - the family in which the overridden element is to be created
Returns:
the new schema element that overrides this one.

shouldWrite

public boolean shouldWrite()

getHighlightType

public SchemaElement.HighlightType getHighlightType()


Copyright © 2000 The Hydrate Project. All Rights Reserved.