org.geneontology.lego.dot
Class LegoDotWriter

java.lang.Object
  extended by org.geneontology.lego.dot.LegoDotWriter
All Implemented Interfaces:
LegoRenderer

public abstract class LegoDotWriter
extends Object
implements LegoRenderer

Rudimentary implementation of a DOT writer for the LEGO annotations in OWL.


Constructor Summary
LegoDotWriter(owltools.graph.OWLGraphWrapper graph, org.semanticweb.owlapi.reasoner.OWLReasoner reasoner)
          Create a new writer for the given ontology and reasoner.
 
Method Summary
protected abstract  void appendLine(CharSequence line)
          Write a line to the file.
protected  void close()
          Overwrite this method to implement a custom close() function for the writer.
protected  void open()
          Overwrite this method to implement a custom open() routine for the writer.
 void render(Collection<org.semanticweb.owlapi.model.OWLNamedIndividual> individuals, String name, boolean renderKey)
          Render the given individuals (aka set of annotations).
 void renderLego(Collection<LegoNode> nodes, String name, boolean renderKey)
          Render the given collection of nodes (LegoNode)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LegoDotWriter

public LegoDotWriter(owltools.graph.OWLGraphWrapper graph,
                     org.semanticweb.owlapi.reasoner.OWLReasoner reasoner)
Create a new writer for the given ontology and reasoner.

Parameters:
graph -
reasoner -
Method Detail

render

public void render(Collection<org.semanticweb.owlapi.model.OWLNamedIndividual> individuals,
                   String name,
                   boolean renderKey)
            throws IOException,
                   LegoTools.UnExpectedStructureException
Description copied from interface: LegoRenderer
Render the given individuals (aka set of annotations).

Specified by:
render in interface LegoRenderer
name - name of the graph (optional)
Throws:
IOException
LegoTools.UnExpectedStructureException - thrown, if there are unexpected axioms.

renderLego

public void renderLego(Collection<LegoNode> nodes,
                       String name,
                       boolean renderKey)
                throws IOException
Render the given collection of nodes (LegoNode)

Parameters:
nodes -
name - name of the graph (optional)
renderKey -
Throws:
IOException

open

protected void open()
             throws IOException
Overwrite this method to implement a custom open() routine for the writer.

Throws:
IOException

appendLine

protected abstract void appendLine(CharSequence line)
                            throws IOException
Write a line to the file. It is expected that the writer appends the appropriate newlines. They are not part of the line.

Parameters:
line -
Throws:
IOException

close

protected void close()
Overwrite this method to implement a custom close() function for the writer. Guaranteed to be called, also in case of an Exception (try-finally pattern).



Copyright © 2012-2013. All Rights Reserved.