org.enhydra.xml.xmlc.metadata
Class DocumentClass

java.lang.Object
  |
  +--org.enhydra.apache.xerces.dom.NodeImpl
        |
        +--org.enhydra.apache.xerces.dom.ChildNode
              |
              +--org.enhydra.apache.xerces.dom.ParentNode
                    |
                    +--org.enhydra.apache.xerces.dom.ElementImpl
                          |
                          +--org.enhydra.xml.xmlc.metadata.MetaDataElement
                                |
                                +--org.enhydra.xml.xmlc.metadata.DocumentClass
All Implemented Interfaces:
Cloneable, Element, EventTarget, Node, NodeList, Serializable

public class DocumentClass
extends MetaDataElement

Specify properties of the XMLC document class to generate.

See Also:
Serialized Form

Field Summary
static String ACCESSOR_TYPE_CLASS
           
static String ACCESSOR_TYPE_ELEMENT
           
static String ACCESSOR_TYPE_HTML_ELEMENT
           
static String ACCESSOR_TYPE_INTERFACE
           
static DOMType DEFAULT_DOM_TYPE
          Default DOM if neither -domfactory or -dom are specified.
static String IMPLEMENTATION_SUFFIX
          Suffix for interface implementations.
static String TAG_NAME
          Element name.
 
Fields inherited from class org.enhydra.apache.xerces.dom.ElementImpl
attributes, name, serialVersionUID
 
Fields inherited from class org.enhydra.apache.xerces.dom.ParentNode
fCachedChild, fCachedChildIndex, fCachedLength, firstChild, ownerDocument
 
Fields inherited from class org.enhydra.apache.xerces.dom.ChildNode
nextSibling, previousSibling
 
Fields inherited from class org.enhydra.apache.xerces.dom.NodeImpl
ELEMENT_DEFINITION_NODE, FIRSTCHILD, flags, HASSTRING, IGNORABLEWS, OWNED, ownerNode, READONLY, SPECIFIED, SYNCCHILDREN, SYNCDATA, UNNORMALIZED
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Constructor Summary
DocumentClass(Document ownerDoc)
          Constructor.
 
Method Summary
 void addImplements(String interfaceName)
          Add an interface to the list of interfaces the class will implement.
protected  void completeModifications()
          Complete modifications to DOM, check some error cases.
 boolean getCreateGetTagMethods()
          Get the createGetTagMethods attribute value.
 boolean getCreateMetaData()
          Get the createMetaData attribute value.
 boolean getDeferredParsing()
          Get the deferred parsing attribute.
 boolean getDelegateSupport()
          Get the delegateSupport attribute value.
 DOMType getDom()
          Get the dom attribute value.
 String getDomFactory()
          Get the domFactory attribute value.
 String getDomFactoryClass(boolean html)
          Get the XMLCDomFactory class to use.
 String getExtends()
          Get the extends attribute value.
 GenerateType getGenerate()
          Get the generate attribute value or the default if it is not specified.
 String getGetTagReturnType()
          Get the return type of getTagXXX() methods or the default if not specified.
 String[] getImplements()
          Get the list of interfaces that the class will implement.
 File getJavaClassSource()
           
 File getJavaInterfaceSource()
           
 String getName()
          Get the name attribute value, or the default value if its not specified.
 String getPackageName()
          Get the package name, or null if not set.
 boolean getRecompilation()
          Get the recompilation attribute value.
 boolean getSuppressGetElementMethods()
          Get the createGetElementMethods attribute value.
 String getUnqualClassName()
          Get the unqualified class name attribute.
 String getUnqualInterfaceName()
          Get the unqualified interface name, or null if there is no interface associated with the class.
 boolean isGenerateSpecified()
          Determine if the generate attribute is specified.
 boolean isNameSpecified()
          Determine if the name attribute is specified.
 void setCreateGetTagMethods(boolean value)
          Set the createGetTagMethods attribute value.
 void setCreateMetaData(boolean value)
          Set the createMetaData attribute value.
 void setDeferredParsing(boolean value)
          Set the deferred parsing attribute value.
 void setDelegateSupport(boolean value)
          Set the delegateSupport attribute value.
 void setDom(DOMType value)
          Set the dom attribute value.
 void setDomFactory(String value)
          Set the domFactory attribute value.
 void setExtends(String value)
          Set the extends attribute value.
 void setGenerate(GenerateType value)
          Set the generate attribute value.
 void setGetTagReturnType(String value)
          Set the return type for getTagXXX() methods or null to delete attribute.
 void setName(String value)
          Set the name attribute value.
 void setRecompilation(boolean value)
          Set the recompilation attribute value.
 void setSuppressGetElementMethods(boolean value)
          Set the createGetElementMethods attribute value.
 
