public class MatchesVarExpansion extends VarExpansion<NearString>
Modifier and Type | Class and Description |
---|---|
static class |
MatchesVarExpansion.Result
Class to store formatted text and indications for other treatments
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_TEMPLATE |
static java.util.regex.Pattern |
PATTERN_PROPERTY_GROUP |
static java.util.regex.Pattern |
PATTERN_SINGLE_PROPERTY |
static java.lang.String |
VAR_CHANGED_DATE |
static java.lang.String |
VAR_CHANGED_ID |
static java.lang.String |
VAR_CREATION_DATE
Deprecated.
|
static java.lang.String |
VAR_CREATION_ID
Deprecated.
|
static java.lang.String |
VAR_DIFF |
static java.lang.String |
VAR_DIFF_REVERSED |
static java.lang.String |
VAR_FUZZY_FLAG |
static java.lang.String |
VAR_ID |
static java.lang.String |
VAR_INITIAL_CREATION_DATE |
static java.lang.String |
VAR_INITIAL_CREATION_ID |
static java.lang.String |
VAR_SCORE_ADJUSTED |
static java.lang.String |
VAR_SCORE_BASE |
static java.lang.String |
VAR_SCORE_NOSTEM |
static java.lang.String |
VAR_SOURCE_LANGUAGE |
static java.lang.String |
VAR_TARGET_LANGUAGE |
PATTERN_BUNDLE_ENTRY, template, VAR_FILE_EXTENSION, VAR_FILE_NAME, VAR_FILE_NAME_ONLY, VAR_FILE_PATH, VAR_FILE_SHORT_PATH, VAR_PROJECT_SOURCE_LANG, VAR_PROJECT_SOURCE_LANG_CODE, VAR_PROJECT_TARGET_LANG, VAR_PROJECT_TARGET_LANG_CODE, VAR_SOURCE_TEXT, VAR_TARGET_TEXT
Constructor and Description |
---|
MatchesVarExpansion(java.lang.String template) |
Modifier and Type | Method and Description |
---|---|
MatchesVarExpansion.Result |
apply(NearString match,
int id) |
java.lang.String |
expandProperties(java.lang.String localTemplate,
java.util.List<TMXProp> props)
Replace property calls by the corresponding value
Format : @{PropertyName} in this case, retreive only the property value, name is elsewhere. |
java.lang.String |
expandVariables(NearString match) |
static java.util.List<java.lang.String> |
getMatchesVariables() |
expandBundleEntries, expandFileName, expandFileNames
public static final java.lang.String VAR_ID
public static final java.lang.String VAR_SCORE_BASE
public static final java.lang.String VAR_SCORE_NOSTEM
public static final java.lang.String VAR_SCORE_ADJUSTED
@Deprecated public static final java.lang.String VAR_CREATION_ID
VAR_CHANGED_ID
.
For the actual creation ID, use VAR_INITIAL_CREATION_ID
.@Deprecated public static final java.lang.String VAR_CREATION_DATE
VAR_CHANGED_DATE
.
For the actual creation date, use VAR_INITIAL_CREATION_DATE
.public static final java.lang.String VAR_INITIAL_CREATION_ID
public static final java.lang.String VAR_INITIAL_CREATION_DATE
public static final java.lang.String VAR_CHANGED_ID
public static final java.lang.String VAR_CHANGED_DATE
public static final java.lang.String VAR_FUZZY_FLAG
public static final java.lang.String VAR_DIFF
public static final java.lang.String VAR_DIFF_REVERSED
public static final java.lang.String VAR_SOURCE_LANGUAGE
public static final java.lang.String VAR_TARGET_LANGUAGE
public static final java.lang.String DEFAULT_TEMPLATE
public static final java.util.regex.Pattern PATTERN_SINGLE_PROPERTY
public static final java.util.regex.Pattern PATTERN_PROPERTY_GROUP
public static java.util.List<java.lang.String> getMatchesVariables()
public java.lang.String expandProperties(java.lang.String localTemplate, java.util.List<TMXProp> props)
localTemplate
- Initial templateprops
- Map of propertiespublic java.lang.String expandVariables(NearString match)
expandVariables
in class VarExpansion<NearString>
public MatchesVarExpansion.Result apply(NearString match, int id)