org.opentox.toxotis.core
Class DescriptorCaclulation<T extends OTPublishable>

java.lang.Object
  extended by org.opentox.toxotis.core.OTComponent<T>
      extended by org.opentox.toxotis.core.OTOnlineResource<T>
          extended by org.opentox.toxotis.core.OTPublishable<T>
              extended by org.opentox.toxotis.core.DescriptorCaclulation<T>
Type Parameters:
T -
All Implemented Interfaces:
Serializable, IDescriptorCalculation, IOnlineResource, IOTComponent, IStAXWritable
Direct Known Subclasses:
Compound

public abstract class DescriptorCaclulation<T extends OTPublishable>
extends OTPublishable<T>
implements IDescriptorCalculation

Abstact class that implements the interface IDescriptorCalculation offering some facilities for easier calculation of descriptors using a remote DC algorithm.

Author:
Pantelis Sopasakis, Charalampos Chomenides
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.opentox.toxotis.core.OTOnlineResource
XSD_DATATYPE_LINKS
 
Fields inherited from class org.opentox.toxotis.core.OTComponent
meta, RDF_ABOUT, RDF_RDF, RDF_RESOURCE, RDF_TYPE
 
Constructor Summary
DescriptorCaclulation()
           
DescriptorCaclulation(VRI uri)
           
 
Method Summary
 Task calculateDescriptors(VRI descriptorCalculationAlgorithm, AuthenticationToken token)
          Calculates all available descriptors using a remote descriptor calculation service.
 Task calculateDescriptors(VRI descriptorCalculationAlgorithm, AuthenticationToken token, String... serviceConfiguration)
          Calculates descriptors for this compound empoying a descriptor calculation web service at the specified location.
 Future<VRI> futureCDKPhysChemDescriptors(AuthenticationToken token, VRI datasetService)
           
 Future<VRI> futureDescriptors(VRI descriptorCalculationAlgorithm, AuthenticationToken token, ExecutorService executor, String... serviceConfiguration)
          Use a remote Service to calculate (some or all available) descriptors for a chemical compound.
 Future<VRI> futureDescriptors(VRI descriptorCalculationAlgorithm, AuthenticationToken token, String... serviceConfiguration)
           
 Future<VRI> futureDescriptors(VRI descriptorCalculationAlgorithm, AuthenticationToken token, VRI datasetService)
          Calculate descriptors for a chemical compound or a dataset providing the URI of the descriptor calculation algorithm, the URI of a dataset service where the result should be stored and an authentication token for accessing the various services.
 Future<VRI> futureJoeLibDescriptors(AuthenticationToken token, VRI datasetService)
           
 
Methods inherited from class org.opentox.toxotis.core.OTPublishable
publish, publish, publishOnline, publishOnline
 
Methods inherited from class org.opentox.toxotis.core.OTOnlineResource
download, download, download, download, downloadImage, loadFromRemote, loadFromRemote, loadFromRemote
 
Methods inherited from class org.opentox.toxotis.core.OTComponent
addOntologicalClasses, asOntModel, endRdfWriter, equals, getMeta, getOntologicalClasses, getUri, hashCode, initRdfWriter, isEnabled, setEnabled, setMeta, setOntologicalClasses, setUri, writeAnnotationProperty, writeClass, writeDatatypeProperty, writeMetaDataProperties, writeObjectProperty, writeRdf, writeRdf, writeSuperClassRelationships
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opentox.toxotis.core.IOTComponent
addOntologicalClasses, asIndividual, asOntModel, getMeta, getOntologicalClasses, getUri, isEnabled, setEnabled, setMeta, setOntologicalClasses
 
Methods inherited from interface org.opentox.toxotis.core.IStAXWritable
writeRdf
 

Constructor Detail

DescriptorCaclulation

public DescriptorCaclulation()

DescriptorCaclulation

public DescriptorCaclulation(VRI uri)
Method Detail

calculateDescriptors

public Task calculateDescriptors(VRI descriptorCalculationAlgorithm,
                                 AuthenticationToken token,
                                 String... serviceConfiguration)
                          throws ServiceInvocationException
Description copied from interface: IDescriptorCalculation
Calculates descriptors for this compound empoying a descriptor calculation web service at the specified location. The method accepts a set or parameters as a String array (String[]) for fine tuning of the remote service.

