Changeset 658


Ignore:
Timestamp:
Apr 17, 2012, 8:42:04 AM (5 years ago)
Author:
rob.hooft@…
Message:
  • Simplify boolean expressions (checkstyle)
Location:
trunk/code/conceptwiki/imports/imports-chemspider/src/main/java/nl/nbic/conceptwiki/imports/chemspider
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/code/conceptwiki/imports/imports-chemspider/src/main/java/nl/nbic/conceptwiki/imports/chemspider/ChemSpiderImport.java

    r641 r658  
    136136                // otherwise the validation utility will tell you the concept is invalid
    137137                // because it has no pref label in the language.
    138                 if (lang.equals("en") == false && encounteredLanguages.add(lang)) {
     138                if (!lang.equals("en") && encounteredLanguages.add(lang)) {
    139139                    labels.add(new LabelImpl(LabelType.PREFERRED, text, new LanguageImpl(lang)));
    140140                } else {
    141141                    // check whether this syn is already a preferred label.
    142142                    // if so, do not add it as an alt
    143                     if (text.equals(entry.title) == false) {
     143                    if (!text.equals(entry.title)) {
    144144                        labels.add(new LabelImpl(LabelType.ALTERNATIVE, text, new LanguageImpl(lang)));
    145145                    }
  • trunk/code/conceptwiki/imports/imports-chemspider/src/main/java/nl/nbic/conceptwiki/imports/chemspider/ChemSpiderImportChembl.java

    r641 r658  
    112112                // if this is the first time for this concept that the language is encountered, set it as the preferred concept,
    113113                // otherwise the validation utility will tell you the concept is invalid because it has no pref label in the language.
    114                 if (lang.equals("en") == false && encounteredLanguages.add(lang)) {
     114                if (!lang.equals("en") && encounteredLanguages.add(lang)) {
    115115                    labels.add(new LabelImpl(LabelType.PREFERRED, text, new LanguageImpl(lang)));
    116116                } else {
    117117                    // check whether this syn is already a preferred label. if so, do not add it as an alt
    118                     if (text.equals(entry.title) == false) {
     118                    if (!text.equals(entry.title)) {
    119119                        labels.add(new LabelImpl(LabelType.ALTERNATIVE, text, new LanguageImpl(lang)));
    120120                    }
  • trunk/code/conceptwiki/imports/imports-chemspider/src/main/java/nl/nbic/conceptwiki/imports/chemspider/ChemSpiderImportDrugbank.java

    r641 r658  
    112112                // if this is the first time for this concept that the language is encountered, set it as the preferred concept,
    113113                // otherwise the validation utility will tell you the concept is invalid because it has no pref label in the language.
    114                 if (lang.equals("en") == false && encounteredLanguages.add(lang)) {
     114                if (!lang.equals("en") && encounteredLanguages.add(lang)) {
    115115                    labels.add(new LabelImpl(LabelType.PREFERRED, text, new LanguageImpl(lang)));
    116116                } else {
    117117                    // check whether this syn is already a preferred label. if so, do not add it as an alt
    118                     if (text.equals(entry.title) == false) {
     118                    if (!text.equals(entry.title)) {
    119119                        labels.add(new LabelImpl(LabelType.ALTERNATIVE, text, new LanguageImpl(lang)));
    120120                    }
  • trunk/code/conceptwiki/imports/imports-chemspider/src/main/java/nl/nbic/conceptwiki/imports/chemspider/ChemSpiderImportMesh.java

    r655 r658  
    177177                // if this is the first time for this concept that the language is encountered, set it as the preferred concept,
    178178                // otherwise the validation utility will tell you the concept is invalid because it has no pref label in the language.
    179                 if (lang.equals("en") == false && encounteredLanguages.add(lang)) {
     179                if (!lang.equals("en") && encounteredLanguages.add(lang)) {
    180180                    labels.add(new LabelImpl(LabelType.PREFERRED, text, new LanguageImpl(lang)));
    181181                } else {
    182182                    // check whether this syn is already a preferred label. if so, do not add it as an alt
    183                     if (text.equals(entry.title) == false) {
     183                    if (!text.equals(entry.title)) {
    184184                        labels.add(new LabelImpl(LabelType.ALTERNATIVE, text, new LanguageImpl(lang)));
    185185                    }
  • trunk/code/conceptwiki/imports/imports-chemspider/src/main/java/nl/nbic/conceptwiki/imports/chemspider/ChemSpiderImportPdb.java

    r641 r658  
    112112                // if this is the first time for this concept that the language is encountered, set it as the preferred concept,
    113113                // otherwise the validation utility will tell you the concept is invalid because it has no pref label in the language.
    114                 if (lang.equals("en") == false && encounteredLanguages.add(lang)) {
     114                if (!lang.equals("en") && encounteredLanguages.add(lang)) {
    115115                    labels.add(new LabelImpl(LabelType.PREFERRED, text, new LanguageImpl(lang)));
    116116                } else {
    117117                    // check whether this syn is already a preferred label. if so, do not add it as an alt
    118                     if (text.equals(entry.title) == false) {
     118                    if (!text.equals(entry.title)) {
    119119                        labels.add(new LabelImpl(LabelType.ALTERNATIVE, text, new LanguageImpl(lang)));
    120120                    }
Note: See TracChangeset for help on using the changeset viewer.