Commit a1c66bb2 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

fields must be private

parent 02e95e8b
......@@ -20,7 +20,7 @@ public class CdPluginFunctions {
@Rule
public UnitTestFailedWatcher unitTestFailedWatcher = new UnitTestFailedWatcher();
String rdfString = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:dcterms=\"http://purl.org/dc/terms/\" xmlns:vCard=\"http://www.w3.org/2001/vcard-rdf/3.0#\" xmlns:bqbiol=\"http://biomodels.net/biology-qualifiers/\" xmlns:bqmodel=\"http://biomodels.net/model-qualifiers/\">\n"
private String rdfString = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:dcterms=\"http://purl.org/dc/terms/\" xmlns:vCard=\"http://www.w3.org/2001/vcard-rdf/3.0#\" xmlns:bqbiol=\"http://biomodels.net/biology-qualifiers/\" xmlns:bqmodel=\"http://biomodels.net/model-qualifiers/\">\n"
+ "<rdf:Description rdf:about=\"#s3\">\n"
+ "<bqmodel:is>\n"
+ "<rdf:Bag>\n"
......
......@@ -13,9 +13,9 @@ import lcsb.mapviewer.cdplugin.CdPluginFunctions;
import lcsb.mapviewer.common.SystemClipboard;
public class CopyActionTest extends CdPluginFunctions {
Logger logger = LogManager.getLogger();
private static Logger logger = LogManager.getLogger();
SystemClipboard cp = new SystemClipboard();
private SystemClipboard cp = new SystemClipboard();
@Test
public void testCopyFromSpecies() {
......
......@@ -19,7 +19,7 @@ import lcsb.mapviewer.model.map.MiriamRelationType;
import lcsb.mapviewer.model.map.MiriamType;
public class CopyPasteAbstractActionTest extends CdPluginFunctions {
Logger logger = LogManager.getLogger();
private static Logger logger = LogManager.getLogger();
@Before
public void setUp() throws Exception {
......
......@@ -15,7 +15,7 @@ import lcsb.mapviewer.common.SystemClipboard;
public class CopyPastePluginTest extends CdPluginFunctions {
SystemClipboard cp = new SystemClipboard();
private SystemClipboard cp = new SystemClipboard();
@Test
public void testConstructor() {
......
......@@ -17,7 +17,7 @@ import lcsb.mapviewer.common.SystemClipboard;
public class PasteActionTest extends CdPluginFunctions {
SystemClipboard cp = new SystemClipboard();
private SystemClipboard cp = new SystemClipboard();
@Test
public void testPerformAnnotationOnSpecies() {
......
......@@ -14,7 +14,7 @@ import jp.sbi.celldesigner.plugin.PluginSpeciesAlias;
import lcsb.mapviewer.cdplugin.CdPluginFunctions;
public class InfoFrameTest extends CdPluginFunctions {
Logger logger = LogManager.getLogger();
private static Logger logger = LogManager.getLogger();
@Test
public void testSetEmptySpeciesList() {
......
......@@ -14,7 +14,7 @@ import lcsb.mapviewer.cdplugin.CdPluginFunctions;
public class InfoPluginTest extends CdPluginFunctions {
Logger logger = LogManager.getLogger();
private static Logger logger = LogManager.getLogger();
@Test
public void testConstructor() {
......
......@@ -43,7 +43,7 @@ public final class MiriamConnector extends CachableInterface implements IExterna
*/
private Logger logger = LogManager.getLogger();
XmlAnnotationParser xap = new XmlAnnotationParser();
private XmlAnnotationParser xap = new XmlAnnotationParser();
/**
* Default class constructor. Prevent initialization.
......
......@@ -9,16 +9,16 @@ import lcsb.mapviewer.model.map.species.field.Structure;
*
*/
public class PdbBestMappingEntry {
public String chainId;
public String experimentalMethod;
public String pdbId;
public int start;
public int end;
public int unpEnd;
public double coverage;
public int unpStart;
public double resolution;
public int taxId;
private String chainId;
private String experimentalMethod;
private String pdbId;
private int start;
private int end;
private int unpEnd;
private double coverage;
private int unpStart;
private double resolution;
private int taxId;
public Structure convertToStructure() {
......
......@@ -44,7 +44,7 @@ public class ChemicalParser {
private ChemicalEntityDtoConverter chemicalEntityDtoConverter;
ObjectMapper objectMapper = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,
private ObjectMapper objectMapper = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,
false);
@Autowired
......
......@@ -46,7 +46,7 @@ public class DrugBankParser extends DrugAnnotation implements IExternalService {
private ChemicalEntityDtoConverter chemicalEntityDtoConverter;
ObjectMapper objectMapper = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,
private ObjectMapper objectMapper = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,
false);
@Autowired
......
package lcsb.mapviewer.annotation.services.dapi.dto;
public class DapiDatabase {
public String name;
private String name;
public DapiDatabase(final String name) {
this.name = name;
}
public String getName() {
return name;
}
}
......@@ -18,9 +18,9 @@ import lcsb.mapviewer.model.cache.CacheType;
public class ApplicationLevelCacheTest extends AnnotationTestFunctions {
Logger logger = LogManager.getLogger();
private static Logger logger = LogManager.getLogger();
boolean status;
private boolean status;
@Before
public void setUp() throws Exception {
......
......@@ -42,15 +42,15 @@ import lcsb.mapviewer.persist.dao.cache.BigFileEntryDao;
public class BigFileCacheTest extends AnnotationTestFunctions {
Logger logger = LogManager.getLogger();
private static Logger logger = LogManager.getLogger();
String ftpUrl = "ftp://ftp.informatik.rwth-aachen.de/README";
String ftpUrlPartContent = "Welcome";
private String ftpUrl = "ftp://ftp.informatik.rwth-aachen.de/README";
private String ftpUrlPartContent = "Welcome";
String httpUrl = "https://www.google.pl/humans.txt";
private String httpUrl = "https://www.google.pl/humans.txt";
@Autowired
BigFileCache bigFileCache;
private BigFileCache bigFileCache;
@Before
public void setUp() throws Exception {
......
......@@ -22,7 +22,7 @@ import lcsb.mapviewer.model.cache.CacheType;
import lcsb.mapviewer.persist.dao.cache.CacheTypeDao;
public class CachableInterfaceTest extends AnnotationTestFunctions {
Logger logger = LogManager.getLogger();
private static Logger logger = LogManager.getLogger();
@Autowired
private List<CachableInterface> interfaces;
......
......@@ -19,12 +19,12 @@ import lcsb.mapviewer.common.exception.InvalidArgumentException;
import lcsb.mapviewer.model.cache.CacheType;
public class GeneralCacheTest extends AnnotationTestFunctions {
Logger logger = LogManager.getLogger();
private static Logger logger = LogManager.getLogger();
GeneralCache cache = new GeneralCache(null);
private GeneralCache cache = new GeneralCache(null);
@Autowired
PermanentDatabaseLevelCacheInterface databaseLevelCache;
private PermanentDatabaseLevelCacheInterface databaseLevelCache;
@AfterClass
public static void tearDownAfterClass() throws Exception {
......
......@@ -16,7 +16,7 @@ import lcsb.mapviewer.common.exception.InvalidArgumentException;
import lcsb.mapviewer.model.cache.CacheType;
public class GeneralCacheWithExclusionTest extends AnnotationTestFunctions {
Logger logger = LogManager.getLogger();
private static Logger logger = LogManager.getLogger();
@AfterClass
public static void tearDownAfterClass() throws Exception {
......
......@@ -9,8 +9,8 @@ package lcsb.mapviewer.annotation.cache;
*/
public final class MockCacheInterface extends CachableInterface {
public static RuntimeException exceptionToThrow = null;
public static Error errorToThrow;
protected static RuntimeException exceptionToThrow = null;
protected static Error errorToThrow;
/**
* Defsault constructor.
......
......@@ -33,7 +33,7 @@ import lcsb.mapviewer.persist.dao.cache.CacheQueryDao;
@Rollback(true)
public class PermanentDatabaseLevelCacheTest extends AnnotationTestFunctions {
Logger logger = LogManager.getLogger();
private static Logger logger = LogManager.getLogger();
@Autowired
private PermanentDatabaseLevelCacheInterface permanentDatabaseLevelCache;
......
......@@ -43,7 +43,7 @@ import lcsb.mapviewer.model.map.MiriamRelationType;
import lcsb.mapviewer.model.map.MiriamType;
public class ChEMBLParserTest extends AnnotationTestFunctions {
Logger logger = LogManager.getLogger();
private static Logger logger = LogManager.getLogger();
@Autowired
private GeneralCacheInterface cache;
......
......@@ -17,7 +17,7 @@ import lcsb.mapviewer.annotation.services.dapi.DrugBankParser;
@ActiveProfiles("drugBankTestProfile")
public class DrugAnnotationTest extends AnnotationTestFunctions {
Logger logger = LogManager.getLogger();
private static Logger logger = LogManager.getLogger();
@Autowired
private DrugBankParser drugBankParser;
......
......@@ -30,7 +30,7 @@ import lcsb.mapviewer.model.map.MiriamData;
import lcsb.mapviewer.model.map.MiriamType;
public class MeSHParserTest extends AnnotationTestFunctions {
Logger logger = LogManager.getLogger();
private static Logger logger = LogManager.getLogger();
@Autowired
private MeSHParser meshParser;
......
......@@ -35,7 +35,7 @@ import lcsb.mapviewer.persist.dao.ProjectDao;
import lcsb.mapviewer.persist.dao.user.UserDao;
public class MiRNAParserTest extends AnnotationTestFunctions {
Logger logger = LogManager.getLogger();
private static Logger logger = LogManager.getLogger();
@Autowired
protected ProjectDao projectDao;
......
......@@ -30,12 +30,12 @@ import lcsb.mapviewer.model.map.MiriamRelationType;
import lcsb.mapviewer.model.map.MiriamType;
public class MiriamConnectorTest extends AnnotationTestFunctions {
Logger logger = LogManager.getLogger();
private static Logger logger = LogManager.getLogger();
@Autowired
MiriamConnector miriamConnector;
private MiriamConnector miriamConnector;
GeneralCacheInterface cache;
private GeneralCacheInterface cache;
@Before
public void setUp() throws Exception {
......
......@@ -44,8 +44,8 @@ import lcsb.mapviewer.model.user.UserClassAnnotators;
import lcsb.mapviewer.persist.dao.map.ModelDao;
public class ModelAnnotatorTest extends AnnotationTestFunctions {
Logger logger = LogManager.getLogger();
IProgressUpdater updater = new IProgressUpdater() {
private static Logger logger = LogManager.getLogger();
private IProgressUpdater updater = new IProgressUpdater() {
@Override
public void setProgress(final double progress) {
}
......
......@@ -35,9 +35,9 @@ import lcsb.mapviewer.model.Article;
public class PubmedParserTest extends AnnotationTestFunctions {
@Autowired
protected PermanentDatabaseLevelCacheInterface permanentDatabaseLevelCacheInterface;
Logger logger = LogManager.getLogger();
private static Logger logger = LogManager.getLogger();
@Autowired
PubmedParser pubmedParser;
private PubmedParser pubmedParser;
private boolean status2;
@Autowired
private GeneralCacheInterface cache;
......
......@@ -25,10 +25,10 @@ import lcsb.mapviewer.model.map.MiriamData;
import lcsb.mapviewer.model.map.MiriamType;
public class TaxonomyBackendTest extends AnnotationTestFunctions {
Logger logger = LogManager.getLogger();
private static Logger logger = LogManager.getLogger();
@Autowired
TaxonomyBackend taxonomyBackend;
private TaxonomyBackend taxonomyBackend;
@Autowired
private GeneralCacheInterface cache;
......
......@@ -26,12 +26,12 @@ import lcsb.mapviewer.model.map.species.GenericProtein;
import lcsb.mapviewer.model.map.species.Species;
public class BrendaAnnotatorTest extends AnnotationTestFunctions {
Logger logger = LogManager.getLogger();
private static Logger logger = LogManager.getLogger();
@Autowired
BrendaAnnotator brendaAnnotator;
private BrendaAnnotator brendaAnnotator;
@Autowired
UniprotAnnotator uniprotAnnotator;
private UniprotAnnotator uniprotAnnotator;
@Before
public void setUp() throws Exception {
......
......@@ -28,7 +28,7 @@ import lcsb.mapviewer.model.map.species.Species;
public class CazyAnnotatorTest extends AnnotationTestFunctions {
@Autowired
CazyAnnotator cazyAnnotator;
private CazyAnnotator cazyAnnotator;
@Before
public void setUp() throws Exception {
......
......@@ -41,10 +41,10 @@ import uk.ac.ebi.chebi.webapps.chebiWS.model.OntologyDataItem;
import uk.ac.ebi.chebi.webapps.chebiWS.model.SearchCategory;
public class ChebiAnnotatorTest extends AnnotationTestFunctions {
static Logger logger = LogManager.getLogger();
private static Logger logger = LogManager.getLogger();
@Autowired
ChebiAnnotator backend;
private ChebiAnnotator backend;
@Autowired
private GeneralCacheInterface cache;
......
......@@ -39,17 +39,22 @@ import lcsb.mapviewer.persist.DbUtils;
@RunWith(Parameterized.class)
public class ElementAnnotatorImplementationsTest extends AnnotationTestFunctions {
static AnnotationConfigApplicationContext applicationContext;
private static AnnotationConfigApplicationContext applicationContext;
@SuppressWarnings("unused")
private static Logger logger = LogManager.getLogger();
@Parameter
public String testName;
private String testName;
@Parameter(1)
public Class<? extends ElementAnnotator> elementAnnotator;
private Class<? extends ElementAnnotator> elementAnnotator;
@Parameter(2)
public MiriamData sourceIdentifier;
private MiriamData sourceIdentifier;
@Parameter(3)
public BioEntity bioEntity;
private BioEntity bioEntity;
@AfterClass
public static void shutDown() {
......
......@@ -32,10 +32,10 @@ import lcsb.mapviewer.model.user.annotator.BioEntityField;
public class ElementAnnotatorTest extends AnnotationTestFunctions {
static AnnotatorData allOutputFieldsAndAnnotations = new AnnotatorData(Object.class);
ElementAnnotator annotator = Mockito.mock(ElementAnnotator.class, Mockito.CALLS_REAL_METHODS);
private static AnnotatorData allOutputFieldsAndAnnotations = new AnnotatorData(Object.class);
private ElementAnnotator annotator = Mockito.mock(ElementAnnotator.class, Mockito.CALLS_REAL_METHODS);
@Autowired
HgncAnnotator autowiredAnnotator;
private HgncAnnotator autowiredAnnotator;
{
for (final BioEntityField field : BioEntityField.values()) {
......
......@@ -29,7 +29,7 @@ import lcsb.mapviewer.model.map.species.Species;
public class EnsemblAnnotatorTest extends AnnotationTestFunctions {
@Autowired
EnsemblAnnotator ensemblAnnotator;
private EnsemblAnnotator ensemblAnnotator;
@Before
public void setUp() throws Exception {
......
......@@ -34,7 +34,7 @@ import lcsb.mapviewer.model.map.species.Species;
public class EntrezAnnotatorTest extends AnnotationTestFunctions {
@Autowired
EntrezAnnotator entrezAnnotator;
private EntrezAnnotator entrezAnnotator;
@Before
public void setUp() throws Exception {
......
......@@ -32,10 +32,10 @@ import lcsb.mapviewer.model.map.MiriamType;
import lcsb.mapviewer.model.map.compartment.Compartment;
public class GoAnnotatorTest extends AnnotationTestFunctions {
Logger logger = LogManager.getLogger();
private static Logger logger = LogManager.getLogger();
@Autowired
GoAnnotator goAnnotator;
private GoAnnotator goAnnotator;
@Autowired
private PermanentDatabaseLevelCacheInterface permanentDatabaseLevelCache;
......
......@@ -31,7 +31,7 @@ import lcsb.mapviewer.model.map.species.Species;
public class HgncAnnotatorTest extends AnnotationTestFunctions {
final Logger logger = LogManager.getLogger();
private final Logger logger = LogManager.getLogger();
@Autowired
private HgncAnnotator hgncAnnotator;
......
......@@ -34,9 +34,9 @@ import lcsb.mapviewer.model.user.annotator.AnnotatorData;
public class KeggAnnotatorTest extends AnnotationTestFunctions {
@Autowired
KeggAnnotator keggAnnotator;
private KeggAnnotator keggAnnotator;
@Autowired
UniprotAnnotator uniprotAnnotator;
private UniprotAnnotator uniprotAnnotator;
@Before
public void setUp() throws Exception {
......
......@@ -16,13 +16,13 @@ import lcsb.mapviewer.model.map.species.Species;
public class MultipleAnnotatorsTest extends AnnotationTestFunctions {
@Autowired
KeggAnnotator keggAnnotator;
private KeggAnnotator keggAnnotator;
@Autowired
UniprotAnnotator uniprotAnnotator;
private UniprotAnnotator uniprotAnnotator;
@Autowired
HgncAnnotator hgncAnnotator;
private HgncAnnotator hgncAnnotator;
@Before
public void setUp() throws Exception {
......
......@@ -29,10 +29,10 @@ import lcsb.mapviewer.model.map.species.field.UniprotRecord;
public class PdbAnnotatorTest extends AnnotationTestFunctions {
@Autowired
PdbAnnotator pdbAnnotator;
private PdbAnnotator pdbAnnotator;
@Autowired
UniprotAnnotator uniprotAnnotator;
private UniprotAnnotator uniprotAnnotator;
@Before
public void setUp() throws Exception {
......
......@@ -30,9 +30,9 @@ import lcsb.mapviewer.model.map.species.SimpleMolecule;
import lcsb.mapviewer.model.map.species.Species;
public class ReconAnnotatorTest extends AnnotationTestFunctions {
Logger logger = LogManager.getLogger();
private static Logger logger = LogManager.getLogger();
@Autowired
ReconAnnotator reconAnnotator;
private ReconAnnotator reconAnnotator;
@Before
public void setUp() throws Exception {
......
......@@ -17,7 +17,7 @@ import lcsb.mapviewer.model.map.species.Species;
public class StitchAnnotatorTest extends AnnotationTestFunctions {
@Autowired
StitchAnnotator testedAnnotator;
private StitchAnnotator testedAnnotator;
@Before
public void setUp() throws Exception {
......
......@@ -17,7 +17,7 @@ import lcsb.mapviewer.model.map.species.Species;
public class StringAnnotatorTest extends AnnotationTestFunctions {
@Autowired