Class DocumentContent

  • All Implemented Interfaces:
    java.io.Serializable

    public class DocumentContent
    extends Document
    DocumentContent represents the @Document (metadata referenced by its absolute path in our repository) together with its content.
    See Also:
    Serialized Form
    • Constructor Detail

      • DocumentContent

        public DocumentContent()
        Instantiates a new Document content.
      • DocumentContent

        public DocumentContent​(java.lang.String path,
                               java.io.InputStream content)
        Instantiates a new Document content.
        Parameters:
        path - the path
        content - the content
      • DocumentContent

        public DocumentContent​(java.lang.String path,
                               java.lang.String version,
                               java.io.InputStream content)
        Instantiates a new Document content.
        Parameters:
        path - the path
        version - the version
        content - the content
      • DocumentContent

        public DocumentContent​(java.lang.String path,
                               java.io.InputStream content,
                               java.util.Map<Document.DocumentProperties,​java.lang.String> properties)
        Instantiates a new Document content.
        Parameters:
        path - the path
        content - the content
        properties - the properties
      • DocumentContent

        public DocumentContent​(java.lang.String path,
                               java.lang.String version,
                               java.io.InputStream content,
                               java.util.Map<Document.DocumentProperties,​java.lang.String> properties)
        Instantiates a new Document content.
        Parameters:
        path - the path
        version - the version
        content - the content
        properties - the properties
    • Method Detail

      • getContent

        public java.io.InputStream getContent()
        Gets content.
        Returns:
        the content
      • setContent

        public void setContent​(java.io.InputStream content)
        Sets content.
        Parameters:
        content - the content
      • readContent

        public java.lang.String readContent()
        Read content string.
        Returns:
        the string
      • show

        public java.lang.String show()
        Helper method to get a formatted string representation of the document content together with properties.
        Returns:
        content with properties as formatted string