org.biopax.paxtools.io
Class SimpleIOHandler

java.lang.Object
  extended by org.biopax.paxtools.io.BioPAXIOHandlerAdapter
      extended by org.biopax.paxtools.io.SimpleIOHandler
All Implemented Interfaces:
BioPAXIOHandler

public class SimpleIOHandler
extends BioPAXIOHandlerAdapter

Simple BioPAX reader/writer.


Nested Class Summary
 class SimpleIOHandler.Triple
           
 
Field Summary
 
Fields inherited from class org.biopax.paxtools.io.BioPAXIOHandlerAdapter
bp, editorMap, factory, level, namespaces, owl, rdf, rdfs, xsd
 
Constructor Summary
SimpleIOHandler()
           
SimpleIOHandler(BioPAXFactory factory, BioPAXLevel level)
           
SimpleIOHandler(BioPAXLevel level)
           
 
Method Summary
 void convertToOWL(Model model, java.io.OutputStream outputStream)
          Converts a model into BioPAX (OWL) format, and writes it into the outputStream.
protected  void createAndBind(Model model)
           
 java.lang.String getId()
           
 java.lang.String getXmlStreamInfo()
          This may be required for external applications to access the specific information (e.g., location) when reporting XML exceptions.
protected  void init(java.io.InputStream in)
           
 void mergeDuplicates(boolean mergeDuplicates)
           
 void normalizeNameSpaces(boolean normalizeNameSpaces)
           
protected  java.util.Map<java.lang.String,java.lang.String> readNameSpaces()
           
protected  void resetEditorMap()
          Updates the member EditorMap for the new BioPAX level and factory (different implementations of EditorMap can be used in modules, e.g.
 void writeObject(java.io.Writer out, BioPAXElement bean)
          Writes the XML representation of individual BioPAX element that is BioPAX-like but only for display or debug purpose (incomplete).
 
Methods inherited from class org.biopax.paxtools.io.BioPAXIOHandlerAdapter
bindValue, convertFromMultipleOwlFiles, convertFromOWL, convertToOWL, createAndAdd, fixReusedPEPs, getEditorMap, getFactory, getLevel, getRDFCommentEditor, getReusedPEPHelper, isConvertingFromLevel1ToLevel2, isFixReusedPEPs, isTreatNilAsNull, literalFixes, resetLevel, resourceFixes, setConvertingFromLevel1ToLevel2, setEditorMap, setFactory, treatNilAsNull
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleIOHandler

public SimpleIOHandler()

SimpleIOHandler

public SimpleIOHandler(BioPAXLevel level)

SimpleIOHandler

public SimpleIOHandler(BioPAXFactory factory,
                       BioPAXLevel level)
Method Detail

mergeDuplicates

public void mergeDuplicates(boolean mergeDuplicates)

resetEditorMap

protected final void resetEditorMap()
Description copied from class: BioPAXIOHandlerAdapter
Updates the member EditorMap for the new BioPAX level and factory (different implementations of EditorMap can be used in modules, e.g. SimpleEditorMap and JenaEditorMap.)

Specified by:
resetEditorMap in class BioPAXIOHandlerAdapter

getXmlStreamInfo

public java.lang.String getXmlStreamInfo()
This may be required for external applications to access the specific information (e.g., location) when reporting XML exceptions.

Returns:

init

protected void init(java.io.InputStream in)
Specified by:
init in class BioPAXIOHandlerAdapter

readNameSpaces

protected java.util.Map<java.lang.String,java.lang.String> readNameSpaces()
Specified by:
readNameSpaces in class BioPAXIOHandlerAdapter

createAndBind

protected void createAndBind(Model model)
Specified by:
createAndBind in class BioPAXIOHandlerAdapter

getId

public java.lang.String getId()

convertToOWL

public void convertToOWL(Model model,
                         java.io.OutputStream outputStream)
Converts a model into BioPAX (OWL) format, and writes it into the outputStream. Saved data can be then read via BioPAXIOHandler interface (e.g., SimpleIOHandler). Note: When the model is incomplete (i.e., contains elements that refer externals, dangling BioPAX elements) and is exported by this method, it works; however one will find corresponding object properties set to NULL later, after converting such data back to Model.

Parameters:
model - model to be converted into OWL format
outputStream - output stream into which the output will be written
Throws:
BioPaxIOException - in case of I/O problems

writeObject

public void writeObject(java.io.Writer out,
                        BioPAXElement bean)
                 throws java.io.IOException
Writes the XML representation of individual BioPAX element that is BioPAX-like but only for display or debug purpose (incomplete). Note: use BioPAXIOHandler#convertToOWL(org.biopax.paxtools .model.Model, Object) instead if you have a model and want to save and later restore it.

Parameters:
out -
bean -
Throws:
java.io.IOException

normalizeNameSpaces

public void normalizeNameSpaces(boolean normalizeNameSpaces)


Copyright © 2011 BioPAX. All Rights Reserved.