Class AbstractDocumentModelWriter

    • Field Detail

      • root

        protected Path root
      • unsavedDocuments

        protected int unsavedDocuments
    • Constructor Detail

      • AbstractDocumentModelWriter

        protected AbstractDocumentModelWriter​(CoreSession session,
                                              String parentPath)
        Parameters:
        session - the session to the repository where to write
        parentPath - where to write the tree. this document will be used as the parent of all top level documents passed as input. Note that you may have
      • AbstractDocumentModelWriter

        protected AbstractDocumentModelWriter​(CoreSession session,
                                              String parentPath,
                                              int saveInterval)
    • Method Detail

      • saveIfNeeded

        protected void saveIfNeeded()
      • close

        public void close()
        Description copied from interface: DocumentWriter
        Closes the writer.
      • createDocument

        protected DocumentModel createDocument​(ExportedDocument xdoc,
                                               Path toPath)
        Creates a new document given its path.

        The parent of this document is assumed to exist.

        Parameters:
        xdoc - the document containing
        toPath - the path of the doc to create
      • beforeCreateDocument

        protected void beforeCreateDocument​(DocumentModel doc)
        Since:
        8.4
      • beforeSaveDocument

        protected void beforeSaveDocument​(DocumentModel doc)
        Since:
        8.4
      • getSaveInterval

        public int getSaveInterval()
      • setSaveInterval

        public void setSaveInterval​(int saveInterval)
      • loadFacetsInfo

        protected boolean loadFacetsInfo​(DocumentModel docModel,
                                         org.dom4j.Document doc)
      • loadSystemInfo

        protected void loadSystemInfo​(DocumentModel docModel,
                                      org.dom4j.Document doc)
      • getFieldClass

        protected static Class<?> getFieldClass​(Type fieldType)