Class TypedNode<X extends TypedExtension>

    • Constructor Detail

      • TypedNode

        protected TypedNode()
    • Method Detail

      • setLocation

        public final void setLocation​(@Opt
                                      @Opt Location<XMLDocumentIdentifier> location)
        Set the location information.
        Parameters:
        location - (maybe null) the new location. Old location is overwritten, even wehn param is null.
      • setLocation

        protected final void setLocation​(@Opt
                                         @Opt Location<XMLDocumentIdentifier> begin,
                                         @Opt
                                         @Opt Location<XMLDocumentIdentifier> end)
        Set the location information to an interval, if both limits are not null. Otherwise to one of them which is not null, otherwise to null. Is called from generated code, operating on unknown SAX event sources, therefore incomplete location info may arrive here. See Location.region(Location,Location) for details of error processing, etc.
        Parameters:
        begin - begin of location region
        end - end of location region
      • asBoolean

        public static <V extends java.lang.Enum<V> & EnumerationValue> boolean asBoolean​(EnumerationAttribute<V> att,
                                                                                         V value)
        Returns whether the contents of an attribute is equal to one particular typed attribute value. This can be used to decode false/true information, as in
           ----option.dtd:----
                 hexadecimalIntegers (yes|no) 'yes'
           ----Compiler.java:---
           if (asBoolean(data0.readAttr_fragmentedLists(),
                         Element_optionlist.Attr_fragmentedLists.Value.Value_yes))...
          
      • asBoolean

        public static <V> boolean asBoolean​(TypedAttribute<java.lang.String> att,
                                            java.lang.String value)
      • asTrimmedString

        public static java.lang.String asTrimmedString​(TypedElement.PCDataContainer el)
        Returns the contents of its argument as a trimmed string. The interface TypedElement.PCDataContainer is added to each generated model class if it represents an element with a content model which contains "PCDATA".
        Parameters:
        el - (maybe null) a model element which contains PCDATA.
        Returns:
        the string value, the concatenation of all PCDATA directly contained in the elemnt. Is ==null in case of null input or empty string.
      • asTrimmedString

        @Opt
        public static @Opt java.lang.String asTrimmedString​(@Opt
                                                            @Opt NmTokenAttribute att)
        Returns the contents of its argument as a trimmed string.
        Parameters:
        att - (maybe null) an attribute object.
        Returns:
        the string value, ==null in case of null input or empty string.
      • asTrimmedString

        @Opt
        public static @Opt java.lang.String asTrimmedString​(@Opt
                                                            @Opt CDataAttribute att)
        Returns the contents of its argument as a trimmed string.
        Parameters:
        att - (maybe null) an attribute object.
        Returns:
        the string value, ==null in case of null input or empty string.
      • asTrimmedString

        @Opt
        public static @Opt java.lang.String asTrimmedString​(@Opt
                                                            @Opt java.lang.String s)
        Returns its argument as a trimmed string.
        Parameters:
        s - (maybe null) input string.
        Returns:
        the string value, ==null in case of null input or empty string.
      • asInt

        @Opt
        public static @Opt java.lang.Integer asInt​(@Opt
                                                   TypedElement.PCDataContainer el)
        Returns the contents of its argument as a decimal encoded integer value. The interface TypedElement.PCDataContainer is added to each generated model class if it represents an element with a content model which contains "PCDATA".
        Returns:
        the Integer value, ==null in case of null input or empty string input or conversion error.
      • asInt

        @Opt
        public static @Opt java.lang.Integer asInt​(@Opt
                                                   @Opt NmTokenAttribute att)
        Returns the value of its argument as a decimal encoded integer value.
        Returns:
        the Integer value, ==null in case of null input or empty string input or conversion error.
      • asInt

        @Opt
        public static @Opt java.lang.Integer asInt​(@Opt
                                                   @Opt CDataAttribute att)
        Returns the value of its argument as a decimal encoded integer value.
        Returns:
        the Integer value, ==null in case of null input or empty string input or conversion error.
      • asInt

        @Opt
        public static @Opt java.lang.Integer asInt​(@Opt
                                                   @Opt java.lang.String s)
        Returns the value of its argument as a decimal encoded integer value.
        Returns:
        the Integer value, ==null in case of null input or empty string input or conversion error.
      • asLong

        @Opt
        public static @Opt java.lang.Long asLong​(TypedElement.PCDataContainer el)
        Returns the contents of its argument as a decimal encoded long value. The interface TypedElement.PCDataContainer is added to each generated model class if it represents an element with a content model which contains "PCDATA".
        Returns:
        the Long value, ==null in case of null input or empty string input or conversion error.
      • asLong

        @Opt
        public static @Opt java.lang.Long asLong​(@Opt
                                                 @Opt NmTokenAttribute att)
        Returns the value of its argument as a decimal encoded long value.
        Returns:
        the Long value, ==null in case of null input or empty string input or conversion error.
      • asLong

        @Opt
        public static @Opt java.lang.Long asLong​(@Opt
                                                 @Opt CDataAttribute att)
        Returns the value of its argument as a decimal encoded long value.
        Returns:
        the Long value, ==null in case of null input or empty string input or conversion error.
      • asLong

        @Opt
        public static @Opt java.lang.Long asLong​(@Opt
                                                 @Opt java.lang.String s)
        Returns the value of its argument as a decimal encoded long value.
        Returns:
        the Long value, ==null in case of null input or empty string input or conversion error.
      • asFloat

        @Opt
        public static @Opt java.lang.Float asFloat​(@Opt
                                                   TypedElement.PCDataContainer el)
        Returns the contents of its argument as a decimal encoded float value. The interface TypedElement.PCDataContainer is added to each generated model class if it represents an element with a content model which contains "PCDATA".
        Returns:
        the Float value, ==null in case of null input or empty string input or conversion error.
      • asFloat

        @Opt
        public static @Opt java.lang.Float asFloat​(@Opt
                                                   @Opt NmTokenAttribute att)
        Returns the value of its argument as a decimal encoded float value.
        Returns:
        the Float value, ==null in case of null input or empty string input or conversion error.
      • asFloat

        @Opt
        public static @Opt java.lang.Float asFloat​(@Opt
                                                   @Opt CDataAttribute att)
        Returns the value of its argument as a decimal encoded float value.
        Returns:
        the Float value, ==null in case of null input or empty string input or conversion error.
      • asFloat

        @Opt
        public static @Opt java.lang.Float asFloat​(@Opt
                                                   @Opt java.lang.String s)
        Returns the value of its argument as a decimal encoded float value.
        Returns:
        the Float value, ==null in case of null input or empty string input or conversion error.
      • asDouble

        @Opt
        public static @Opt java.lang.Double asDouble​(TypedElement.PCDataContainer el)
        Returns the contents of its argument as a decimal encoded double value. The interface TypedElement.PCDataContainer is added to each generated model class if it represents an element with a content model which contains "PCDATA".
        Returns:
        the Double value, ==null in case of null input or empty string input or conversion error.
      • asDouble

        @Opt
        public static @Opt java.lang.Double asDouble​(@Opt
                                                     @Opt NmTokenAttribute att)
        Returns the value of its argument as a decimal encoded double value.
        Returns:
        the Double value, ==null in case of null input or empty string input or conversion error.
      • asDouble

        @Opt
        public static @Opt java.lang.Double asDouble​(@Opt
                                                     @Opt CDataAttribute att)
        Returns the value of its argument as a decimal encoded double value.
        Returns:
        the Double value, ==null in case of null input or empty string input or conversion error.
      • asDouble

        @Opt
        public static @Opt java.lang.Double asDouble​(@Opt
                                                     @Opt java.lang.String s)
        Returns the value of its argument as a decimal encoded double value.
        Returns:
        the Double value, ==null in case of null input or empty string input or conversion error.
      • asHexInt

        @Opt
        public static @Opt java.lang.Integer asHexInt​(@Opt
                                                      TypedElement.PCDataContainer el)
        Returns the contents of its argument as a hexdecimal encoded integer value. A prefix "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".
        Returns:
        the Integer value, ==null in case of null input or empty string input or conversion error.
      • asHexInt

        @Opt
        public static @Opt java.lang.Integer asHexInt​(@Opt
                                                      @Opt NmTokenAttribute att)
        Returns the value of its argument as a hexdecimal encoded integer value. A prefix "0x" or "0X" MAY be present and is discarded, but is not required.
        Returns:
        the Integer value, ==null in case of null input or empty string input or conversion error.
      • asHexInt

        @Opt
        public static @Opt java.lang.Integer asHexInt​(@Opt
                                                      @Opt CDataAttribute att)
        Returns the value of its argument as a hexdecimal encoded integer value. A prefix "0x" or "0X" MAY be present and is discarded, but is not required.
        Returns:
        the Integer value, ==null in case of null input or empty string input or conversion error.
      • asHexInt

        @Opt
        public static @Opt java.lang.Integer asHexInt​(@Opt
                                                      @Opt java.lang.String s)
        Returns the value of its argument as a hexdecimal encoded integer value. A prefix "0x" or "0X" MAY be present and is discarded, but is not required.
        Returns:
        the Integer value, ==null in case of null input or empty string input or conversion error.
      • asBigInteger

        @Opt
        public static @Opt java.math.BigInteger asBigInteger​(TypedElement.PCDataContainer el)
        Returns the contents of its argument as a decimal encoded BigInteger value. The interface TypedElement.PCDataContainer is added to each generated model class if it represents an element with a content model which contains "PCDATA".
        Returns:
        the BigInteger value, ==null in case of null input or empty string input or conversion error.
      • asBigInteger

        @Opt
        public static @Opt java.math.BigInteger asBigInteger​(@Opt
                                                             @Opt NmTokenAttribute att)
        Returns the value of its argument as a decimal encoded BigInteger value.
        Returns:
        the BigInteger value, ==null in case of null input or empty string input or conversion error.
      • asBigInteger

        @Opt
        public static @Opt java.math.BigInteger asBigInteger​(@Opt
                                                             @Opt CDataAttribute att)
        Returns the value of its argument as a decimal encoded BigInteger value.
        Returns:
        the BigInteger value, ==null in case of null input or empty string input or conversion error.
      • asBigInteger

        @Opt
        public static @Opt java.math.BigInteger asBigInteger​(@Opt
                                                             @Opt java.lang.String s)
        Returns the value of its argument as a decimal encoded BigInteger value.
        Returns:
        the BigInteger value, ==null in case of null input or empty string input or conversion error.
      • asBigDecimal

        @Opt
        public static @Opt java.math.BigDecimal asBigDecimal​(TypedElement.PCDataContainer el)
        Returns the contents of its argument as a decimal encoded BigDecimal value. The interface TypedElement.PCDataContainer is added to each generated model class if it represents an element with a content model which contains "PCDATA".
        Returns:
        the BigDecimal value, ==null in case of null input or empty string input or conversion error.
      • asBigDecimal

        @Opt
        public static @Opt java.math.BigDecimal asBigDecimal​(@Opt
                                                             @Opt NmTokenAttribute att)
        Returns the value of its argument as a decimal encoded BigDecimal value.
        Returns:
        the BigDecimal value, ==null in case of null input or empty string input or conversion error.
      • asBigDecimal

        @Opt
        public static @Opt java.math.BigDecimal asBigDecimal​(@Opt
                                                             @Opt CDataAttribute att)
        Returns the value of its argument as a decimal encoded BigDecimal value.
        Returns:
        the BigDecimal value, ==null in case of null input or empty string input or conversion error.
      • asBigDecimal

        @Opt
        public static @Opt java.math.BigDecimal asBigDecimal​(@Opt
                                                             @Opt java.lang.String s)
        Returns the value of its argument as a decimal encoded BigDecimal value.
        Returns:
        the BigDecimal value, ==null in case of null input or empty string input or conversion error.
      • getPCData

        protected static java.lang.String getPCData​(org.w3c.dom.NodeList nodes)
        Gets the pc data content of a W3C DOM. (IS NOT TDOM RELATED, aber HIER? FIXME )
      • encode

        public abstract void encode​(EncodingOutputStream out,
                                    X ext)
                             throws java.io.IOException
        Abstract fall-back method which MUST be overridden and always throws an Exception.
        Throws:
        java.io.IOException
      • encodeOptional

        protected static <E extends TypedExtension> void encodeOptional​(boolean asAbstract,
                                                                        TypedNode<E> node,
                                                                        EncodingOutputStream out,
                                                                        E ext)
                                                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • encode

        public void encode​(boolean asAbstract,
                           EncodingOutputStream out,
                           X ext)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • checkStrict

        protected static <T> T checkStrict​(java.lang.String name,
                                           T arg)
      • checkStar

        protected static <T> T[] checkStar​(java.lang.String name,
                                           T[] arg)
      • checkPlus

        protected static <T> T[] checkPlus​(java.lang.String name,
                                           T[] arg)
        (internal use only) bttodo