Class TemplatingClass
java.lang.Object
com.microblink.blinkinput.entities.recognizers.templating.TemplatingClass
- All Implemented Interfaces:
android.os.Parcelable
Class that represents a specific class of documents when used within Templating API.
-
Nested Class Summary
-
Field Summary
FieldsFields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconsumeResultFrom(TemplatingClass other) intprotected voidfinalize()Returns the currently set array of classification processor groups.Returns the currently set array of non-classification processor groups.<T extends TemplatingRecognizer>
TReturns theTemplatingRecognizerwhich contains thisTemplatingClassornullif thisTemplatingClassis not contained withing anyTemplatingRecognizer.voidsetClassificationProcessorGroups(ProcessorGroup... processorGroups) Sets processor groups that will be executed before classification, i.e.voidsetNonClassificationProcessorGroups(ProcessorGroup... processorGroups) Sets processor groups that will be executed ifTemplatingClassifier.classify(TemplatingClass)returnstrue.voidsetTemplatingClassifier(TemplatingClassifier templatingClassifier) Sets the classifier which will tell whether currently processed document belongs to this class.voidwriteToParcel(android.os.Parcel dest, int flags)
-
Field Details
-
CREATOR
-
-
Constructor Details
-
TemplatingClass
public TemplatingClass()
-
-
Method Details
-
setTemplatingClassifier
Sets the classifier which will tell whether currently processed document belongs to this class. If set tonull, existing classifier (if exists) will be cleared and non-classification processor groups will not be executed.- Parameters:
templatingClassifier- Classifier which will tell whether currently processed document belongs to this class.
-
consumeResultFrom
-
setClassificationProcessorGroups
Sets processor groups that will be executed before classification, i.e. beforeTemplatingClassifier.classify(TemplatingClass)is invoked.- Parameters:
processorGroups- processor groups that will be executed before classification
-
getClassificationProcessorGroups
Returns the currently set array of classification processor groups.- Returns:
- the currently set array of classification processor groups.
-
setNonClassificationProcessorGroups
Sets processor groups that will be executed ifTemplatingClassifier.classify(TemplatingClass)returnstrue.- Parameters:
processorGroups- processor groups that will be executed after classification, if classification is positive
-
getNonClassificationProcessorGroups
Returns the currently set array of non-classification processor groups.- Returns:
- the currently set array of non-classification processor groups.
-
getOwningRecognizer
Returns theTemplatingRecognizerwhich contains thisTemplatingClassornullif thisTemplatingClassis not contained withing anyTemplatingRecognizer.- Returns:
- the
TemplatingRecognizerwhich contains thisTemplatingClassornullif thisTemplatingClassis not contained withing anyTemplatingRecognizer. - Throws:
ClassCastException- if owning recognizer is not of correct type
-
finalize
-
describeContents
public int describeContents()- Specified by:
describeContentsin interfaceandroid.os.Parcelable
-
writeToParcel
public void writeToParcel(@NonNull android.os.Parcel dest, int flags) - Specified by:
writeToParcelin interfaceandroid.os.Parcelable
-