org.hydrateframework.gen.schema
Interface SchemaElement

All Known Subinterfaces:
Member, Member
All Known Implementing Classes:
Attribute, Attribute, ClassComparator, ClassDef, ClassDef, DefaultKeyAttribute, DiscriminatorAttribute, Enumeration, Enumeration, Enumeration.Option, Family, Family, Key, Key, Method, Method.Parameter, Relationship, Relationship, Relationship.NestedMember, Relationship.Reference, Relationship.Reference, SchemaElementBase, XMLSchema, XMLSchema.XMLSchemaElement

public interface SchemaElement


Nested Class Summary
static class SchemaElement.HighlightType
           
 
Method Summary
 SchemaElement.HighlightType getHighlightType()
           
 java.lang.String getName()
           
 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 readFromXmlDoc(java.util.Stack<java.lang.String> readContext, org.w3c.dom.Element elem)
          Read the element from the DOM model
 void resolve()
           
 boolean shouldWrite()
           
 java.lang.String toSummary()
           
 void writeToXmlDoc(SAXWriter wrt)
          Write out this schema element to the SAX Handler
 

Method Detail

getName

java.lang.String getName()

writeToXmlDoc

void writeToXmlDoc(SAXWriter wrt)
                   throws org.xml.sax.SAXException
Write out this schema element to the SAX Handler

Parameters:
contentHandler - the SAX content handler.
Throws:
org.xml.sax.SAXException

readFromXmlDoc

boolean readFromXmlDoc(java.util.Stack<java.lang.String> readContext,
                       org.w3c.dom.Element elem)
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.

override

SchemaElement override(Family family)
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 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.

notifyUpdate

void notifyUpdate(SchemaElement element)
Notify a schema element that the schema element it is overriding has changed

Parameters:
element - the overridden schema element.

isValid

boolean isValid(java.lang.StringBuffer reason)
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.

shouldWrite

boolean shouldWrite()

toSummary

java.lang.String toSummary()

resolve

void resolve()

getHighlightType

SchemaElement.HighlightType getHighlightType()


Copyright © 2000 The Hydrate Project. All Rights Reserved.