|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjdrew.oo.util.SymbolTable
public class SymbolTable
This class is responsible for managing the integer codes that are used by the engine datastructers to represent roles and symbols. Integer codes are used as these values are compared frequently and integer comparisons are consierably more efficent than string comparisons.
Title: OO jDREW
Description: Reasoning Engine for the Semantic Web - Supporting OO RuleML 0.88
Copyright: Copyright (c) 2005
| Field Summary | |
|---|---|
static int |
genid
This is used to generate new Skolem constants; ensuring uniqueness of all generated constants. |
static int |
IASSERT
This integer stores the code for an assert term. |
static int |
IINCONSISTENT
|
static int |
INAF
This integer stores the code for a NAF term. |
static int |
INEG
|
static int |
INOROLE
This integer stores the integer code that is used for the role of positional parameters. |
static int |
INOSYM
This symbol takes up the first slot in the symbol table - as we ensure that the integer code 0 is never used. |
static int |
IOID
This integer stores the integer code that is used for the system oid role. |
static int |
IPLEX
This integer stores the code for the "constructor" of a plex term. |
static int |
IPREST
This integer stores the integer code that is used for the role of positional rest parameters. |
static int |
IREST
This integer stores the integer code that is used for the role of slotted rest parameters. |
static java.util.Vector |
roles
This vector stores all known roles. |
static java.util.Vector |
symbols
This vector stores all known symbols. |
| Constructor Summary | |
|---|---|
SymbolTable()
|
|
| Method Summary | |
|---|---|
static int |
internRole(java.lang.String role)
This method is used to initalize a role and assign it an integer code if it has not been used before; or retrieve the integer code of a role if it already has been encountered. |
static int |
internSymbol(java.lang.String sym)
This method is used to initalize a symbol and assign it an integer code if it has not been used before; or retrieve the integer code of a symbol if it already has been encountered. |
static void |
reset()
This method is used to reset the symbol table. |
static java.lang.String |
role(int idx)
This method gets the string representation of a role for the integer code. |
static java.lang.String |
symbol(int idx)
This method gets the string representation of a symbol for the integer code. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.util.Vector symbols
public static java.util.Vector roles
public static int genid
public static final int IOID
public static final int INOROLE
public static final int IPREST
public static final int IREST
public static final int INOSYM
public static final int INAF
public static final int IPLEX
public static final int IASSERT
public static final int IINCONSISTENT
public static final int INEG
| Constructor Detail |
|---|
public SymbolTable()
| Method Detail |
|---|
public static void reset()
public static int internSymbol(java.lang.String sym)
sym - String A string containing the symbol.
public static int internRole(java.lang.String role)
role - String A string containing the role name.
public static java.lang.String symbol(int idx)
idx - int The integer code to get the symbol string for.
public static java.lang.String role(int idx)
idx - int The integer code to get the role string for.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||