Project

General

Profile

Revision ede5b774

IDede5b774cc3a78179e96d3bdd92c1af296cb45a3
Parent bb7eee99
Child 204aa9a6

Added by Andreas Müller over 4 years ago

cleanup

View differences:

cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/CdmIoBase.java
43 43
    private static final long serialVersionUID = -2216451655392574659L;
44 44
    private static final Logger logger = Logger.getLogger(CdmIoBase.class);
45 45

  
46
    private final Set<IIoObserver> observers = new HashSet<IIoObserver>();
46
    private final Set<IIoObserver> observers = new HashSet<>();
47 47
    protected String ioName = null;
48 48

  
49 49

  
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/SimpleImportConfiguratorBase.java
10 10

  
11 11
import eu.etaxonomy.cdm.database.ICdmDataSource;
12 12
import eu.etaxonomy.cdm.io.common.mapping.IInputTransformer;
13
import eu.etaxonomy.cdm.io.terms.RepresentationCsvImport;
14 13

  
15 14
/**
16 15
 * @author a.mueller
......
31 30
    }
32 31

  
33 32

  
34
    @Override
35
    @SuppressWarnings("unchecked")
36
    protected void makeIoClassList(){
37
        ioClassList = new Class[]{
38
            RepresentationCsvImport.class,
39
        };
40
    }
41

  
42 33
    /**
43 34
     * {@inheritDoc}
44 35
     */
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/dwca/in/CsvStream.java
83 83
			next = null;
84 84
			return resultItem;
85 85
		}else{
86
			resultMap = new HashMap<String, String>();
86
			resultMap = new HashMap<>();
87 87
			try {
88 88
				String[] next = csvReader.readNext();
89 89
				line++;
......
178 178
	}
179 179

  
180 180

  
181

  
182 181
}
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/terms/RepresentationCsvImportConfigurator.java
23 23
 */
