de.fuberlin.wiwiss.ng4j.db
Class QuadDB
java.lang.Object
de.fuberlin.wiwiss.ng4j.db.QuadDB
public class QuadDB
- extends Object
Database persistence for a set of Quads and a set of graph names, with a
Node
based interface. The class manages two collections of objects:
a set of quads, and a set of graph names. The latter is needed because we
want to support empty graphs.
All operations but insert(com.hp.hpl.jena.graph.Node, com.hp.hpl.jena.graph.Node, com.hp.hpl.jena.graph.Node, com.hp.hpl.jena.graph.Node)
allow Node.ANY
wildcards.
The implementation is na•ve: a graphs table and a quads
table. A table prefix can be supplied in order to support multiple QuadDBs
in a single database.
TODO: Factor out DB-specific stuff, e.g. table creation.
- Author:
- Richard Cyganiak (richard@cyganiak.de)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HSQL_TYPE
public static final int HSQL_TYPE
- See Also:
- Constant Field Values
MYSQL_TYPE
public static final int MYSQL_TYPE
- See Also:
- Constant Field Values
POSTGRESQL_TYPE
public static final int POSTGRESQL_TYPE
- See Also:
- Constant Field Values
QuadDB
public QuadDB(Connection connection,
String tablePrefix)
insert
public void insert(Node g,
Node s,
Node p,
Node o)
delete
public void delete(Node g,
Node s,
Node p,
Node o)
find
public Iterator find(Node g,
Node s,
Node p,
Node o)
count
public int count()
insertGraphName
public void insertGraphName(Node graphName)
deleteGraphName
public void deleteGraphName(Node graphName)
containsGraphName
public boolean containsGraphName(Node graphName)
listGraphNames
public Iterator listGraphNames()
countGraphNames
public int countGraphNames()
createTables
public void createTables()
deleteTables
public void deleteTables()
tablesExist
public boolean tablesExist()
close
public void close()