@User public abstract class TypedElement<E extends TypedElement<E,X>,X extends TypedExtension> extends TypedSubstantial<X> implements TypedContent, Locatable<XMLDocumentIdentifier>
Modifier and Type | Class and Description |
---|---|
static class |
TypedElement.AttributeDecoder |
static class |
TypedElement.AttributeEncoder |
static class |
TypedElement.MixedContent<E extends TypedElement<E,X>,X extends TypedExtension>
Base class for all generated classes which model "mixed contents" or
"unmixed contents".
|
static interface |
TypedElement.MixedContentContainer
Implemented by all Element types which include PCDATA and other elements.
|
static class |
TypedElement.MixedContentFactory<C extends TypedElement.MixedContent<E,X>,E extends TypedElement<E,X>,X extends TypedExtension,Y extends Exception> |
static interface |
TypedElement.PCDataContainer
Implemented by all Element types which include PCDATA.
|
static class |
TypedElement.UnmixedContent<E extends TypedElement<E,X>,X extends TypedExtension>
Content class in case that only PCData is contained, can be reused between models
and instances.
|
TypedNode.ParseListener<E extends TypedElement<?,?>>
TypedContent.DecodingConstructor<C extends TypedContent,X extends TypedExtension,Y extends Exception>, TypedContent.ParsingConstructor<C extends TypedContent,E extends TypedElement<E,X>,X extends TypedExtension,Y extends Exception>
Modifier and Type | Field and Description |
---|---|
static Function<TypedElement,String> |
getDeepPCData |
static Function<TypedElement.MixedContentContainer,String> |
getFlatPCData |
protected NamespaceName |
name |
Modifier | Constructor and Description |
---|---|
protected |
TypedElement(Element domElement) |
protected |
TypedElement(NamespaceName name) |
protected |
TypedElement(String name)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
__dumpElementSnapshot(List<TypedSubstantial<X>> list) |
protected TypedAttribute[] |
__getAllAttrs() |
protected static @Opt NamespaceName |
classifyForException(TypedSubstantial s) |
protected static <C extends TypedElement.MixedContent<E,X>,E extends TypedElement<E,X>,X extends TypedExtension,Y extends Exception> |
decodeMixed(TypedElement.MixedContentFactory<C,E,X,Y> factory,
DecodingInputStream in,
X ext,
Class<? extends C> contentClass,
int max) |
static <C extends TypedContent,E extends TypedExtension,Y extends Exception> |
decodeOptional(TypedContent.DecodingConstructor<C,E,Y> constructor,
DecodingInputStream in,
E ext) |
static <C extends TypedContent,E extends TypedExtension,Y extends Exception> |
decodePlus(TypedContent.DecodingConstructor<? extends C,E,Y> constructor,
DecodingInputStream in,
E ext,
Class<C> contentClass) |
static <C extends TypedContent,E extends TypedExtension,Y extends Exception> |
decodePlusList(TypedContent.DecodingConstructor<? extends C,E,Y> constructor,
DecodingInputStream in,
E ext,
Class<C> contentClass) |
static <C extends TypedContent,E extends TypedExtension,Y extends Exception> |
decodeStar(TypedContent.DecodingConstructor<? extends C,E,Y> constructor,
DecodingInputStream in,
E ext,
Class<C> contentClass) |
static <C extends TypedContent,E extends TypedExtension,Y extends Exception> |
decodeStarList(TypedContent.DecodingConstructor<? extends C,E,Y> constructor,
DecodingInputStream in,
E ext,
Class<C> contentClass) |
void |
encode(boolean asAbstract,
EncodingOutputStream out,
X ext) |
protected static <E extends TypedExtension> |
encodeMixed(EncodingOutputStream out,
E ext,
int count,
Iterator<? extends TypedElement.MixedContent<?,E>> i) |
void |
end(ContentHandler contentHandler,
LexicalHandler lexicalHandler) |
protected static void |
ensureSize(List<?> list,
int size) |
protected static Element |
extractElement(ContentMapping content) |
List<TypedAttribute> |
getAttrsSnapshot()
Call
getAttrsSnapshot(boolean) in validating mode. |
List<TypedAttribute> |
getAttrsSnapshot(boolean validating) |
abstract String |
getDeepPCData()
Collect and concatenate all PCData, directly or indirectly contained in this
model component (mostly: an Element).
|
List<TypedSubstantial<X>> |
getElemsSnapshot() |
TypedEtherealContainer |
getEtherealContainer()
Gives access to the Comments and PIs after the opening tag and before the close tag.
|
String |
getLocalName()
Return the local part of the namespace name from this element's tag definition.
|
NamespaceName |
getName()
Return the NamespaceName.
|
String |
getNamespaceURI()
Return the URI part of the namespace name from this element's tag definition.
|
protected static String |
getPCData(TypedElement.MixedContentContainer mcc) |
abstract int |
getTagIndex() |
String |
getTagName()
Return the name as it was written in the original dtd.
|
protected void |
initAttrs(Attributes attrs)
Will be overridden by generated code which picks attribute values.
|
protected void |
initAttrs(@Opt Location<XMLDocumentIdentifier> from,
@Opt Location<XMLDocumentIdentifier> to,
Attributes attrs)
Will be called by generated code.
|
protected void |
initAttrsSafe(@Opt Location<XMLDocumentIdentifier> from,
@Opt Location<XMLDocumentIdentifier> to,
Attributes attrs)
Will be called by generated code if not
TdomAttributeSyntaxException can
arise when parsing the attributes. |
static void |
matchEndElement(SAXEventStream in,
NamespaceName name) |
static void |
matchEndElement(SAXEventStream in,
String tag) |
static Attributes |
matchStartElement(SAXEventStream in,
NamespaceName name) |
static Attributes |
matchStartElement(SAXEventStream in,
String tag) |
protected static <E extends TypedElement<E,X>,X extends TypedExtension,Y extends Exception> |
parseAbstract(TypedDTD dtd,
X ext,
TypedNode.ParseListener<E> listener,
Map<? super String,? extends TypedContent.ParsingConstructor<?,E,X,Y>> subclassTable,
Element elem) |
protected static <C extends TypedContent> |
parseAndClose(C content,
SAXEventStream in,
boolean explicit,
String tagName) |
protected static <C extends TypedContent> |
parseAndClose(C content,
SAXEventStream in,
String tagName)
Backwards compatibility definition.
|
protected static <E extends TypedElement<E,X>,X extends TypedExtension,Y extends Exception> |
parseMixed(TypedElement.MixedContentFactory<?,E,X,Y> factory,
SAXEventStream in,
X ext,
TypedNode.ParseListener<E> listener,
TypedElement.MixedContent... array) |
protected static <C extends TypedElement.MixedContent<E,X>,E extends TypedElement<E,X>,X extends TypedExtension,Y extends Exception> |
parseMixed(TypedElement.MixedContentFactory<C,E,X,Y> factory,
X ext,
TypedNode.ParseListener<E> listener,
Element domElement,
List<? super C> l) |
static <C extends TypedContent,E extends TypedElement<E,X>,X extends TypedExtension,Y extends Exception> |
parseOptional(TypedContent.ParsingConstructor<C,E,X,Y> constructor,
ContentMapping content,
X ext,
TypedNode.ParseListener<E> listener) |
static <C extends TypedContent,E extends TypedElement<E,X>,X extends TypedExtension,Y extends Exception> |
parsePlus(TypedContent.ParsingConstructor<? extends C,E,X,Y> constructor,
ContentMapping content,
X ext,
TypedNode.ParseListener<E> listener,
Class<C> contentClass)
DOCME ML ist das nur für w3cDom ??? und OHNE attribute ??? DANN nur TdomContentException !!
|
static <C extends TypedContent,E extends TypedElement<E,X>,X extends TypedExtension,Y extends Exception> |
parsePlusList(TypedContent.ParsingConstructor<? extends C,E,X,Y> constructor,
ContentMapping content,
X ext,
TypedNode.ParseListener<E> listener,
Class<C> contentClass) |
static <C extends TypedContent,E extends TypedElement<E,X>,X extends TypedExtension,Y extends Exception> |
parseStar(TypedContent.ParsingConstructor<? extends C,E,X,Y> constructor,
ContentMapping content,
X ext,
TypedNode.ParseListener<E> listener,
Class<C> contentClass) |
static <C extends TypedContent,E extends TypedElement<E,X>,X extends TypedExtension,Y extends Exception> |
parseStarList(TypedContent.ParsingConstructor<? extends C,E,X,Y> constructor,
ContentMapping content,
X ext,
TypedNode.ParseListener<E> listener,
Class<C> contentClass) |
protected static void |
semiparseEmpty(TypedSubstantial<?>... content) |
protected static <C extends TypedElement.MixedContent<E,X>,E extends TypedElement<E,X>,X extends TypedExtension> |
semiparseMixed(TypedElement.MixedContentFactory<C,E,X,?> factory,
TypedSubstantial[] nodes,
List<? super C> l) |
protected static <A> void |
setResizing(List<? super A> list,
int index,
A elem) |
void |
start(ContentHandler contentHandler,
LexicalHandler lexicalHandler,
Attributes attributes) |
static NamespaceName |
w3c_getNamespaceName(Node node) |
dumpFollowingEthereals, dumpPrecedingEthereals, getFollowingEthereals, getPrecedingEthereals, readFollowingEthereals, readPrecedingEthereals
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLocation
protected final NamespaceName name
public static final Function<TypedElement.MixedContentContainer,String> getFlatPCData
public static final Function<TypedElement,String> getDeepPCData
@Deprecated protected TypedElement(String name)
protected TypedElement(NamespaceName name)
protected TypedElement(Element domElement)
@User public TypedEtherealContainer getEtherealContainer()
protected void initAttrs(Attributes attrs) throws TdomAttributeSyntaxException
TdomAttributeSyntaxException
protected void initAttrs(@Opt @Opt Location<XMLDocumentIdentifier> from, @Opt @Opt Location<XMLDocumentIdentifier> to, Attributes attrs) throws TdomAttributeSyntaxException
TdomAttributeSyntaxException
protected void initAttrsSafe(@Opt @Opt Location<XMLDocumentIdentifier> from, @Opt @Opt Location<XMLDocumentIdentifier> to, Attributes attrs)
TdomAttributeSyntaxException
can
arise when parsing the attributes. Sets the location of the Element before
invoking the generated code, which steps through the different Attributes.
This is necessary for error messaging.@User public final String getTagName()
<? tdom xmlns:X='Y' ?>
" have been present in the DTD source.
Then there must be at most one(1) colon character ":
" in the name,
and it must be preceded by a prefix which appears in such a namespace declaration.@User public final String getNamespaceURI()
getTagName()
), it will be the empty string.
See the documentation of NamespaceName
for the different cases.@User public final String getLocalName()
getTagName()
.
Otherwise it is the part after the colon.NamespaceName
, in either mode.@User public final NamespaceName getName()
public abstract int getTagIndex()
protected static Element extractElement(ContentMapping content)
public static <C extends TypedContent,E extends TypedElement<E,X>,X extends TypedExtension,Y extends Exception> C parseOptional(TypedContent.ParsingConstructor<C,E,X,Y> constructor, ContentMapping content, X ext, TypedNode.ParseListener<E> listener) throws TdomContentException, Y extends Exception
TdomContentException
Y extends Exception
public static <C extends TypedContent,E extends TypedElement<E,X>,X extends TypedExtension,Y extends Exception> C[] parseStar(TypedContent.ParsingConstructor<? extends C,E,X,Y> constructor, ContentMapping content, X ext, TypedNode.ParseListener<E> listener, Class<C> contentClass) throws TdomContentException, Y extends Exception
TdomContentException
Y extends Exception
public static <C extends TypedContent,E extends TypedElement<E,X>,X extends TypedExtension,Y extends Exception> CheckedList<C> parseStarList(TypedContent.ParsingConstructor<? extends C,E,X,Y> constructor, ContentMapping content, X ext, TypedNode.ParseListener<E> listener, Class<C> contentClass) throws TdomContentException, Y extends Exception
TdomContentException
Y extends Exception
public static <C extends TypedContent,E extends TypedElement<E,X>,X extends TypedExtension,Y extends Exception> C[] parsePlus(TypedContent.ParsingConstructor<? extends C,E,X,Y> constructor, ContentMapping content, X ext, TypedNode.ParseListener<E> listener, Class<C> contentClass) throws TdomContentException, Y extends Exception
TdomContentException
Y extends Exception
public static <C extends TypedContent,E extends TypedElement<E,X>,X extends TypedExtension,Y extends Exception> CheckedListPlus<C> parsePlusList(TypedContent.ParsingConstructor<? extends C,E,X,Y> constructor, ContentMapping content, X ext, TypedNode.ParseListener<E> listener, Class<C> contentClass) throws TdomContentException, Y extends Exception
TdomContentException
Y extends Exception
public final void encode(boolean asAbstract, EncodingOutputStream out, X ext) throws IOException
encode
in class TypedNode<X extends TypedExtension>
IOException
public static <C extends TypedContent,E extends TypedExtension,Y extends Exception> C decodeOptional(TypedContent.DecodingConstructor<C,E,Y> constructor, DecodingInputStream in, E ext) throws IOException, TdomContentException, Y extends Exception
IOException
TdomContentException
Y extends Exception
public static <C extends TypedContent,E extends TypedExtension,Y extends Exception> C[] decodeStar(TypedContent.DecodingConstructor<? extends C,E,Y> constructor, DecodingInputStream in, E ext, Class<C> contentClass) throws IOException, Y extends Exception, TdomContentException
IOException
Y extends Exception
TdomContentException
public static <C extends TypedContent,E extends TypedExtension,Y extends Exception> C[] decodePlus(TypedContent.DecodingConstructor<? extends C,E,Y> constructor, DecodingInputStream in, E ext, Class<C> contentClass) throws IOException, Y extends Exception, TdomContentException
IOException
Y extends Exception
TdomContentException
public static <C extends TypedContent,E extends TypedExtension,Y extends Exception> CheckedListPlus<C> decodePlusList(TypedContent.DecodingConstructor<? extends C,E,Y> constructor, DecodingInputStream in, E ext, Class<C> contentClass) throws IOException, Y extends Exception, TdomContentException
IOException
Y extends Exception
TdomContentException
public static <C extends TypedContent,E extends TypedExtension,Y extends Exception> CheckedList<C> decodeStarList(TypedContent.DecodingConstructor<? extends C,E,Y> constructor, DecodingInputStream in, E ext, Class<C> contentClass) throws IOException, Y extends Exception, TdomContentException
IOException
Y extends Exception
TdomContentException
public static NamespaceName w3c_getNamespaceName(Node node)
protected static <E extends TypedElement<E,X>,X extends TypedExtension,Y extends Exception> TypedContent parseAbstract(TypedDTD dtd, X ext, TypedNode.ParseListener<E> listener, Map<? super String,? extends TypedContent.ParsingConstructor<?,E,X,Y>> subclassTable, Element elem) throws TdomContentException, Y extends Exception
TdomContentException
Y extends Exception
protected static <C extends TypedContent> C parseAndClose(C content, SAXEventStream in, String tagName) throws TdomXmlException
TdomXmlException
protected static <C extends TypedContent> C parseAndClose(C content, SAXEventStream in, boolean explicit, String tagName) throws TdomXmlException
TdomXmlException
public static Attributes matchStartElement(SAXEventStream in, String tag) throws TdomContentException
TdomContentException
public static Attributes matchStartElement(SAXEventStream in, NamespaceName name) throws TdomContentException
TdomContentException
public static void matchEndElement(SAXEventStream in, String tag) throws TdomXmlException
TdomXmlException
public static void matchEndElement(SAXEventStream in, NamespaceName name) throws TdomXmlException
TdomXmlException
protected static <C extends TypedElement.MixedContent<E,X>,E extends TypedElement<E,X>,X extends TypedExtension,Y extends Exception> void parseMixed(TypedElement.MixedContentFactory<C,E,X,Y> factory, X ext, TypedNode.ParseListener<E> listener, Element domElement, List<? super C> l) throws TdomContentException, Y extends Exception
TdomContentException
Y extends Exception
protected static <C extends TypedElement.MixedContent<E,X>,E extends TypedElement<E,X>,X extends TypedExtension> void semiparseMixed(TypedElement.MixedContentFactory<C,E,X,?> factory, TypedSubstantial[] nodes, List<? super C> l) throws TdomContentException
TdomContentException
protected static <E extends TypedExtension> void encodeMixed(EncodingOutputStream out, E ext, int count, Iterator<? extends TypedElement.MixedContent<?,E>> i) throws IOException
IOException
protected static <C extends TypedElement.MixedContent<E,X>,E extends TypedElement<E,X>,X extends TypedExtension,Y extends Exception> C[] decodeMixed(TypedElement.MixedContentFactory<C,E,X,Y> factory, DecodingInputStream in, X ext, Class<? extends C> contentClass, int max) throws IOException, TdomContentException, Y extends Exception
IOException
TdomContentException
Y extends Exception
protected static <E extends TypedElement<E,X>,X extends TypedExtension,Y extends Exception> TypedElement.MixedContent[] parseMixed(TypedElement.MixedContentFactory<?,E,X,Y> factory, SAXEventStream in, X ext, TypedNode.ParseListener<E> listener, TypedElement.MixedContent... array) throws Y extends Exception, TdomContentException, TdomXmlException
Y extends Exception
TdomContentException
TdomXmlException
protected static String getPCData(TypedElement.MixedContentContainer mcc)
public abstract String getDeepPCData()
TypedSubstantial
getDeepPCData
in class TypedSubstantial<X extends TypedExtension>
public List<TypedAttribute> getAttrsSnapshot()
getAttrsSnapshot(boolean)
in validating mode.public List<TypedAttribute> getAttrsSnapshot(boolean validating)
validating
- If set to false, Attributes with no explicit value set by the user
(i.e. only the default value) will not be contained in the snapshot.protected TypedAttribute[] __getAllAttrs()
public abstract void __dumpElementSnapshot(List<TypedSubstantial<X>> list)
public List<TypedSubstantial<X>> getElemsSnapshot()
protected static void ensureSize(List<?> list, int size)
protected static <A> void setResizing(List<? super A> list, int index, A elem)
@Opt protected static @Opt NamespaceName classifyForException(TypedSubstantial s)
protected static void semiparseEmpty(TypedSubstantial<?>... content) throws TdomContentException
TdomContentException
public void start(ContentHandler contentHandler, LexicalHandler lexicalHandler, Attributes attributes) throws SAXException
SAXException
public void end(ContentHandler contentHandler, LexicalHandler lexicalHandler) throws SAXException
SAXException
see also the complete user documentation .