Package org.eigenbase.xom
Class GenericDef
- java.lang.Object
-
- org.eigenbase.xom.ElementDef
-
- org.eigenbase.xom.GenericDef
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,NodeDef
public class GenericDef extends ElementDef
AGenericDefis aElementDefwhose attributes and children are stored in collections, not generated members. It is convenient for building XML documents, but is not strongly typed.- Since:
- 3 October, 2001
- Version:
- $Id: //open/util/resgen/src/org/eigenbase/xom/GenericDef.java#3 $
- Author:
- jhyde
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GenericDef(java.lang.String tagName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChild(NodeDef element)voiddisplay(java.io.PrintWriter out, int indent)Outputs this node to any PrintWriter, in a formatted fashion with automatic indenting.voiddisplayXML(XMLOutput out, int indent)Outputs this element definition in XML to any XMLOutput.java.lang.ObjectgetAttribute(java.lang.String key)NodeDef[]getChildren()Returns the children of this node.java.lang.StringgetName()Returns the tag name of this element, or null for TEXT elements.intgetType()Returns the type of this element.voidsetAttribute(java.lang.String key, java.lang.Object value)-
Methods inherited from class org.eigenbase.xom.ElementDef
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, getMixedChildren_new, getText, getWrapper, hashCode, toCompactXML, toString, toXML, verifyEqual
-
-
-
-
Method Detail
-
display
public void display(java.io.PrintWriter out, int indent)Description copied from interface:NodeDefOutputs 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:NodeDefOutputs this element definition in XML to any XMLOutput.- Specified by:
displayXMLin interfaceNodeDef- Overrides:
displayXMLin classElementDef- Parameters:
out- the XMLOutput class to display the XML
-
getType
public int getType()
Description copied from interface:NodeDefReturns the type of this element. Values are as forDOMWrapper.getType().- Specified by:
getTypein interfaceNodeDef- Overrides:
getTypein classElementDef
-
getName
public java.lang.String getName()
Returns the tag name of this element, or null for TEXT elements.- Specified by:
getNamein interfaceNodeDef- Overrides:
getNamein classElementDef
-
addChild
public void addChild(NodeDef element)
- Overrides:
addChildin classElementDef
-
getChildren
public NodeDef[] getChildren()
Description copied from interface:NodeDefReturns the children of this node.- Specified by:
getChildrenin interfaceNodeDef- Overrides:
getChildrenin classElementDef
-
setAttribute
public void setAttribute(java.lang.String key, java.lang.Object value)
-
getAttribute
public java.lang.Object getAttribute(java.lang.String key)
-
-