Class TemplatingClass
java.lang.Object
com.microblink.blinkid.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
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
consumeResultFrom
(TemplatingClass other) int
protected void
finalize()
Returns the currently set array of classification processor groups.Returns the currently set array of non-classification processor groups.<T extends TemplatingRecognizer>
TReturns theTemplatingRecognizer
which contains thisTemplatingClass
ornull
if thisTemplatingClass
is not contained withing anyTemplatingRecognizer
.void
setClassificationProcessorGroups
(ProcessorGroup... processorGroups) Sets processor groups that will be executed before classification, i.e.void
setNonClassificationProcessorGroups
(ProcessorGroup... processorGroups) Sets processor groups that will be executed ifTemplatingClassifier.classify(TemplatingClass)
returnstrue
.void
setTemplatingClassifier
(TemplatingClassifier templatingClassifier) Sets the classifier which will tell whether currently processed document belongs to this class.void
writeToParcel
(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 theTemplatingRecognizer
which contains thisTemplatingClass
ornull
if thisTemplatingClass
is not contained withing anyTemplatingRecognizer
.- Returns:
- the
TemplatingRecognizer
which contains thisTemplatingClass
ornull
if thisTemplatingClass
is not contained withing anyTemplatingRecognizer
. - Throws:
ClassCastException
- if owning recognizer is not of correct type
-
finalize
-
describeContents
public int describeContents()- Specified by:
describeContents
in interfaceandroid.os.Parcelable
-
writeToParcel
public void writeToParcel(@NonNull android.os.Parcel dest, int flags) - Specified by:
writeToParcel
in interfaceandroid.os.Parcelable
-