Methods inherited from class org.enhydra.xml.xmlc.metadata.MetaDataElement
addStringArrayAttribute, deleteChild, getAttributeNull, getBooleanAttribute, getBooleanAttribute, getBooleanObjectAttribute, getChild, getChildren, getCreateChild, getDocument, getMetaData, getStringArrayAttribute, isAttributeSpecified, mergeAttributes, mergeElement, mergeSingletonChild, setBooleanAttribute, setBooleanAttribute, setBooleanObjectAttribute, setChild, setRemoveAttribute, setRemoveStringArrayAttribute
 
Methods inherited from class org.enhydra.apache.xerces.dom.ElementImpl
cloneNode, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getDefaultAttributes, getElementsByTagName, getElementsByTagNameNS, getNodeName, getNodeType, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, hasAttributes, normalize, reconcileDefaultAttributes, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setOwnerDocument, setReadOnly, setupDefaultAttributes, synchronizeData
 
Methods inherited from class org.enhydra.apache.xerces.dom.ParentNode
checkNormalizationAfterInsert, checkNormalizationAfterRemove, getChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, getOwnerDocument, hasChildNodes, insertBefore, internalInsertBefore, internalRemoveChild, item, lastChild, lastChild, ownerDocument, removeChild, replaceChild, synchronizeChildren
 
Methods inherited from class org.enhydra.apache.xerces.dom.ChildNode
getNextSibling, getParentNode, getPreviousSibling, parentNode, previousSibling
 
Methods inherited from class org.enhydra.apache.xerces.dom.NodeImpl
addEventListener, appendChild, changed, changes, compareDocumentPosition, dispatchEvent, getBaseURI, getFeature, getLocalName, getNamespaceURI, getNodeValue, getPrefix, getReadOnly, getTextContent, getUserData, getUserData, hasStringValue, hasStringValue, internalIsIgnorableWhitespace, isDefaultNamespace, isEqualNode, isFirstChild, isFirstChild, isIgnorableWhitespace, isNormalized, isNormalized, isOwned, isOwned, isReadOnly, isReadOnly, isSameNode, isSpecified, isSpecified, isSupported, lookupNamespaceURI, lookupPrefix, needsSyncChildren, needsSyncChildren, needsSyncData, needsSyncData, removeEventListener, setNodeValue, setPrefix, setTextContent, setUserData, setUserData, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Node
appendChild, compareDocumentPosition, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 

Field Detail

TAG_NAME

public static final String TAG_NAME
Element name.

IMPLEMENTATION_SUFFIX

public static final String IMPLEMENTATION_SUFFIX
Suffix for interface implementations.

DEFAULT_DOM_TYPE

public static final DOMType DEFAULT_DOM_TYPE
Default DOM if neither -domfactory or -dom are specified.

ACCESSOR_TYPE_ELEMENT

public static final String ACCESSOR_TYPE_ELEMENT

ACCESSOR_TYPE_HTML_ELEMENT

public static final String ACCESSOR_TYPE_HTML_ELEMENT

ACCESSOR_TYPE_CLASS

public static final String ACCESSOR_TYPE_CLASS

ACCESSOR_TYPE_INTERFACE

public static final String ACCESSOR_TYPE_INTERFACE
Constructor Detail

