Class Token

java.lang.Object
org.apache.jena.riot.tokens.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()
    • 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)
    • 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()
      Overrides:
      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 org.apache.jena.graph.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 org.apache.jena.graph.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()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • tokenForInteger

      public static Token tokenForInteger(long value)
    • tokenForWord

      public static Token tokenForWord(String word)
    • tokenForNode

      public static Token tokenForNode(org.apache.jena.graph.Node n)
    • tokenForNode

      public static Token tokenForNode(org.apache.jena.graph.Node node, String base, PrefixMap mapping)