public abstract class Noun extends GrammaticalTerm implements Cloneable
| Modifier and Type | Class and Description |
|---|---|
static class |
Noun.NounType
What "type" of noun.
|
GrammaticalTerm.TermType| Modifier and Type | Field and Description |
|---|---|
protected static String |
VALIDATION_ERROR_HEADER |
protected static String |
VALIDATION_WARNING_HEADER |
| Modifier | Constructor and Description |
|---|---|
protected |
Noun(LanguageDeclension declension,
String name,
String pluralAlias,
Noun.NounType type,
String entityName,
LanguageStartsWith startsWith,
LanguageGender gender,
String access,
boolean isStandardField,
boolean isCopiedFromDefault)
Construct a noun for the given declension
|
| Modifier and Type | Method and Description |
|---|---|
Noun |
clone() |
Noun |
clone(LanguageGender genderOverride,
LanguageStartsWith startsWithOverride) |
Noun |
clone(LanguageGender genderOverride,
LanguageStartsWith startsWithOverride,
Map<NounForm,String> valueOverrides)
Make a clone of the given noun, overwriting the given values with the provided overrides
|
boolean |
defaultValidate(String name,
Collection<? extends NounForm> requiredForms) |
boolean |
equals(Object obj) |
protected boolean |
equalsValue(Object obj) |
String |
getAccess() |
abstract Map<? extends NounForm,String> |
getAllDefinedValues() |
String |
getCloseButNoCigarString(NounForm form) |
String |
getClosestString(NounForm form) |
String |
getDefaultString(boolean isPlural) |
String |
getEntityName() |
LanguageGender |
getGender() |
Noun.NounType |
getNounType() |
String |
getPluralAlias() |
LanguageStartsWith |
getStartsWith()
The "startsWith" is based on the next term in the sequence, not the next noun
|
abstract String |
getString(NounForm nid) |
String |
getString(NounForm nid,
boolean lowerCase) |
protected GrammaticalTerm.TermType |
getTermType() |
int |
hashCode() |
boolean |
isCopiedFromDefault() |
boolean |
isStandardField() |
abstract void |
makeSkinny()
Provides clients the capability of indicating when members of Noun's can be converted to space efficient data structures.
|
<T extends NounForm> |
makeSkinny(Map<T,String> map)
Utility method used to convert static
Map's concrete type to a ImmutableSortedMap. |
protected void |
setGender(LanguageGender gender) |
protected void |
setStartsWith(LanguageStartsWith startsWith) |
void |
setString(LanguageDeclension declension,
ResultSet rs) |
protected abstract void |
setString(String value,
NounForm nid) |
String |
toString() |
boolean |
validate(String name)
validate and fix-up missing data if possible.
|
protected boolean |
validateGender(String name) |
protected boolean |
validateValues(String name) |
protected abstract boolean |
validateValues(String name,
LanguageCase _case) |
getDeclension, getNameprotected static final String VALIDATION_ERROR_HEADER
protected static final String VALIDATION_WARNING_HEADER
protected Noun(LanguageDeclension declension, String name, String pluralAlias, Noun.NounType type, String entityName, LanguageStartsWith startsWith, LanguageGender gender, String access, boolean isStandardField, boolean isCopiedFromDefault)
declension - the declension for the language associated with this nounname - the name of the nounpluralAlias - an alias used in the label files to refer to this noun in pluraltype - the NounType of this nounentityName - TODOstartsWith - what this noun starts withgender - the grammatical gender of the nounaccess - a string preresenting the access of this objectisStandardField - whether this noun represents a standard field (as opposed to a concept). Determines the section the noun is placed in for rename tabsisCopiedFromDefault - if true, means that this noun was not defined in the language of the declension, but instead is copied from english or another fallback languagepublic boolean isCopiedFromDefault()
isCopiedFromDefault in class GrammaticalTermpublic final LanguageGender getGender()
public final LanguageStartsWith getStartsWith()
GrammaticalTermgetStartsWith in class GrammaticalTermpublic String getPluralAlias()
public String getAccess()
public String getEntityName()
public String getDefaultString(boolean isPlural)
public abstract Map<? extends NounForm,String> getAllDefinedValues()
public boolean isStandardField()
protected boolean equalsValue(Object obj)
protected boolean validateGender(String name)
name - the name of the noun
called by validate(String, LanguageDictionary. protected void setGender(LanguageGender gender)
protected void setStartsWith(LanguageStartsWith startsWith)
public Noun.NounType getNounType()
protected boolean validateValues(String name)
protected abstract boolean validateValues(String name, LanguageCase _case)
public final boolean validate(String name)
validate in class GrammaticalTermname - the name of the termpublic Noun clone(LanguageGender genderOverride, LanguageStartsWith startsWithOverride)
public Noun clone(LanguageGender genderOverride, LanguageStartsWith startsWithOverride, Map<NounForm,String> valueOverrides)
genderOverride - the gender to override, if not nullstartsWithOverride - the starts with to override, if not nullvalueOverrides - the overrides for values (usually from end-user customization)public final void setString(LanguageDeclension declension, ResultSet rs) throws SQLException
SQLExceptionpublic boolean defaultValidate(String name, Collection<? extends NounForm> requiredForms)
public String getClosestString(NounForm form)
form - the form to findpublic String getCloseButNoCigarString(NounForm form)
form - the form to find the closest.protected final GrammaticalTerm.TermType getTermType()
getTermType in class GrammaticalTermpublic abstract void makeSkinny()
public <T extends NounForm> Map<T,String> makeSkinny(Map<T,String> map)
Map's concrete type to a ImmutableSortedMap.
ImmutableSortedMap have a 8 byte overhead per element and are useful for reducing the per element
overhead, that is traditionally high on most Map implementations.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.