Package org.omegat.core.segmentation
Class MapRule
java.lang.Object
org.omegat.core.segmentation.MapRule
A class representing the language rules and their mapping to the segmentation
rules for each particular language.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()Copy of the object.booleanIndicates whether some other MapRule is "equal to" this one.Returns Compiled Pattern for the language/country ISO code (of a form LL-CC).Returns Language Code for programmatic usage.Returns Language Name (to display it in a dialog).Returns Pattern for the language/country ISO code (of a form LL-CC).getRules()Returns List of rules (of classRule) for the languageinthashCode()Returns a hash code value for the object.toString()Returns a string representation of the MapRule for debugging purposes.
-
Constructor Details
-
MapRule
Create initialized MapRule object.- Parameters:
language- localized language name (from segmentation.conf), or language code (from SRX)pattern- language pattern such as "EN.*" or ".*"rules- segmentation rules.
-
MapRule
Create initialized MapRule object from segmentation.srx.- Parameters:
languagemap- language map from segmentation.srx.rules- segmentation rules.
-
-
Method Details
-
getLanguageName
Returns Language Name (to display it in a dialog). -
getLanguage
Returns Language Code for programmatic usage. -
getPattern
Returns Pattern for the language/country ISO code (of a form LL-CC). -
getCompiledPattern
Returns Compiled Pattern for the language/country ISO code (of a form LL-CC). -
copy
Copy of the object.- Returns:
- new MapRule object
-
getRules
Returns List of rules (of classRule) for the language -
equals
Indicates whether some other MapRule is "equal to" this one. -
hashCode
public int hashCode()Returns a hash code value for the object. -
toString
Returns a string representation of the MapRule for debugging purposes.
-