Interface StringDocument

    • Field Detail

      • logger

        static final org.apache.logging.log4j.Logger logger
    • Method Detail

      • getContentAsString

        String getContentAsString()
        Gets the document content as a string.
        Returns:
        the content of the document as a string.
      • cloneWithURI

        StringDocument cloneWithURI​(URI uri)
        Description copied from interface: FilterableDocument
        Gets a clone of the document with a different URI.
        Specified by:
        cloneWithURI in interface FilterableDocument
        Parameters:
        uri - the document returned document will have.
        Returns:
        A new document with the given URI.
      • cloneWithMetadata

        StringDocument cloneWithMetadata​(com.google.common.collect.ListMultimap<String,​String> metadata)
        Description copied from interface: FilterableDocument
        Gets a clone of the document with the given metadata.

        Note that the returned document will only have the metadata given as a paramater to this method. Typically the result of NoContentDocument.getCopyOfMetadata() should be manipulated then passed to this function to preserve existing metadata.

        Specified by:
        cloneWithMetadata in interface FilterableDocument
        Parameters:
        metadata - The only metadata that the returbed document will have.
        Returns:
        A new document with the given headers.
      • getCharset

        Optional<Charset> getCharset()
        Charset of a StringDocument are always UTF-8, if the document contains any indication of charset it must be UTF-8
        Specified by:
        getCharset in interface NoContentDocument
        Returns:
        the charset of a document which is always UTF-8.