com.ontotext.ordi.wsmo4rdf.impl
Class WsmoConnectionImpl

java.lang.Object
  extended by com.ontotext.ordi.wsmo4rdf.impl.WsmoConnectionImpl
All Implemented Interfaces:
Connection, WarningAware, Wrapper, WsmoConnection, DataStore, WsmoRepository

public class WsmoConnectionImpl
extends Object
implements WsmoConnection


Constructor Summary
WsmoConnectionImpl(WsmoSource source, TConnection ordiConnection, WsmoFactory wsmoFactory, LogicalExpressionFactory leFactory)
           
 
Method Summary
 void addGoal(Goal arg0)
           
 void addMediator(Mediator arg0)
           
 void addOntology(Ontology arg0)
           
 void addWebService(WebService arg0)
           
 void clearWarnings()
          Clears all reported warnings by the object.
 void close()
          Releases all resources hold by this instance.
 void commit()
          Commits all operations part of the current transaction.
 void deleteGoal(IRI arg0)
           
 void deleteMediator(IRI arg0)
           
 void deleteOntology(IRI arg0)
           
 void deleteWebService(IRI arg0)
           
 void evaluate(String query, QueryResultListener listener)
          Invoke a query against this repository and read the results through a call-back interface.
 WsmoSource getDataSource()
          Gets the DataSource this session is using.
 String getDescription()
           
 Goal getGoal(IRI arg0)
           
 Mediator getMediator(IRI arg0)
           
 Ontology getOntology(IRI arg0)
           
 IsolationLevel getTransactionIsolationLevel()
          Gets the isolation level of the current transaction.
 String getVersion()
           
 ORDIWarning getWarning()
          Retrieves the first warning reported by the object
 WebService getWebService(IRI arg0)
           
 boolean isAutoCommit()
          Checks if the the current session is in auto-commit mode.
 boolean isOpen()
          Checks if this session is opened.
 boolean isReadOnly()
          Checks if the current session to data provider is read-only.
 boolean isWrapperFor(Class<?> iface)
          Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does.
 List<IRI> listGoals()
           
 List<IRI> listMediators()
           
 List<IRI> listOntologies()
           
 List<IRI> listWebServices()
           
 Set<Entity> load(Identifier arg0)
           
 Entity load(Identifier arg0, Class arg1)
           
 void remove(Identifier arg0)
          Removes all associated statements to a specific identifier.
 void remove(Identifier arg0, Class arg1)
           
 void rollback()
          Rollbacks all operations part of the current transaction.
 void save(Entity arg0)
           
 void saveGoal(Goal arg0)
           
 void saveMediator(Mediator arg0)
           
 void saveOntology(Ontology arg0)
           
 void saveWebService(WebService arg0)
           
 void setAutoCommit(boolean mode)
          Sets the commit mode of the current transaction.
 void setDescription(String arg0)
           
 void setTransactionIsolationLevel(IsolationLevel isolationLevel)
          Sets the isolation level of the current transaction.
<T> T
unwrap(Class<T> iface)
          Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WsmoConnectionImpl

public WsmoConnectionImpl(WsmoSource source,
                          TConnection ordiConnection,
                          WsmoFactory wsmoFactory,
                          LogicalExpressionFactory leFactory)
Method Detail

getDataSource

public WsmoSource getDataSource()
Description copied from interface: Connection
Gets the DataSource this session is using.

Specified by:
getDataSource in interface Connection
Returns:
data source that created this sessions

getTransactionIsolationLevel

public IsolationLevel getTransactionIsolationLevel()
Description copied from interface: Connection
Gets the isolation level of the current transaction.

Specified by:
getTransactionIsolationLevel in interface Connection
Returns:
isolation level

isAutoCommit

public boolean isAutoCommit()
Description copied from interface: Connection
Checks if the the current session is in auto-commit mode.

Specified by:
isAutoCommit in interface Connection
Returns:
true if it is auto-commit mode.

setAutoCommit

public void setAutoCommit(boolean mode)
                   throws ORDIException
Description copied from interface: Connection
Sets the commit mode of the current transaction.

Specified by:
setAutoCommit in interface Connection
Parameters:
mode - true for auto-commit, otherwise false
Throws:
ORDIException

setTransactionIsolationLevel

public void setTransactionIsolationLevel(IsolationLevel isolationLevel)
                                  throws ORDIException
Description copied from interface: Connection
Sets the isolation level of the current transaction.

Specified by:
setTransactionIsolationLevel in interface Connection
Parameters:
isolationLevel - to be used
Throws:
ORDIException

isWrapperFor

public boolean isWrapperFor(Class<?> iface)
                     throws ORDIException
Description copied from interface: Wrapper
Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does.

Specified by:
isWrapperFor in interface Wrapper
Parameters:
iface - A Class defining an interface that the result must implement.
Returns:
an object that implements the interface. May be a proxy for the actual implementing object.
Throws:
ORDIException

unwrap

public <T> T unwrap(Class<T> iface)
         throws ORDIException
Description copied from interface: Wrapper
Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.

Specified by:
unwrap in interface Wrapper
Parameters:
iface - a Class defining an interface.
Returns:
true if this implements the interface or directly or indirectly wraps an object that does.
Throws:
ORDIException

isOpen

public boolean isOpen()
Description copied from interface: Connection
Checks if this session is opened.

Specified by:
isOpen in interface Connection
Returns:
true if closed, false otherwise.

rollback

public void rollback()
              throws ORDIException
Description copied from interface: Connection
Rollbacks all operations part of the current transaction.

Specified by:
rollback in interface Connection
Throws:
ORDIException

commit

public void commit()
            throws ORDIException
Description copied from interface: Connection
Commits all operations part of the current transaction.

