Package org.openscience.cdk.libio.jena
Class Convertor
java.lang.Object
org.openscience.cdk.libio.jena.Convertor
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IAtomContainermodel2Molecule(org.apache.jena.rdf.model.Model model, IChemObjectBuilder builder) static org.apache.jena.rdf.model.Modelmolecule2Model(IAtomContainer molecule) Converts aIAtomContainerinto aModelrepresentation using the CDK OWL.static org.apache.jena.rdf.model.Resourceorder2Resource(IBond.Order order) Create theResourcematching the givenIBond.Order.static IBond.Orderresource2Order(org.apache.jena.rdf.model.Resource rdfOrder) Converts aResourceobject into the matchingIBond.Order.
-
Constructor Details
-
Convertor
public Convertor()
-
-
Method Details
-
molecule2Model
Converts aIAtomContainerinto aModelrepresentation using the CDK OWL.- Parameters:
molecule-IAtomContainerto serialize into a RDF graph.- Returns:
- the RDF graph representing the
IAtomContainer.
-
resource2Order
Converts aResourceobject into the matchingIBond.Order.- Parameters:
rdfOrder- Resource for which the matchingIBond.Ordershould be given.- Returns:
- the matching
IBond.Order.
-
order2Resource
Create theResourcematching the givenIBond.Order.- Parameters:
order- bond order to return the matchingResourcefor.- Returns:
- the matching
Resource.
-
model2Molecule
public static IAtomContainer model2Molecule(org.apache.jena.rdf.model.Model model, IChemObjectBuilder builder) - Parameters:
model- RDF graph to deserialize into anIAtomContainer.builder-IChemObjectBuilderused to create newIChemObjects.- Returns:
- a
IAtomContainerdeserialized from the RDF graph.
-