Package com.attivio.sdk.scanner
Interface IncludeExcludeDocumentFilter
-
- All Known Implementing Classes:
IncludeExcludeDocumentFilterImpl
public interface IncludeExcludeDocumentFilter
Support for filtering documents by field value. Only included documents will be published.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addFilter(java.lang.String filterName, java.util.List<java.lang.String> includeList, java.util.List<java.lang.String> excludeList, boolean includeIfMissing)
Adds a filter.boolean
isIncluded(IngestDocument doc, java.lang.String filterName)
The value of the field is evaluated by the filter to determine if the document should be published.boolean
isIncluded(java.lang.String nameSpaceValue, java.lang.String filterName)
The value evaluated by the filter to determine if the name space should be scanned.
-
-
-
Method Detail
-
addFilter
void addFilter(java.lang.String filterName, java.util.List<java.lang.String> includeList, java.util.List<java.lang.String> excludeList, boolean includeIfMissing)
Adds a filter. When documents are passed to the filter for evaluation, the filter name must match the field name. For inclusion determination, the field value is evaluated for document inclusion. The document will be included if included by any of the regex expressions in the inclusion list and not excluded by any of the regex expressions in the exclusion list.- Parameters:
filterName
- the name of the filter - typically the name of the AttivioDocument field. When the filter is used byisIncluded(IngestDocument, String)
, the name of the filter and the name of the document field must match.includeList
- a list of regex expressions. If the list is null or empty then all the documents are included regardless the field value.excludeList
- a list of regex expressions. If the list is null or empty then no documents are excluded base on the field value.includeIfMissing
- if true the document will be included if the field is missing from the document. if false, the document will not be included if the field is missing.
-
isIncluded
boolean isIncluded(IngestDocument doc, java.lang.String filterName)
The value of the field is evaluated by the filter to determine if the document should be published.- Parameters:
doc
-filterName
- the name of the filter and the document field name- Returns:
- true if the document should be published.
-
isIncluded
boolean isIncluded(java.lang.String nameSpaceValue, java.lang.String filterName)
The value evaluated by the filter to determine if the name space should be scanned. Examples of name spaces are the uri of folders and sub-sites.- Parameters:
nameSpaceValue
-filetrName
- the filter- Returns:
-
-