Class Convertor

java.lang.Object
org.openscience.cdk.libio.jena.Convertor

public class Convertor extends Object
Helper class that converts a CDK IChemObject into RDF using a Jena model and the CDK data model ontology.
Source code:
main
Belongs to CDK module:
iordf
Keywords:
Resource Description Framework, Jena, RDF, Web Ontology Language, OWL
  • Constructor Details

    • Convertor

      public Convertor()
  • Method Details

    • molecule2Model

      public static org.apache.jena.rdf.model.Model molecule2Model(IAtomContainer molecule)
      Converts a IAtomContainer into a Model representation using the CDK OWL.
      Parameters:
      molecule - IAtomContainer to serialize into a RDF graph.
      Returns:
      the RDF graph representing the IAtomContainer.
    • resource2Order

      public static IBond.Order resource2Order(org.apache.jena.rdf.model.Resource rdfOrder)
      Converts a Resource object into the matching IBond.Order.
      Parameters:
      rdfOrder - Resource for which the matching IBond.Order should be given.
      Returns:
      the matching IBond.Order.
    • order2Resource

      public static org.apache.jena.rdf.model.Resource order2Resource(IBond.Order order)
      Create the Resource matching the given IBond.Order.
      Parameters:
      order - bond order to return the matching Resource for.
      Returns:
      the matching Resource.
    • model2Molecule

      public static IAtomContainer model2Molecule(org.apache.jena.rdf.model.Model model, IChemObjectBuilder builder)
      Converts a Model into an IAtomContainer using the given IChemObjectBuilder.
      Parameters:
      model - RDF graph to deserialize into an IAtomContainer.
      builder - IChemObjectBuilder used to create new IChemObjects.
      Returns:
      a IAtomContainer deserialized from the RDF graph.