org.opentox.toxotis.core.component
Class DataEntry

java.lang.Object
  extended by org.opentox.toxotis.core.OTComponent<DataEntry>
      extended by org.opentox.toxotis.core.component.DataEntry
All Implemented Interfaces:
Serializable, IOTComponent, IStAXWritable

public class DataEntry
extends OTComponent<DataEntry>

A DataEntry is a set a multiplicity consisting of a compounds and a set of feature-value pairs assigned to it.

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

Field Summary
 
Fields inherited from class org.opentox.toxotis.core.OTComponent
meta, RDF_ABOUT, RDF_RDF, RDF_RESOURCE, RDF_TYPE
 
Constructor Summary
DataEntry()
           
DataEntry(Compound compound, List<FeatureValue> featureValues)
           
 
Method Summary
 boolean addFeatureValue(FeatureValue e)
           
 void addFeatureValue(int index, FeatureValue element)
           
 com.hp.hpl.jena.ontology.Individual asIndividual(com.hp.hpl.jena.ontology.OntModel model)
          The OpenTox component as an individual.
 boolean equals(Object obj)
           
 int featureValuesSize()
           
 Compound getConformer()
           
 FeatureValue getFeatureValue(int index)
           
 List<FeatureValue> getFeatureValues()
           
 VRI getUri()
          Get the URI of the resource (as an instance of VRI.
 boolean hasFeatureValues()
           
 int hashCode()
           
 FeatureValue removeFeatureValue(int index)
           
 void setConformer(Compound compound)
           
 void setFeatureValues(List<FeatureValue> featureValues)
           
 void writeRdf(XMLStreamWriter writer)
          Due to the large size of some objects like datasets, it is advisable to use this method for serializing large objects to RDF/XML rather than the method OntModel#write(OutputStream).
 
Methods inherited from class org.opentox.toxotis.core.OTComponent
addOntologicalClasses, asOntModel, endRdfWriter, getMeta, getOntologicalClasses, 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
 

Constructor Detail

DataEntry

public DataEntry()

DataEntry

public DataEntry(Compound compound,
                 List<FeatureValue> featureValues)
Method Detail

getUri

public VRI getUri()
Description copied from class: OTComponent
Get the URI of the resource (as an instance of VRI. Anonymous resources, return null

Specified by:
getUri in interface IOTComponent
Overrides:
getUri in class OTComponent<DataEntry>
Returns:
URI of the component or null if not any.

getConformer

public Compound getConformer()

setConformer

public void setConformer(Compound compound)

getFeatureValues

public List<FeatureValue> getFeatureValues()

setFeatureValues

public void setFeatureValues(List<FeatureValue> featureValues)

addFeatureValue

public void addFeatureValue(int index,
                            FeatureValue element)

addFeatureValue

public boolean addFeatureValue(FeatureValue e)

featureValuesSize

public int featureValuesSize()

removeFeatureValue

public FeatureValue removeFeatureValue(int index)

hasFeatureValues

public boolean hasFeatureValues()

getFeatureValue

public FeatureValue getFeatureValue(int index)

asIndividual

public com.hp.hpl.jena.ontology.Individual asIndividual(com.hp.hpl.jena.ontology.OntModel model)
Description copied from interface: IOTComponent
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.

writeRdf

public void writeRdf(XMLStreamWriter writer)
              throws XMLStreamException
Description copied from interface: IStAXWritable
Due to the large size of some objects like datasets, it is advisable to use this method for serializing large objects to RDF/XML rather than the method OntModel#write(OutputStream). In the case of Datasets, it has been shown that this method performs much faster (about 7,5 times faster on a dataset of 21 features and 1000 compounds).

Parameters:
writer - XML Stream Writer used for the serialization of the dataset object.
Throws:
XMLStreamException - In case the serialization is not possible due to syntax errors.

equals

public boolean equals(Object obj)
Overrides:
equals in class OTComponent<DataEntry>

hashCode

public int hashCode()
Overrides:
hashCode in class OTComponent<DataEntry>


Copyright © 2011-2012 OpenTox. All Rights Reserved.