org.eigenbase.xom
Class WrapperElementDef

java.lang.Object
  extended by org.eigenbase.xom.ElementDef
      extended by org.eigenbase.xom.WrapperElementDef
All Implemented Interfaces:
Serializable, Cloneable, NodeDef

public class WrapperElementDef
extends ElementDef

WrapperElementDef is an ElementDef which retains the underlying XML DOMWrapper. It is used when there is no specific class for this tag.

Since:
31 October, 2001
Author:
jhyde
See Also:
Serialized Form
 

Field Summary
(package private)  DOMWrapper _def
           
(package private)  Class enclosure
           
(package private)  String prefix
           
 
Constructor Summary
WrapperElementDef(DOMWrapper def, Class enclosure, String prefix)
           
 
Method Summary
 void display(PrintWriter out, int indent)
          Outputs this node to any PrintWriter, in a formatted fashion with automatic indenting.
 void displayXML(XMLOutput out, int indent)
          Outputs this element definition in XML to any XMLOutput.
 NodeDef[] getChildren()
          Returns the children of this node.
 String getName()
          Returns the name of this node's tag.
 int getType()
          Returns the type of this element.
 DOMWrapper getWrapper()
          Retrieves the DOMWrapper which was used to create this node.
 
Methods inherited from class org.eigenbase.xom.ElementDef
addChild, addChildren, clone, constructElement, constructElement, deepCopy, diff, displayAttribute, displayAttributeDiff, displayDiff, displayElement, displayElementArray, displayElementArrayDiff, displayElementDiff, displayIndent, displayString, displayStringArray, displayStringArrayDiff, displayStringDiff, displayXML, displayXMLElement, displayXMLElementArray, displayXMLString, displayXMLStringArray, equals, getElementChildren, getElementClass, getLocation, getMixedChildren_new, getMixedChildren, getText, hashCode, toCompactXML, toString, toXML, verifyEqual
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_def

DOMWrapper _def

enclosure

Class enclosure

prefix

String prefix
Constructor Detail

WrapperElementDef

public WrapperElementDef(DOMWrapper def,
                         Class enclosure,
                         String prefix)
Method Detail

display

public void display(PrintWriter out,
                    int indent)
Description copied from interface: NodeDef
Outputs this node to any PrintWriter, in a formatted fashion with automatic indenting.

Parameters:
out - the PrintWriter to which to write this NodeDef.
indent - the indentation level for the printout.

displayXML

public void displayXML(XMLOutput out,
                       int indent)
Description copied from interface: NodeDef
Outputs this element definition in XML to any XMLOutput.

Specified by:
displayXML in interface NodeDef
Overrides:
displayXML in class ElementDef
Parameters:
out - the XMLOutput class to display the XML

getType

public int getType()
Description copied from interface: NodeDef
Returns the type of this element. Values are as for DOMWrapper.getType().

Specified by:
getType in interface NodeDef
Overrides:
getType in class ElementDef

getName

public String getName()
Description copied from interface: NodeDef
Returns the name of this node's tag.

Specified by:
getName in interface NodeDef
Overrides:
getName in class ElementDef

getChildren

public NodeDef[] getChildren()
Description copied from interface: NodeDef
Returns the children of this node.

Specified by:
getChildren in interface NodeDef
Overrides:
getChildren in class ElementDef

getWrapper

public DOMWrapper getWrapper()
Description copied from interface: NodeDef
Retrieves the DOMWrapper which was used to create this node. Only works if this nodes's MetaDef.FullDefinition.keepDef was true (or, if it is not set, if the default MetaDef.Model.defaultKeepDef is true); otherwise, returns null.

Specified by:
getWrapper in interface NodeDef
Overrides:
getWrapper in class ElementDef
Returns:
wrapper underlying this node

SourceForge.net_Logo