Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixes to work with cdk 1.5.x and the develop brach of core bioclipse …
…features
  • Loading branch information
goglepox committed Oct 1, 2013
1 parent 2d7c6bd commit cd380e3
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 15 deletions.
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: IBatis Plug-in
Bundle-SymbolicName: net.bioclipse.databases.iBatis
Bundle-Version: 2.2.0.v20100127
Bundle-Version: 2.6.1.qualifier
Bundle-Activator: net.bioclipse.databases.ibatis.Activator
Require-Bundle: org.eclipse.core.runtime
Bundle-ActivationPolicy: lazy
Expand Down
2 changes: 1 addition & 1 deletion plugins/net.bioclipse.filestore.tests/META-INF/MANIFEST.MF
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Tests Plug-in
Bundle-SymbolicName: net.bioclipse.filestore.tests
Bundle-Version: 2.2.0.v20100127
Bundle-Version: 2.6.1.qualifier
Bundle-Activator: net.bioclipse.filestore.tests.Activator
Require-Bundle: org.eclipse.core.runtime,
org.junit4,
Expand Down
2 changes: 1 addition & 1 deletion plugins/net.bioclipse.filestore/META-INF/MANIFEST.MF
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Filestore Plug-in
Bundle-SymbolicName: net.bioclipse.filestore
Bundle-Version: 2.2.0.v20100127
Bundle-Version: 2.6.1.qualifier
Bundle-Activator: net.bioclipse.filestore.Activator
Require-Bundle: org.eclipse.core.runtime
Bundle-ActivationPolicy: lazy
Expand Down
2 changes: 1 addition & 1 deletion plugins/net.bioclipse.hsqldb.tests/META-INF/MANIFEST.MF
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Tests Plug-in
Bundle-SymbolicName: net.bioclipse.hsqldb.tests
Bundle-Version: 2.2.0.v20100127
Bundle-Version: 2.6.1.qualifier
Bundle-Activator: net.bioclipse.hsqldb.Activator
Require-Bundle: org.eclipse.core.runtime,
net.bioclipse.hsqldb,
Expand Down
2 changes: 1 addition & 1 deletion plugins/net.bioclipse.hsqldb/META-INF/MANIFEST.MF
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: HSQLDB database plugin
Bundle-SymbolicName: net.bioclipse.hsqldb; singleton:=true
Bundle-Version: 2.2.0.v20100127
Bundle-Version: 2.6.1.qualifier
Bundle-Activator: net.bioclipse.hsqldb.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
Expand Down
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Plugintests
Bundle-SymbolicName: net.bioclipse.structuredb.plugintests; singleton:=true
Bundle-Version: 2.2.0.v20100127
Bundle-Version: 2.6.1.qualifier
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
Expand Down
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Structuredb Plug-in for tests
Bundle-SymbolicName: net.bioclipse.structuredb.tests;singleton:=true
Bundle-Version: 2.2.0.v20100127
Bundle-Version: 2.6.1.qualifier
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
net.bioclipse.structuredb,
Expand Down
Expand Up @@ -15,7 +15,6 @@

import org.openscience.cdk.AtomContainer;
import org.openscience.cdk.ChemObject;
import org.openscience.cdk.Molecule;
import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.io.MDLReader;

Expand All @@ -42,7 +41,7 @@ public static AtomContainer getCycloOctan() throws CDKException {
public static AtomContainer readFromFile(String path) throws CDKException {
InputStream ins = TestData.class.getClassLoader().getResourceAsStream(path);
MDLReader reader = new MDLReader(ins);
return (AtomContainer) reader.read( (ChemObject)new Molecule() );
return (AtomContainer) reader.read( (ChemObject) new AtomContainer() );
}

public static String getTestSDFFilePath() {
Expand Down
2 changes: 1 addition & 1 deletion plugins/net.bioclipse.structuredb/META-INF/MANIFEST.MF
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Structuredb Plug-in
Bundle-SymbolicName: net.bioclipse.structuredb; singleton:=true
Bundle-Version: 2.2.0.v20100127
Bundle-Version: 2.6.1.qualifier
Bundle-Activator: net.bioclipse.structuredb.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
Expand Down
Expand Up @@ -54,6 +54,12 @@ public int getNumberOfMolecules() {
return numberOfMolecules;
}

@Override
public boolean isDirty( int index ) {

// TODO Auto-generated method stub
return false;
}
public void markDirty( int index, ICDKMolecule moleculeToSave ) {

// TODO Implement this method
Expand Down
Expand Up @@ -41,7 +41,6 @@
import org.openscience.cdk.interfaces.IAtomContainer;
import org.openscience.cdk.interfaces.IBond;
import org.openscience.cdk.interfaces.IChemFile;
import org.openscience.cdk.interfaces.IMolecule;
import org.openscience.cdk.io.CMLReader;
import org.openscience.cdk.io.CMLWriter;
import org.openscience.cdk.smiles.SmilesGenerator;
Expand Down Expand Up @@ -84,7 +83,7 @@ public DBMolecule( String name, AtomContainer molecule ) {

Fingerprinter fingerprinter = new Fingerprinter();
try {
fingerPrint = fingerprinter.getFingerprint(molecule);
fingerPrint = fingerprinter.getBitFingerprint(molecule).asBitSet();
persistedFingerPrint = makePersistedFingerPrint(fingerPrint);
} catch (Exception e) {
//If this happens often maybe something else is needed
Expand Down Expand Up @@ -208,10 +207,10 @@ private BitSet makeFingerPrint(byte[] persistedFingerPrint) {
}

public String toSMILES() {
if ( "".equals( smiles ) && atomContainer instanceof IMolecule ) {
if ( "".equals( smiles ) && atomContainer instanceof IAtomContainer ) {
if (atomContainer.getAtomCount() < 100) {
SmilesGenerator sg = new SmilesGenerator();
smiles = sg.createSMILES( (IMolecule)atomContainer );
smiles = sg.createSMILES( atomContainer );
}
else {
logger.warn( "Not generating SMILES. " +
Expand Down Expand Up @@ -367,7 +366,7 @@ public BitSet getFingerprint(net.bioclipse.core.domain.IMolecule.Property
if (urgency == net.bioclipse.core.domain.IMolecule.Property.USE_CALCULATED) {
Fingerprinter fp = new Fingerprinter();
try {
fingerPrint = fp.getFingerprint( getAtomContainer() );
fingerPrint = fp.getBitFingerprint( getAtomContainer() ).asBitSet();
}
catch (Exception e) {
throw new BioclipseException(
Expand Down

0 comments on commit cd380e3

Please sign in to comment.