EmbeddedConfig
Controls how embedded documents within containers are handled during parsing.
Notes
Controls how the DefaultParser handles embedded documents (such as email attachments or files within ZIP archives). Supports splitting embedded documents into individual documents, skipping embedded documents by content type, and skipping embedded documents based on the container content type.
Usage
- YAML
- JSON
- XML
discardContainerContentTypes:
- ignoreCase: false
ignoreDiacritic: false
matchEmpty: false
method: BASIC
negateMatches: false
partial: false
pattern: string
replaceAll: false
trim: false
maxEmbeddedDepth: 0
skipEmbeddedContentTypes:
- ignoreCase: false
ignoreDiacritic: false
matchEmpty: false
method: BASIC
negateMatches: false
partial: false
pattern: string
replaceAll: false
trim: false
skipEmbeddedOfContentTypes:
- ignoreCase: false
ignoreDiacritic: false
matchEmpty: false
method: BASIC
negateMatches: false
partial: false
pattern: string
replaceAll: false
trim: false
splitContentTypes:
- ignoreCase: false
ignoreDiacritic: false
matchEmpty: false
method: BASIC
negateMatches: false
partial: false
pattern: string
replaceAll: false
trim: false
{
"discardContainerContentTypes": [
{
"ignoreCase": false,
"ignoreDiacritic": false,
"matchEmpty": false,
"method": "BASIC",
"negateMatches": false,
"partial": false,
"pattern": "string",
"replaceAll": false,
"trim": false
}
],
"maxEmbeddedDepth": 0,
"skipEmbeddedContentTypes": [
{
"ignoreCase": false,
"ignoreDiacritic": false,
"matchEmpty": false,
"method": "BASIC",
"negateMatches": false,
"partial": false,
"pattern": "string",
"replaceAll": false,
"trim": false
}
],
"skipEmbeddedOfContentTypes": [
{
"ignoreCase": false,
"ignoreDiacritic": false,
"matchEmpty": false,
"method": "BASIC",
"negateMatches": false,
"partial": false,
"pattern": "string",
"replaceAll": false,
"trim": false
}
],
"splitContentTypes": [
{
"ignoreCase": false,
"ignoreDiacritic": false,
"matchEmpty": false,
"method": "BASIC",
"negateMatches": false,
"partial": false,
"pattern": "string",
"replaceAll": false,
"trim": false
}
]
}
<embedded>
<discardContainerContentTypes>
<discardContainerContentType>
<ignoreCase>false</ignoreCase>
<ignoreDiacritic>false</ignoreDiacritic>
<matchEmpty>false</matchEmpty>
<method>BASIC</method>
<negateMatches>false</negateMatches>
<partial>false</partial>
<pattern>string</pattern>
<replaceAll>false</replaceAll>
<trim>false</trim>
</discardContainerContentType>
</discardContainerContentTypes>
<maxEmbeddedDepth>0</maxEmbeddedDepth>
<skipEmbeddedContentTypes>
<skipEmbeddedContentType>
<ignoreCase>false</ignoreCase>
<ignoreDiacritic>false</ignoreDiacritic>
<matchEmpty>false</matchEmpty>
<method>BASIC</method>
<negateMatches>false</negateMatches>
<partial>false</partial>
<pattern>string</pattern>
<replaceAll>false</replaceAll>
<trim>false</trim>
</skipEmbeddedContentType>
</skipEmbeddedContentTypes>
<skipEmbeddedOfContentTypes>
<skipEmbeddedOfContentType>
<ignoreCase>false</ignoreCase>
<ignoreDiacritic>false</ignoreDiacritic>
<matchEmpty>false</matchEmpty>
<method>BASIC</method>
<negateMatches>false</negateMatches>
<partial>false</partial>
<pattern>string</pattern>
<replaceAll>false</replaceAll>
<trim>false</trim>
</skipEmbeddedOfContentType>
</skipEmbeddedOfContentTypes>
<splitContentTypes>
<splitContentType>
<ignoreCase>false</ignoreCase>
<ignoreDiacritic>false</ignoreDiacritic>
<matchEmpty>false</matchEmpty>
<method>BASIC</method>
<negateMatches>false</negateMatches>
<partial>false</partial>
<pattern>string</pattern>
<replaceAll>false</replaceAll>
<trim>false</trim>
</splitContentType>
</splitContentTypes>
</embedded>
Properties
| Property | Type | Required | Default |
|---|---|---|---|
discardContainerContentTypes | TextMatcher[] | No | - |
maxEmbeddedDepth | integer | No | -1 |
skipEmbeddedContentTypes | TextMatcher[] | No | - |
skipEmbeddedOfContentTypes | TextMatcher[] | No | - |
splitContentTypes | TextMatcher[] | No | - |
Property Details
discardContainerContentTypes
Content types of container files to discard once their embedded documents were split off (see splitContentTypes). A split container is otherwise a document of its own, with whatever content it has itself, and is committed like any other: the body of an email, the text of an office document holding pictures. A zip file has none, so you may not want it. Its embedded documents are not affected: they are documents of their own and carry on.
Only applies to a container whose type is also split, and that held embedded documents. A container that is merged is the one document holding everything and is never discarded, whatever is listed here. Each level is looked at on its own: a split container inside a split container is discarded too when its type is listed. Default is to discard none.
maxEmbeddedDepth
How deep to follow embedded documents. 0 is the container itself, 1 its immediate attachments, and so on. Default is -1, unlimited. Embedded documents nest — a zip holding an email holding a PDF — so a limit is worth setting when containers are untrusted.
skipEmbeddedContentTypes
Content types of the embedded documents to leave unparsed, whatever contains them. A common use is skipping the images embedded in office documents, which are numerous and rarely worth extracting.
skipEmbeddedOfContentTypes
Content types of container files whose embedded documents should not be parsed at all. Use it to ignore the innards of a container type wholesale — the container itself is still processed.
splitContentTypes
Content types of container files whose embedded documents should become documents in their own right. By default nothing is split: embedded content and metadata are merged into the parent.
Split documents go through the whole import cycle themselves, this parser included, and are returned as a nested tree under the container.