if(element instanceof Taxon){
return ((Taxon)element).getTitleCache();
} else if( element instanceof TaxonRelationship) {
- return ((TaxonRelationship)element).getType().getRepresentation(Language.ENGLISH()).getAbbreviatedLabel();
+ return ((TaxonRelationship)element).getType().getRepresentation(Language.getLanguageFromUuid(Language.uuidEnglish)).getAbbreviatedLabel();
}
return "TODO";
}
TaxonDescription targetDescription = TaxonDescription.NewInstance(targetTaxon);
String moveMessage = String.format("Elements moved from %s", EditorUtil.getActiveMultiPageTaxonEditor().getTaxon());
targetDescription.setTitleCache(moveMessage, true);
- Annotation annotation = Annotation.NewInstance(moveMessage, Language.DEFAULT());
+ Annotation annotation = Annotation.NewInstance(moveMessage, Language.getDefaultLanguage());
annotation.setAnnotationType(AnnotationType.TECHNICAL());
targetDescription.addAnnotation(annotation);
}
description.setTitleCache(description.getTitleCache() + separator + moveMessage, true);
}
- Annotation annotation = Annotation.NewInstance(moveMessage, Language.DEFAULT());
+ Annotation annotation = Annotation.NewInstance(moveMessage, Language.getDefaultLanguage());
annotation.setAnnotationType(AnnotationType.TECHNICAL());
description.addAnnotation(annotation);
newAcceptedTaxonNode.getTaxon().addDescription(description);
Representation result;
result = inverse ? type.getInverseRepresentation(language) : type.getRepresentation(language);
if (result == null){
- result = inverse ? type.getInverseRepresentation(Language.ENGLISH()) : type.getRepresentation(Language.ENGLISH());
+ result = inverse ?
+ type.getInverseRepresentation(Language.getLanguageFromUuid(Language.uuidEnglish)) :
+ type.getRepresentation(Language.getLanguageFromUuid(Language.uuidEnglish));
}
return result;
}
}
public String getAbbreviatedLabel(){
- return getRepresentation(Language.ENGLISH()).getAbbreviatedLabel();
+ return getRepresentation(Language.getLanguageFromUuid(Language.uuidEnglish)).getAbbreviatedLabel();
}
public void setInverse(boolean inverse) {
String languageUuidString = getPreferenceStore().getString(
GLOBAL_LANGUAGE_UUID);
- if (CdmUtils.isEmpty(languageUuidString)) {
- return Language.DEFAULT();
+ if (CdmUtils.isBlank(languageUuidString)) {
+ return Language.getDefaultLanguage();
}
UUID languageUuid = UUID.fromString(languageUuidString);
date.initController(formFactory, formElement);
- textMethodLanguageString = formFactory.createLanguageStringWithLabelElement(formElement, "Method", media.getDescription(Language.DEFAULT()), style);
+ textMethodLanguageString = formFactory.createLanguageStringWithLabelElement(formElement, "Method", media.getDescription(Language.getDefaultLanguage()), style);
selection_collection = formFactory.createSelectionElement(Collection.class, getConversationHolder(), formElement, "Collection", entity.getCollection(), EntitySelectionElement.ALL, style);
text_accessionNumber = formFactory.createTextWithLabelElement(formElement, "Accession Number", entity.getAccessionNumber(), style);
getEntity().setTitleCache(null);\r
} else if (eventSource == text_description) {\r
\r
- getEntity().getRepresentation(Language.DEFAULT()).setText(text_description.getText());\r
+ getEntity().getRepresentation(Language.getDefaultLanguage()).setText(text_description.getText());\r
\r
} else if (eventSource == uri_uri) {\r
\r
e.printStackTrace();\r
}\r
} else if (eventSource == text_abbreviatedLabel) {\r
- getEntity().getRepresentation(Language.DEFAULT()).setAbbreviatedLabel(text_abbreviatedLabel.getText());\r
+ getEntity().getRepresentation(Language.getDefaultLanguage()).setAbbreviatedLabel(text_abbreviatedLabel.getText());\r
} else if (eventSource == timePeriod_validPeriod) {\r
getEntity().setValidPeriod(timePeriod_validPeriod.getTimePeriod());\r
} else if (eventSource == combo_namedAreaType) {\r
* @author n.hoffmann
* @created Oct 21, 2010
* @version 1.0
+ * @deprecated Should not be used as the Google translation service is not free anymore
*/
public class GoogleLanguageApiWrapper implements ITranslationServiceWrapper {