Skip to content

Commit

Permalink
Override getNo2D. getNo3D, getNoStructures in ResourceTypeImpl.
Browse files Browse the repository at this point in the history
Also, deprecate addCalculatedProps() method.
  • Loading branch information
olas committed Mar 15, 2010
1 parent 878ff5c commit b159dad
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
Expand Up @@ -556,11 +556,18 @@ public void setName(String newName) {

/**
* <!-- begin-user-doc -->
* Override to return correct number of 2D
* <!-- end-user-doc -->
* @generated
*/
public int getNo2d() {
return no2d;

int cnt=0;
for (StructureType stype : getStructure()){
if (stype.isHas2d())
cnt++;
}
return cnt;
// return no2d;
}

/**
Expand Down Expand Up @@ -602,11 +609,17 @@ public boolean isSetNo2d() {

/**
* <!-- begin-user-doc -->
* Override to return correct number of 3D
* <!-- end-user-doc -->
* @generated
*/
public int getNo3d() {
return no3d;
int cnt=0;
for (StructureType stype : getStructure()){
if (stype.isHas3d())
cnt++;
}
return cnt;
// return no3d;
}

/**
Expand Down Expand Up @@ -649,10 +662,12 @@ public boolean isSetNo3d() {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getNoMols() {
return noMols;
if (getStructure()!=null)
return getStructure().size();
return 0;
// return noMols;
}

/**
Expand Down
Expand Up @@ -975,7 +975,7 @@ else if (diagnostic.getSeverity()== Diagnostic.ERROR){
//Calculate non-stored properties like num of mols, no2D etc
qsar=Activator.getDefault().getJavaQsarManager();
if (getQsarModel()!=null){
qsar.addCalculatedPropertiesToQsarModel(getQsarModel());
// qsar.addCalculatedPropertiesToQsarModel(getQsarModel());
logger.debug(" ## ## QSAREditor read model file successfully");
}else{
logger.error(" ## ## QSAREditor read model file FAILED");
Expand Down
Expand Up @@ -1673,6 +1673,7 @@ private String getStructureName( IResource resource, int molindex ) {
* Go through and add transient properties to EMF model, which are not
* stored in file.
*/
@Deprecated
public void addCalculatedPropertiesToQsarModel( QsarType qsarModel ) {

ICDKManager cdk = net.bioclipse.cdk.business.Activator.getDefault().getJavaCDKManager();
Expand Down

0 comments on commit b159dad

Please sign in to comment.