Class JsonldBiopaxConverter

java.lang.Object
org.biopax.paxtools.io.jsonld.JsonldBiopaxConverter
All Implemented Interfaces:
JsonldConverter

public class JsonldBiopaxConverter extends Object implements JsonldConverter
  • Constructor Details

    • JsonldBiopaxConverter

      public JsonldBiopaxConverter()
  • Method Details

    • convertToJsonld

      public void convertToJsonld(InputStream in, OutputStream os) throws IOException
      Description copied from interface: JsonldConverter
      Convert inputstream in owl/rdf format to outputsream in jsonld format.
      Specified by:
      convertToJsonld in interface JsonldConverter
      Parameters:
      in - input stream (BioPAX RDF/XML data)
      os - output stream (to write the JSON-LD result)
      Throws:
      IOException - when an I/O error occurs
    • convertFromJsonld

      public void convertFromJsonld(InputStream in, OutputStream out)
      Description copied from interface: JsonldConverter
      Convert inputstream in jsonld format to outputsream in owl/rdf format.
      Specified by:
      convertFromJsonld in interface JsonldConverter
      Parameters:
      in - input stream (JSON-LD data)
      out - output stream (to write the BioPAX RDF/XML result)
    • preProcessFile

      public File preProcessFile(InputStream in) throws IOException
      Converts the BioPAX data (stream) to an equivalent temporary BioPAX RDF/XML file that contains absolute instead of (possibly) relative URIs for all the BioPAX elements out there; and returns that file. This is required due to a bug in Jena lib that results in inserting '#' inside the URIs...
      Parameters:
      in - biopax input stream
      Returns:
      a temporary file
      Throws:
      IOException