}\r
\r
ITermRepresentation_L10n representation_L10n = new TermRepresentation_L10n(term, false);\r
- handleL10nRepresentation(json, representation_L10n);\r
+ handleL10nRepresentation(json, representation_L10n, false);\r
if(!replaceRepresentations){\r
json.element("representations", term.getRepresentations(), jsonConfig);\r
}\r
if(RelationshipTermBase.class.isAssignableFrom(term.getClass())){\r
RelationshipTermBase<?> relTerm = (RelationshipTermBase<?>)term;\r
ITermRepresentation_L10n inverseRepresentation_L10n = new TermRepresentation_L10n(relTerm, true);\r
- handleL10nRepresentation(json, inverseRepresentation_L10n);\r
+ handleL10nRepresentation(json, inverseRepresentation_L10n, true);\r
if(!replaceRepresentations){\r
json.element("inverseRepresentations", relTerm.getInverseRepresentations(), jsonConfig);\r
}\r
* @param json\r
* @param representation_L10n\r
*/\r
- private void handleL10nRepresentation(JSONObject json, ITermRepresentation_L10n representation_L10n) {\r
+ private void handleL10nRepresentation(JSONObject json, ITermRepresentation_L10n representation_L10n, boolean isInverse) {\r
+ String baseLabel = isInverse? "inverseRepresentation_L10n" : "representation_L10n";\r
if (representation_L10n.getLabel() != null) {\r
- json.element("representation_L10n",representation_L10n.getLabel());\r
+ json.element(baseLabel,representation_L10n.getLabel());\r
}\r
if (representation_L10n.getAbbreviatedLabel() != null) {\r
- json.element("representation_L10n_abbreviatedLabel", representation_L10n.getAbbreviatedLabel());\r
+ json.element(baseLabel + "_abbreviatedLabel", representation_L10n.getAbbreviatedLabel());\r
}\r
if (representation_L10n.getAbbreviatedLabel() != null) {\r
- json.element("representation_L10n_language_iso", representation_L10n.getLanguageIso());\r
+ json.element(baseLabel + "_languageIso", representation_L10n.getLanguageIso());\r
}\r
if (representation_L10n.getAbbreviatedLabel() != null) {\r
- json.element("representation_L10n_language_uuid", representation_L10n.getLanguageUuid());\r
+ json.element(baseLabel + "_languageUuid", representation_L10n.getLanguageUuid());\r
}\r
}\r
\r