cleanup
authorAndreas Müller <a.mueller@bgbm.org>
Wed, 18 Dec 2019 10:57:07 +0000 (11:57 +0100)
committerAndreas Müller <a.mueller@bgbm.org>
Wed, 18 Dec 2019 10:57:07 +0000 (11:57 +0100)
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IService.java
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/ITermTreeService.java
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IVersionableService.java
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/longrunningService/LongRunningTasksService.java
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/util/AbstractRelationshipEdge.java
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/util/CacheUpdater.java
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/util/CacheUpdaterWithNewCacheStrategy.java
cdmlib-services/src/test/java/eu/etaxonomy/cdm/api/service/molecular/AmplificationServiceTest.java
cdmlib-services/src/test/java/eu/etaxonomy/cdm/api/service/taxonGraph/TaxonGraphHibernateListenerTest.java
cdmlib-test/src/main/java/eu/etaxonomy/cdm/test/integration/CdmTransactionalIntegrationTestExample.java

index d9440324cd1420467f7561532fd1096dad77fc67..019f02fd4c4f98b82528f470c211723a602cbaf4 100644 (file)
@@ -199,7 +199,7 @@ public interface IService<T extends ICdmBase>{
 \r
     /**\r
      * Returns a list of entities of type <T> optionally restricted\r
-     * to objects belonging to a class that that extends <T>\r
+     * to objects belonging to a class that extends <T>\r
      *\r
      * @param type  The type of entities to return (can be null to count all entities of type <T>)\r
      * @param limit The maximum number of objects returned (can be null for all matching objects)\r
index ce9625028643dc2edd1eb6643bd4cc18352c3183..e3ffbcdc7d831804aa987689a8e80877f7bad771 100644 (file)
@@ -9,7 +9,6 @@
 
 package eu.etaxonomy.cdm.api.service;
 
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
@@ -20,7 +19,6 @@ import eu.etaxonomy.cdm.model.term.TermNode;
 import eu.etaxonomy.cdm.model.term.TermTree;
 import eu.etaxonomy.cdm.model.term.TermType;
 import eu.etaxonomy.cdm.persistence.dao.common.Restriction;
-import eu.etaxonomy.cdm.persistence.dao.common.Restriction.Operator;
 import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.cdm.persistence.query.OrderHint;
 
@@ -48,5 +46,5 @@ public interface ITermTreeService extends IIdentifiableEntityService<TermTree> {
        public <S extends TermTree> List<UuidAndTitleCache<S>> getUuidAndTitleCacheByTermType(
                Class<S> clazz, TermType termType, Integer limit, String pattern);
 
-    List<Restriction<?>> buildTermTypeFilterRestrictions(TermType termType);
+    public List<Restriction<?>> buildTermTypeFilterRestrictions(TermType termType);
 }
index 0d67d83c0bbf9d905267bee8d71bfe77efc13971..548f03a04a57f07c82027bc47d5a76b874dcd819 100644 (file)
@@ -21,7 +21,8 @@ import eu.etaxonomy.cdm.model.view.AuditEvent;
 import eu.etaxonomy.cdm.model.view.AuditEventRecord;
 import eu.etaxonomy.cdm.persistence.dao.common.AuditEventSort;
 
-public interface IVersionableService<T extends VersionableEntity> extends IService<T> {
+public interface IVersionableService<T extends VersionableEntity>
+        extends IService<T> {
 
        /**
         * Returns a paged list of audit events (in order) which affected the state of an entity t.
index e61011a9a178762d8782db2608933191def15cd9..f9764bfbcc6759e832a8b869a09f72f2926d3381 100755 (executable)
@@ -46,19 +46,19 @@ import eu.etaxonomy.cdm.persistence.dto.SpecimenNodeWrapper;
 public class LongRunningTasksService implements ILongRunningTasksService{
 
     @Autowired
-    ITaxonNodeService taxonNodeService;
+    private ITaxonNodeService taxonNodeService;
 
     @Autowired
-    IDescriptiveDataSetService descriptiveDataSetService;
+    private IDescriptiveDataSetService descriptiveDataSetService;
 
     @Autowired
-    IProgressMonitorService progressMonitorService;
+    private IProgressMonitorService progressMonitorService;
 
     @Autowired
-    CacheUpdater updater;
+    private CacheUpdater updater;
 
     @Autowired
-    SortIndexUpdaterWrapper sortIndexUpdater;
+    private SortIndexUpdaterWrapper sortIndexUpdater;
 
     @Autowired
     @Qualifier("cdmRepository")
@@ -119,7 +119,6 @@ public class LongRunningTasksService implements ILongRunningTasksService{
                 }
                 monitor.setResult(updateResult);
                 return updateResult;
-
             }
         };
         UUID uuid = progressMonitorService.registerNewRemotingMonitor(monitorThread);
@@ -154,10 +153,9 @@ public class LongRunningTasksService implements ILongRunningTasksService{
         RemotingProgressMonitorThread monitorThread = new RemotingProgressMonitorThread() {
             @Override
             public Serializable doRun(IRemotingProgressMonitor monitor) {
-                UpdateResult result;
                 config.setMonitor(monitor);
 
-                result = updateData(config);
+                UpdateResult result = updateData(config);
                 for(Exception e : result.getExceptions()) {
                     monitor.addReport(e.getMessage());
                 }
@@ -230,10 +228,9 @@ public class LongRunningTasksService implements ILongRunningTasksService{
         RemotingProgressMonitorThread monitorThread = new RemotingProgressMonitorThread() {
             @Override
             public Serializable doRun(IRemotingProgressMonitor monitor) {
-                UpdateResult result;
-                configurator.setMonitor(monitor);
 
-                result = sortIndexUpdater.doInvoke(configurator);
+                configurator.setMonitor(monitor);
+                UpdateResult result = sortIndexUpdater.doInvoke(configurator);
 
                 for(Exception e : result.getExceptions()) {
                     monitor.addReport(e.getMessage());
@@ -247,5 +244,4 @@ public class LongRunningTasksService implements ILongRunningTasksService{
         monitorThread.start();
         return uuid;
     }
-
 }
index 46a8a048ebc4568f5654d66c66cc019cc61e47f9..d621198548ff8e738070f231c14aeb9ea763ed8d 100644 (file)
@@ -1,3 +1,11 @@
+/**
+* Copyright (C) 2016 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
 package eu.etaxonomy.cdm.api.service.util;
 
 import java.util.Arrays;
@@ -5,8 +13,8 @@ import java.util.EnumSet;
 import java.util.HashSet;
 import java.util.Set;
 
-import eu.etaxonomy.cdm.model.common.RelationshipTermBase;
 import eu.etaxonomy.cdm.model.common.RelationshipBase.Direction;
+import eu.etaxonomy.cdm.model.common.RelationshipTermBase;
 
 /**
  * Holds a RelationshipType ({@link RelationshipTermBase}) of type {@code <T>}
@@ -20,7 +28,6 @@ import eu.etaxonomy.cdm.model.common.RelationshipBase.Direction;
  * @author a.kohlbecker
  * @since Dec 7, 2012
  *
- *
  * @param <T> a sub class of ({@link RelationshipTermBase})
  */
 public class AbstractRelationshipEdge<T extends RelationshipTermBase> {
@@ -102,6 +109,4 @@ public class AbstractRelationshipEdge<T extends RelationshipTermBase> {
     public boolean isBidirectional() {
         return directions.equals(EnumSet.allOf(Direction.class));
     }
-
-
 }
index 4bda91ea706f6d846b673eeeaf0e34454e68bf42..ca1c8c3c2f998322182d8194d8f1ab0af00ecab7 100644 (file)
@@ -1,3 +1,11 @@
+/**
+* Copyright (C) 2016 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
 package eu.etaxonomy.cdm.api.service.util;
 
 import java.io.Serializable;
@@ -49,33 +57,24 @@ import eu.etaxonomy.cdm.model.term.TermVocabulary;
 public class CacheUpdater implements Serializable {
 
     private static final long serialVersionUID = -1410600568024821771L;
-
     private static final Logger logger = Logger.getLogger(CacheUpdater.class);
 
     @Autowired
     protected INameService nameService;
-
     @Autowired
     protected ITaxonService taxonService;
-
     @Autowired
     protected  IClassificationService classificationService;
-
     @Autowired
     protected IReferenceService referenceService;
-
     @Autowired
     protected IAgentService agentService;
-
-
     @Autowired
     protected IOccurrenceService occurrenceService;
-
     @Autowired
     protected ITermService termService;
     @Autowired
     protected IDescriptionService descriptionService;
-
     @Autowired
     protected ICollectionService collectionService;
     @Autowired
@@ -83,7 +82,6 @@ public class CacheUpdater implements Serializable {
 
     @Autowired
     protected IVocabularyService vocabularyService;
-
     @Autowired
     protected IPolytomousKeyService polytomousKeyService;
     @Autowired
index 487013cdfbb6605e577e1c050fdd5644e26ce18e..e8aa521602e7b8371e4aca10110ea33eef0e12df 100644 (file)
@@ -1,3 +1,11 @@
+/**
+* Copyright (C) 2016 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
 package eu.etaxonomy.cdm.api.service.util;
 
 import org.apache.log4j.Logger;
@@ -24,7 +32,6 @@ public class CacheUpdaterWithNewCacheStrategy extends CacheUpdater {
     private static final long serialVersionUID = 7667521864001167289L;
     private static final Logger logger = Logger.getLogger(CacheUpdaterWithNewCacheStrategy.class);
 
-
        private boolean handleSingleTableClass(Class<? extends IdentifiableEntity> clazz) {
                logger.warn("Updating class " + clazz.getSimpleName() + " ...");
                try {
index f91839f529035f04c95edcb61169cf1664355752..7f5f70f4b128d50df078d13827484cc96f57799a 100644 (file)
@@ -19,28 +19,20 @@ import eu.etaxonomy.cdm.test.integration.CdmTransactionalIntegrationTest;
 /**
  * @author pplitzner
  * @since 31.03.2014
- *
  */
-public class AmplificationServiceTest  extends CdmTransactionalIntegrationTest {
+public class AmplificationServiceTest extends CdmTransactionalIntegrationTest {
+
     @SuppressWarnings("unused")
        private static final Logger logger = Logger.getLogger(AmplificationServiceTest.class);
 
     @SpringBeanByType
     private IAmplificationService amplificationService;
 
-
     @Test
     public void testNothingTest(){
        //dummy as min 1 Test is required
     }
 
-
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.cdm.test.integration.CdmIntegrationTest#createTestData()
-     */
     @Override
-    public void createTestDataSet() throws FileNotFoundException {
-        // TODO Auto-generated method stub
-        
-    }
-}
+    public void createTestDataSet() throws FileNotFoundException {}
+}
\ No newline at end of file
index a13ba1557f2f3daf88c74d80b2586df719ae79ea..07ebd156c2444fca218805337129f57ecde70cd6 100644 (file)
@@ -47,7 +47,6 @@ import eu.etaxonomy.cdm.test.unitils.CleanSweepInsertLoadStrategy;
 /**
  * @author a.kohlbecker
  * @since Oct 1, 2018
- *
  */
 public class TaxonGraphHibernateListenerTest extends CdmTransactionalIntegrationTestWithSecurity {
 
index f291212731167b032721fbe54c7d1a8bde52ae0d..a79e99d84272ce08dce5207c13adc55567d38b0a 100644 (file)
@@ -52,7 +52,7 @@ public class CdmTransactionalIntegrationTestExample extends CdmTransactionalInte
         europeanAbiesClassification.setUuid(UUID.fromString(CLASSIFICATION_UUID));
 //        classificationDao.save(europeanAbiesClassification);
 
-         Reference sec = ReferenceFactory.newBook();
+        Reference sec = ReferenceFactory.newBook();
         sec.setTitleCache("Kohlbecker, A., Testcase standart views, 2013", true);
         Reference sec_sensu = ReferenceFactory.newBook();
         sec_sensu.setTitleCache("Komarov, V. L., Flora SSSR 29", true);