24 24
public class RepresentationCsvImportConfigurator
25 25
        extends SimpleImportConfiguratorBase<InputStreamReader>{
26

  
26 27
    private static final long serialVersionUID = -3602889553095677715L;
27 28

  
28 29
    private boolean overrideWithEmpty;
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/common/CdmGenericDaoImpl.java
858 858

  
859 859
    @Override
860 860
    public Object initializeCollection(UUID ownerUuid, String fieldName, List<String> appendedPropertyPaths)  {
861
        List<String> propertyPaths = new ArrayList<String>();
861
        List<String> propertyPaths = new ArrayList<>();
862 862
        propertyPaths.add(fieldName);
863 863
        if(appendedPropertyPaths != null && !appendedPropertyPaths.isEmpty()) {
864 864
            for(String app : appendedPropertyPaths) {
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/application/MonitoredGenericApplicationContext.java
22 22

  
23 23
/**
24 24
 * {@link GenericApplicationContext Generic application context} which allows progress monitoring.
25
 *
25 26
 * @author a.mueller
26 27
 * @date 29.09.2011
27 28
 *
......
55 56
        return countTasks;
56 57
    }
57 58

  
59
    @Override
58 60
    protected void invokeBeanFactoryPostProcessors(ConfigurableListableBeanFactory beanFactory){
59 61
        String task = "Invoke bean factory post processors";
60 62
        checkMonitorCancelled(currentMonitor);
......
64 66
        checkMonitorCancelled(currentMonitor);
65 67
    }
66 68

  
69
    @Override
67 70
    protected void finishBeanFactoryInitialization(ConfigurableListableBeanFactory beanFactory){
68 71
        checkMonitorCancelled(currentMonitor);
69 72
        String task = "Finish bean factory initialization";
......
89 92
        return currentMonitor;
90 93
    }
91 94

  
92

  
93
    /* (non-Javadoc)
94
     * @see org.springframework.context.support.AbstractApplicationContext#refresh()
95
     */
96 95
    public void refresh(IProgressMonitor monitor) throws BeansException, IllegalStateException {
97 96
        checkMonitorCancelled(monitor);
98 97
        String message = "Refresh application context. This might take a while ...";
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/facade/DerivedUnitFacadeFieldUnitCacheStrategy.java
116 116

  
117 117
		//plant description
118 118
		result = CdmUtils.concat("; ", result, facade.getPlantDescription());
119
		if (CdmUtils.isNotEmpty(result) && !result.endsWith(".")){
119
		if (StringUtils.isNotBlank(result) && !result.endsWith(".")){
120 120
			result += ".";
121 121
		}
122 122

  
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IAnnotatableService.java
1 1
/**
2 2
 * Copyright (C) 2007 EDIT
3
 * European Distributed Institute of Taxonomy 
3
 * European Distributed Institute of Taxonomy
4 4
 * http://www.e-taxonomy.eu
5
 * 
5
 *
6 6
 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 7
 * See LICENSE.TXT at the top of this package for the full license terms.
8 8
 */
......
18 18
import eu.etaxonomy.cdm.persistence.dao.initializer.IBeanInitializer;
19 19
import eu.etaxonomy.cdm.persistence.query.OrderHint;
20 20

  
21
public interface IAnnotatableService<T extends AnnotatableEntity> extends IVersionableService<T> {
22
	
21
public interface IAnnotatableService<T extends AnnotatableEntity>
22
            extends IVersionableService<T> {
23

  
23 24
	/**
24 25
	 * Return a Pager containing Annotation entities belonging to the object supplied, optionally
25 26
	 * filtered by MarkerType
26
	 * 
27
	 *
27 28
	 * @param annotatedObj The object that "owns" the annotations returned
28 29
	 * @param status Only return annotations which are marked with a Marker of this type (can be null to return all annotations)
29 30
	 * @param pageSize The maximum number of terms returned (can be null for all annotations)
......
33 34
	 * @return a Pager of Annotation entities
34 35
	 */
35 36
	public Pager<Annotation> getAnnotations(T annotatedObj, MarkerType status, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
36
	
37

  
37 38
	/**
38 39
	 * Returns a Pager containing Marker entities belonging to the object supplied, optionally filtered by
39 40
	 * whether they are technical or non-technical markers
40
	 * 
41
	 *
41 42
	 * @param annotatableEntity the entity which is marked
42 43
	 * @param technical The type of MarkerTypes to consider (null to count all markers, regardless of whether the makerType is technical or not)
43 44
	 * @param pageSize The maximum number of markers returned (can be null for all markers)
......
47 48
	 * @return a List of Marker instances
48 49
	 */
49 50
	public Pager<Marker> getMarkers(T annotatableEntity, Boolean technical, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
50
	
51

  
51 52
	/**
52
	 * Returns a list of arrays representing counts of entities of type clazz, grouped by their markerTypes. The arrays have two elements. 
53
	 * Returns a list of arrays representing counts of entities of type clazz, grouped by their markerTypes. The arrays have two elements.
53 54
	 * The first element is the MarkerType, initialized using the propertyPaths parameter. The second element is the count of all markers of Objects
54 55
	 * of type clazz with that MarkerType. The boolean technical can be used to choose only technical or only non-technical marker types. The list is sorted by
55 56
	 * titleCache of the markerType, in ascending order.
56
	 * 
57
	 *
57 58
	 * @param clazz optionally restrict the markers to those belonging to this class
58 59
	 * @param technical The type of MarkerTypes to consider (null to count all markers, regardless of whether the makerType is technical or not)
59 60
	 * @param pageSize The maximum number of arrays returned (can be null for all arrays)
......
62 63
	 * @return
63 64
	 */
64 65
	public List<Object[]> groupMarkers(Class<? extends T> clazz, Boolean technical, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
65
	
66

  
66 67
	/**
67 68
	 * returns a count of all markers belonging to that clazz, optionally filtered to include only technical or only non-technical markers.
68
	 * 
69
	 *
69 70
	 * @param clazz optionally restrict the markers to those belonging to this class
70 71
	 * @param technical The type of MarkerTypes to consider (null to count all markers, regardless of whether the makerType is technical or not)
71 72
	 * @return a count of markers
72 73
	 */
73 74
	public int countMarkers(Class<? extends T> clazz, Boolean technical);
74
} 
75
}
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IIdentifiableEntityService.java
36 36
import eu.etaxonomy.cdm.strategy.merge.IMergable;
37 37
import eu.etaxonomy.cdm.strategy.merge.IMergeStrategy;
38 38

  
39
public interface IIdentifiableEntityService<T extends IdentifiableEntity> extends IAnnotatableService<T> {
39
public interface IIdentifiableEntityService<T extends IdentifiableEntity>
40
            extends IAnnotatableService<T> {
40 41

  
41 42
    /**
42 43
     * (Re-)generate the title caches for all objects of this concrete IdentifiableEntity class.

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)