Class Doc

java.lang.Object
com.norconex.importer.doc.Doc
All Implemented Interfaces:
Closeable, AutoCloseable

public class Doc extends Object implements Closeable
A document being imported.
  • Constructor Details

    • Doc

      public Doc(String reference)
    • Doc

      public Doc(@NonNull @NonNull Doc doc)
      Copy constructor.
      Parameters:
      doc - document details to copy
  • Method Details

    • setMetadata

      public Doc setMetadata(Properties metadata)
    • getParentReferences

      public List<String> getParentReferences()
    • setParentReferences

      public Doc setParentReferences(List<String> parentReferences)
    • addParentReference

      public Doc addParentReference(String parentReference)
    • withReference

      public Doc withReference(String reference)
    • close

      public void close() throws IOException
      Disposes of any resources associated with this document (like disk or memory cache).
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException - could not dispose of document resources
    • getInputStream

      public CachedInputStream getInputStream()
    • setInputStream

      public Doc setInputStream(@NonNull @NonNull InputStream inputStream)
    • getStreamFactory

      public CachedStreamFactory getStreamFactory()
    • getReference

      @NonNull public @NonNull String getReference()
    • getContentType

      public ContentType getContentType()
    • getCharset

      public Charset getCharset()
    • getMetadata

      public Properties getMetadata()
    • setContentType

      public Doc setContentType(ContentType contentType)
      Returns:
      this.
    • setCharset

      public Doc setCharset(Charset charset)
      Returns:
      this.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object