@User public abstract class TypedNode<X extends TypedExtension> extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
TypedNode.ParseListener<E extends TypedElement<?,?>>
Listener interface which may be registered with the tdom generated parsing code
and will be called after each successful parsing step.
|
Modifier | Constructor and Description |
---|---|
protected |
TypedNode() |
Modifier and Type | Method and Description |
---|---|
static @Opt BigDecimal |
asBigDecimal(@Opt CDataAttribute att)
Returns the value of its argument as a decimal encoded BigDecimal value.
|
static @Opt BigDecimal |
asBigDecimal(@Opt NmTokenAttribute att)
Returns the value of its argument as a decimal encoded BigDecimal value.
|
static @Opt BigDecimal |
asBigDecimal(@Opt String s)
Returns the value of its argument as a decimal encoded BigDecimal value.
|
static @Opt BigDecimal |
asBigDecimal(TypedElement.PCDataContainer el)
Returns the contents of its argument as a decimal encoded BigDecimal value.
|
static @Opt BigInteger |
asBigInteger(@Opt CDataAttribute att)
Returns the value of its argument as a decimal encoded BigInteger value.
|
static @Opt BigInteger |
asBigInteger(@Opt NmTokenAttribute att)
Returns the value of its argument as a decimal encoded BigInteger value.
|
static @Opt BigInteger |
asBigInteger(@Opt String s)
Returns the value of its argument as a decimal encoded BigInteger value.
|
static @Opt BigInteger |
asBigInteger(TypedElement.PCDataContainer el)
Returns the contents of its argument as a decimal encoded BigInteger value.
|
static <V extends Enum<V> & EnumerationValue> |
asBoolean(EnumerationAttribute<V> att,
V value)
Returns whether the contents of an attribute is equal to one
particular typed attribute value.
|
static <V> boolean |
asBoolean(TypedAttribute<String> att,
String value) |
static @Opt Double |
asDouble(@Opt CDataAttribute att)
Returns the value of its argument as a decimal encoded double value.
|
static @Opt Double |
asDouble(@Opt NmTokenAttribute att)
Returns the value of its argument as a decimal encoded double value.
|
static @Opt Double |
asDouble(@Opt String s)
Returns the value of its argument as a decimal encoded double value.
|
static @Opt Double |
asDouble(TypedElement.PCDataContainer el)
Returns the contents of its argument as a decimal encoded double value.
|
static @Opt Float |
asFloat(@Opt CDataAttribute att)
Returns the value of its argument as a decimal encoded float value.
|
static @Opt Float |
asFloat(@Opt NmTokenAttribute att)
Returns the value of its argument as a decimal encoded float value.
|
static @Opt Float |
asFloat(@Opt String s)
Returns the value of its argument as a decimal encoded float value.
|
static @Opt Float |
asFloat(TypedElement.PCDataContainer el)
Returns the contents of its argument as a decimal encoded float value.
|
static @Opt Integer |
asHexInt(@Opt CDataAttribute att)
Returns the value of its argument as a hexdecimal encoded integer value.
|
static @Opt Integer |
asHexInt(@Opt NmTokenAttribute att)
Returns the value of its argument as a hexdecimal encoded integer value.
|
static @Opt Integer |
asHexInt(@Opt String s)
Returns the value of its argument as a hexdecimal encoded integer value.
|
static @Opt Integer |
asHexInt(TypedElement.PCDataContainer el)
Returns the contents of its argument as a hexdecimal encoded integer value.
|
static @Opt Integer |
asInt(@Opt CDataAttribute att)
Returns the value of its argument as a decimal encoded integer value.
|
static @Opt Integer |
asInt(@Opt NmTokenAttribute att)
Returns the value of its argument as a decimal encoded integer value.
|
static @Opt Integer |
asInt(@Opt String s)
Returns the value of its argument as a decimal encoded integer value.
|
static @Opt Integer |
asInt(TypedElement.PCDataContainer el)
Returns the contents of its argument as a decimal encoded integer value.
|
static @Opt Long |
asLong(@Opt CDataAttribute att)
Returns the value of its argument as a decimal encoded long value.
|
static @Opt Long |
asLong(@Opt NmTokenAttribute att)
Returns the value of its argument as a decimal encoded long value.
|
static @Opt Long |
asLong(@Opt String s)
Returns the value of its argument as a decimal encoded long value.
|
static @Opt Long |
asLong(TypedElement.PCDataContainer el)
Returns the contents of its argument as a decimal encoded long value.
|
static @Opt String |
asTrimmedString(@Opt CDataAttribute att)
Returns the contents of its argument as a trimmed string.
|
static @Opt String |
asTrimmedString(@Opt NmTokenAttribute att)
Returns the contents of its argument as a trimmed string.
|
static @Opt String |
asTrimmedString(@Opt String s)
Returns its argument as a trimmed string.
|
static String |
asTrimmedString(TypedElement.PCDataContainer el)
Returns the contents of its argument as a trimmed string.
|
protected static <T> CheckedListPlus<T> |
checkPlus(String name,
CheckedListPlus<T> arg) |
protected static <T> T[] |
checkPlus(String name,
T[] arg)
(internal use only) bttodo
|
protected static <T> CheckedList<T> |
checkStar(String name,
CheckedList<T> arg) |
protected static <T> T[] |
checkStar(String name,
T[] arg) |
protected static <T> T |
checkStrict(String name,
T arg) |
void |
encode(boolean asAbstract,
EncodingOutputStream out,
X ext) |
abstract void |
encode(EncodingOutputStream out,
X ext)
Abstract fall-back method which MUST be overridden and always throws an Exception.
|
protected static <E extends TypedExtension> |
encodeOptional(boolean asAbstract,
TypedNode<E> node,
EncodingOutputStream out,
E ext) |
protected static <E extends TypedExtension> |
encodePlus(boolean asAbstract,
CheckedListPlus<? extends TypedNode<E>> nodes,
EncodingOutputStream out,
E ext) |
protected static <E extends TypedExtension> |
encodePlus(boolean asAbstract,
TypedNode<E>[] nodes,
EncodingOutputStream out,
E ext) |
protected static <E extends TypedExtension> |
encodeStar(boolean asAbstract,
CheckedList<? extends TypedNode<E>> nodes,
EncodingOutputStream out,
E ext) |
protected static <E extends TypedExtension> |
encodeStar(boolean asAbstract,
TypedNode<E>[] nodes,
EncodingOutputStream out,
E ext) |
protected static List<TypedEthereal> |
extractEthereals(SAXEventStream sev) |
@Opt Location<XMLDocumentIdentifier> |
getLocation()
Return the location in the original text document.
|
protected static String |
getPCData(NodeList nodes)
Gets the pc data content of a W3C DOM.
|
void |
setLocation(@Opt Locatable<XMLDocumentIdentifier> loc)
Set the location information.
|
void |
setLocation(@Opt Location<XMLDocumentIdentifier> location)
Set the location information.
|
protected void |
setLocation(@Opt Location<XMLDocumentIdentifier> begin,
@Opt Location<XMLDocumentIdentifier> end)
Set the location information to an interval, if both limits are not null.
|
@User @Opt public final @Opt Location<XMLDocumentIdentifier> getLocation()
@User public final void setLocation(@Opt @Opt Location<XMLDocumentIdentifier> location)
location
- (maybe null) the new location. Old location is overwritten, even wehn
param is null.@User public final void setLocation(@Opt @Opt Locatable<XMLDocumentIdentifier> loc)
loc
- (maybe null) the new location.@User protected final void setLocation(@Opt @Opt Location<XMLDocumentIdentifier> begin, @Opt @Opt Location<XMLDocumentIdentifier> end)
Location.interval(Location,Location)
for details of error processing, etc.begin
- begin of location intervalend
- end of location interval@User public static <V extends Enum<V> & EnumerationValue> boolean asBoolean(EnumerationAttribute<V> att, V value)
----option.dtd:---- hexadecimalIntegers (yes|no) 'yes' ----Compiler.java:--- if (asBoolean(data0.readAttr_fragmentedLists(), Element_optionlist.Attr_fragmentedLists.Value.Value_yes))...
@User public static <V> boolean asBoolean(TypedAttribute<String> att, String value)
@User public static String asTrimmedString(TypedElement.PCDataContainer el)
TypedElement.PCDataContainer
is added to each generated
model class if it represents an element with a content model which contains "PCDATA".el
- (maybe null) a model element which contains PCDATA.@User @Opt public static @Opt String asTrimmedString(@Opt @Opt NmTokenAttribute att)
att
- (maybe null) an attribute object.@User @Opt public static @Opt String asTrimmedString(@Opt @Opt CDataAttribute att)
att
- (maybe null) an attribute object.@User @Opt public static @Opt String asTrimmedString(@Opt @Opt String s)
s
- (maybe null) input string.@User @Opt public static @Opt Integer asInt(@Opt TypedElement.PCDataContainer el)
TypedElement.PCDataContainer
is added to each generated
model class if it represents an element with a content model which contains "PCDATA".@User @Opt public static @Opt Integer asInt(@Opt @Opt NmTokenAttribute att)
@User @Opt public static @Opt Integer asInt(@Opt @Opt CDataAttribute att)
@User @Opt public static @Opt Integer asInt(@Opt @Opt String s)
@User @Opt public static @Opt Long asLong(TypedElement.PCDataContainer el)
TypedElement.PCDataContainer
is added to each generated model class if it
represents an element with a content model which contains "PCDATA".@User @Opt public static @Opt Long asLong(@Opt @Opt NmTokenAttribute att)
@User @Opt public static @Opt Long asLong(@Opt @Opt CDataAttribute att)
@User @Opt public static @Opt Long asLong(@Opt @Opt String s)
@User @Opt public static @Opt Float asFloat(@Opt TypedElement.PCDataContainer el)
TypedElement.PCDataContainer
is added to each generated model
class if it represents an element with a content model which contains "PCDATA".@User @Opt public static @Opt Float asFloat(@Opt @Opt NmTokenAttribute att)
@User @Opt public static @Opt Float asFloat(@Opt @Opt CDataAttribute att)
@User @Opt public static @Opt Float asFloat(@Opt @Opt String s)
@User @Opt public static @Opt Double asDouble(TypedElement.PCDataContainer el)
TypedElement.PCDataContainer
is added to each generated model
class if it represents an element with a content model which contains "PCDATA".@User @Opt public static @Opt Double asDouble(@Opt @Opt NmTokenAttribute att)
@User @Opt public static @Opt Double asDouble(@Opt @Opt CDataAttribute att)
@User @Opt public static @Opt Double asDouble(@Opt @Opt String s)
@User @Opt public static @Opt Integer asHexInt(@Opt TypedElement.PCDataContainer el)
0x
" or "0X
" MAY be present and is discarded, but is
not required.
The interface TypedElement.PCDataContainer
is added to each generated model
class if it represents an element with a content model which contains "PCDATA".@User @Opt public static @Opt Integer asHexInt(@Opt @Opt NmTokenAttribute att)
0x
" or "0X
" MAY be present and is discarded, but is
not required.@User @Opt public static @Opt Integer asHexInt(@Opt @Opt CDataAttribute att)
0x
" or "0X
" MAY be present and is discarded, but is
not required.@User @Opt public static @Opt Integer asHexInt(@Opt @Opt String s)
0x
" or "0X
" MAY be present and is discarded, but is
not required.@User @Opt public static @Opt BigInteger asBigInteger(TypedElement.PCDataContainer el)
TypedElement.PCDataContainer
is added to each generated model
class if it represents an element with a content model which contains "PCDATA".@User @Opt public static @Opt BigInteger asBigInteger(@Opt @Opt NmTokenAttribute att)
@User @Opt public static @Opt BigInteger asBigInteger(@Opt @Opt CDataAttribute att)
@User @Opt public static @Opt BigInteger asBigInteger(@Opt @Opt String s)
@User @Opt public static @Opt BigDecimal asBigDecimal(TypedElement.PCDataContainer el)
TypedElement.PCDataContainer
is added to each generated model
class if it represents an element with a content model which contains "PCDATA".@User @Opt public static @Opt BigDecimal asBigDecimal(@Opt @Opt NmTokenAttribute att)
@User @Opt public static @Opt BigDecimal asBigDecimal(@Opt @Opt CDataAttribute att)
@User @Opt public static @Opt BigDecimal asBigDecimal(@Opt @Opt String s)
protected static String getPCData(NodeList nodes)
protected static List<TypedEthereal> extractEthereals(SAXEventStream sev)
public abstract void encode(EncodingOutputStream out, X ext) throws IOException
IOException
protected static <E extends TypedExtension> void encodeOptional(boolean asAbstract, TypedNode<E> node, EncodingOutputStream out, E ext) throws IOException
IOException
protected static <E extends TypedExtension> void encodeStar(boolean asAbstract, TypedNode<E>[] nodes, EncodingOutputStream out, E ext) throws IOException
IOException
protected static <E extends TypedExtension> void encodeStar(boolean asAbstract, CheckedList<? extends TypedNode<E>> nodes, EncodingOutputStream out, E ext) throws IOException
IOException
protected static <E extends TypedExtension> void encodePlus(boolean asAbstract, TypedNode<E>[] nodes, EncodingOutputStream out, E ext) throws IOException
IOException
protected static <E extends TypedExtension> void encodePlus(boolean asAbstract, CheckedListPlus<? extends TypedNode<E>> nodes, EncodingOutputStream out, E ext) throws IOException
IOException
public void encode(boolean asAbstract, EncodingOutputStream out, X ext) throws IOException
IOException
protected static <T> T checkStrict(String name, T arg)
protected static <T> T[] checkStar(String name, T[] arg)
protected static <T> CheckedList<T> checkStar(String name, CheckedList<T> arg)
protected static <T> T[] checkPlus(String name, T[] arg)
protected static <T> CheckedListPlus<T> checkPlus(String name, CheckedListPlus<T> arg)
see also the complete user documentation .