com.ontotext.ordi.wrappers
Class SesameImpl

java.lang.Object
  extended by com.ontotext.ordi.wrappers.SesameImpl
All Implemented Interfaces:
TripleStore

public class SesameImpl
extends java.lang.Object
implements TripleStore

A Reference implementation of TripleStore using Sesame.

Version:
$Revision: 1.1 $ $Date: 2006/02/01 14:17:15 $
Author:
not attributable

Field Summary
static java.lang.String SESAME_CONFIG_PARAM
          the loccation of the external configuration file used to initialise sesame
static java.lang.String SESAME_PASS
          the sesame's user passwor
static java.lang.String SESAME_REPOSITORY
          the id of the sesame's repository used to store wsml entiites
static java.lang.String SESAME_RMI_HOST
          RMI connect parameters to a previously initialized Sesame Server on the net
static java.lang.String SESAME_RMI_PORT
           
static java.lang.String SESAME_USER
          sesame user used to connect to the sesame instance
 
Constructor Summary
SesameImpl()
           
 
Method Summary
 void addStatement(org.wsmo.common.Identifier subj, org.wsmo.common.IRI pred, org.wsmo.common.Identifier obj)
          add a single statement to the repository
 void addStatement(org.wsmo.common.Identifier subj, org.wsmo.common.IRI pred, java.lang.String literal)
          add a single statement to the repository
 void beginUpdate()
          invoke it to enable further modifications to the repository
 boolean canUpdate()
          check if modificatin is possible in the current state of the repository
 void commitUpdate()
          invoke it to commit the modifications made to the repository and disamble further modifications
 TripleIterator getStatements(org.wsmo.common.Identifier subj, org.wsmo.common.IRI pred, org.wsmo.common.Identifier obj)
          return a TripleIterator with the statements matching the arguments
 TripleIterator getStatements(org.wsmo.common.Identifier subj, org.wsmo.common.IRI pred, java.lang.String literal)
          return a TripleIterator with the statements matching the arguments
 boolean hasStatement(org.wsmo.common.Identifier subj, org.wsmo.common.IRI pred, org.wsmo.common.Identifier obj)
          check if a statement is present in the rpository
 boolean hasStatement(org.wsmo.common.Identifier subj, org.wsmo.common.IRI pred, java.lang.String literal)
          check if a statement is present in the rpository
 void initialize(java.util.Map params)
          invoked to initialize the reposiotry.
 int removeStatements(org.wsmo.common.Identifier subj, org.wsmo.common.IRI pred)
          remove all statements with the given subject and predicate from the reposiotry
 int removeStatements(org.wsmo.common.Identifier subj, org.wsmo.common.IRI pred, org.wsmo.common.Identifier obj)
          remove all statements with the given subject, predicate and object from the reposiotry
 int removeStatements(org.wsmo.common.Identifier subj, org.wsmo.common.IRI pred, java.lang.String literal)
          remove all statements with the given subject, predicate and object from the reposiotry
 void shutdown()
          invoked to shut down the reposiroty.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SESAME_REPOSITORY

public static java.lang.String SESAME_REPOSITORY
the id of the sesame's repository used to store wsml entiites


SESAME_USER

public static java.lang.String SESAME_USER
sesame user used to connect to the sesame instance


SESAME_PASS

public static java.lang.String SESAME_PASS
the sesame's user passwor


SESAME_CONFIG_PARAM

public static java.lang.String SESAME_CONFIG_PARAM
the loccation of the external configuration file used to initialise sesame


SESAME_RMI_HOST

public static java.lang.String SESAME_RMI_HOST
RMI connect parameters to a previously initialized Sesame Server on the net


SESAME_RMI_PORT

public static java.lang.String SESAME_RMI_PORT
Constructor Detail

SesameImpl

public SesameImpl()
Method Detail

initialize

public void initialize(java.util.Map params)
Description copied from interface: TripleStore
invoked to initialize the reposiotry.

Specified by:
initialize in interface TripleStore
Parameters:
params - is a map with innitialization parameters. Strings are used as keys and the values may be key dependand

shutdown

public void shutdown()
Description copied from interface: TripleStore
invoked to shut down the reposiroty.

Specified by:
shutdown in interface TripleStore

getStatements

public TripleIterator getStatements(org.wsmo.common.Identifier subj,
                                    org.wsmo.common.IRI pred,
                                    org.wsmo.common.Identifier obj)
Description copied from interface: TripleStore
return a TripleIterator with the statements matching the arguments

