org.hydrateframework.gen.schema
Class SchemaElementBase

java.lang.Object
  extended by org.hydrateframework.gen.schema.SchemaElementBase
All Implemented Interfaces:
SchemaElement
Direct Known Subclasses:
Attribute, ClassComparator, ClassDef, Enumeration, Enumeration.Option, Family, Key, Method, Method.Parameter, Relationship, Relationship.Reference, XMLSchema, XMLSchema.XMLSchemaElement

public abstract class SchemaElementBase
extends java.lang.Object
implements SchemaElement

Version:
@(#)$Revision: 1.3 $
Author:
David Chamberlin

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.hydrateframework.gen.schema.SchemaElement
SchemaElement.HighlightType
 
Field Summary
static int ATTR_MANDATORY
           
static int ATTR_MANDATORYNOOVR
           
static int ATTR_NOOVR
           
static int ATTR_OPTIONAL
           
static int ATTR_OPTIONALNOOVR
           
static int BOOL_FALSE
           
static int BOOL_NOT
           
static int BOOL_NOTSET
           
static int BOOL_TRUE
           
static org.apache.commons.logging.Log log
           
static java.lang.String NAME
           
protected  boolean valid
           
 
Constructor Summary
SchemaElementBase()
           
 
Method Summary
static void addBoolAttribute(java.util.Collection<SAXWriter.Attr> attrs, java.lang.String name, int value)
           
static void addEnumAttribute(java.util.Collection<SAXWriter.Attr> attrs, java.lang.String name, java.lang.Object value)
           
static void addIntAttribute(java.util.Collection<SAXWriter.Attr> attrs, java.lang.String name, int value)
           
static void addListAttribute(java.util.Collection<SAXWriter.Attr> attrs, java.lang.String name, java.util.Collection<java.lang.String> value)
           
static void addStringAttribute(java.util.Collection<SAXWriter.Attr> attrs, java.lang.String name, java.lang.String value)
           
abstract  SchemaElementBase getOverrides()
           
 boolean isValidIdentifier(java.lang.String name, java.lang.String textName, java.lang.StringBuffer reason)
           
 SchemaElement newElement(java.lang.String name, java.util.Collection<? extends SchemaElement> search, java.lang.Class objectClass, java.lang.Object[] constructionParams)
           
static void printAttrWarning(java.util.Stack<java.lang.String> readContext, java.lang.String attributeName)
           
static void printWarning(java.util.Stack<java.lang.String> readContext, java.lang.String message)
           
 int readBoolAttribute(java.util.Stack<java.lang.String> readContext, java.lang.String attributeName, org.w3c.dom.Element elem, int expectation, int prevValue)
           
<T> T
readEnumAttribute(java.util.Stack<java.lang.String> readContext, java.lang.String attributeName, org.w3c.dom.Element elem, java.lang.Class enumClass, int expectation, T prevValue)
           
 int readIntAttribute(java.util.Stack<java.lang.String> readContext, java.lang.String attributeName, org.w3c.dom.Element elem, int expectation, int prevValue)
           
 java.util.List<java.lang.String> readListAttribute(java.util.Stack<java.lang.String> readContext, java.lang.String attributeName, org.w3c.dom.Element elem, int expectation)
           
 java.lang.String readStringAttribute(java.util.Stack<java.lang.String> readContext, java.lang.String attributeName, org.w3c.dom.Element elem, int expectation, java.lang.String prevValue)
           
protected  boolean refEquals(java.lang.Object o1, java.lang.Object o2)
           
 boolean supersedes(SchemaElementBase other)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.hydrateframework.gen.schema.SchemaElement
getHighlightType, getName, isValid, notifyUpdate, override, readFromXmlDoc, resolve, shouldWrite, toSummary, writeToXmlDoc
 

Field Detail

BOOL_TRUE

public static final int BOOL_TRUE
See Also:
Constant Field Values

BOOL_FALSE

public static final int BOOL_FALSE
See Also:
Constant Field Values

BOOL_NOTSET

public static final int BOOL_NOTSET
See Also:
Constant Field Values

BOOL_NOT

public static final int BOOL_NOT
See Also:
Constant Field Values

ATTR_OPTIONAL

public static final int ATTR_OPTIONAL
See Also:
Constant Field Values

ATTR_OPTIONALNOOVR

public static final int ATTR_OPTIONALNOOVR
See Also:
Constant Field Values

ATTR_MANDATORY

public static final int ATTR_MANDATORY
See Also:
Constant Field Values

ATTR_MANDATORYNOOVR

public static final int ATTR_MANDATORYNOOVR
See Also:
Constant Field Values

ATTR_NOOVR

public static final int ATTR_NOOVR
See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values

valid

protected boolean valid

log

public static org.apache.commons.logging.Log log
Constructor Detail

SchemaElementBase

public SchemaElementBase()
Method Detail

printAttrWarning

public static void printAttrWarning(java.util.Stack<java.lang.String> readContext,
                                    java.lang.String attributeName)

printWarning

public static void printWarning(java.util.Stack<java.lang.String> readContext,
                                java.lang.String message)

addBoolAttribute

public static void addBoolAttribute(java.util.Collection<SAXWriter.Attr> attrs,
                                    java.lang.String name,
                                    int value)

addStringAttribute

public static void addStringAttribute(java.util.Collection<SAXWriter.Attr> attrs,
                                      java.lang.String name,
                                      java.lang.String value)

addEnumAttribute

public static void addEnumAttribute(java.util.Collection<SAXWriter.Attr> attrs,
                                    java.lang.String name,
                                    java.lang.Object value)

addIntAttribute

public static void addIntAttribute(java.util.Collection<SAXWriter.Attr> attrs,
                                   java.lang.String name,
                                   int value)

addListAttribute

public static void addListAttribute(java.util.Collection<SAXWriter.Attr> attrs,
                                    java.lang.String name,
                                    java.util.Collection<java.lang.String> value)

readBoolAttribute

public int readBoolAttribute(java.util.Stack<java.lang.String> readContext,
                             java.lang.String attributeName,
                             org.w3c.dom.Element elem,
                             int expectation,
                             int prevValue)

readIntAttribute

public int readIntAttribute(java.util.Stack<java.lang.String> readContext,
                            java.lang.String attributeName,
                            org.w3c.dom.Element elem,
                            int expectation,
                            int prevValue)

readStringAttribute

public java.lang.String readStringAttribute(java.util.Stack<java.lang.String> readContext,
                                            java.lang.String attributeName,
                                            org.w3c.dom.Element elem,
                                            int expectation,
                                            java.lang.String prevValue)

getOverrides

public abstract SchemaElementBase getOverrides()

supersedes

public boolean supersedes(SchemaElementBase other)

refEquals

protected boolean refEquals(java.lang.Object o1,
                            java.lang.Object o2)

readEnumAttribute

public <T> T readEnumAttribute(java.util.Stack<java.lang.String> readContext,
                               java.lang.String attributeName,
                               org.w3c.dom.Element elem,
                               java.lang.Class enumClass,
                               int expectation,
                               T prevValue)

readListAttribute

public java.util.List<java.lang.String> readListAttribute(java.util.Stack<java.lang.String> readContext,
                                                          java.lang.String attributeName,
                                                          org.w3c.dom.Element elem,
                                                          int expectation)

newElement

public SchemaElement newElement(java.lang.String name,
                                java.util.Collection<? extends SchemaElement> search,
                                java.lang.Class objectClass,
                                java.lang.Object[] constructionParams)

isValidIdentifier

public boolean isValidIdentifier(java.lang.String name,
                                 java.lang.String textName,
                                 java.lang.StringBuffer reason)


Copyright © 2000 The Hydrate Project. All Rights Reserved.