org.opentox.toxotis.core
Interface IOTComponent<T extends IOTComponent>

All Known Subinterfaces:
IOnlineResource, IOntologyServiceSupport<T>, IRestOperation, IStAXWritable
All Known Implementing Classes:
AASpecifications, Algorithm, BibTeX, Bookmark, Compound, Conformer, DataEntry, Dataset, DescriptorCaclulation, DummyComponent, ErrorReport, Feature, FeatureValue, HttpMediatype, HttpMethod, HttpParameter, HttpStatus, Model, MultiParameter, OTComponent, OTOnlineResource, OTPublishable, Parameter, ParameterValue, QprfReport, RestOperation, ServiceRestDocumentation, Task, User, VariableInfo, VariableValue

public interface IOTComponent<T extends IOTComponent>

Generic interface for all OpenTox components in ToxOtis that can be represented as individuals in an RDF graph. According to the OpenTox API specifications (since API 1.1.) should be available in RDF (application/rdf+xml) while other RDF-related representations can be also available optionally (like application/x-turtle).

Author:
Pantelis Sopasakis, Charalampos Chomenides

Method Summary
 T addOntologicalClasses(OntologicalClass... ontClasses)
          Adds a list of ontological classes to the current ones.
 com.hp.hpl.jena.ontology.Individual asIndividual(com.hp.hpl.jena.ontology.OntModel model)
          The OpenTox component as an individual.
 com.hp.hpl.jena.ontology.OntModel asOntModel()
          Creates a new Ontological Model (uses an instance of SimpleOntModelImpl ) and assigns to it the Individual from the method asIndividual(OntModel).
 MetaInfo getMeta()
          Obtain meta information about the underlying OpenTox resource/component.
 Set<OntologicalClass> getOntologicalClasses()
          The list of ontological classes for the current entity.
 VRI getUri()
          Get the URI of the resource (as an instance of VRI.
 boolean isEnabled()
          Whether the current entity is enabled.
 T setEnabled(boolean enabled)
          Sets the status of the current modifiable entity.
 T setMeta(MetaInfo meta)
          Set the meta-information of the component
 T setOntologicalClasses(Set<OntologicalClass> ontClasses)
          A simple setter for the ontological classes of the current OT-component.
 

Method Detail

asIndividual

com.hp.hpl.jena.ontology.Individual asIndividual(com.hp.hpl.jena.ontology.OntModel model)
The OpenTox component as an individual.

Parameters:
model - The ontological model to which the individual belongs.
Returns:
The OpenTox component as an individual of a data model.

asOntModel

com.hp.hpl.jena.ontology.OntModel asOntModel()
Creates a new Ontological Model (uses an instance of SimpleOntModelImpl ) and assigns to it the Individual from the method asIndividual(OntModel). The ontological model will contain no other information apart from the representation of the inderlying OpenTox component.

Returns:
An ontological model for the current OpenTox component.

getUri

VRI getUri()
Get the URI of the resource (as an instance of VRI. Anonymous resources, return null

Returns:
URI of the component or null if not any.

getMeta

MetaInfo getMeta()
Obtain meta information about the underlying OpenTox resource/component. These meta information include various fields of the Dublin Core ontology (title, identifier), properties from the OpenTox ontology (see http://opentox.org/data/documents/development/RDF%20Files/OpenToxOntology) and some elements from other ontologies like rdfs:comment

Returns:
Meta information about the resource

setMeta

T setMeta(MetaInfo meta)
Set the meta-information of the component

Parameters:
meta - Meta information for the component
Returns:
The component itself with the updated meta-information
See Also:
Meta Information

getOntologicalClasses

Set<OntologicalClass> getOntologicalClasses()
The list of ontological classes for the current entity.

Returns:
Set of ontological classes.

setOntologicalClasses

T setOntologicalClasses(Set<OntologicalClass> ontClasses)
A simple setter for the ontological classes of the current OT-component.

Parameters:
ontClasses - The Set of ontological classes to be prescribed for the current component.
Returns:
The current component with the updated set of ontological classes.

addOntologicalClasses

T addOntologicalClasses(OntologicalClass... ontClasses)
Adds a list of ontological classes to the current ones.

Parameters:
ontClasses - An array of ontological classes.
Returns:
The current modifiable object updated with the new ontological classes.

isEnabled

boolean isEnabled()
Whether the current entity is enabled. Only enabled entities are presented to end-users. An entity can be virtually deleted it is set to be disabled. Further action of course is need to handle enabled and disabled resources. Mainly, this serves as an auxiliary property of all OT-components for easier DB management.

Returns:
true if the object is enabled and false otherwise.

setEnabled

T setEnabled(boolean enabled)
Sets the status of the current modifiable entity.

Parameters:
enabled - Whether to enable or to disable the current instance.
Returns:
The current modifiable object updated with the new value of the enabled status.


Copyright © 2011-2012 OpenTox. All Rights Reserved.