@Service public class JavaPropertyScanner extends AbstractPropertyScanner implements PropertyScanner
| Constructor and Description |
|---|
JavaPropertyScanner() |
| Modifier and Type | Method and Description |
|---|---|
File |
computeTranslationPath(File template,
Locale templateLocale,
Locale translationLocale)
computes the location of the translation file for the given template and locale
|
PropertyConverter |
createConverter(org.eclipse.emf.common.util.URI resource)
creates a new PropertyConverter for the given file
|
File |
findTemplate(File propertyFile,
ScanConfiguration config)
retrieves the translation template for the given translation (used for mono lingual resources)
|
Map<Locale,File> |
findTranslations(File template,
ScanConfiguration config)
finds all existing translation files for the given template
|
String[] |
getDefaultExcludes()
returns the default excludes for the file scan
|
String[] |
getDefaultIncludes()
returns the default includes for the file scan
|
String |
getEncoding()
determines which encoding should be used to write and write resources
|
Locale |
getLocale(File propertyFile)
extracts the locale from the given file
|
boolean |
isBilingual() |
isTemplate, isTranslation, matchesLocaleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisTemplate, isTranslation@Property(name="TYPE",
value="PROPERTIES_ENCODED")
public static final String TYPE
public File findTemplate(File propertyFile, ScanConfiguration config)
PropertyScannerfindTemplate in interface PropertyScannernull if not availablepublic Locale getLocale(File propertyFile)
PropertyScannergetLocale in interface PropertyScannerpublic Map<Locale,File> findTranslations(File template, ScanConfiguration config)
PropertyScannerfindTranslations in interface PropertyScannerpublic File computeTranslationPath(File template, Locale templateLocale, Locale translationLocale)
PropertyScannercomputeTranslationPath in interface PropertyScannerpublic boolean isBilingual()
isBilingual in interface PropertyScannertrue if this scanner is responsible for bi-lingual files (like XLFIFF) and false if is responsible for mono-lingual
files like java propertiespublic PropertyConverter createConverter(org.eclipse.emf.common.util.URI resource)
PropertyScannercreateConverter in interface PropertyScannerpublic String[] getDefaultIncludes()
PropertyScannergetDefaultIncludes in interface PropertyScannerpublic String[] getDefaultExcludes()
PropertyScannergetDefaultExcludes in interface PropertyScannerpublic String getEncoding()
PropertyScannergetEncoding in interface PropertyScannerCopyright © 2013–2014 Jabylon. All rights reserved.