Class Token


public final class Token extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • getType

      public final TokenType getType()
    • getImage

      public final String getImage()
    • getImage2

      public final String getImage2()
    • getCntrlCode

      public final int getCntrlCode()
    • getSubToken1

      public final Token getSubToken1()
    • getSubToken2

      public final Token getSubToken2()
    • getStringType

      public final StringType getStringType()
    • hasStringType

      public final boolean hasStringType(StringType st)
    • isLongString

      public final boolean isLongString()
    • setType

      public final Token setType(TokenType tokenType)
    • setImage

      public final Token setImage(String tokenImage)
    • setImage

      public final Token setImage(char tokenImage)
    • setImage2

      public final Token setImage2(String tokenImage2)
    • setCntrlCode

      public final Token setCntrlCode(int cntrlCode)
    • setSubToken1

      public final Token setSubToken1(Token subToken)
    • setSubToken2

      public final Token setSubToken2(Token subToken)
    • setStringType

      public final Token setStringType(StringType st)
    • getColumn

      public long getColumn()
    • getLine

      public long getLine()
    • asString

      public String asString()
    • asInt

      public int asInt()
    • asLong

      public long asLong()
    • asLong

      public long asLong(long dft)
    • asWord

      public String asWord()
    • text

      public String text()
    • toString

      public String toString()
      toString in class Object
    • toString

      public String toString(boolean addLocation)
    • isEOF

      public boolean isEOF()
    • isWord

      public boolean isWord()
    • isString

      public boolean isString()
    • isNumber

      public boolean isNumber()
    • isNode

      public boolean isNode()
    • isNodeBasic

      public boolean isNodeBasic()
    • isBasicLiteral

      public boolean isBasicLiteral()
    • isInteger

      public boolean isInteger()
    • isIRI

      public boolean isIRI()
    • isBNode

      public boolean isBNode()
    • asNode

      public Node asNode()
      Token to Node, a very direct form that is purely driven off the token. Turtle and N-triples need to process the token and not call this: 1/ Use bNode label as given 2/ No prefix or URI resolution. 3/ No checking.
    • asNode

      public Node asNode(PrefixMap pmap)
      Token to Node, with a prefix map.

      Languages may need to process the token (.e.g test for end of file) and need more control than calling this method.

      • Use bNode label as given
      • No prefix or URI resolution.
      • No checking.
    • hasType

      public boolean hasType(TokenType tokenType)
    • hashCode

      public int hashCode()
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      equals in class Object
    • tokenForChar

      public static Token tokenForChar(char character)
    • tokenForInteger

      public static Token tokenForInteger(long value)
    • tokenForWord

      public static Token tokenForWord(String word)
    • tokenForNode

      public static Token tokenForNode(Node n)
    • tokenForNode

      public static Token tokenForNode(Node node, String base, PrefixMap mapping)