Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Renamed and cleand up SmartsMatcher and result model.

  • Loading branch information...
commit dde3f68783f63977305f34b79c8d387a6add96de 1 parent 2b8fced
@olas authored
View
4 plugins/net.bioclipse.ds.common/src/net/bioclipse/ds/matcher/SmartsInclExclMatcher.java
@@ -35,7 +35,7 @@
import net.bioclipse.ds.model.IDSTest;
import net.bioclipse.ds.model.ITestResult;
import net.bioclipse.ds.model.result.SimpleResult;
-import net.bioclipse.ds.model.result.SmartsMatch;
+import net.bioclipse.ds.model.result.StructuralAlertsMatch;
/**
@@ -308,7 +308,7 @@ public String toString() {
}
//Toxicophores are by definition positive
- SmartsMatch match=new SmartsMatch(
+ StructuralAlertsMatch match=new StructuralAlertsMatch(
smartName, ITestResult.POSITIVE);
match.setAtomNumbers( matchingAtoms );
match.setSmartsString( inclSmart + " ; " + exclSmart );
View
19 plugins/net.bioclipse.ds.common/src/net/bioclipse/ds/matcher/SmartsMatcher.java
@@ -36,7 +36,7 @@
import net.bioclipse.ds.model.IDSTest;
import net.bioclipse.ds.model.ITestResult;
import net.bioclipse.ds.model.result.SimpleResult;
-import net.bioclipse.ds.model.result.SmartsMatch;
+import net.bioclipse.ds.model.result.StructuralAlertsMatch;
/**
@@ -55,15 +55,6 @@
Map<String, String> smarts; //Smarts string -> Smarts Name
/**
- * The required parameters in the manifest of contributed test. Default
- * impl is empty, subclasses may override.
- * @return
- */
- List<String> getRequiredParameters(){
- return new ArrayList<String>();
- }
-
- /**
* Verify parameters, read/parse SDF file into model, and verify properties
* @param monitor
* @throws DSException
@@ -85,7 +76,8 @@ public void initialize(IProgressMonitor monitor) throws DSException {
//Verify parameters
//=================
- //All SDFile implementations require the 'file' parameter (resource)
+ //This implementations requires the 'file' parameter (resource)
+ //pointing to a file of SMARTS
String filepath=getParameters().get( FILE_PROPERTY_PARAM );
if (filepath==null)
throw new DSException("Required parameter '" + FILE_PROPERTY_PARAM
@@ -96,7 +88,8 @@ public void initialize(IProgressMonitor monitor) throws DSException {
String path="";
try {
- logger.debug("Trying to locate file: " + filepath + " from plugin: " + getPluginID());
+ logger.debug("Trying to locate file: " + filepath + " from plugin: "
+ + getPluginID());
URL url = Platform.getBundle(getPluginID()).getEntry(filepath);
logger.debug("File has URL: " + url);
URL fileURL = FileLocator.toFileURL(url);
@@ -246,7 +239,7 @@ private boolean isValidSmarts( String smarts ) {
}
//Toxicophores are by definition positive
- SmartsMatch match=new SmartsMatch(
+ StructuralAlertsMatch match=new StructuralAlertsMatch(
smartsName, ITestResult.POSITIVE);
for (int aindex : matchingAtoms){
match.putAtomResult( aindex, ITestResult.POSITIVE );
View
6 plugins/net.bioclipse.ds.ui/src/net/bioclipse/ds/ui/report/SmartsMatchReportModel.java
@@ -19,7 +19,7 @@
import net.bioclipse.core.business.BioclipseException;
import net.bioclipse.ds.model.ITestResult;
import net.bioclipse.ds.model.TestRun;
-import net.bioclipse.ds.model.result.SmartsMatch;
+import net.bioclipse.ds.model.result.StructuralAlertsMatch;
import net.bioclipse.ds.report.AbstractTestReportModel;
import net.bioclipse.ds.report.DSRow;
import net.bioclipse.ds.report.StatusHelper;
@@ -42,8 +42,8 @@ public SmartsMatchReportModel() {
for (int i=0; i<run.getMatches().size(); i++){
ITestResult match = run.getMatches().get( i );
- if ( match instanceof SmartsMatch ) {
- SmartsMatch extmolmatch = (SmartsMatch) match;
+ if ( match instanceof StructuralAlertsMatch ) {
+ StructuralAlertsMatch extmolmatch = (StructuralAlertsMatch) match;
Map<String, String> params=new HashMap<String, String>();
params.put("name", match.getName());
View
6 ...rc/net/bioclipse/ds/model/result/SmartsMatch.java → ...clipse/ds/model/result/StructuralAlertsMatch.java
@@ -12,13 +12,13 @@
/**
- * A result that also holds a SMARTS string
+ * A result that also holds a Structural Alerts string (E.g. SMARTS)
* @author ola
*
*/
-public class SmartsMatch extends PosNegIncMatch{
+public class StructuralAlertsMatch extends PosNegIncMatch{
- public SmartsMatch(String name, int resultStatus) {
+ public StructuralAlertsMatch(String name, int resultStatus) {
super( name, resultStatus );
}
Please sign in to comment.
Something went wrong with that request. Please try again.