public final class Token extends Object
Modifier and Type | Field and Description |
---|---|
int |
cntrlCode |
static String |
ImageANY |
static String |
ImageFalse |
static String |
ImageTrue |
Constructor and Description |
---|
Token(long line,
long column) |
Token(Token token) |
Modifier and Type | Method and Description |
---|---|
int |
asInt() |
long |
asLong() |
long |
asLong(long dft) |
Node |
asNode()
Token to Node, a very direct form that is purely driven off the token.
|
Node |
asNode(PrefixMap pmap)
Token to Node, with a prefix map
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.
|
String |
asWord() |
boolean |
equals(Object other) |
int |
getCntrlCode() |
long |
getColumn() |
String |
getImage() |
String |
getImage2() |
long |
getLine() |
Token |
getSubToken1() |
Token |
getSubToken2() |
TokenType |
getType() |
int |
hashCode() |
boolean |
hasType(TokenType tokenType) |
boolean |
isBasicLiteral() |
boolean |
isBNode() |
boolean |
isCtlCode() |
boolean |
isEOF() |
boolean |
isInteger() |
boolean |
isIRI() |
boolean |
isNode() |
boolean |
isNodeBasic() |
boolean |
isNumber() |
boolean |
isString() |
boolean |
isWord() |
Token |
setCntrlCode(int cntrlCode) |
Token |
setImage(char tokenImage) |
Token |
setImage(String tokenImage) |
Token |
setImage2(String tokenImage2) |
Token |
setSubToken1(Token subToken) |
Token |
setSubToken2(Token subToken) |
Token |
setType(TokenType tokenType) |
String |
text() |
static Token |
tokenForChar(char character) |
static Token |
tokenForInteger(long value) |
static Token |
tokenForNode(Node n) |
static Token |
tokenForNode(Node n,
Prologue prologue) |
static Token |
tokenForNode(Node node,
String base,
PrefixMap mapping) |
static Token |
tokenForWord(String word) |
String |
toString() |
String |
toString(boolean addLocation) |
public int cntrlCode
public static final String ImageANY
public static final String ImageTrue
public static final String ImageFalse
public Token(long line, long column)
public Token(Token token)
public final TokenType getType()
public final String getImage()
public final String getImage2()
public final int getCntrlCode()
public final Token getSubToken1()
public final Token getSubToken2()
public final Token setImage(char tokenImage)
public final Token setCntrlCode(int cntrlCode)
public long getColumn()
public long getLine()
public int asInt()
public long asLong()
public long asLong(long dft)
public String asWord()
public String text()
public String toString(boolean addLocation)
public boolean isEOF()
public boolean isCtlCode()
public boolean isWord()
public boolean isString()
public boolean isNumber()
public boolean isNode()
public boolean isNodeBasic()
public boolean isBasicLiteral()
public boolean isInteger()
public boolean isIRI()
public boolean isBNode()
public Node asNode()
public Node asNode(PrefixMap pmap)
public boolean hasType(TokenType tokenType)
public static Token tokenForChar(char character)
public static Token tokenForInteger(long value)
Licenced under the Apache License, Version 2.0