Class TemplatingClass

  • All Implemented Interfaces:
    android.os.Parcelable

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

      • CREATOR

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

      • TemplatingClass

        public TemplatingClass()
    • Method Detail

      • 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.
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.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