TreeRecognizer
Inheritance: java.lang.Object, com.aspose.barcode.barcoderecognition.recognition.datamatrix.oldalgorithm.treealgorithm.BaseRecognizer
public class TreeRecognizer extends BaseRecognizer
Class for recognizing a tree of algorithms. Firstly it applies owner algorithm (if needed), secondly applies children algorithms (leafs or tree recognizers)
Constructors
Constructor | Description |
---|---|
TreeRecognizer(IAlgorithm ownerAlgorithm, System.Type[] writableType) | Initializes a new instance of the TreeRecognizer class. |
TreeRecognizer() | Initializes a new instance of the TreeRecognizer class without owner algorithm |
Fields
Field | Description |
---|---|
_firstSuccessOnly | If one of algorithms at current level is succesfull, next algorithms from this level will not be applied |
Methods
Method | Description |
---|---|
addCreateTree() | Creates a tree recognizer(without owner algorithm) and adds it as a child |
addCreateTree(IAlgorithm algorithm) | Creates a tree recognizer with owner algorithm. |
addLeaf(IAlgorithm algorithm, System.Type[] writableTypes) | Adds a leaf algorithm as a child. |
addLeafs(IAlgorithm[] algorithms) | Adds leafs |
addTree(TreeRecognizer treeRecognizer) | Adds a tree recognizer as a child |
equals(Object arg0) | |
getChilren() | Gets children algorithms |
getClass() | |
getOwner() | Gets owner algorithm |
hashCode() | |
makeCycle(ICorrector iterator) | Makes a cycle at this node owner |
notify() | |
notifyAll() | |
run(ModelHolder modelHolder) | Applies the algorithm of tree recognition |
setCorrector(ICorrector corrector) | Sets a corrector for the owner algorithm |
setFirstSuccessOnly(IAlgorithm isFirstSuccessOnly) | If set true, if one of algorithms at current level is succesfull, next algorithms from this level will not be applied |
toString() | |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
TreeRecognizer(IAlgorithm ownerAlgorithm, System.Type[] writableType)
public TreeRecognizer(IAlgorithm ownerAlgorithm, System.Type[] writableType)
Initializes a new instance of the TreeRecognizer class.
Parameters:
Parameter | Type | Description |
---|---|---|
ownerAlgorithm | IAlgorithm | First algorithm, which will be applied before leafs. |
writableType | com.aspose.ms.System.Type[] | Algorithm can rewrite this types |
TreeRecognizer()
public TreeRecognizer()
Initializes a new instance of the TreeRecognizer class without owner algorithm
_firstSuccessOnly
public IAlgorithm _firstSuccessOnly
If one of algorithms at current level is succesfull, next algorithms from this level will not be applied
addCreateTree()
public final TreeRecognizer addCreateTree()
Creates a tree recognizer(without owner algorithm) and adds it as a child
Returns: TreeRecognizer
addCreateTree(IAlgorithm algorithm)
public final TreeRecognizer addCreateTree(IAlgorithm algorithm)
Creates a tree recognizer with owner algorithm. Adds created recognizer as a child
Parameters:
Parameter | Type | Description |
---|---|---|
algorithm | IAlgorithm | Owner algorithm for a tree reconizer |
Returns: TreeRecognizer - Created tree recognizer
addLeaf(IAlgorithm algorithm, System.Type[] writableTypes)
public final void addLeaf(IAlgorithm algorithm, System.Type[] writableTypes)
Adds a leaf algorithm as a child.
Parameters:
Parameter | Type | Description |
---|---|---|
algorithm | IAlgorithm | Leaf algorithm |
writableTypes | com.aspose.ms.System.Type[] | Algorithm can rewrite this types |
addLeafs(IAlgorithm[] algorithms)
public final TreeRecognizer addLeafs(IAlgorithm[] algorithms)
Adds leafs
Parameters:
Parameter | Type | Description |
---|---|---|
algorithms | IAlgorithm[] | An array of algorithms |
Returns: TreeRecognizer - This
addTree(TreeRecognizer treeRecognizer)
public final void addTree(TreeRecognizer treeRecognizer)
Adds a tree recognizer as a child
Parameters:
Parameter | Type | Description |
---|---|---|
treeRecognizer | TreeRecognizer | A tree recognizer |
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
getChilren()
public final System.Collections.Generic.List<BaseRecognizer> getChilren()
Gets children algorithms
Returns: List - Children algorithms
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class>
getOwner()
public final LeafRecognizer getOwner()
Gets owner algorithm
Returns: com.aspose.barcode.barcoderecognition.recognition.datamatrix.oldalgorithm.treealgorithm.LeafRecognizer - Owner algorithm
hashCode()
public native int hashCode()
Returns: int
makeCycle(ICorrector iterator)
public final TreeRecognizer makeCycle(ICorrector iterator)
Makes a cycle at this node owner
Parameters:
Parameter | Type | Description |
---|---|---|
iterator | ICorrector | An iterator for a cycle |
Returns: TreeRecognizer - This
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
run(ModelHolder modelHolder)
public boolean run(ModelHolder modelHolder)
Applies the algorithm of tree recognition
Parameters:
Parameter | Type | Description |
---|---|---|
modelHolder | ModelHolder | Model holder. Contains input and output models for algorithms |
Returns: boolean - Is succesfully applied and got a result
setCorrector(ICorrector corrector)
public final void setCorrector(ICorrector corrector)
Sets a corrector for the owner algorithm
Parameters:
Parameter | Type | Description |
---|---|---|
corrector | ICorrector |
setFirstSuccessOnly(IAlgorithm isFirstSuccessOnly)
public final void setFirstSuccessOnly(IAlgorithm isFirstSuccessOnly)
If set true, if one of algorithms at current level is succesfull, next algorithms from this level will not be applied
Parameters:
Parameter | Type | Description |
---|---|---|
isFirstSuccessOnly | IAlgorithm | Is first success only |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |