Package org.eigenbase.xom
Class TextDef
java.lang.Object
org.eigenbase.xom.TextDef
- All Implemented Interfaces:
NodeDef
- Direct Known Subclasses:
CdataDef,CommentDef
A
TextDef represents piece of textual data in an XML document.
Free text (such as Some text) is represented by an actual
TextDef; comments (such as invalid input: '<'-- a comment -->)
by derived class CommentDef; and CDATA sections (such as
<![CDATA[Some text]]>) by derived class CdataDef.- Since:
- 5 October, 2001
- Version:
- $Id: //open/util/resgen/src/org/eigenbase/xom/TextDef.java#4 $
- Author:
- jhyde
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddisplay(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[]Returns the children of this node.Returns the location of this element in its document.getName()Returns the name of this node's tag.getText()Returns the text inside this node.intgetType()Returns the type of this element.Retrieves theDOMWrapperwhich was used to create this node.
-
Field Details
-
s
-
asIs
boolean asIsWhether to print the data as is -- never quote as a CDATA section. Useful if the fragment contains a valid XML string.
-
-
Constructor Details
-
TextDef
public TextDef() -
TextDef
-
TextDef
-
TextDef
-
TextDef
- Throws:
XOMException
-
-
Method Details
-
getName
Description copied from interface:NodeDefReturns the name of this node's tag. -
getText
Description copied from interface:NodeDefReturns the text inside this node. -
getChildren
Description copied from interface:NodeDefReturns the children of this node.- Specified by:
getChildrenin interfaceNodeDef
-
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
Description copied from interface:NodeDefOutputs this node to any PrintWriter, in a formatted fashion with automatic indenting. -
displayXML
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
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
-