Class TdbTextExtractionInfo


  • public class TdbTextExtractionInfo
    extends java.lang.Object
    Container for text extraction information. Access to instances of this class is provided via properties in the TdbTextField class. Use this class to perform and control text extraction using TRIPcof or TRIPview-C.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getBinaryCopyField()
      Get the name of the STRING field that receives a copy of the document data, and/or contains the document data to extract text from.
      boolean getClientSide()
      Determines if the text extraction should be performed on the server (false; default) or on the client-side (true).
      boolean getExtractFromStored()
      Determines if the text extraction should be performed from the value already stored in the STRING field defined by the property BinaryCopyField.
      boolean getExtractText()
      Indicates if text extraction is to be performed.
      java.lang.String getFileName()
      Get the name of the file that the Stream property refers to.
      java.lang.String getPropertyNameField()
      Get the name of the phrase field to recieve document property names during text extraction.
      java.lang.String getPropertyValueField()
      Get the value of the phrase field to recieve document property values during text extraction.
      java.io.InputStream getStream()
      Get the stream for document data to extract text from and optionally store a copy of.
      TdbStringField getStringField()
      If this method returns a non-null value, text extraction will be performed from any value assigned to the TdbStringField instance in question.
      java.lang.String getTextField()
      The text field in which the extracted text is to be stored.
      void setBinaryCopyField​(java.lang.String binaryCopyField)
      Set the name of the STRING field that receives a copy of the document data, and/or contains the document data to extract text from.
      void setClientSide​(boolean clientside)
      If set to true, text extraction will be performed on the client-side and require a local installation of TRIPcof or of TRIPview-C.
      void setExtractFromStored​(boolean extractFromStored)
      Determines if the text extraction should be performed from the value already stored in the STRING field defined by the property BinaryCopyField.
      void setExtractText​(boolean doExtractText)
      Indicates if text extraction is to be performed.
      void setFileName​(java.lang.String filename)
      Set the name of the file that the Stream property refers to.
      void setPropertyNameField​(java.lang.String propertyNameField)
      Sets the name of the phrase field to recieve document property names during text extraction.
      void setPropertyValueField​(java.lang.String propertyValueField)
      Sets the value of the phrase field to recieve document property values during text extraction.
      void setStream​(java.io.InputStream is)
      Set a stream for document data to extract text from and optionally store a copy of.
      void setStringField​(TdbStringField stringField)
      If assigned a non-null value, text extraction will be performed from any value assigned to the provided TdbStringField instance.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getClientSide

        public boolean getClientSide()
        Determines if the text extraction should be performed on the server (false; default) or on the client-side (true).
        Returns:
        True to extract text on client and false to extract text on server.

        If TRIPcof is used, the TRIPcof installation directory must be specified as either a system property with the name TRIPCOF_HOME, or an environment variable with the name TRIPCOF_HOME

        If TRIPview-C is used, the TRIPview-C installation directory must be specified as either a system property with the name TRIPVIEW_HOME, or an environment variable with the name TRIPVIEW_HOME.

        If the text extraction is performed on the client-side, it is fully performed before commit of the record. The data transmitted to the server for the associated text field will be the extracted text. No TRIPview-C/TRIPcof processing is then done on the server.

      • setClientSide

        public void setClientSide​(boolean clientside)
        If set to true, text extraction will be performed on the client-side and require a local installation of TRIPcof or of TRIPview-C.
        Parameters:
        clientside - True to extract text on client and false to extract text on server.

        If TRIPcof is used, the TRIPcof installation directory must be specified as either a system property with the name TRIPCOF_HOME, or an environment variable with the name TRIPCOF_HOME

        If TRIPview-C is used, the TRIPview-C installation directory must be specified as either a system property with the name TRIPVIEW_HOME, or an environment variable with the name TRIPVIEW_HOME.

        If the text extraction is performed on the client-side, it is fully performed before commit of the record. The data transmitted to the server for the associated text field will be the extracted text. No TRIPview-C/TRIPcof processing is then done on the server.

      • getTextField

        public java.lang.String getTextField()
        The text field in which the extracted text is to be stored.
      • getBinaryCopyField

        public java.lang.String getBinaryCopyField()
        Get the name of the STRING field that receives a copy of the document data, and/or contains the document data to extract text from.

        If a STRING field is specified in this property and neither the FileName nor the Stream property is specified, text extraction will be performed from the data already stored in the specified string field. Note that this is only supported for updates of existing records.

      • setBinaryCopyField

        public void setBinaryCopyField​(java.lang.String binaryCopyField)
        Set the name of the STRING field that receives a copy of the document data, and/or contains the document data to extract text from.

        If a STRING field is specified in this property and neither the FileName nor the Stream property is specified, text extraction will be performed from the data already stored in the specified string field. Note that this is only supported for updates of existing records.

        If the setStringField(String) method has been called with a non-null value and that refers to a different STRING field than this property does, that value will be reset to null when the setBinaryCopyField method is called with a non-null, non-empty argument.

        When the setStringField method property is called with a non-null value, the BinaryCopyField property will be automatically assigned the name of the associated STRING field.

      • getStringField

        public TdbStringField getStringField()
        If this method returns a non-null value, text extraction will be performed from any value assigned to the TdbStringField instance in question.
      • getPropertyNameField

        public java.lang.String getPropertyNameField()
        Get the name of the phrase field to recieve document property names during text extraction.
      • setPropertyNameField

        public void setPropertyNameField​(java.lang.String propertyNameField)
        Sets the name of the phrase field to recieve document property names during text extraction.
      • getPropertyValueField

        public java.lang.String getPropertyValueField()
        Get the value of the phrase field to recieve document property values during text extraction.
      • setPropertyValueField

        public void setPropertyValueField​(java.lang.String propertyValueField)
        Sets the value of the phrase field to recieve document property values during text extraction.
      • getFileName

        public java.lang.String getFileName()
        Get the name of the file that the Stream property refers to.

        The file name is a valuable aid to the text extractor in helping to determine the type of the file, if it cannot be determined by any other means.

        If FileName is specified and refers to an existing local file and the Stream property is null, text extraction will be performed from the named file. This is the preferred choice if the application is running on the TRIP server machine.

      • setFileName

        public void setFileName​(java.lang.String filename)
        Set the name of the file that the Stream property refers to.

        The file name is a valuable aid to the text extractor in helping to determine the type of the file, if it cannot be determined by any other means.

        If FileName is specified and refers to an existing local file and the Stream property is null, text extraction will be performed from the named file. This is the preferred choice if the application is running on the TRIP server machine.

      • getStream

        public java.io.InputStream getStream()
        Get the stream for document data to extract text from and optionally store a copy of.
      • setStream

        public void setStream​(java.io.InputStream is)
        Set a stream for document data to extract text from and optionally store a copy of.
      • getExtractText

        public boolean getExtractText()
        Indicates if text extraction is to be performed. Must be set to true in order for extraction to work.
        Returns:
        true if text extraction is to be performed
      • setExtractText

        public void setExtractText​(boolean doExtractText)
        Indicates if text extraction is to be performed. Must be set to true in order for extraction to work.
        Parameters:
        doExtractText - Pass true to perform text extraction.
      • getExtractFromStored

        public boolean getExtractFromStored()
        Determines if the text extraction should be performed from the value already stored in the STRING field defined by the property BinaryCopyField. This property is false by default.
      • setExtractFromStored

        public void setExtractFromStored​(boolean extractFromStored)
                                  throws TdbException
        Determines if the text extraction should be performed from the value already stored in the STRING field defined by the property BinaryCopyField.

        Set this property to true if you wish to perform a text extraction on data previously added to a STRING field, but do not intend or wish to supply the value again.

        This property is false by default.

        Parameters:
        extractFromStored - True to extract from stored file, false otherw.se
        Throws:
        TdbException - If the TRIPsystem version is too old.