public class Sentence
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
CONTEXT
This token type means the possible choices of the item depend on the
context.
|
static int |
FUNCTION
The token type for a function name.
|
static int |
KEYWORD
The token type for a keyword.
|
| Constructor and Description |
|---|
Sentence() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.lang.String n,
java.lang.String string,
int type)
Add a word to the set of next tokens.
|
void |
addAlias(java.lang.String alias,
DbTableOrView table)
Add an alias name and object
|
void |
addTable(DbTableOrView table)
Add a table.
|
java.util.HashMap<java.lang.String,DbTableOrView> |
getAliases()
Get the alias map.
|
DbSchema |
getLastMatchedSchema()
Get the last matched schema if the last match was a schema.
|
DbTableOrView |
getLastMatchedTable()
Get the last matched table if the last match was a table.
|
DbTableOrView |
getLastTable()
Get the last added table.
|
java.util.HashMap<java.lang.String,java.lang.String> |
getNext()
Get the map of next tokens.
|
java.lang.String |
getQuery()
Get the query string.
|
java.lang.String |
getQueryUpper()
Get the uppercase version of the query string.
|
java.util.HashSet<DbTableOrView> |
getTables()
Get the set of tables.
|
void |
setLastMatchedSchema(DbSchema schema)
Set the last matched schema if the last match was a schema,
or null if it was not.
|
void |
setLastMatchedTable(DbTableOrView table)
Set the last matched table if the last match was a table.
|
void |
setQuery(java.lang.String query)
Set the query string.
|
void |
start()
Start the timer to make sure processing doesn't take too long.
|
void |
stopIfRequired()
Check if it's time to stop processing.
|
public static final int CONTEXT
public static final int KEYWORD
public static final int FUNCTION
public void start()
public void stopIfRequired()
public void add(java.lang.String n,
java.lang.String string,
int type)
n - the token namestring - an example texttype - the token typepublic void addAlias(java.lang.String alias,
DbTableOrView table)
alias - the alias nametable - the alias tablepublic void addTable(DbTableOrView table)
table - the tablepublic java.util.HashSet<DbTableOrView> getTables()
public java.util.HashMap<java.lang.String,DbTableOrView> getAliases()
public DbTableOrView getLastTable()
public DbSchema getLastMatchedSchema()
public void setLastMatchedSchema(DbSchema schema)
schema - the last matched schema or nullpublic void setLastMatchedTable(DbTableOrView table)
table - the last matched table or nullpublic DbTableOrView getLastMatchedTable()
public void setQuery(java.lang.String query)
query - the query stringpublic java.lang.String getQuery()
public java.lang.String getQueryUpper()
public java.util.HashMap<java.lang.String,java.lang.String> getNext()