|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.shapelogic.logic.LetterTaskFactory
public class LetterTaskFactory
Should create all the rules used for letter matching. Contains 2 sets of rules for letter matching 1: A simple set that only works for straight letters using simple properties 2: A more complex set of rules works for straight and curved letters This uses annotations
Field Summary | |
---|---|
static java.lang.String |
POLYGON
|
static boolean |
USE_LEGACY_SYNTAX
To test if rules with old syntax still works |
Constructor Summary | |
---|---|
LetterTaskFactory()
|
Method Summary | |
---|---|
static BaseTask |
createLetterTasksFromRule(BaseTask parentTask,
java.util.List<NumericRule> allNumericRules,
java.lang.String letterSelector)
Create a letter task from all NumericRules of the underlying letters. |
static java.lang.String |
filter(java.lang.String expression)
Transform base expression to expression filter with size applied. |
static NumericRule[] |
getSimpleNumericRuleForAllLetters(java.lang.String polygon)
Generate all rule that are needed for matching all the capital letter using new complex filter rules. |
static java.lang.String |
matchPolygonToLetterUsingTask(Polygon rawPolygon,
Polygon polygon,
NumericRule[] rulesArrayForLetterMatching)
|
static java.lang.String |
size(java.lang.String expression)
Transform base expression to expression with size applied. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String POLYGON
public static final boolean USE_LEGACY_SYNTAX
Constructor Detail |
---|
public LetterTaskFactory()
Method Detail |
---|
public static java.lang.String size(java.lang.String expression)
public static java.lang.String filter(java.lang.String expression)
public static NumericRule[] getSimpleNumericRuleForAllLetters(java.lang.String polygon)
polygon
- is a String that contain the context variable that the rules will be applied topublic static BaseTask createLetterTasksFromRule(BaseTask parentTask, java.util.List<NumericRule> allNumericRules, java.lang.String letterSelector)
parentTask
- To insert this task into, will often be the RootTaskallNumericRules
- all the Numeric Rules that are usedletterSelector
- if you only want to match against on letter for debugging problems
public static java.lang.String matchPolygonToLetterUsingTask(Polygon rawPolygon, Polygon polygon, NumericRule[] rulesArrayForLetterMatching)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |