Package eu.bandm.tools.muli.tdom
Class Document_translationfile
java.lang.Object
eu.bandm.tools.tdom.runtime.TypedNode<X>
eu.bandm.tools.tdom.runtime.TypedDocument<Element,Extension>
eu.bandm.tools.muli.tdom.Document
eu.bandm.tools.muli.tdom.Document_translationfile
Meaning: List of multi-lingual translations.
Document with an Element_translationfile
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_translationfile
(InputStream in, Extension ext) Input must be tdom-spec compressed encoding, as written byencode(EncodingOutputStream)
.Document_translationfile
(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_translationfile
@Undocumented Document_translationfile(Document domDocument, Extension ext) throws TdomAttributeException, TdomContentException 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_translationfile
Create a document in a bottom-up fashion from its toplevel element. @param root (never null) top element. -
Document_translationfile
Document_translationfile(SAXEventStream in, Extension ext) throws TdomAttributeException, TdomXmlException, TdomContentException -
Document_translationfile
public Document_translationfile(InputStream in, Extension ext) throws IOException, TdomAttributeException, TdomContentException 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_translationfile(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 IOException, TdomAttributeException, TdomContentException - Specified by:
decode
in classTypedDocument<Element,
Extension> - Throws:
IOException
TdomAttributeException
TdomContentException
-
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
-