Class MatchesVarExpansion


  • public class MatchesVarExpansion
    extends VarExpansion<NearString>
    This class is used to convert a NearString to a text visible in the MatchesTextArea according to the given template containing variables.
    • Field Detail

      • VAR_SCORE_NOSTEM

        public static final java.lang.String VAR_SCORE_NOSTEM
        See Also:
        Constant Field Values
      • VAR_SCORE_ADJUSTED

        public static final java.lang.String VAR_SCORE_ADJUSTED
        See Also:
        Constant Field Values
      • VAR_INITIAL_CREATION_ID

        public static final java.lang.String VAR_INITIAL_CREATION_ID
        See Also:
        Constant Field Values
      • VAR_INITIAL_CREATION_DATE

        public static final java.lang.String VAR_INITIAL_CREATION_DATE
        See Also:
        Constant Field Values
      • VAR_CHANGED_DATE

        public static final java.lang.String VAR_CHANGED_DATE
        See Also:
        Constant Field Values
      • VAR_DIFF_REVERSED

        public static final java.lang.String VAR_DIFF_REVERSED
        See Also:
        Constant Field Values
      • VAR_SOURCE_LANGUAGE

        public static final java.lang.String VAR_SOURCE_LANGUAGE
        See Also:
        Constant Field Values
      • VAR_TARGET_LANGUAGE

        public static final java.lang.String VAR_TARGET_LANGUAGE
        See Also:
        Constant Field Values
      • DEFAULT_TEMPLATE

        public static final java.lang.String DEFAULT_TEMPLATE
        See Also:
        Constant Field Values
      • PATTERN_SINGLE_PROPERTY

        public static final java.util.regex.Pattern PATTERN_SINGLE_PROPERTY
      • PATTERN_PROPERTY_GROUP

        public static final java.util.regex.Pattern PATTERN_PROPERTY_GROUP
    • Constructor Detail

      • MatchesVarExpansion

        public MatchesVarExpansion​(java.lang.String template)
    • Method Detail

      • getMatchesVariables

        public static java.util.List<java.lang.String> getMatchesVariables()
      • expandProperties

        public 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.
        Format : @[Property name with *][separator 1][separator2] in this case, return all properties matching the 1st pattern, as key=value pairs where = is replaced by separator1 and use separator2 between entries.
        Expression \n for new line is accepted in separators.
        Parameters:
        localTemplate - Initial template
        props - Map of properties
        Returns:
        Expanded template