java.lang.Object
com.microblink.blinkid.entities.recognizers.templating.TemplatingClass
All Implemented Interfaces:
android.os.Parcelable

public final class TemplatingClass extends Object implements android.os.Parcelable
Class that represents a specific class of documents when used within Templating API.
  • Field Details

    • CREATOR

      @NonNull public static final android.os.Parcelable.Creator<TemplatingClass> CREATOR
  • Constructor Details

    • TemplatingClass

      public TemplatingClass()
  • Method Details

    • setTemplatingClassifier

      public void setTemplatingClassifier(@Nullable TemplatingClassifier templatingClassifier)
      Sets the classifier which will tell whether currently processed document belongs to this class. If set to null, 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

      public void consumeResultFrom(@NonNull TemplatingClass other)
    • setClassificationProcessorGroups

      public void setClassificationProcessorGroups(@Nullable ProcessorGroup... processorGroups)
      Sets processor groups that will be executed before classification, i.e. before TemplatingClassifier.classify(TemplatingClass) is invoked.
      Parameters:
      processorGroups - processor groups that will be executed before classification
    • getClassificationProcessorGroups

      @Nullable public ProcessorGroup[] getClassificationProcessorGroups()
      Returns the currently set array of classification processor groups.
      Returns:
      the currently set array of classification processor groups.
    • setNonClassificationProcessorGroups

      public void setNonClassificationProcessorGroups(@Nullable ProcessorGroup... processorGroups)
      Sets processor groups that will be executed if TemplatingClassifier.classify(TemplatingClass) returns true.
      Parameters:
      processorGroups - processor groups that will be executed after classification, if classification is positive
    • getNonClassificationProcessorGroups

      @Nullable public ProcessorGroup[] getNonClassificationProcessorGroups()
      Returns the currently set array of non-classification processor groups.
      Returns:
      the currently set array of non-classification processor groups.
    • getOwningRecognizer

      @Nullable public <T extends TemplatingRecognizer> T getOwningRecognizer()
      Returns the TemplatingRecognizer which contains this TemplatingClass or null if this TemplatingClass is not contained withing any TemplatingRecognizer.
      Returns:
      the TemplatingRecognizer which contains this TemplatingClass or null if this TemplatingClass is not contained withing any TemplatingRecognizer.
      Throws:
      ClassCastException - if owning recognizer is not of correct type
    • finalize

      protected void finalize() throws Throwable
      Overrides:
      finalize in class Object
      Throws:
      Throwable
    • describeContents

      public int describeContents()
      Specified by:
      describeContents in interface android.os.Parcelable
    • writeToParcel

      public void writeToParcel(@NonNull android.os.Parcel dest, int flags)
      Specified by:
      writeToParcel in interface android.os.Parcelable