Project

General

Profile

« Previous | Next » 

Revision 5e971c04

Added by Andreas Kohlbecker about 3 years ago

ref #9666 adding is{rankLevel} to term serialization for cdm_tokens

View differences:

cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/json/processor/bean/TermBaseBeanProcessor.java
17 17

  
18 18
import eu.etaxonomy.cdm.api.service.l10n.TermRepresentation_L10n;
19 19
import eu.etaxonomy.cdm.model.common.RelationshipTermBase;
20
import eu.etaxonomy.cdm.model.name.Rank;
20 21
import eu.etaxonomy.cdm.model.term.OrderedTermVocabulary;
21 22
import eu.etaxonomy.cdm.model.term.TermBase;
22 23
import eu.etaxonomy.cdm.model.term.TermVocabulary;
......
89 90
                json.element("inverseRepresentations", relTerm.getInverseRepresentations(), jsonConfig);
90 91
            }
91 92
        }
93

  
94
        // add additional representation for RelationShipBase
95
        if(Rank.class.isAssignableFrom(term.getClass())){
96
            Rank rank = (Rank)term;
97
            json.element("isSupraGeneric", rank.isSupraGeneric(), jsonConfig);
98
            json.element("isFamily", rank.getUuid().equals(Rank.FAMILY().getUuid()), jsonConfig);
99
            json.element("isGenus", rank.isGenus(), jsonConfig);
100
            json.element("isInfraGeneric", rank.isInfraGeneric(), jsonConfig);
101
            json.element("isSpeciesAggregate", rank.isSpeciesAggregate(), jsonConfig);
102
            json.element("isSpecies", rank.isSpecies(), jsonConfig);
103
            json.element("isInfraSpecific", rank.isInfraSpecific(), jsonConfig);
104

  
105
        }
92 106
        return json;
93 107
    }
94 108

  

Also available in: Unified diff