public class GrammaticalLabelSetImpl extends LabelSetImpl implements GrammaticalLabelSet
BasePropertyFile.MetaDataInfo, BasePropertyFile.Parser, BasePropertyFile.SubstitutionExceptionGrammaticalLabelSet.GrammaticalLabelSetCompositedata, lastModified, metaData, MISSING_LABEL| Modifier | Constructor and Description |
|---|---|
|
GrammaticalLabelSetImpl(LanguageDictionary dictionary,
GrammaticalLabelFileParser p) |
|
GrammaticalLabelSetImpl(LanguageDictionary dictionary,
GrammaticalLabelFileParser p,
PropertyFileData data) |
protected |
GrammaticalLabelSetImpl(LanguageDictionary dictionary,
PropertyFileData data,
Map<String,String> labelSectionToFilename,
Set<String> publicSections)
Used by sleepy cat, or other implementations that already have the data specified preparsed
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
allowOtherGrammaticalForms() |
Object |
get(String section,
String param,
boolean allowLabelException)
Override so that missing labels don't throw gacks, but are logged instead
|
Object |
get(String section,
String param,
Object ifNull)
Get the object stored in section/param in the IniFile.
|
LanguageDictionary |
getDictionary() |
GrammaticalTerm |
getGrammaticalTerm(String section,
String param)
Test to see if the parameter contains *solely* a grammatical term, and if it does, return it, otherwise null
|
Set<String> |
getPublicSectionNames() |
String |
getString(LabelReference ref) |
String |
getString(String section,
Renameable[] entities,
String param) |
String |
getString(String section,
Renameable[] entities,
String param,
boolean forMessageFormat) |
String |
getString(String section,
Renameable[] entities,
String param,
String ifNull) |
String |
getString(String section,
String param)
Get the value stored in section/param in the IniFile as a string.
|
String |
getString(String section,
String param,
boolean forMessageFormat) |
String |
getString(String section,
String param,
String ifNull)
Get the value stored in section/param in the IniFile as a string.
|
String |
getStringThrow(String section,
String param)
Get the value stored in section/param in the IniFile as a string.
|
static GrammaticalLabelSet |
getTestLabelSet(LanguageLabelSetDescriptor.GrammaticalLabelSetDescriptor descriptor)
Use this only for testing or various values.
|
static GrammaticalLabelSet |
getTestLabelSet(LanguageLabelSetDescriptor.GrammaticalLabelSetDescriptor descriptor,
GrammaticalLabelSetProvider parent) |
protected Object |
resolveLabelRef(Object o) |
protected Object |
resolveLabelRef(Object o,
String section,
String param) |
void |
setLabelSectionToFilename(Map<String,String> sectionMap) |
get, getFilenameFromLabelSection, getLabelSectionToFilename, getPropertyFileData, labelExists, processMissingLabelattachSharedKeyMap, containsListParam, containsParam, containsSection, doSubstitutions, doSubstitutions, entrySet, get, getBoolean, getBoolean, getCensoredString, getFloat, getFloat, getInt, getInt, getLastModified, getList, getList, getListConfigValues, getNumListEntryParams, getParams, getParams, getSection, inner_get, isProductionMode, makeListEntryParam, outputValueXML, outputValueXMLCensored, outputXML, outputXML, put, remove, removeSection, sectionNames, setLastModified, stringToBoolean, substituteclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitget, getPropertyFileDatacontainsParam, containsSection, getLabelSectionToFilename, getLastModified, getParams, getParams, sectionNameslabelExistsget, getBoolean, getFloat, getInt, getList, getSectionentrySet, getBoolean, getCensoredString, getFloat, getInt, getListpublic GrammaticalLabelSetImpl(LanguageDictionary dictionary, GrammaticalLabelFileParser p) throws IOException
dictionary - the dictionary that was filled in by the parserp - the parserIOExceptionpublic GrammaticalLabelSetImpl(LanguageDictionary dictionary, GrammaticalLabelFileParser p, PropertyFileData data) throws IOException
dictionary - the dictionary that was filled in by the parserp - the parserdata - the data that contains the public section namesIOExceptionprotected GrammaticalLabelSetImpl(LanguageDictionary dictionary, PropertyFileData data, Map<String,String> labelSectionToFilename, Set<String> publicSections)
dictionary - the dictionary associated with this label setdata - the preloaded datalabelSectionToFilename - the labelSectionToFilenamepublicSections - The set of sections to be constructed. Usually comes from the prebuilt english labels.
We used to use data.getPublicSectionNames(), but when building the non english labels DB, that value is null.public static GrammaticalLabelSet getTestLabelSet(LanguageLabelSetDescriptor.GrammaticalLabelSetDescriptor descriptor) throws IOException
descriptor - the descriptor to use to create the test label setIOExceptionpublic static GrammaticalLabelSet getTestLabelSet(LanguageLabelSetDescriptor.GrammaticalLabelSetDescriptor descriptor, GrammaticalLabelSetProvider parent) throws IOException
IOExceptionprotected boolean allowOtherGrammaticalForms()
public String getString(String section, String param)
NonConfigIniFilegetString in interface NonConfigIniFilegetString in class LabelSetImplsection - the section to look in.param - the param name to look for.public String getString(LabelReference ref)
getString in interface GrammaticalLabelSetref - the label to look uppublic String getStringThrow(String section, String param)
NonConfigIniFilegetStringThrow in interface NonConfigIniFilegetStringThrow in class LabelSetImplsection - the section to look in.param - the param name to look for.public String getString(String section, String param, String ifNull)
BaseNonConfigIniFilegetString in interface BaseNonConfigIniFilegetString in class LabelSetImplsection - the section to look in.param - the param name to look for.ifNull - the default value to use.public String getString(String section, Renameable[] entities, String param)
getString in interface GrammaticalLabelSetpublic String getString(String section, Renameable[] entities, String param, String ifNull)
getString in interface GrammaticalLabelSetpublic String getString(String section, String param, boolean forMessageFormat)
getString in interface GrammaticalLabelSetpublic String getString(String section, Renameable[] entities, String param, boolean forMessageFormat)
getString in interface GrammaticalLabelSetpublic Object get(String section, String param, boolean allowLabelException) throws ParameterNotFoundException, SettingsSectionNotFoundException
get in interface GrammaticalLabelSetget in class BasePropertyFilesection - the section to searchparam - the key inside that sectionallowLabelException - if an exception should be thrown instead of null returned for a bad labelParameterNotFoundException - if the parameter is missingSettingsSectionNotFoundException - if the section is undefinedpublic Object get(String section, String param, Object ifNull) throws SettingsSectionNotFoundException
BaseNonConfigIniFileget in interface BaseNonConfigIniFileget in class BasePropertyFilesection - the section to look in.param - the param name to look for.ifNull - the object to return if no value was found.SettingsSectionNotFoundExceptionpublic void setLabelSectionToFilename(Map<String,String> sectionMap)
setLabelSectionToFilename in class LabelSetImplpublic GrammaticalTerm getGrammaticalTerm(String section, String param)
GrammaticalLabelSetgetGrammaticalTerm in interface GrammaticalLabelSetsection - the section to searchparam - the parameter to search.public Set<String> getPublicSectionNames()
getPublicSectionNames in interface GrammaticalLabelSetpublic LanguageDictionary getDictionary()
getDictionary in interface GrammaticalLabelSetCopyright (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.