com.ontotext.ordi.wsmo4rdf.remote.client
Class RemoteWsmoConnection

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

public class RemoteWsmoConnection
extends Object
implements WsmoConnection


Constructor Summary
RemoteWsmoConnection(int conId, RemoteWsmo4rdfGate gate)
           
 
Method Summary
 void addGoal(Goal goal)
           
 void addMediator(Mediator med)
           
 void addOntology(Ontology ont)
           
 void addWebService(WebService ws)
           
 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 id)
           
 void deleteMediator(IRI id)
           
 void deleteOntology(IRI id)
           
 void deleteWebService(IRI id)
           
 void evaluate(String query, QueryResultListener listener)
          Invoke a query against this repository and read the results through a call-back interface.
 void finalize()
           
 DataSource getDataSource()
          Gets the DataSource this session is using.
 String getDescription()
           
 Goal getGoal(IRI id)
           
 Mediator getMediator(IRI id)
           
 Ontology getOntology(IRI id)
           
 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 id)
           
 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 id)
           
 Entity load(Identifier id, Class clazz)
           
 void remove(Identifier id)
           
 void remove(Identifier id, Class clazz)
           
 void rollback()
          Rollbacks all operations part of the current transaction.
 void save(Entity item)
           
 void saveGoal(Goal goal)
           
 void saveMediator(Mediator med)
           
 void saveOntology(Ontology ont)
           
 void saveWebService(WebService ws)
           
 void setAutoCommit(boolean mode)
          Sets the commit mode of the current transaction.
 void setDescription(String desc)
           
 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, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteWsmoConnection

public RemoteWsmoConnection(int conId,
                            RemoteWsmo4rdfGate gate)
Method Detail

finalize

public void finalize()
Overrides:
finalize in class Object

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

getDescription

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

setDescription

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

getVersion

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

addOntology

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

deleteOntology

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

getOntology

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

saveOntology

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

listOntologies

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

addGoal

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

saveGoal

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

getGoal

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

deleteGoal

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

listGoals

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

addMediator

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

addWebService

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

deleteMediator

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

deleteWebService

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

getMediator

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

getWebService

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

listMediators

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

listWebServices

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

saveMediator

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

saveWebService

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

load

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

load

public Entity load(Identifier id,
                   Class clazz)
Specified by:
load in interface DataStore

remove

public void remove(Identifier id)
Specified by:
remove in interface DataStore

remove

public void remove(Identifier id,
                   Class clazz)
Specified by:
remove in interface DataStore

save

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

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

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

getDataSource

public DataSource 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.

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.

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

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

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

clearWarnings

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

Specified by:
clearWarnings in interface WarningAware

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.


Copyright © 2008. All Rights Reserved.