Package eu.bandm.tools.tdom.runtime
Class TypedProcessingInstruction
java.lang.Object
eu.bandm.tools.tdom.runtime.TypedNode
eu.bandm.tools.tdom.runtime.TypedEthereal
eu.bandm.tools.tdom.runtime.TypedProcessingInstruction
Realizes "PIs" = Processing Instructions in a tdom model instance.
Implementation is immutable/algebraic.
The text value is a (possibly empty) string.
The target value must match the "Name" production [5]
from [XML 1.0],
section 2.6. This is checked by
NmTokenAttribute.checkPITarget(String)
.-
Nested Class Summary
Nested classes/interfaces inherited from class eu.bandm.tools.tdom.runtime.TypedNode
TypedNode.ParseListener<E extends TypedElement<?,
?>> -
Constructor Summary
ConstructorDescriptionTypedProcessingInstruction
(String target, String text) Create an instance with given values. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dump
(ContentHandler contentHandler, LexicalHandler lexicalHandler) Write this model component to a SAX output stream.void
encode
(EncodingOutputStream out, TypedExtension ext) Abstract fall-back method which MUST be overridden and always throws an Exception.Returns the target value.getText()
Returns the text contents.Methods inherited from class eu.bandm.tools.tdom.runtime.TypedEthereal
forAnyExtension
Methods inherited from class eu.bandm.tools.tdom.runtime.TypedNode
asBigDecimal, asBigDecimal, asBigDecimal, asBigDecimal, asBigInteger, asBigInteger, asBigInteger, asBigInteger, asBoolean, asBoolean, asDouble, asDouble, asDouble, asDouble, asFloat, asFloat, asFloat, asFloat, asHexInt, asHexInt, asHexInt, asHexInt, asInt, asInt, asInt, asInt, asLong, asLong, asLong, asLong, asTrimmedString, asTrimmedString, asTrimmedString, asTrimmedString, checkPlus, checkPlus, checkStar, checkStar, checkStrict, encode, encodeOptional, encodePlus, encodePlus, encodeStar, encodeStar, extractEthereals, getLocation, getPCData, setLocation, setLocation, setLocation
-
Constructor Details
-
TypedProcessingInstruction
Create an instance with given values.- Throws:
IllegalArgumentException
- if target is not conformant to syntax rules, see the class description above.IllegalArgumentException
- if any argument ==null
-
-
Method Details
-
getTarget
Returns the target value.- Returns:
- (never null) the target value.
-
getText
Returns the text contents.- Returns:
- (never null) the text contents.
-
encode
Description copied from class:TypedNode
Abstract fall-back method which MUST be overridden and always throws an Exception. -
dump
public void dump(ContentHandler contentHandler, @Opt LexicalHandler lexicalHandler) throws SAXException Description copied from class:TypedEthereal
Write this model component to a SAX output stream. Please note that in the SAX architecture, PIs are treated by aContentHandler
, but Comments by aLexicalHandler
, so these two handlers must be supplied as a tandem for a method defined with this abstract class.- Specified by:
dump
in classTypedEthereal
- Parameters:
contentHandler
- (never null) SAX handler for writing a TypedProcessingInstructionlexicalHandler
- SAX handler for writing a Comment. If null, then the comments are silently discarded.- Throws:
SAXException
-