Class EmbeddedConfig

java.lang.Object
com.norconex.importer.handler.parser.impl.EmbeddedConfig
All Implemented Interfaces:
Serializable

public class EmbeddedConfig extends Object implements Serializable

For documents containing embedded documents (e.g. zip files), the default behavior of this treat them as a single document, merging all embedded documents content and metadata into the parent document. You can tell this parser to "split" embedded documents to have them treated as if they were individual documents. When split, each embedded documents will go through the entire import cycle, going through your handlers and even this parser again (just like any regular document would).

You can also decide to skip the parsing of embedded documents. Either by the content type of the parent document, or the content types of the embedded documents.

When embedded are being parsed, the resulting ImporterResponse will contain nested documents, which in turn, might contain some (tree-like structure).

See Also:
  • Constructor Details

    • EmbeddedConfig

      public EmbeddedConfig()
  • Method Details

    • getSplitContentTypes

      public List<TextMatcher> getSplitContentTypes()
      Gets the content types of container files to split and treat their embedded files as separate documents. Default does not split any type (all embedded documents are merged).
      Returns:
      list of content type matcher
    • setSplitContentTypes

      public EmbeddedConfig setSplitContentTypes(List<TextMatcher> splitContentTypes)
      Gets the content types of container files to split and treat their embedded files as separate documents. Default does not split any type (all embedded documents are merged).
      Parameters:
      splitContentTypes - list of content type matcher
      Returns:
      this instance
    • getSkipEmbeddedOfContentTypes

      public List<TextMatcher> getSkipEmbeddedOfContentTypes()
      Gets the content type matchers of container files you do not want to have their embedded files parsed. Embedded files of matching containers will effectively be skipped/ignored. Default parses embedded files of all container file content types.
      Returns:
      list of content type matcher
    • setSkipEmbeddedOfContentTypes

      public EmbeddedConfig setSkipEmbeddedOfContentTypes(List<TextMatcher> skipEmbeddedOfContentTypes)
      Gets the content type matchers of container files you do not want to have their embedded files parsed. Embedded files of matching containers will effectively be skipped/ignored. Default parses embedded files of all container file content types.
      Parameters:
      skipEmbeddedOfContentTypes - list of content type matcher
      Returns:
      this instance
    • getSkipEmbeddedContentTypes

      public List<TextMatcher> getSkipEmbeddedContentTypes()
      Gets the content types of container files to split and treat their embedded files as separate documents. Default does not split any type (all embedded documents are merged).
      Returns:
      list of content type matcher
    • setSkipEmbeddedContentTypes

      public EmbeddedConfig setSkipEmbeddedContentTypes(List<TextMatcher> skipEmbeddedContentTypes)
      Gets the content types of container files to split and treat their embedded files as separate documents. Default does not split any type (all embedded documents are merged).
      Parameters:
      skipEmbeddedContentTypes - list of content type matcher
      Returns:
      this instance
    • getMaxEmbeddedDepth

      public int getMaxEmbeddedDepth()
      Maximum detph of embeded documents to extract. Zero is the root document (original container).
      Returns:
      maximum depth of embedded docs to extract
    • setMaxEmbeddedDepth

      public EmbeddedConfig setMaxEmbeddedDepth(int maxEmbeddedDepth)
      Maximum detph of embeded documents to extract. Zero is the root document (original container).
      Parameters:
      maxEmbeddedDepth - max depth or -1 (default) for unlimited.
      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