Project

General

Profile

« Previous | Next » 

Revision 0928b8c3

Added by Andreas Müller about 4 years ago

cleanup

View differences:

cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/excel/common/ExcelImportConfiguratorBase.java
9 9

  
10 10
package eu.etaxonomy.cdm.io.excel.common;
11 11

  
12

  
13 12
import java.net.URI;
14 13

  
15 14
import org.apache.log4j.Logger;
......
34 33

  
35 34
	private String worksheetName = null;
36 35

  
37
	/**
38
	 * @param url
39
	 * @param destination
40
	 */
41 36
	protected ExcelImportConfiguratorBase(URI uri, ICdmDataSource destination) {
42 37
		this(uri, destination, defaultTransformer);
43 38
	}
44 39

  
45
	/**
46
	 * @param url
47
	 * @param destination
48
	 */
49 40
	protected ExcelImportConfiguratorBase(URI uri, ICdmDataSource destination, IInputTransformer transformer) {
50 41
		super(transformer);
51 42
		setSource(uri);
cdmlib-model/src/main/java/eu/etaxonomy/cdm/format/taxon/TaxonRelationshipFormatter.java
197 197
        return result;
198 198
    }
199 199

  
200
    /**
201
     * @param author
202
     * @return
203
     */
204 200
    private String getFamilyNames(TeamOrPersonBase<?> author) {
205 201
        if (author.isInstanceOf(Person.class)){
206 202
            Person person = CdmBase.deproxy(author, Person.class);
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/agent/Team.java
100 100
    @XmlElement(name = "hasMoreMembers")
101 101
	private boolean hasMoreMembers;
102 102

  
103

  
103
// ********************************** FACTORY ***************************/
104 104

  
105 105
	/**
106 106
	 * Creates a new team instance without any concrete {@link Person members}.
......
140 140
		}
141 141
	}
142 142

  
143
	/**
144
	 * @return
145
	 */
146 143
	private void addListenerForTeamMember(Person member) {
147 144
		PropertyChangeListener listener = new PropertyChangeListener() {
148 145
			@Override
......
392 389
			return null;
393 390
		}
394 391
	}
392

  
395 393
}
cdmlib-model/src/main/java/eu/etaxonomy/cdm/strategy/cache/agent/TeamDefaultCacheStrategy.java
20 20

  
21 21
/**
22 22
 * @author AM
23
 *
24 23
 */
25 24
public class TeamDefaultCacheStrategy extends StrategyBase implements INomenclaturalAuthorCacheStrategy<Team> {
26 25
    private static final long serialVersionUID = 8375295443642690479L;
......
120 119
        return result;
121 120
    }
122 121

  
123

  
124 122
	@Override
125 123
    public String getFullTitle(Team team) {
126 124
		String result = "";
cdmlib-model/src/main/java/eu/etaxonomy/cdm/strategy/cache/reference/DefaultReferenceCacheStrategy.java
538 538
        if (reference.isProtectedAbbrevTitleCache()){
539 539
            String cache = reference.getAbbrevTitleCache();
540 540
            return handleDetailAndYearForProtected(reference, cache, microReference);
541

  
542 541
        }
542

  
543 543
        String result = getTokenizedNomenclaturalTitel(reference);
544 544
        //if no data is available and only titleCache is protected take the protected title
545 545
        //this is to avoid empty cache if someone forgets to set also the abbrevTitleCache
......
550 550
        }
551 551

  
552 552
        microReference = Nz(microReference);
553
        if (StringUtils.isNotBlank(microReference)){
553
        if (isNotBlank(microReference)){
554 554
            microReference = getBeforeMicroReference() + microReference;
555 555
            if (microReference.endsWith(".")  && result.contains(INomenclaturalReference.MICRO_REFERENCE_TOKEN + ".") ){
556 556
                microReference = microReference.substring(0, microReference.length() - 1);
......
583 583
     * which can later be replaced by the real data.
584 584
     *
585 585
     * @see INomenclaturalReference#MICRO_REFERENCE_TOKEN
586
     *
587
     * @param ref The reference
588
     * @return
589 586
     */
590 587
    private String getTokenizedNomenclaturalTitel(Reference ref) {
591 588
        if (isRealInRef(ref)){
cdmlib-model/src/main/java/eu/etaxonomy/cdm/strategy/parser/NonViralNameParserImpl.java
51 51

  
52 52

  
53 53
/**
54
 * @author a.mueller
54
 * Parser for {@link TaxonName}s of type NonViralName and below.
55 55
 *
56
 * @author a.mueller
56 57
 */
57 58
public class NonViralNameParserImpl
58 59
            extends NonViralNameParserImplRegExBase
59 60
            implements INonViralNameParser<INonViralName> {
60
	private static final Logger logger = Logger.getLogger(NonViralNameParserImpl.class);
61

  
62
    private static final Logger logger = Logger.getLogger(NonViralNameParserImpl.class);
61 63

  
62 64
	// good intro: http://java.sun.com/docs/books/tutorial/essential/regex/index.html
63 65

  
cdmlib-model/src/test/java/eu/etaxonomy/cdm/strategy/cache/reference/DefaultReferenceCacheStrategyTest.java
331 331
        Assert.assertEquals("Unexpected nomencl. reference", "Acta Inst. Bot. Acad. Sci. URSS, ser. 1, Fasc. 11: 248. 1955", book1.getNomenclaturalCitation("248"));
332 332
    }
333 333

  
334

  
335 334
    @Test
336 335
    public void testBookGetTitleCache2(){
337 336
        //series
cdmlib-model/src/test/java/eu/etaxonomy/cdm/strategy/parser/NonViralNameParserImplTest.java
55 55
import eu.etaxonomy.cdm.model.reference.ReferenceType;
56 56
import eu.etaxonomy.cdm.model.term.DefaultTermInitializer;
57 57
import eu.etaxonomy.cdm.strategy.exceptions.StringNotParsableException;
58

  
58 59
/**
59
 * @author a.mueller
60
 * Tests for {@link NonViralNameParserImpl}.
60 61
 *
62
 * @author a.mueller
61 63
 */
62 64
public class NonViralNameParserImplTest {
65

  
63 66
    private static final NomenclaturalCode ICNAFP = NomenclaturalCode.ICNAFP;
64 67
    private static final NomenclaturalCode ICZN = NomenclaturalCode.ICZN;
65 68

  
......
1548 1551
        String strBookSection2 = "Hieracium vulgatum subsp. acuminatum (Jord.) Zahn in Schinz & Keller, Fl. Schweiz, ed. 2, 2: 288. 1905-1907";
1549 1552
        String strBookSection2NoComma = "Hieracium vulgatum subsp. acuminatum (Jord.) Zahn in Schinz & Keller, Fl. Schweiz ed. 2, 2: 288. 1905-1907";
1550 1553
        INonViralName nameBookSection2 =
1551
            parser.parseReferencedName(strBookSection2, null, null);
1554
              parser.parseReferencedName(strBookSection2, null, null);
1552 1555
        assertFalse(nameBookSection2.hasProblem());
1553 1556
        nameBookSection2.setFullTitleCache(null, false);
1554 1557
        assertEquals(strBookSection2NoComma.replace(" ed.", ", ed."), nameBookSection2.getFullTitleCache());

Also available in: Unified diff