Package eu.bandm.tools.lablog.xml
Class Document_package
java.lang.Object
eu.bandm.tools.tdom.runtime.TypedNode<X>
eu.bandm.tools.tdom.runtime.TypedDocument<Element,Extension>
eu.bandm.tools.lablog.xml.Document
eu.bandm.tools.lablog.xml.Document_package
Document with an
Element_package
as its root (=topmost) element.
Of main interest for the programmer are the constructors. These allow to read different external representations. Furthermore, each instance is visitable as a whole.Furthermore, the ID relation is managed by TypedDocument.createDictionary()
.-
Nested Class Summary
Nested classes/interfaces inherited from class eu.bandm.tools.tdom.runtime.TypedNode
TypedNode.ParseListener<E extends TypedElement<?,
?>> -
Field Summary
Fields inherited from class eu.bandm.tools.tdom.runtime.TypedDocument
generationComment, root, STRING_ETHEREAL_SEPARATOR
-
Constructor Summary
ConstructorDescriptionCreate a document in a bottom-up fashion from its toplevel element.Document_package
(SAXEventStream in, Extension ext) Document_package
(InputStream in, Extension ext) Input must be tdom-spec compressed encoding, as written byencode(EncodingOutputStream)
.Document_package
(Document domDocument, Extension ext) Parses an untyped W3C DOM document into a tdom instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected final Element
decode
(DecodingInputStream in, Extension ext) final void
final void
encode
(EncodingOutputStream out, Extension ext) Abstract fall-back method which MUST be overridden and always throws an Exception.Return the top level element.final int
void
Send the visitor to this instance.Methods inherited from class eu.bandm.tools.tdom.runtime.TypedDocument
createDictionary, decode, decodeEthereals, encode, encodeEthereals, end, getDTD, getEtherealContainer, getGenerationComment, getRootUntyped, setGenerationComment, start
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
-
Document_package
@Undocumented Document_package(Document domDocument, Extension ext) throws TdomContentException, TdomAttributeException Parses an untyped W3C DOM document into a tdom instance.- Throws:
TdomContentException
- if content models of contained elements are violated.TdomAttributeException
- if required attributes are missing, or attribute syntax is violated.
-
Document_package
Create a document in a bottom-up fashion from its toplevel element.- Parameters:
root
- (never null) top element.
-
Document_package
Document_package(SAXEventStream in, Extension ext) throws TdomContentException, TdomXmlException, TdomAttributeException -
Document_package
public Document_package(InputStream in, Extension ext) throws TdomContentException, IOException, TdomAttributeException Input must be tdom-spec compressed encoding, as written byencode(EncodingOutputStream)
. XML text representation requires some XML parser and piping its SAX Events into #Document_package(SAXEventStream)}.
-
-
Method Details
-
getDocumentElement
Return the top level element. @return (never null) the top element. -
host
Description copied from interface:Visitable
Send the visitor to this instance. -
getTagIndex
public final int getTagIndex()- Overrides:
getTagIndex
in classTypedDocument<Element,
Extension>
-
decode
protected final Element decode(DecodingInputStream in, Extension ext) throws TdomContentException, IOException, TdomAttributeException - Specified by:
decode
in classTypedDocument<Element,
Extension> - Throws:
TdomContentException
IOException
TdomAttributeException
-
encode
Description copied from class:TypedNode
Abstract fall-back method which MUST be overridden and always throws an Exception.- Overrides:
encode
in classTypedDocument<Element,
Extension> - Throws:
IOException
-
encode
- Throws:
IOException
-