Specified by:
calculateDescriptors in interface IDescriptorCalculation
Parameters:
descriptorCalculationAlgorithm - A descriptor calculation algorithm. Some descriptor calculation algorithm URIs are found in the collection org.opentox.toxotis.client.collection. Services.DescriptorCalculation such as TUM's implementation using CDK and JOELib descriptors.
token - Token used to authenticate the client and grant it access to the various OpenTox resources.
serviceConfiguration - A string array (String[]) used for fine tuning of the remote service. Successive pairs of values act as a parameter name - parameter value pair which is posted to the remote service.
Returns:
The task returned by the remote service that will be used to monitor the progress of the descriptor calculation process.
Throws:
ServiceInvocationException

calculateDescriptors

public Task calculateDescriptors(VRI descriptorCalculationAlgorithm,
                                 AuthenticationToken token)
                          throws ServiceInvocationException
Description copied from interface: IDescriptorCalculation
Calculates all available descriptors using a remote descriptor calculation service.

Specified by:
calculateDescriptors in interface IDescriptorCalculation
Parameters:
descriptorCalculationAlgorithm - A descriptor calculation algorithm. Some descriptor calculation algorithm URIs are found in the collection org.opentox.toxotis.client.collection. Services.DescriptorCalculation such as TUM's implementation using CDK and JOELib descriptors.
token - Token used to authenticate the client and grant it access to the various OpenTox resources.
Returns:
The task returned by the remote service that will be used to monitor the progress of the descriptor calculation process.
Throws:
ServiceInvocationException

futureDescriptors

public Future<VRI> futureDescriptors(VRI descriptorCalculationAlgorithm,
                                     AuthenticationToken token,
                                     String... serviceConfiguration)
                              throws ServiceInvocationException
Specified by:
futureDescriptors in interface IDescriptorCalculation
Throws:
ServiceInvocationException

futureDescriptors

public Future<VRI> futureDescriptors(VRI descriptorCalculationAlgorithm,
                                     AuthenticationToken token,
                                     ExecutorService executor,
                                     String... serviceConfiguration)
Description copied from interface: IDescriptorCalculation
Use a remote Service to calculate (some or all available) descriptors for a chemical compound. Such processes might take long to complete so are usually executed asynchronously or put in an execution pool.

Specified by:
futureDescriptors in interface IDescriptorCalculation
Parameters:
descriptorCalculationAlgorithm - The URI of an OpenTox descriptor calculation algorithm. A compound or a dataset is posted to a descriptor calculation algorithm and the expected result is a dataset containing the submitted compound(s) and the calculated descriptor values for each compound.
token - Authentication token used for accessing the descriptor calculation service.
executor - An executor used to sumbit the thread in. Be aware that the executor is not shutdown in this method so it is up to the user whether it should be shutdown or not.
serviceConfiguration - A string array (String[]) used for fine tuning of the remote service. Successive pairs of values act as a parameter name - parameter value pair which is posted to the remote service. You can choose the features to be calculated using this argument. For instance if you want only the descriptor Zagreb Index calculated, you should set the options to {"ALL","false","ZagrebIndexDescriptor", "true"}.
Returns:
A Future waiting for the background job to complete and and return the URI of a Dataset with the calculated descriptors for this Compound.

futureCDKPhysChemDescriptors

public Future<VRI> futureCDKPhysChemDescriptors(AuthenticationToken token,
                                                VRI datasetService)
                                         throws ServiceInvocationException
Specified by:
futureCDKPhysChemDescriptors in interface IDescriptorCalculation
Throws:
ServiceInvocationException

futureJoeLibDescriptors

public Future<VRI> futureJoeLibDescriptors(AuthenticationToken token,
                                           VRI datasetService)
                                    throws ServiceInvocationException
Specified by:
futureJoeLibDescriptors in interface IDescriptorCalculation
Throws:
ServiceInvocationException

futureDescriptors

public Future<VRI> futureDescriptors(VRI descriptorCalculationAlgorithm,
                                     AuthenticationToken token,
                                     VRI datasetService)
                              throws ServiceInvocationException
Description copied from interface: IDescriptorCalculation
Calculate descriptors for a chemical compound or a dataset providing the URI of the descriptor calculation algorithm, the URI of a dataset service where the result should be stored and an authentication token for accessing the various services.

Specified by:
futureDescriptors in interface IDescriptorCalculation
Parameters:
descriptorCalculationAlgorithm - URI of an OpenTox descriptor calculation algorithm
token - Authentication token used for accessing the descriptor calculation service.
datasetService - The URI of a dataset service, i.e. a URI of the form http://domain_name.ext:1234/ blah/blah/dataset.
Returns:
A Future result of an asynchronous job initiated
Throws:
ServiceInvocationException


Copyright © 2011-2012 OpenTox. All Rights Reserved.