Specified by:
commit in interface Connection
Throws:
ORDIException

close

public void close()
           throws ORDIException
Description copied from interface: Connection
Releases all resources hold by this instance.

Specified by:
close in interface Connection
Throws:
ORDIException

isReadOnly

public boolean isReadOnly()
Description copied from interface: Connection
Checks if the current session to data provider is read-only.

Specified by:
isReadOnly in interface Connection
Returns:
true if read-only

getWarning

public ORDIWarning getWarning()
Description copied from interface: WarningAware
Retrieves the first warning reported by the object

Specified by:
getWarning in interface WarningAware
Returns:
the first ORDIWarning or null if there are none.

clearWarnings

public void clearWarnings()
Description copied from interface: WarningAware
Clears all reported warnings by the object.

Specified by:
clearWarnings in interface WarningAware

evaluate

public void evaluate(String query,
                     QueryResultListener listener)
              throws MalformedQueryException
Description copied from interface: WsmoConnection
Invoke a query against this repository and read the results through a call-back interface.

Specified by:
evaluate in interface WsmoConnection
Parameters:
query - to be evaluated
listener - is call-back interface to be used
Throws:
MalformedQueryException

addGoal

public void addGoal(Goal arg0)
             throws SynchronisationException
Specified by:
addGoal in interface WsmoRepository
Throws:
SynchronisationException

addMediator

public void addMediator(Mediator arg0)
                 throws SynchronisationException
Specified by:
addMediator in interface WsmoRepository
Throws:
SynchronisationException

addOntology

public void addOntology(Ontology arg0)
                 throws SynchronisationException
Specified by:
addOntology in interface WsmoRepository
Throws:
SynchronisationException

addWebService

public void addWebService(WebService arg0)
                   throws SynchronisationException
Specified by:
addWebService in interface WsmoRepository
Throws:
SynchronisationException

deleteGoal

public void deleteGoal(IRI arg0)
                throws SynchronisationException
Specified by:
deleteGoal in interface WsmoRepository
Throws:
SynchronisationException

deleteMediator

public void deleteMediator(IRI arg0)
                    throws SynchronisationException
Specified by:
deleteMediator in interface WsmoRepository
Throws:
SynchronisationException

deleteOntology

public void deleteOntology(IRI arg0)
                    throws SynchronisationException
Specified by:
deleteOntology in interface WsmoRepository
Throws:
SynchronisationException

deleteWebService

public void deleteWebService(IRI arg0)
                      throws SynchronisationException
Specified by:
deleteWebService in interface WsmoRepository
Throws:
SynchronisationException

getDescription

public String getDescription()
Specified by:
getDescription in interface WsmoRepository

getGoal

public Goal getGoal(IRI arg0)
             throws SynchronisationException
Specified by:
getGoal in interface WsmoRepository
Throws:
SynchronisationException

getMediator

public Mediator getMediator(IRI arg0)
                     throws SynchronisationException
Specified by:
getMediator in interface WsmoRepository
Throws:
SynchronisationException

getOntology

public Ontology getOntology(IRI arg0)
                     throws SynchronisationException
Specified by:
getOntology in interface WsmoRepository
Throws:
SynchronisationException

getVersion

public String getVersion()
                  throws SynchronisationException
Specified by:
getVersion in interface WsmoRepository
Throws:
SynchronisationException

getWebService

public WebService getWebService(IRI arg0)
                         throws SynchronisationException
Specified by:
getWebService in interface WsmoRepository
Throws:
SynchronisationException

listGoals

public List<IRI> listGoals()
                    throws SynchronisationException
Specified by:
listGoals in interface WsmoRepository
Throws:
SynchronisationException

listMediators

public List<IRI> listMediators()
                        throws SynchronisationException
Specified by:
listMediators in interface WsmoRepository
Throws:
SynchronisationException

listOntologies

public List<IRI> listOntologies()
                         throws SynchronisationException
Specified by:
listOntologies in interface WsmoRepository
Throws:
SynchronisationException

listWebServices

public List<IRI> listWebServices()
                          throws SynchronisationException
Specified by:
listWebServices in interface WsmoRepository
Throws:
SynchronisationException

saveGoal

public void saveGoal(Goal arg0)
              throws SynchronisationException
Specified by:
saveGoal in interface WsmoRepository
Throws:
SynchronisationException

saveMediator

public void saveMediator(Mediator arg0)
                  throws SynchronisationException
Specified by:
saveMediator in interface WsmoRepository
Throws:
SynchronisationException

saveOntology

public void saveOntology(Ontology arg0)
                  throws SynchronisationException
Specified by:
saveOntology in interface WsmoRepository
Throws:
SynchronisationException

saveWebService

public void saveWebService(WebService arg0)
                    throws SynchronisationException
Specified by:
saveWebService in interface WsmoRepository
Throws:
SynchronisationException

setDescription

public void setDescription(String arg0)
Specified by:
setDescription in interface WsmoRepository

load

public Set<Entity> load(Identifier arg0)
Specified by:
load in interface DataStore

load

public Entity load(Identifier arg0,
                   Class arg1)
Specified by:
load in interface DataStore

remove

public void remove(Identifier arg0)
Removes all associated statements to a specific identifier. There are two types of removes: 1) Entity - delete all statements where TS = Entity ID. 2) TopEntity - delete all statements where namedGraph = TopEntity ID in addition to procedure for Entity

Specified by:
remove in interface DataStore
Parameters:
arg0 - identifier to be deleted (anonymous identifiers are ignored)

remove

public void remove(Identifier arg0,
                   Class arg1)
Specified by:
remove in interface DataStore

save

public void save(Entity arg0)
Specified by:
save in interface DataStore


Copyright © 2008. All Rights Reserved.