Package org.openscience.cdk.libio.jena
Class Convertor
- java.lang.Object
-
- org.openscience.cdk.libio.jena.Convertor
-
public class Convertor extends Object
Helper class that converts a CDKIChemObject
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 Constructor Description Convertor()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IAtomContainer
model2Molecule(org.apache.jena.rdf.model.Model model, IChemObjectBuilder builder)
static org.apache.jena.rdf.model.Model
molecule2Model(IAtomContainer molecule)
Converts aIAtomContainer
into aModel
representation using the CDK OWL.static org.apache.jena.rdf.model.Resource
order2Resource(IBond.Order order)
Create theResource
matching the givenIBond.Order
.static IBond.Order
resource2Order(org.apache.jena.rdf.model.Resource rdfOrder)
Converts aResource
object into the matchingIBond.Order
.
-
-
-
Method Detail
-
molecule2Model
public static org.apache.jena.rdf.model.Model molecule2Model(IAtomContainer molecule)
Converts aIAtomContainer
into aModel
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 aResource
object into the matchingIBond.Order
.- Parameters:
rdfOrder
- Resource for which the matchingIBond.Order
should be given.- Returns:
- the matching
IBond.Order
.
-
order2Resource
public static org.apache.jena.rdf.model.Resource order2Resource(IBond.Order order)
Create theResource
matching the givenIBond.Order
.- Parameters:
order
- bond order to return the matchingResource
for.- 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
-IChemObjectBuilder
used to create newIChemObject
s.- Returns:
- a
IAtomContainer
deserialized from the RDF graph.
-
-