|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hp.hpl.guess.db.DBServer
| Field Summary | |
static boolean |
EDGE
|
static Hashtable |
edgedefs
|
static boolean |
NODE
|
static Hashtable |
nodedefs
|
| Constructor Summary | |
DBServer(String db_file_name_prefix)
|
|
| Method Summary | |
void |
addEdge(Edge e)
|
void |
addField(Field f)
add a new field to the database |
void |
addNode(Node node)
|
void |
alter(String columnname,
String query)
|
void |
closeStatements()
|
boolean |
containsEdge(Edge e)
|
boolean |
containsEdge(Edge e,
String state)
|
boolean |
containsNode(Node n)
|
boolean |
containsNode(Node n,
String state)
|
int |
createDirectedEdge(Node source,
Node dest)
adds a new edge to the database and return its ID. |
int |
createDirectedEdge(Node source,
Node dest,
int id)
adds a new edge to the database and return its ID. |
void |
createEmpty()
|
int |
createUndirectedEdge(Node source,
Node dest)
adds a new edge to the database and return its ID. |
int |
createUndirectedEdge(Node source,
Node dest,
int id)
adds a new edge to the database and return its ID. |
static void |
dump(ResultSet rs)
|
void |
exportGDF(String filename)
|
void |
fillSchema(EdgeSchema schema,
Graph g)
This usually gets called once to add the fields alrady present for nodes that the database knows about. |
void |
fillSchema(NodeSchema schema,
Graph g)
This usually gets called once to add the fields alrady present for nodes that the database knows about. |
void |
findMatchingEdges(Query q)
find all matching edges for query q, q will be modified to hold the results |
void |
findMatchingNodes(Query q)
find all matching nodes for query q, q will be modified to hold the results |
static String |
fixString(String init,
Hashtable defs)
|
Object |
getColumn(Edge e,
Field f)
returns the value of Field f in for Edge n |
Object |
getColumn(Edge e,
Field f,
int s)
returns the value of Field f in for Edge n |
Object |
getColumn(Edge e,
Field f,
String s)
returns the value of Field f in for Edge n |
Object |
getColumn(Node n,
Field f)
returns the value of Field f in for Node n |
Object |
getColumn(Node n,
Field f,
int s)
returns the value of Field f in for Node n |
Object |
getColumn(Node n,
Field f,
String s)
returns the value of Field f in for Node n |
Object[] |
getColumns(Edge e,
Field[] f)
returns the value of Field[] f in for Edge n |
Object[] |
getColumns(Edge e,
Field[] f,
int s)
returns the value of Field[] f in for Edge n |
Object[] |
getColumns(Edge e,
Field[] f,
String s)
returns the value of Field[] f in for Edge n |
Object[] |
getColumns(Node n,
Field[] f)
returns the value of Field[] f in for Node n |
Object[] |
getColumns(Node n,
Field[] f,
int s)
returns the value of Field[] f in for Node n |
Object[] |
getColumns(Node n,
Field[] f,
String s)
returns the value of Field[] f in for Node n |
boolean |
getCommitState()
|
static DBServer |
getDBServer()
|
Vector |
getEdgesNotInCurrent(Graph g,
int statenum)
|
Vector |
getEdgesNotInCurrent(Graph g,
String statenum)
|
AbstractTableModel |
getEdgeTable()
|
void |
getNodeColumn(Hashtable ht,
String column,
String limit)
|
Vector |
getNodesNotInCurrent(Graph g,
int statenum)
|
Vector |
getNodesNotInCurrent(Graph g,
String statenum)
|
AbstractTableModel |
getNodeTable()
|
Statement |
getStatement()
|
PreparedStatement |
getStatement(String prep)
|
Set |
getStates()
|
Object |
getStatistic(Field f,
String s)
|
Object |
getStatistic(Field f,
String s,
String state)
|
static String |
getTypeString(int type)
|
int |
identity()
|
static DBServer |
init(String dbname)
|
static DBServer |
initInMemory()
|
void |
loadFromFile(String text)
|
void |
loadFromText(String text)
|
void |
loadState(Graph g,
int statenum)
|
void |
loadState(Graph g,
String statenum)
|
void |
loadState(int state)
|
void |
loadState(String state)
|
static void |
main(String[] args)
|
String |
prettyPrintResult(String query)
|
void |
q(String expression)
|
void |
query(String expression)
executes the query specified by expression |
void |
refresh(Graph g)
call this to load up all the nodes/edges from the database into the graph. |
void |
remove(Edge edge)
|
void |
remove(Node node)
|
void |
removeComplete(Edge edge)
|
void |
removeComplete(Node node)
|
static void |
resetSingleton()
|
void |
saveCSV(String filename,
String expression)
|
void |
saveState(int statenum)
|
void |
saveState(String statenum)
|
void |
setCommitState(boolean state)
|
void |
shutdown()
shutdown operator, once you call this don't assume you can do anything with the StorageListener |
void |
shutdownConn()
|
static String[] |
stringSplit(String line)
|
void |
undelete(Edge e)
|
void |
undelete(Node node)
|
void |
update(String expression)
|
void |
update(String expression,
Statement st)
|
void |
updateColumn(Edge n,
Field f,
Object value)
call this to update the value for field f for Edge n. |
void |
updateColumn(Node n,
Field f,
Object value)
call this to update the value for field f for Node n. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final boolean NODE
public static final boolean EDGE
public static Hashtable nodedefs
public static Hashtable edgedefs
| Constructor Detail |
public DBServer(String db_file_name_prefix)
throws Exception
| Method Detail |
public Statement getStatement()
throws SQLException
SQLExceptionpublic Set getStates()
getStates in interface StorageListenerpublic void setCommitState(boolean state)
public boolean getCommitState()
public Object getColumn(Node n,
Field f)
StorageListener
getColumn in interface StorageListenern - the node you want the result forf - the field
public Object getColumn(Edge e,
Field f)
StorageListener
getColumn in interface StorageListenerf - the field
public Object getColumn(Node n,
Field f,
String s)
StorageListener
getColumn in interface StorageListenern - the node you want the result forf - the fields - the state to retrieve from
public Object getStatistic(Field f,
String s)
getStatistic in interface StorageListener
public Object getStatistic(Field f,
String s,
String state)
public Object getColumn(Edge e,
Field f,
String s)
StorageListener
getColumn in interface StorageListenerf - the fields - the state to retrieve from
public Object getColumn(Node n,
Field f,
int s)
StorageListener
getColumn in interface StorageListenern - the node you want the result forf - the fields - the state to retrieve from
public Object getColumn(Edge e,
Field f,
int s)
StorageListener
getColumn in interface StorageListenerf - the fields - the state to retrieve from
public Object[] getColumns(Node n,
Field[] f)
StorageListener
getColumns in interface StorageListenern - the node you want the result forf - the field
public Object[] getColumns(Edge e,
Field[] f)
StorageListener
getColumns in interface StorageListenerf - the field
public Object[] getColumns(Edge e,
Field[] f,
String s)
StorageListener
getColumns in interface StorageListenerf - the fields - the state to retrieve from
public Object[] getColumns(Node n,
Field[] f,
String s)
StorageListener
getColumns in interface StorageListenern - the node you want the result forf - the fields - the state to retrieve from
public Object[] getColumns(Node n,
Field[] f,
int s)
StorageListener
getColumns in interface StorageListenern - the node you want the result forf - the fields - the state to retrieve from
public Object[] getColumns(Edge e,
Field[] f,
int s)
StorageListener
getColumns in interface StorageListenerf - the fields - the state to retrieve from
public PreparedStatement getStatement(String prep)
throws SQLException
SQLExceptionpublic void closeStatements()
public void fillSchema(NodeSchema schema,
Graph g)
StorageListener
fillSchema in interface StorageListenercom.hp.hpl.Schema#addFieldToSL(Field),
#addFieldToSL(Field);
public void fillSchema(EdgeSchema schema,
Graph g)
StorageListener
fillSchema in interface StorageListenercom.hp.hpl.Schema#addFieldToSL(Field),
#addFieldToSL(Field);
public void updateColumn(Node n,
Field f,
Object value)
StorageListener
updateColumn in interface StorageListenern - the node that is being modifiedf - the field that you want changed (e.g. column)value - the new value
public void updateColumn(Edge n,
Field f,
Object value)
StorageListener
updateColumn in interface StorageListenern - the edge that is being modifiedf - the field that you want changed (e.g. column)value - the new valuepublic void addField(Field f)
StorageListener
addField in interface StorageListenerf - the field to addpublic static String getTypeString(int type)
public void shutdownConn()
throws SQLException
SQLException
public void q(String expression)
throws SQLException
SQLException
public void saveCSV(String filename,
String expression)
throws Exception
Exception
public void query(String expression)
throws SQLException
expression -
SQLException
public int identity()
throws SQLException
SQLException
public void update(String expression,
Statement st)
throws SQLException
SQLException
public void update(String expression)
throws SQLException
SQLExceptionpublic String prettyPrintResult(String query)
public static void dump(ResultSet rs)
throws SQLException
SQLException
public void getNodeColumn(Hashtable ht,
String column,
String limit)
throws Exception
Exceptionpublic void findMatchingNodes(Query q)
StorageListener
findMatchingNodes in interface StorageListenerq - the query to evaluatepublic void findMatchingEdges(Query q)
StorageListener
findMatchingEdges in interface StorageListenerq - the query to evaluatepublic void refresh(Graph g)
StorageListener
refresh in interface StorageListenerg - the graph to load the results into
public static DBServer init(String dbname)
throws Exception
Exceptionpublic static DBServer getDBServer()
public static DBServer initInMemory()
throws Exception
Exceptionpublic static void resetSingleton()
public void shutdown()
StorageListener
shutdown in interface StorageListener
public void alter(String columnname,
String query)
public static String fixString(String init,
Hashtable defs)
public void loadFromFile(String text)
loadFromFile in interface StorageListenerpublic void loadFromText(String text)
loadFromText in interface StorageListenerpublic void createEmpty()
createEmpty in interface StorageListenerpublic static String[] stringSplit(String line)
public void saveState(int statenum)
saveState in interface StorageListenerpublic void saveState(String statenum)
saveState in interface StorageListener
public Vector getNodesNotInCurrent(Graph g,
int statenum)
getNodesNotInCurrent in interface StorageListener
public Vector getNodesNotInCurrent(Graph g,
String statenum)
getNodesNotInCurrent in interface StorageListener
public Vector getEdgesNotInCurrent(Graph g,
int statenum)
getEdgesNotInCurrent in interface StorageListener
public Vector getEdgesNotInCurrent(Graph g,
String statenum)
getEdgesNotInCurrent in interface StorageListenerpublic void loadState(int state)
loadState in interface StorageListenerpublic void loadState(String state)
loadState in interface StorageListener
public void loadState(Graph g,
int statenum)
loadState in interface StorageListener
public void loadState(Graph g,
String statenum)
loadState in interface StorageListener
public static void main(String[] args)
throws Exception
Exceptionpublic boolean containsEdge(Edge e)
containsEdge in interface StorageListener
public boolean containsEdge(Edge e,
String state)
containsEdge in interface StorageListenerpublic boolean containsNode(Node n)
containsNode in interface StorageListener
public boolean containsNode(Node n,
String state)
containsNode in interface StorageListenerpublic void addEdge(Edge e)
addEdge in interface StorageListener
public int createDirectedEdge(Node source,
Node dest)
StorageListener
createDirectedEdge in interface StorageListener
public int createDirectedEdge(Node source,
Node dest,
int id)
StorageListener
createDirectedEdge in interface StorageListener
public int createUndirectedEdge(Node source,
Node dest,
int id)
StorageListener
createUndirectedEdge in interface StorageListener
public int createUndirectedEdge(Node source,
Node dest)
StorageListener
createUndirectedEdge in interface StorageListenerpublic void undelete(Edge e)
undelete in interface StorageListenerpublic void undelete(Node node)
undelete in interface StorageListenerpublic void addNode(Node node)
addNode in interface StorageListenerpublic void remove(Edge edge)
remove in interface StorageListenerpublic void removeComplete(Edge edge)
removeComplete in interface StorageListenerpublic void removeComplete(Node node)
removeComplete in interface StorageListenerpublic void remove(Node node)
remove in interface StorageListenerpublic AbstractTableModel getNodeTable()
getNodeTable in interface StorageListenerpublic AbstractTableModel getEdgeTable()
getEdgeTable in interface StorageListenerpublic void exportGDF(String filename)
exportGDF in interface StorageListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||