public final class LanguageDictionary extends Object implements Serializable
LabelSet,
Serialized Form| Constructor and Description |
|---|
LanguageDictionary(HumanLanguage language) |
| Modifier and Type | Method and Description |
|---|---|
Adjective |
createAdjective(String name,
LanguageStartsWith startsWith,
LanguagePosition position,
boolean copiedFromDefault) |
Article |
createArticle(String name,
LanguageArticle articleType,
boolean copiedFromDefault) |
Noun |
createNoun(String tableEnumOrId,
Noun.NounType type,
ResultSet rs,
Uniquefy uniquefy)
construct new noun from result set.
|
Noun |
createNoun(String name,
String pluralAlias,
Noun.NounType type,
String entityName,
LanguageStartsWith startsWith,
LanguageGender gender,
String access,
boolean isStandardField,
boolean isCopied) |
boolean |
equals(Object o) |
String |
format(Object obj,
Renameable[] entities,
boolean overrideForms,
boolean forMessageFormat)
Construct String value from the given Label structure, which could be
either String or LabelTag.
|
Adjective |
getAdjective(String name) |
Set<String> |
getAllInheritedTermNames(GrammaticalTerm.TermType type) |
Set<String> |
getAllTermNames(GrammaticalTerm.TermType type) |
Article |
getArticle(String name) |
LanguageDeclension |
getDeclension() |
Noun |
getDynamicNoun(String name,
Renameable ei,
boolean getRenamedValue,
boolean doFormat)
used to resolve custom object name at runtime.
|
HumanLanguage |
getLanguage() |
SortedSet<String> |
getNames(String tableEnum,
boolean includeEntity)
return a sorted list of noun names for the given entity.
|
Noun |
getNoun(String name,
boolean getRenamedValue) |
Noun |
getNounByPluralAlias(String name,
boolean getRenamedValue) |
com.google.common.collect.Multimap<String,Noun> |
getNounsByEntity() |
Adjective |
getOrCreateAdjective(String name,
LanguageStartsWith startsWith,
LanguagePosition position) |
Article |
getOrCreateArticle(String name,
LanguageArticle articleType) |
Noun |
getOrCreateNoun(String tableEnum,
String name,
String pluralAlias,
Noun.NounType type,
LanguageGender gender,
LanguageStartsWith startsWith,
String access,
boolean isStandardField) |
int |
hashCode() |
boolean |
isAdjective(String name) |
boolean |
isArticle(String name) |
boolean |
isCustom(String name) |
boolean |
isEntity(String name) |
boolean |
isEntityPlural(String name) |
boolean |
isNoun(String name) |
void |
makeSkinny()
LanguageDictionary store metadata in Map's that have a high memory per element cost. |
void |
put(String name,
GrammaticalTerm term) |
void |
putAll(LanguageDictionary otherDictionary)
Copy the terms from the other dictionary into this one.
|
void |
setString(Adjective m,
AdjectiveForm form,
String value) |
void |
setString(Article m,
ArticleForm form,
String value) |
void |
setString(Noun n,
NounForm form,
String value) |
String |
toString() |
void |
validateAll() |
public LanguageDictionary(HumanLanguage language)
public HumanLanguage getLanguage()
public LanguageDeclension getDeclension()
public Noun createNoun(String name, String pluralAlias, Noun.NounType type, String entityName, LanguageStartsWith startsWith, LanguageGender gender, String access, boolean isStandardField, boolean isCopied)
public Noun createNoun(String tableEnumOrId, Noun.NounType type, ResultSet rs, Uniquefy uniquefy) throws SQLException
SQLExceptionpublic Set<String> getAllTermNames(GrammaticalTerm.TermType type)
public Set<String> getAllInheritedTermNames(GrammaticalTerm.TermType type)
type - the term type to searchpublic Adjective createAdjective(String name, LanguageStartsWith startsWith, LanguagePosition position, boolean copiedFromDefault)
public Article createArticle(String name, LanguageArticle articleType, boolean copiedFromDefault)
public String format(Object obj, Renameable[] entities, boolean overrideForms, boolean forMessageFormat)
obj - the object to parseentities - the renameable objects that are the parameters for the valueforMessageFormat - if the MessageFormat values need to be preserved, such as {0}overrideForms - if true, it means that the forms in the term refs in the objects do not match the current dictionary and need to be recalculatedpublic Noun getDynamicNoun(String name, Renameable ei, boolean getRenamedValue, boolean doFormat)
public void put(String name, GrammaticalTerm term)
public void putAll(LanguageDictionary otherDictionary)
otherDictionary - the other dictionary which contains all of the values.public void validateAll()
public final SortedSet<String> getNames(String tableEnum, boolean includeEntity)
public boolean isEntity(String name)
public boolean isEntityPlural(String name)
public boolean isAdjective(String name)
public boolean isArticle(String name)
public boolean isNoun(String name)
public boolean isCustom(String name)
public Noun getOrCreateNoun(String tableEnum, String name, String pluralAlias, Noun.NounType type, LanguageGender gender, LanguageStartsWith startsWith, String access, boolean isStandardField)
public Adjective getOrCreateAdjective(String name, LanguageStartsWith startsWith, LanguagePosition position)
public Article getOrCreateArticle(String name, LanguageArticle articleType)
public void setString(Adjective m, AdjectiveForm form, String value)
public void setString(Article m, ArticleForm form, String value)
public void makeSkinny()
LanguageDictionary store metadata in Map's that have a high memory per element cost. The various
dictionaries are static in nature and would not change after the initial load. ImmutableSortedMap's have
a 8 byte overhead cost which is attractive to keep the required space of LanguageDictionary to a minimum.
Since LanguageDictionary's are static, this make them a perfect candidate for ImmutableSortedMap.Copyright (c) 2016-2017, Salesforce.com, Inc. All rights reserved. Licensed under the BSD 3-Clause license. For full license text, see the LICENSE.txt file in the repository.