Class Carrydown


  • public class Carrydown
    extends BaseTable
    This class manages the table that keeps track of intrinsic relationships between documents.

    carrydown
    FieldTypeDescription        
    jobidBIGINTReference:jobs.id
    parentidhashVARCHAR(40)
    childidhashVARCHAR(40)
    datanameVARCHAR(255)
    datavaluehashVARCHAR(40)
    datavalueLONGTEXT
    isnewCHAR(1)
    processidVARCHAR(16)


    • Field Detail

      • parentIDHashField

        public static final java.lang.String parentIDHashField
        See Also:
        Constant Field Values
      • childIDHashField

        public static final java.lang.String childIDHashField
        See Also:
        Constant Field Values
      • dataValueHashField

        public static final java.lang.String dataValueHashField
        See Also:
        Constant Field Values
      • ISNEW_BASE

        protected static final int ISNEW_BASE
        The standard value for the "isnew" field. Means that the link existed prior to this scan, and no new link was found yet.
        See Also:
        Constant Field Values
      • ISNEW_NEW

        protected static final int ISNEW_NEW
        This value means that the link is brand-new; it did not exist before this pass.
        See Also:
        Constant Field Values
      • ISNEW_EXISTING

        protected static final int ISNEW_EXISTING
        This value means that the link existed before, and has been found during this scan.
        See Also:
        Constant Field Values
      • isNewMap

        protected static java.util.Map isNewMap
    • Method Detail

      • deleteOwner

        public void deleteOwner​(java.lang.Long jobID)
                         throws ManifoldCFException
        Delete an owning job (and clean up the corresponding carrydown rows).
        Throws:
        ManifoldCFException
      • recordCarrydownData

        public boolean recordCarrydownData​(java.lang.Long jobID,
                                           java.lang.String parentDocumentIDHash,
                                           java.lang.String childDocumentIDHash,
                                           java.lang.String[] documentDataNames,
                                           java.lang.String[][] documentDataValueHashes,
                                           java.lang.Object[][] documentDataValues,
                                           java.lang.String processID)
                                    throws ManifoldCFException
        Add carrydown data for a given parent/child pair.
        Returns:
        true if new carrydown data was recorded; false otherwise.
        Throws:
        ManifoldCFException
      • recordCarrydownDataMultiple

        public boolean[] recordCarrydownDataMultiple​(java.lang.Long jobID,
                                                     java.lang.String parentDocumentIDHash,
                                                     java.lang.String[] childDocumentIDHashes,
                                                     java.lang.String[][] dataNames,
                                                     java.lang.String[][][] dataValueHashes,
                                                     java.lang.Object[][][] dataValues,
                                                     java.lang.String processID)
                                              throws ManifoldCFException
        Add carrydown data to the table.
        Throws:
        ManifoldCFException
      • revertRecords

        public void revertRecords​(java.lang.Long jobID,
                                  java.lang.String[] parentDocumentIDHashes)
                           throws ManifoldCFException
        Revert all records belonging to the specified parent documents to their original, pre-modified, state.
        Throws:
        ManifoldCFException
      • performRevertRecords

        protected void performRevertRecords​(java.lang.String query,
                                            java.lang.Long jobID,
                                            java.util.List<java.lang.String> list)
                                     throws ManifoldCFException
        Throws:
        ManifoldCFException
      • restoreRecords

        public void restoreRecords​(java.lang.Long jobID,
                                   java.lang.String[] parentDocumentIDHashes)
                            throws ManifoldCFException
        Return all records belonging to the specified parent documents to the base state, and delete the old (eliminated) child records.
        Throws:
        ManifoldCFException
      • performRestoreRecords

        protected void performRestoreRecords​(java.lang.String query,
                                             java.lang.Long jobID,
                                             java.util.List<java.lang.String> list)
                                      throws ManifoldCFException
        Throws:
        ManifoldCFException
      • deleteRecords

        public void deleteRecords​(java.lang.Long jobID,
                                  java.lang.String[] documentIDHashes)
                           throws ManifoldCFException
        Delete all records that mention a particular set of document identifiers.
        Throws:
        ManifoldCFException
      • maxClausePerformDeleteRecords

        protected int maxClausePerformDeleteRecords​(java.lang.Long jobID)
      • getDataValues

        public java.lang.String[] getDataValues​(java.lang.Long jobID,
                                                java.lang.String documentIdentifierHash,
                                                java.lang.String dataName)
                                         throws ManifoldCFException
        Get unique values given a document identifier, data name, an job identifier
        Throws:
        ManifoldCFException
      • getDataValuesAsFiles

        public CharacterInput[] getDataValuesAsFiles​(java.lang.Long jobID,
                                                     java.lang.String documentIdentifierHash,
                                                     java.lang.String dataName)
                                              throws ManifoldCFException
        Get unique values given a document identifier, data name, an job identifier
        Throws:
        ManifoldCFException
      • stringToStatus

        public static int stringToStatus​(java.lang.String status)
        Convert string to link status.
      • statusToString

        public static java.lang.String statusToString​(int status)
        Convert link status to string