Interface ParentChildDocumentAssociation

  • All Known Implementing Classes:
    ParentChildDocumentAssociation

    public interface ParentChildDocumentAssociation
    Scanners use instances of this interface to associate parent documents with child documents.
    • Method Detail

      • noteChild

        void noteChild​(IngestDocument parent,
                       IngestDocument child)
        Annotates parent and child documents such that the parent child relationship is maintained.
        Parameters:
        parent -
        child -
      • clearAssociation

        void clearAssociation​(IngestDocument doc)
        Clears any association related fields
        Parameters:
        doc -
      • getChildIndex

        int getChildIndex​(IngestDocument doc)
        Returns:
        which part this child document is in a compound document or -1 if it is not part of a compound document
      • getUltimateParentId

        java.lang.String getUltimateParentId​(IngestDocument doc)
        Returns:
        the document id of the top-level ancestor of this document or null if this document is not part of a compound document.
      • getParentId

        java.lang.String getParentId​(IngestDocument doc)
        Returns:
        the document id of the parent of this document or null if this document is not part of a compound document.
      • getChildCount

        int getChildCount​(IngestDocument doc)
        Returns:
        the number of children created for this compound document or 0 if this is not a compound document.
      • createChildQuery

        PhraseQuery createChildQuery​(IngestDocument doc)
        Creates a Query that will find all children of this document, if any. Note, this query will have no effect if the schema does not contain the parentId field.
        Returns:
        a Query that will find all children of this document, if any
      • createChildQuery

        PhraseQuery createChildQuery​(java.lang.String docId)
        Creates a Query that will find all children of this document, if any. Note, this query will have no effect if the schema does not contain the parentId field.
        Returns:
        a Query that will find all children of this document, if any
      • getAncestry

        java.util.ArrayList<java.lang.String> getAncestry​(IngestDocument doc)
        Returns:
        the list of ancestor ids of this document.