Project

General

Profile

Revision 9c8dc025

ID9c8dc025bd3130b594db5f9de411f233473bbf11
Parent 98ce4a92
Child 2469bc9b

Added by Andreas Müller about 2 years ago

ref #6682 split doubtful in rel doubtful and taxon doubtful + use full authorshipCache for MAN non-authors

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/format/taxon/TaxonRelationshipFormatter.java
69 69
        if (relatedTaxon == null){
70 70
            return null;
71 71
        }
72
        boolean isDoubtful = taxonRelationship.isDoubtful() || relatedTaxon.isDoubtful();
73
        String doubtfulStr = isDoubtful ? "?" : "";
72

  
73
        String doubtfulTaxonStr = relatedTaxon.isDoubtful() ? "?" : "";
74
        String doubtfulRelationStr = taxonRelationship.isDoubtful() ? "?" : "";
75

  
74 76

  
75 77
        TaxonName name = relatedTaxon.getName();
76 78

  
77
//        List<TaggedText> tags = new ArrayList<>();
78 79
        TaggedTextBuilder builder = new TaggedTextBuilder();
79 80

  
80 81
        //rel symbol
81
        String symbol = getSymbol(type, reverse, languages);
82
        String symbol = doubtfulRelationStr + getSymbol(type, reverse, languages);
82 83
        builder.add(TagEnum.symbol, symbol);
83 84

  
84 85
        //name
85 86
        if (isMisapplied){
86 87
            //starting quote
87
            String startQuote = " " + doubtfulStr + QUOTE_START;
88
            builder.addSeparator(startQuote);// .add(TaggedText.NewSeparatorInstance(startQuote));
88
            String startQuote = " " + doubtfulTaxonStr + QUOTE_START;
89
            builder.addSeparator(startQuote);
89 90

  
90 91
            //name cache
91 92
            List<TaggedText> nameCacheTags = getNameCacheTags(name);
......
95 96
            String endQuote = QUOTE_END;
96 97
            builder.add(TagEnum.postSeparator, endQuote);
97 98
        }else{
98
            builder.addSeparator(" " + doubtfulStr);
99
            builder.addSeparator(" " + doubtfulTaxonStr);
99 100
            //name full title cache
100 101
            List<TaggedText> nameCacheTags = getNameTitleCacheTags(name);
101 102
            builder.addAll(nameCacheTags);
102 103
        }
103 104

  
104 105

  
105
        //sensu (+ Separatoren?)
106
        //sec/sensu (+ Separatoren?)
106 107
        if (isNotBlank(relatedTaxon.getAppendedPhrase())){
107 108
            builder.addWhitespace();
108 109
            builder.add(TagEnum.appendedPhrase, relatedTaxon.getAppendedPhrase());
......
124 125

  
125 126
//        //, non author
126 127
        if (isMisapplied && name != null){
127
            if (name.getCombinationAuthorship() != null && isNotBlank(name.getCombinationAuthorship().getNomenclaturalTitle())){
128
                builder.addSeparator(NON_SEPARATOR);
129
                builder.add(TagEnum.authors, name.getCombinationAuthorship().getNomenclaturalTitle());
130
            }else if (isNotBlank(name.getAuthorshipCache())){
128
            if (isNotBlank(name.getAuthorshipCache())){
131 129
                builder.addSeparator(NON_SEPARATOR);
132 130
                builder.add(TagEnum.authors, name.getAuthorshipCache().trim());
133 131
            }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)