Class DocumentContent

java.lang.Object
com.priint.pubserver.document.Document
com.priint.pubserver.document.DocumentContent
All Implemented Interfaces:
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:
  • Constructor Details

    • DocumentContent

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

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

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

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

      public DocumentContent(String path, String version, InputStream content, Map<Document.DocumentProperties,String> properties)
      Instantiates a new Document content.
      Parameters:
      path - the path
      version - the version
      content - the content
      properties - the properties
  • Method Details

    • getContent

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

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

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

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