org.trippi.impl.base
Interface TriplestoreSession

All Known Implementing Classes:
KowariSession, MPTSession, OracleSession, SesameSession, SynchronizedTriplestoreSession

public interface TriplestoreSession

A read/write session to an RDF database. If a session doesn't support writes, the add and delete methods will throw UnsupportedOperationException (an unchecked exception).

Author:
cwilper@cs.cornell.edu

Method Summary
 void add(java.util.Set triples)
          Add the given triples to the store.
 void close()
          Close the session, releasing any resources.
 void delete(java.util.Set triples)
          Delete the given triples from the store.
 TripleIterator findTriples(java.lang.String lang, java.lang.String queryText)
           
 TripleIterator findTriples(org.jrdf.graph.SubjectNode subject, org.jrdf.graph.PredicateNode predicate, org.jrdf.graph.ObjectNode object)
           
 java.lang.String[] listTripleLanguages()
           
 java.lang.String[] listTupleLanguages()
           
 TupleIterator query(java.lang.String queryText, java.lang.String language)
          Perform a tuple query against the store.
 

Method Detail

add

void add(java.util.Set triples)
         throws java.lang.UnsupportedOperationException,
                TrippiException
Add the given triples to the store.

Parameters:
triples - a Set of Triple objects.
Throws:
java.lang.UnsupportedOperationException - if modifications are not supported.
TrippiException - if adding to the store otherwise failed.

delete

void delete(java.util.Set triples)
            throws java.lang.UnsupportedOperationException,
                   TrippiException
Delete the given triples from the store.

Parameters:
triples - a Set of Triple objects.
Throws:
java.lang.UnsupportedOperationException - if modifications are not supported.
TrippiException - if deleting from the store failed.

query

TupleIterator query(java.lang.String queryText,
                    java.lang.String language)
                    throws TrippiException
Perform a tuple query against the store.

Parameters:
queryText - the text of the query
language - the query language
Throws:
TrippiException

findTriples

TripleIterator findTriples(java.lang.String lang,
                           java.lang.String queryText)
                           throws TrippiException
Throws:
TrippiException

findTriples

TripleIterator findTriples(org.jrdf.graph.SubjectNode subject,
                           org.jrdf.graph.PredicateNode predicate,
                           org.jrdf.graph.ObjectNode object)
                           throws TrippiException
Throws:
TrippiException

listTupleLanguages

java.lang.String[] listTupleLanguages()

listTripleLanguages

java.lang.String[] listTripleLanguages()

close

void close()
           throws TrippiException
Close the session, releasing any resources.

Throws:
TrippiException