Package org.eigenbase.xom
Class TextDef
- java.lang.Object
-
- org.eigenbase.xom.TextDef
-
- All Implemented Interfaces:
NodeDef
- Direct Known Subclasses:
CdataDef,CommentDef
public class TextDef extends java.lang.Object implements NodeDef
ATextDefrepresents piece of textual data in an XML document. Free text (such asSome text) is represented by an actualTextDef; comments (such as<-- a comment -->) by derived classCommentDef; and CDATA sections (such as<![CDATA[Some text]]>) by derived classCdataDef.- Since:
- 5 October, 2001
- Version:
- $Id: //open/util/resgen/src/org/eigenbase/xom/TextDef.java#4 $
- Author:
- jhyde
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddisplay(java.io.PrintWriter pw, 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.NodeDef[]getChildren()Returns the children of this node.LocationgetLocation()Returns the location of this element in its document.java.lang.StringgetName()Returns the name of this node's tag.java.lang.StringgetText()Returns the text inside this node.intgetType()Returns the type of this element.DOMWrappergetWrapper()Retrieves theDOMWrapperwhich was used to create this node.
-
-
-
Constructor Detail
-
TextDef
public TextDef()
-
TextDef
public TextDef(java.lang.String s)
-
TextDef
public TextDef(java.lang.String s, boolean asIs)
-
TextDef
public TextDef(java.lang.String s, boolean asIs, Location location)
-
TextDef
public TextDef(DOMWrapper _def) throws XOMException
- Throws:
XOMException
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:NodeDefReturns the name of this node's tag.
-
getText
public java.lang.String getText()
Description copied from interface:NodeDefReturns the text inside this node.
-
getChildren
public NodeDef[] getChildren()
Description copied from interface:NodeDefReturns the children of this node.- Specified by:
getChildrenin interfaceNodeDef
-
getWrapper
public DOMWrapper getWrapper()
Description copied from interface:NodeDefRetrieves theDOMWrapperwhich was used to create this node. Only works if this nodes'sMetaDef.Element.keepDefwas true (or, if it is not set, if the defaultMetaDef.Model.defaultKeepDefis true); otherwise, returnsnull.- Specified by:
getWrapperin interfaceNodeDef- Returns:
- wrapper underlying this node
-
getType
public int getType()
Description copied from interface:NodeDefReturns the type of this element. Values are as forDOMWrapper.getType().
-
display
public void display(java.io.PrintWriter pw, int indent)Description copied from interface:NodeDefOutputs this node to any PrintWriter, in a formatted fashion with automatic indenting.
-
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- Parameters:
out- the XMLOutput class to display the XML
-
getLocation
public Location getLocation()
Description copied from interface:NodeDefReturns the location of this element in its document.- Specified by:
getLocationin interfaceNodeDef- Returns:
- location of this element, or null if location is not available
-
-