Project

General

Profile

Revision fe4c0713

IDfe4c0713670fbff614ad06230c0d9cd750e476e5
Parent aaea23f9
Child 04a88dbc

Added by Patrick Plitzner almost 4 years ago

ref #6320 Add pherogram title cache to format keys

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/format/ICdmFormatter.java
10 10

  
11 11
/**
12 12
 * Implementing classes provide a string representation for a given object.
13
 * How the the string is built can be configured 
13
 * How the the string is built can be configured
14 14
 * by using the {@link FormatKey} enum.<br>
15 15
 * @author pplitzner
16 16
 * @date Nov 30, 2015
......
50 50
        SEQUENCE_DNA_MARKER,
51 51
        /*single read*/
52 52
        SINGLE_READ_PRIMER,
53
        SINGLE_READ_PHEROGRAM_TITLE_CACHE,
53 54
        AMPLIFICATION_LABEL,
54 55
    }
55 56

  
......
60 61
	 * <code>
61 62
	 * format(derivedUnit, GATHERING_COUNTRY, COMMA, GATHERING_COLLECTOR, COMMA, OPEN_BRACKET, COLLECTION_CODE, CLOSE_BRACKET
62 63
	 * </code> will result in something like <i>Peru, L. (B)</i>
63
	 * 
64
	 *
64 65
	 * @param object the object which should be formatted as a string representation
65
	 * @param formatKeys a list of enum values specifying the parts of which the string consists 
66
	 * @param formatKeys a list of enum values specifying the parts of which the string consists
66 67
	 * @return a string representation of the given object according to the chosen enum values
67 68
	 */
68 69
    public String format(Object object, FormatKey... formatKeys);
69
    
70

  
70 71
    /**
71 72
     * Returns a string representation of the given object.<br>
72 73
     * <b>Note:</b> Only use this method if the formatKeys for this
cdmlib-model/src/main/java/eu/etaxonomy/cdm/format/occurrences/SingleReadFormatter.java
28 28
        if(singleRead.getPrimer()!=null){
29 29
            formatKeyMap.put(FormatKey.SINGLE_READ_PRIMER, singleRead.getPrimer().getLabel());
30 30
        }
31
        if(singleRead.getPherogram()!=null){
32
            formatKeyMap.put(FormatKey.SINGLE_READ_PHEROGRAM_TITLE_CACHE, singleRead.getPherogram().getTitleCache());
33
        }
31 34
        if(singleRead.getAmplificationResult()!=null &&
32 35
                singleRead.getAmplificationResult().getAmplification()!=null){
33 36
            formatKeyMap.put(FormatKey.AMPLIFICATION_LABEL, singleRead.getAmplificationResult().getAmplification().getLabelCache());

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)