Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated for API changes in the IChemObjectBuilder

  • Loading branch information...
commit c159bd522061cf87cee8db969f85a2677468c9d7 1 parent a346769
@egonw egonw authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/main/org/openscience/cdk/libio/jena/Convertor.java
View
8 src/main/org/openscience/cdk/libio/jena/Convertor.java
@@ -351,20 +351,20 @@ public static IMolecule model2Molecule(Model model,
IMolecule mol = null;
if (mols.hasNext()) {
Resource rdfMol = mols.next();
- mol = builder.newMolecule();
+ mol = builder.newInstance(IMolecule.class);
Map<Resource,IAtom> rdfToCDKAtomMap = new HashMap<Resource,IAtom>();
StmtIterator atoms = rdfMol.listProperties(CDK.HASATOM);
while (atoms.hasNext()) {
Resource rdfAtom = atoms.nextStatement().getResource();
IAtom atom;
if (rdfAtom.hasProperty(RDF.type, CDK.PSEUDOATOM)) {
- atom = builder.newPseudoAtom();
+ atom = builder.newInstance(IPseudoAtom.class);
atom.setStereoParity(0);
Statement label = rdfAtom.getProperty(CDK.HASLABEL);
if (label != null)
((IPseudoAtom)atom).setLabel(label.getString());
} else {
- atom = builder.newAtom();
+ atom = builder.newInstance(IAtom.class);
}
Statement symbol = rdfAtom.getProperty(CDK.SYMBOL);
if (symbol != null) atom.setSymbol(symbol.getString());
@@ -375,7 +375,7 @@ public static IMolecule model2Molecule(Model model,
StmtIterator bonds = rdfMol.listProperties(CDK.HASBOND);
while (bonds.hasNext()) {
Resource rdfBond = bonds.nextStatement().getResource();
- IBond bond = builder.newBond();
+ IBond bond = builder.newInstance(IBond.class);
StmtIterator bondAtoms = rdfBond.listProperties(CDK.BINDSATOM);
int atomCounter = 0;
while (bondAtoms.hasNext()) {
Please sign in to comment.
Something went wrong with that request. Please try again.