Specified by:
getStatements in interface TripleStore
Parameters:
subj - is Identifier or null indicating a wildcard
pred - is IRI or null indicating a wildcard
obj - is Identifier or null indicating a wildcard
Returns:
a TripleIterator that enumerates the matched statements

getStatements

public TripleIterator getStatements(org.wsmo.common.Identifier subj,
                                    org.wsmo.common.IRI pred,
                                    java.lang.String literal)
Description copied from interface: TripleStore
return a TripleIterator with the statements matching the arguments

Specified by:
getStatements in interface TripleStore
Parameters:
subj - is Identifier or null indicating a wildcard
pred - is IRI or null indicating a wildcard
literal - String representation of a the literal or the DataValue
Returns:
a TripleIterator that enumerates the matched statements

hasStatement

public boolean hasStatement(org.wsmo.common.Identifier subj,
                            org.wsmo.common.IRI pred,
                            org.wsmo.common.Identifier obj)
Description copied from interface: TripleStore
check if a statement is present in the rpository

Specified by:
hasStatement in interface TripleStore
Parameters:
subj - is Identifier or null indicating a wildcard
pred - is IRI or null indicating a wildcard
obj - is Identifier or null indicating a wildcard
Returns:
true if statement is found in the repository, false otherwise

hasStatement

public boolean hasStatement(org.wsmo.common.Identifier subj,
                            org.wsmo.common.IRI pred,
                            java.lang.String literal)
Description copied from interface: TripleStore
check if a statement is present in the rpository

Specified by:
hasStatement in interface TripleStore
Parameters:
subj - is Identifier or null indicating a wildcard
pred - is IRI or null indicating a wildcard
literal - String representation of a the literal or the DataValue
Returns:
true if statement is found in the repository, false otherwise

addStatement

public void addStatement(org.wsmo.common.Identifier subj,
                         org.wsmo.common.IRI pred,
                         org.wsmo.common.Identifier obj)
Description copied from interface: TripleStore
add a single statement to the repository

Specified by:
addStatement in interface TripleStore
Parameters:
subj - is Identifier, null is not allowed
pred - is IRI, null is not allowed
obj - is Identifier, null is not allowed

addStatement

public void addStatement(org.wsmo.common.Identifier subj,
                         org.wsmo.common.IRI pred,
                         java.lang.String literal)
Description copied from interface: TripleStore
add a single statement to the repository

Specified by:
addStatement in interface TripleStore
Parameters:
subj - is Identifier,null is not allowed
pred - is IRI,null is not allowed
literal - String representation of a the literal or the DataValue,null is not allowed

removeStatements

public int removeStatements(org.wsmo.common.Identifier subj,
                            org.wsmo.common.IRI pred)
Description copied from interface: TripleStore
remove all statements with the given subject and predicate from the reposiotry

Specified by:
removeStatements in interface TripleStore
Parameters:
subj - is Identifier or null indicating a wildcard
pred - is IRI or null indicating a wildcard
Returns:
number of statements removed

removeStatements

public int removeStatements(org.wsmo.common.Identifier subj,
                            org.wsmo.common.IRI pred,
                            org.wsmo.common.Identifier obj)
Description copied from interface: TripleStore
remove all statements with the given subject, predicate and object from the reposiotry

Specified by:
removeStatements in interface TripleStore
Parameters:
subj - is Identifier or null indicating a wildcard
pred - is IRI or null indicating a wildcard
obj - is Identifier or null indicating a wildcard
Returns:
number of statements removed

removeStatements

public int removeStatements(org.wsmo.common.Identifier subj,
                            org.wsmo.common.IRI pred,
                            java.lang.String literal)
Description copied from interface: TripleStore
remove all statements with the given subject, predicate and object from the reposiotry

Specified by:
removeStatements in interface TripleStore
Parameters:
subj - is Identifier or null indicating a wildcard
pred - is IRI or null indicating a wildcard
literal - String representation of a the literal or the DataValue
Returns:
number of statements removed

canUpdate

public boolean canUpdate()
Description copied from interface: TripleStore
check if modificatin is possible in the current state of the repository

Specified by:
canUpdate in interface TripleStore
Returns:
true if allowed, false otherwise

beginUpdate

public void beginUpdate()
Description copied from interface: TripleStore
invoke it to enable further modifications to the repository

Specified by:
beginUpdate in interface TripleStore

commitUpdate

public void commitUpdate()
Description copied from interface: TripleStore
invoke it to commit the modifications made to the repository and disamble further modifications

Specified by:
commitUpdate in interface TripleStore


Copyright © 2005-2006 Ontotext Lab., GNU LGPL License applies.