Class StringToken

  • Direct Known Subclasses:
    StringRecoveryToken

    public class StringToken
    extends Token
    chunk of string. ID validation depends on the immutability of this object.
    • Field Detail

      • literal

        public final java.lang.String literal
      • ignorable

        protected final boolean ignorable
      • refType

        public DatatypeRef refType
        if this field is non-null, this field will receive assigned DataType object.
      • saturated

        protected boolean saturated
      • ignoredType

        private static final org.relaxng.datatype.Datatype[] ignoredType
    • Method Detail

      • match

        public boolean match​(DataExp exp)
        DataExp can consume this token if its datatype can accept this string
        Overrides:
        match in class Token
      • match

        public boolean match​(ListExp exp)
        ListExp can consume this token if its pattern accepts this string
        Overrides:
        match in class Token
      • createChildStringToken

        protected StringToken createChildStringToken​(java.lang.String literal,
                                                     DatatypeRef dtRef)
      • matchAnyString

        public boolean matchAnyString()
        Description copied from class: Token
        returns true if anyString pattern can consume this token
        Overrides:
        matchAnyString in class Token
      • assignType

        private void assignType​(org.relaxng.datatype.Datatype dt)
      • isIgnorable

        boolean isIgnorable()
        checks if this token is ignorable. StringToken is ignorable when it matches [ \t\r\n]*
        Overrides:
        isIgnorable in class Token