public class LabelSetDescriptorImpl extends Object implements LanguageLabelSetDescriptor.GrammaticalLabelSetDescriptor
LanguageLabelSetDescriptor.GrammaticalLabelSetDescriptorDICTIONARY_FILENAME, LABELS_FILENAME| Constructor and Description |
|---|
LabelSetDescriptorImpl(URL rootDirectory,
HumanLanguage language,
String labelSetName)
Construct a LabelSetDescriptor for the given labelSetName.
|
LabelSetDescriptorImpl(URL rootDirectory,
HumanLanguage language,
String setName,
String basename,
String dictionaryName)
Constructor to override the default file basename with the specified basename.
|
LabelSetDescriptorImpl(URL rootDirectory,
String labelSetName)
Construct a LabelSetDescriptor for the given labelSetName in the default language
Uses the label and dictionary file name from the properties files
|
public LabelSetDescriptorImpl(URL rootDirectory, String labelSetName)
rootDirectory - the root directory of the files in the given languagelabelSetName - the name of the label setpublic LabelSetDescriptorImpl(URL rootDirectory, HumanLanguage language, String labelSetName)
rootDirectory - the root directory of the files in the given languagelanguage - the language of the label setlabelSetName - the name of the label setpublic LabelSetDescriptorImpl(URL rootDirectory, HumanLanguage language, String setName, String basename, String dictionaryName)
public LabelSetDescriptorImpl getForOtherLanguage(HumanLanguage otherLanguage)
LanguageLabelSetDescriptorgetForOtherLanguage in interface LanguageLabelSetDescriptorgetForOtherLanguage in interface LanguageLabelSetDescriptor.GrammaticalLabelSetDescriptorotherLanguage - the other language for which to return the descriptorLabelSetDescriptor.getRootDir(), but this allows
overriding to allow a different root for different languages.public URL getRootDir()
getRootDir in interface LabelSetDescriptorpublic URL getRootFile()
getRootFile in interface LabelSetDescriptorpublic String getLabelSetName()
getLabelSetName in interface LanguageLabelSetDescriptor.GrammaticalLabelSetDescriptorpublic URL getDictionaryDir()
public URL getDictionaryFile()
getDictionaryFile in interface LanguageLabelSetDescriptor.GrammaticalLabelSetDescriptorpublic boolean hasOverridingFiles()
hasOverridingFiles in interface LabelSetDescriptorpublic HumanLanguage getLanguage()
getLanguage in interface LanguageLabelSetDescriptorpublic List<URL> getOverridingFiles()
getOverridingFiles in interface LabelSetDescriptorpublic List<URL> getOverridingDictionaryFiles()
getOverridingDictionaryFiles in interface LanguageLabelSetDescriptor.GrammaticalLabelSetDescriptorLabelSetDescriptor.getOverridingFiles()public static LabelSetDescriptorImpl getWithMultipleRoots(com.google.common.base.Function<HumanLanguage,URL> rootMap, HumanLanguage baseLanguage, String setName, String basename, String dictionaryName)
rootMap - a map from HumanLanguage to URL rootbaseLanguage - the first language you need (it still assumes base language is base)setName - the name of the label setbasename - the "labels.xml" or equivalent for the setdictionaryName - the "names.xml" or equivalent for the setpublic static com.google.common.base.Function<HumanLanguage,URL> getLabelRootFunction(String rootPath, String labelName, ClassLoader resourceLocator)
rootPath - the path to the directory containing the labelslabelName - the name of the label file in the directory.resourceLocator - the relevant classloader to use to find the labelspublic boolean hasModularizedFiles()
hasModularizedFiles in interface LabelSetDescriptorpublic List<URL> getModularizedFiles()
getModularizedFiles in interface LabelSetDescriptorCopyright (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.