com.ontotext.ordi.tripleset
Interface TConnection

All Superinterfaces:
Connection, WarningAware, Wrapper
All Known Implementing Classes:
RDBMSConnection, TConnectionImpl, TQueryConnectionImpl, TRREEConnection

public interface TConnection
extends Connection

Connection to data source to support tripleset data model.

Author:
vassil

Method Summary
 void addListener(Listener listener)
          Adds a new connection listener.
 TStatement addStatement(Resource subj, URI pred, Value obj, URI namedGraph)
          Adds a new statement.
 TStatement addStatement(Resource subj, URI pred, Value obj, URI namedGraph, URI... ts)
          Adds a new statement and associated it with a collection of tripleses.
 int associateTripleset(Resource subj, URI pred, Value obj, URI namedGraph, URI... ts)
          Associates one or multiple statements.
 int deassociateTripleset(Resource subj, URI pred, Value obj, URI namedGraph, URI... ts)
          Deassociates one or multiple statements.
 CloseableIterator<? extends BindingSet> evaluate(TupleExpr tupleExpr, BindingSet bindings, boolean includeInferred)
          Deprecated. 
 CloseableIterator<? extends BindingSet> evaluate(TupleExpr tupleExpr, BindingSet bindings, Dataset dataset, boolean includeInferred, URI tripleset)
           
 CloseableIterator<? extends Value> getValuesOfType(URI uri)
          Gets iterator to specific type of values.
 List<Listener> listListeners()
          Lists all associated connection listeners.
 void removeListener(Listener listener)
          Removes previously associated connection listener.
 int removeStatement(Resource subj, URI pred, Value obj, URI namedGraph)
          Removes one or multiple statements.
 CloseableIterator<? extends TStatement> search(Resource subj, URI pred, Value obj, URI namedgraph, URI ts)
          Gets all statements based on a pattern match.
 
Methods inherited from interface com.ontotext.ordi.Connection
close, commit, getDataSource, getTransactionIsolationLevel, isAutoCommit, isOpen, isReadOnly, rollback, setAutoCommit, setTransactionIsolationLevel
 
Methods inherited from interface com.ontotext.ordi.Wrapper
isWrapperFor, unwrap
 
Methods inherited from interface com.ontotext.ordi.WarningAware
clearWarnings, getWarning
 

Method Detail

addStatement

TStatement addStatement(Resource subj,
                        URI pred,
                        Value obj,
                        URI namedGraph)
                        throws ORDIException
Adds a new statement.

Returns:
the newly added statement to the store
Throws:
ORDIException

addStatement

TStatement addStatement(Resource subj,
                        URI pred,
                        Value obj,
                        URI namedGraph,
                        URI... ts)
                        throws ORDIException
Adds a new statement and associated it with a collection of tripleses.

Returns:
the newly added statement to the store
Throws:
ORDIException

removeStatement

int removeStatement(Resource subj,
                    URI pred,
                    Value obj,
                    URI namedGraph)
                    throws ORDIException
Removes one or multiple statements.

Returns:
the number of deleted statements
Throws:
ORDIException

associateTripleset

int associateTripleset(Resource subj,
                       URI pred,
                       Value obj,
                       URI namedGraph,
                       URI... ts)
Associates one or multiple statements.

Returns:
the number of newly associated statements

deassociateTripleset

int deassociateTripleset(Resource subj,
                         URI pred,
                         Value obj,
                         URI namedGraph,
                         URI... ts)
Deassociates one or multiple statements.

Returns:
the number of modified statements

search

CloseableIterator<? extends TStatement> search(Resource subj,
                                               URI pred,
                                               Value obj,
                                               URI namedgraph,
                                               URI ts)
                                               throws ORDIException
Gets all statements based on a pattern match.

Returns:
iterator to the matched statements
Throws:
ORDIException

getValuesOfType

CloseableIterator<? extends Value> getValuesOfType(URI uri)
                                                   throws ORDIException
Gets iterator to specific type of values.

Parameters:
uri - of the value types
Returns:
iterators to all values of the specified type
Throws:
ORDIException

addListener

void addListener(Listener listener)
Adds a new connection listener.

Parameters:
listener -

removeListener

void removeListener(Listener listener)
Removes previously associated connection listener.

Parameters:
listener -

listListeners

List<Listener> listListeners()
Lists all associated connection listeners.

Returns:
list of listeners

evaluate

@Deprecated
CloseableIterator<? extends BindingSet> evaluate(TupleExpr tupleExpr,
                                                            BindingSet bindings,
                                                            boolean includeInferred)
                                                 throws ORDIException
Deprecated. 

Evaluates abstract query expression and executes it.

Parameters:
tupleExpr - abstract query expression
bindings - the keys reference variables to be bound to result values
includeInferred - to include inferred statements in the result
Returns:
result object
Throws:
ORDIException

evaluate

CloseableIterator<? extends BindingSet> evaluate(TupleExpr tupleExpr,
                                                 BindingSet bindings,
                                                 Dataset dataset,
                                                 boolean includeInferred,
                                                 URI tripleset)
                                                 throws ORDIException
Throws:
ORDIException


Copyright © 2008. All Rights Reserved.