public class ResourceFile extends Object
ResourceFile represents a single locale of a ResourceBundle.| Constructor and Description |
|---|
ResourceFile(DashboardConfiguration config,
Repository repo,
String svnRepoUrl,
String checkedOutPath,
String relativeFilePath,
SVNUtil svn,
String fullSvnPath)
Creates a new resource file that can be analyzed.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getBaseName()
Returns the base name of this file without the filename suffix and without the locale.
|
String |
getBundleBaseName()
Returns the full bundle path.
|
String |
getFullLocalPath()
Gets the full local path.
|
String |
getLanguage()
Gets the language.
|
Locale |
getLocale()
Gets the locale.
|
Properties |
getProperties()
Gets the properties.
|
String |
getRelativeCheckoutUrl()
Gets the relative checkout url.
|
String |
getRelativeFilePath()
Gets the file path relative to the checkout directory.
|
String |
getSVNPath()
Gets the SVN path.
|
boolean |
isDefault()
Checks if this file contains default language.
|
boolean |
isVariant()
Checks if is variant.
|
static boolean |
isVariant(String languageCode)
Utility method to check whether a given language code is a variant (e.g.
|
void |
setBundle(ResourceBundle bundle)
Sets the bundle.
|
LanguageModel |
toLanguageModel(org.apache.maven.plugin.logging.Log log,
CheckConfiguration checks)
To language model.
|
String |
toString() |
public ResourceFile(DashboardConfiguration config, Repository repo, String svnRepoUrl, String checkedOutPath, String relativeFilePath, SVNUtil svn, String fullSvnPath) throws IOException
config - the configrepo - the repository configsvnRepoUrl - the url to the repositorycheckedOutPath - the path where the repository has been checked outrelativeFilePath - the relative file path of the resource filesvn - the svnfullSvnPath - the full svn pathIOException - couldn't determine the full local pathpublic void setBundle(ResourceBundle bundle)
bundle - the new bundlepublic String getSVNPath()
public String getFullLocalPath()
public Properties getProperties()
public String getLanguage()
public Locale getLocale()
public boolean isVariant()
public static boolean isVariant(String languageCode)
languageCode - the codetrue if the code is a variant.public boolean isDefault()
public String getRelativeCheckoutUrl()
public String getRelativeFilePath()
public LanguageModel toLanguageModel(org.apache.maven.plugin.logging.Log log, CheckConfiguration checks)
log - the logchecks - the check configurationpublic String getBaseName()
public String getBundleBaseName()
Copyright © 2013-2015. All Rights Reserved.