org.opentox.toxotis.core
Interface IStAXWritable

All Superinterfaces:
IOTComponent
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 IStAXWritable
extends IOTComponent

An interface for components that can be written to an output stream using the Java streaming API for XML (StAX) using in particular some implementation of javax.xml.stream.XMLStreamWriter.

Author:
Pantelis Sopasakis, Charalampos Chomenides

Method Summary
 void writeRdf(OutputStream output)
          Serializes the Dataset object into an RDF/XML document and writes it to a given output stream.
 void writeRdf(Writer writer)
          Serializes the Dataset object into an RDF/XML document and writes it to an output stream using a java.io.Writer.
 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 interface org.opentox.toxotis.core.IOTComponent
addOntologicalClasses, asIndividual, asOntModel, getMeta, getOntologicalClasses, getUri, isEnabled, setEnabled, setMeta, setOntologicalClasses
 

Method Detail

writeRdf

void writeRdf(Writer writer)
Serializes the Dataset object into an RDF/XML document and writes it to an output stream using a java.io.Writer.

Parameters:
writer - A Writer used to write the RDF representation to an output destination.

writeRdf

void writeRdf(OutputStream output)
Serializes the Dataset object into an RDF/XML document and writes it to a given output stream.

Parameters:
output - OutputStream where the output should be written.

writeRdf

void writeRdf(XMLStreamWriter writer)
              throws XMLStreamException
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
XMLStreamException - In case the serialization is not possible due to syntax errors.
UnsupportedOperationException - If the method is not implemented yet.


Copyright © 2011-2012 OpenTox. All Rights Reserved.