org.trippi.impl.kowari
Class KowariSessionFactory

java.lang.Object
  extended by org.trippi.impl.kowari.KowariSessionFactory
All Implemented Interfaces:
TriplestoreSessionFactory

public class KowariSessionFactory
extends java.lang.Object
implements TriplestoreSessionFactory

A TriplestoreSessionFactory that provides Kowari sessions. This wraps Kowari's built-in SessionFactory object.

Author:
cwilper@cs.cornell.edu

Field Summary
static java.lang.String[] TRIPLE_LANGUAGES
          spo
static java.lang.String[] TUPLE_LANGUAGES
          itql, rdql
static java.net.URI XSD_MODEL_URI
          http://tucana.org/tucana#XMLSchemaModel
 
Constructor Summary
KowariSessionFactory(java.lang.String hostname, int port, java.lang.String serverName, java.lang.String modelName, java.lang.String textModelName, boolean autoCreate, AliasManager aliasManager)
          Constructor for a remote Kowari triplestore.
KowariSessionFactory(java.lang.String serverPath, java.lang.String serverName, java.lang.String modelName, java.lang.String textModelName, boolean autoCreate, AliasManager aliasManager)
          Constructor for a local Kowari triplestore.
 
Method Summary
 void close()
          Free up any system resources allocated by the session factory.
 void finalize()
          Ensure close() gets called at garbage collection time.
 java.lang.String[] listTripleLanguages()
           
 java.lang.String[] listTupleLanguages()
           
 TriplestoreSession newSession()
          Get a new session.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TUPLE_LANGUAGES

public static final java.lang.String[] TUPLE_LANGUAGES
itql, rdql


TRIPLE_LANGUAGES

public static final java.lang.String[] TRIPLE_LANGUAGES
spo


XSD_MODEL_URI

public static java.net.URI XSD_MODEL_URI
http://tucana.org/tucana#XMLSchemaModel

Constructor Detail

KowariSessionFactory

public KowariSessionFactory(java.lang.String serverPath,
                            java.lang.String serverName,
                            java.lang.String modelName,
                            java.lang.String textModelName,
                            boolean autoCreate,
                            AliasManager aliasManager)
                     throws java.net.URISyntaxException,
                            TrippiException
Constructor for a local Kowari triplestore.

Throws:
java.net.URISyntaxException
TrippiException

KowariSessionFactory

public KowariSessionFactory(java.lang.String hostname,
                            int port,
                            java.lang.String serverName,
                            java.lang.String modelName,
                            java.lang.String textModelName,
                            boolean autoCreate,
                            AliasManager aliasManager)
                     throws java.net.URISyntaxException,
                            TrippiException
Constructor for a remote Kowari triplestore.

Throws:
java.net.URISyntaxException
TrippiException
Method Detail

newSession

public TriplestoreSession newSession()
                              throws TrippiException
Description copied from interface: TriplestoreSessionFactory
Get a new session.

Specified by:
newSession in interface TriplestoreSessionFactory
Throws:
TrippiException

listTripleLanguages

public java.lang.String[] listTripleLanguages()
Specified by:
listTripleLanguages in interface TriplestoreSessionFactory

listTupleLanguages

public java.lang.String[] listTupleLanguages()
Specified by:
listTupleLanguages in interface TriplestoreSessionFactory

close

public void close()
           throws TrippiException
Description copied from interface: TriplestoreSessionFactory
Free up any system resources allocated by the session factory.

Specified by:
close in interface TriplestoreSessionFactory
Throws:
TrippiException

finalize

public void finalize()
              throws TrippiException
Ensure close() gets called at garbage collection time.

Overrides:
finalize in class java.lang.Object
Throws:
TrippiException