public abstract class BioPAXIOHandlerAdapter extends Object implements BioPAXIOHandler
| Modifier and Type | Field and Description |
|---|---|
protected String |
base |
protected String |
bp |
protected EditorMap |
editorMap |
protected BioPAXFactory |
factory |
protected BioPAXLevel |
level |
protected Map<String,String> |
namespaces |
protected static String |
owl |
protected static String |
rdf |
protected static String |
rdfs |
protected static String |
xsd |
| Constructor and Description |
|---|
BioPAXIOHandlerAdapter() |
BioPAXIOHandlerAdapter(BioPAXFactory factory,
BioPAXLevel level) |
BioPAXIOHandlerAdapter(BioPAXLevel level) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
bindValue(String valueString,
PropertyEditor editor,
BioPAXElement bpe,
Model model)
This method binds the value to the bpe.
|
Model |
convertFromOWL(InputStream in)
Reads a BioPAX model from an OWL file input stream (in) and converts it to a model.
|
void |
convertToOWL(Model model,
OutputStream outputStream,
String... ids)
Similar to
BioPAXIOHandler.convertToOWL(org.biopax.paxtools.model.Model,
java.io.OutputStream) (org.biopax.paxtools.model.Model, Object)}, but
extracts a sub-model, converts it into BioPAX (OWL) format,
and writes it into the outputStream. |
protected void |
createAndAdd(Model model,
String id,
String localName)
This method is called by the reader for each OWL instance in the OWL model.
|
protected abstract void |
createAndBind(Model model)
This method provides a hook for the implementers of this abstract class to create objects themselves and bind
the properties to the objects.
|
void |
fixReusedPEPs(boolean fixReusedPEPs)
Enables (true) or disables (false) the fixing of reused peps.
|
EditorMap |
getEditorMap() |
BioPAXFactory |
getFactory() |
BioPAXLevel |
getLevel() |
protected StringPropertyEditor |
getRDFCommentEditor(BioPAXElement bpe)
Paxtools maps BioPAX:comment (L3) and BioPAX:COMMENT (L2) to rdf:comment.
|
protected ReusedPEPHelper |
getReusedPEPHelper()
This is a helper class initialized only if fixReusedPEPs is true.
|
protected abstract void |
init(InputStream in)
This method provides a hook for the implementers of this abstract class to perform the initial reading from the
input stream.
|
boolean |
isFixReusedPEPs()
Workaround for a very common Level 2 issue.
|
protected abstract Map<String,String> |
readNameSpaces()
This method provides a hook for the implementers of this abstract class to set the namespaces of the model.
|
protected void |
reset(InputStream in) |
protected abstract void |
resetEditorMap()
Updates the member EditorMap for the new BioPAX level and factory (different implementations of
EditorMap can be used in modules, e.g.
|
protected void |
resetLevel(BioPAXLevel level,
BioPAXFactory factory)
Updates the level and factory for this I/O
(final - because used in the constructor)
|
protected Object |
resourceFixes(BioPAXElement bpe,
Object value)
This method currently only fixes reusedPEPs if the option is set.
|
void |
setEditorMap(EditorMap editorMap) |
void |
setFactory(BioPAXFactory factory) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconvertToOWLprotected BioPAXLevel level
protected BioPAXFactory factory
protected EditorMap editorMap
protected static final String rdf
protected static final String rdfs
protected String bp
protected static final String xsd
protected static final String owl
protected String base
public BioPAXIOHandlerAdapter()
public BioPAXIOHandlerAdapter(BioPAXLevel level)
public BioPAXIOHandlerAdapter(BioPAXFactory factory, BioPAXLevel level)
protected final void resetLevel(BioPAXLevel level, BioPAXFactory factory)
level - BioPAX Levelfactory - concrete BioPAX factory impl.protected abstract void resetEditorMap()
public void fixReusedPEPs(boolean fixReusedPEPs)
fixReusedPEPs in interface BioPAXIOHandlerfixReusedPEPs - true if fixing is desiredfixReusedPEPspublic boolean isFixReusedPEPs()
isFixReusedPEPs in interface BioPAXIOHandlerprotected ReusedPEPHelper getReusedPEPHelper()
public BioPAXFactory getFactory()
getFactory in interface BioPAXIOHandlerpublic void setFactory(BioPAXFactory factory)
setFactory in interface BioPAXIOHandlerfactory - used for creating objectspublic EditorMap getEditorMap()
getEditorMap in interface BioPAXIOHandlerpublic void setEditorMap(EditorMap editorMap)
setEditorMap in interface BioPAXIOHandlereditorMap - used for this handler.public BioPAXLevel getLevel()
getLevel in interface BioPAXIOHandlerpublic Model convertFromOWL(InputStream in)
convertFromOWL in interface BioPAXIOHandlerin - inputStream from which the model will be readprotected void reset(InputStream in)
protected void createAndAdd(Model model, String id, String localName)
model - to be insertedid - of the new object. The model should not contain another object with the same ID.localName - of the class to be instantiated.protected abstract void init(InputStream in)
in - BioPAX RDF/XML input streamprotected abstract Map<String,String> readNameSpaces()
protected abstract void createAndBind(Model model)
model - to be populatedprotected Object resourceFixes(BioPAXElement bpe, Object value)
bpe - to be boundvalue - to be assigned.protected void bindValue(String valueString, PropertyEditor editor, BioPAXElement bpe, Model model)
valueString - to be assignededitor - that maps to the propertybpe - to be boundmodel - to be populated.protected StringPropertyEditor getRDFCommentEditor(BioPAXElement bpe)
bpe - to be bound.public void convertToOWL(Model model, OutputStream outputStream, String... ids)
BioPAXIOHandler.convertToOWL(org.biopax.paxtools.model.Model,
java.io.OutputStream) (org.biopax.paxtools.model.Model, Object)}, but
extracts a sub-model, converts it into BioPAX (OWL) format,
and writes it into the outputStream.
Saved data can be then read via BioPAXIOHandler
interface (e.g., SimpleIOHandler).convertToOWL in interface BioPAXIOHandlermodel - model to be converted into OWL formatoutputStream - output stream into which the output will be writtenids - optional list of "root" element absolute URIs;
direct/indirect child objects are auto-exported as well.Copyright © 2016 BioPAX. All rights reserved.