Class DocumentFile


  • public class DocumentFile
    extends java.lang.Object
    Encapsulates a file that should be written to MarkLogic as a single document. A DocumentWriteOperation can be constructed via the toDocumentWriteOperation method.

    The modifiedContent allows for the content of the constructed DocumentWriteOperation to be set via that property instead of via the File. The assumption is that something like a DocumentFileProcessor has read in the contents of the File used to construct this class.

    • Constructor Detail

      • DocumentFile

        public DocumentFile​(java.lang.String uri,
                            org.springframework.core.io.Resource resource)
      • DocumentFile

        public DocumentFile​(java.lang.String uri,
                            java.io.File file)
    • Method Detail

      • toDocumentWriteOperation

        public com.marklogic.client.document.DocumentWriteOperation toDocumentWriteOperation()
      • getUri

        public java.lang.String getUri()
      • getOperationType

        public com.marklogic.client.document.DocumentWriteOperation.OperationType getOperationType()
      • getMetadata

        public com.marklogic.client.io.DocumentMetadataHandle getMetadata()
      • getContent

        public com.marklogic.client.io.marker.AbstractWriteHandle getContent()
      • getTemporalDocumentURI

        public java.lang.String getTemporalDocumentURI()
      • getFileExtension

        public java.lang.String getFileExtension()
      • getResource

        public org.springframework.core.io.Resource getResource()
      • getFile

        public java.io.File getFile()
      • setFormat

        public void setFormat​(com.marklogic.client.io.Format format)
      • getDocumentMetadata

        public com.marklogic.client.io.DocumentMetadataHandle getDocumentMetadata()
      • setDocumentMetadata

        public void setDocumentMetadata​(com.marklogic.client.io.DocumentMetadataHandle documentMetadata)
      • setUri

        public void setUri​(java.lang.String uri)
      • setResource

        public void setResource​(org.springframework.core.io.Resource resource)
      • getFormat

        public com.marklogic.client.io.Format getFormat()
      • setTemporalDocumentURI

        public void setTemporalDocumentURI​(java.lang.String temporalDocumentURI)
      • setModifiedContent

        public void setModifiedContent​(java.lang.String modifiedContent)
      • getModifiedContent

        public java.lang.String getModifiedContent()
      • getRootPath

        public java.nio.file.Path getRootPath()
      • setRootPath

        public void setRootPath​(java.nio.file.Path rootPath)
        Optional to set - the Path that this File was loaded relative to
        Parameters:
        rootPath -