org.ilrt.inkling.api
Interface GraphInterface

All Known Implementing Classes:
SQLGraph, Graph, ComplexQuery, UnionGraph

public interface GraphInterface

Inspired by http://www.w3.org/2001/12/rubyrdf/basicrdf.rb

An interface for Graph objects


Method Summary
 java.util.Vector ask(java.lang.Object s, java.lang.Object p, java.lang.Object o)
          Return a Graph matching the query triple specified.
 Graph ask(Query query)
          Return a Graph matching the query triple specified.
 java.sql.ResultSet askSquish(java.lang.String query)
          Ask a squish query of any type of Graph returnign a rectangular ResultSet.
 boolean delete(Statement s)
          Delete a single statement (or all instances of a given Statement).
 java.lang.String getBase()
          Sets the base uri for the GraphInterface.
 java.util.Vector getStatements()
          Returns a Vector of all Statements in the GraphInterface
 boolean removeAll()
          Remove all statements.
 void setBase(java.lang.String base)
          Returns the base uri for the GraphInterface.
 void tell(Statement statement)
          Insert a single Statement into the GraphInterface
 void tellAll(java.util.Vector statements)
          Inserts all the Statements into a Vector into the GraphInterface
 

Method Detail

getStatements

public java.util.Vector getStatements()
Returns a Vector of all Statements in the GraphInterface

tellAll

public void tellAll(java.util.Vector statements)
Inserts all the Statements into a Vector into the GraphInterface

tell

public void tell(Statement statement)
Insert a single Statement into the GraphInterface

ask

public Graph ask(Query query)
Return a Graph matching the query triple specified. The Query can have null arguments.

ask

public java.util.Vector ask(java.lang.Object s,
                            java.lang.Object p,
                            java.lang.Object o)
Return a Graph matching the query triple specified. Arguments should be Strings, Nodes or null.

getBase

public java.lang.String getBase()
Sets the base uri for the GraphInterface. Usually this will be the url or filename of an RDF file. For UnionGraphs it is @@fixme@@; for SQLGraph it is the jdbc database url.

setBase

public void setBase(java.lang.String base)
Returns the base uri for the GraphInterface. Usually this will be the url or filename of an RDF file. For UnionGraphs it is @@fixme@@; for SQLGraph it is the jdbc database url.

askSquish

public java.sql.ResultSet askSquish(java.lang.String query)
Ask a squish query of any type of Graph returnign a rectangular ResultSet.

delete

public boolean delete(Statement s)
Delete a single statement (or all instances of a given Statement).

removeAll

public boolean removeAll()
Remove all statements.