DocumentClass

public DocumentClass(Document ownerDoc)
Constructor.
Method Detail

getName

public String getName()
Get the name attribute value, or the default value if its not specified.

setName

public void setName(String value)
Set the name attribute value.

isNameSpecified

public boolean isNameSpecified()
Determine if the name attribute is specified.

getGenerate

public GenerateType getGenerate()
Get the generate attribute value or the default if it is not specified.

setGenerate

public void setGenerate(GenerateType value)
Set the generate attribute value.

isGenerateSpecified

public boolean isGenerateSpecified()
Determine if the generate attribute is specified.

getDelegateSupport

public boolean getDelegateSupport()
Get the delegateSupport attribute value.

setDelegateSupport

public void setDelegateSupport(boolean value)
Set the delegateSupport attribute value.

getCreateMetaData

public boolean getCreateMetaData()
Get the createMetaData attribute value.

setCreateMetaData

public void setCreateMetaData(boolean value)
Set the createMetaData attribute value.

getRecompilation

public boolean getRecompilation()
Get the recompilation attribute value.

setRecompilation

public void setRecompilation(boolean value)
Set the recompilation attribute value. This attribute is a short cut for setting other attributes. Setting this to true has the following affects, however setting it to false doesn't modify any other attributes.

getDeferredParsing

public boolean getDeferredParsing()
Get the deferred parsing attribute.

setDeferredParsing

public void setDeferredParsing(boolean value)
Set the deferred parsing attribute value. This attribute is a short cut for setting other attributes. Setting this to true has the following effects, however setting it to false doesn't modify any other attributes.

getExtends

public String getExtends()
Get the extends attribute value.

setExtends

public void setExtends(String value)
Set the extends attribute value.

getDomFactory

public String getDomFactory()
Get the domFactory attribute value.

setDomFactory

public void setDomFactory(String value)
Set the domFactory attribute value. If not null, clears the dom attribute.

getDom

public DOMType getDom()
Get the dom attribute value.

setDom

public void setDom(DOMType value)
Set the dom attribute value. If not null, clears the domFactory attribute.

getDomFactoryClass

public String getDomFactoryClass(boolean html)
Get the XMLCDomFactory class to use. This is chosen based on the dom or domFactory attributes.

getImplements

public String[] getImplements()
Get the list of interfaces that the class will implement.

addImplements

public void addImplements(String interfaceName)
Add an interface to the list of interfaces the class will implement.

getPackageName

public String getPackageName()
Get the package name, or null if not set.

getUnqualClassName

public String getUnqualClassName()
Get the unqualified class name attribute. If only a class is being generated, this is the base name, otherwise its the interface name with `Impl" appended.

getUnqualInterfaceName

public String getUnqualInterfaceName()
Get the unqualified interface name, or null if there is no interface associated with the class.

getJavaClassSource

public File getJavaClassSource()

getJavaInterfaceSource

public File getJavaInterfaceSource()

getCreateGetTagMethods

public boolean getCreateGetTagMethods()
Get the createGetTagMethods attribute value.

setCreateGetTagMethods

public void setCreateGetTagMethods(boolean value)
Set the createGetTagMethods attribute value.

getGetTagReturnType

public String getGetTagReturnType()
Get the return type of getTagXXX() methods or the default if not specified.

setGetTagReturnType

public void setGetTagReturnType(String value)
Set the return type for getTagXXX() methods or null to delete attribute.

getSuppressGetElementMethods

public boolean getSuppressGetElementMethods()
Get the createGetElementMethods attribute value.

setSuppressGetElementMethods

public void setSuppressGetElementMethods(boolean value)
Set the createGetElementMethods attribute value.

completeModifications

protected void completeModifications()
                              throws XMLCException
Complete modifications to DOM, check some error cases.
Overrides:
completeModifications in class MetaDataElement
See Also:
MetaDataElement.completeModifications()


Copyright © 1999-2002 enhydra.org (Mark Diekhans, David Li, Richard Kunze). All Rights reserved.