Package com.attivio.util
Class IncludeExcludeDocumentFilterImpl
- java.lang.Object
-
- com.attivio.util.IncludeExcludeDocumentFilterImpl
-
- All Implemented Interfaces:
IncludeExcludeDocumentFilter
public class IncludeExcludeDocumentFilterImpl extends java.lang.Object implements IncludeExcludeDocumentFilter
-
-
Constructor Summary
Constructors Constructor Description IncludeExcludeDocumentFilterImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFilter(java.lang.String fieldName, 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
public void addFilter(java.lang.String fieldName, java.util.List<java.lang.String> includeList, java.util.List<java.lang.String> excludeList, boolean includeIfMissing)
Description copied from interface:IncludeExcludeDocumentFilter
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.- Specified by:
addFilter
in interfaceIncludeExcludeDocumentFilter
- Parameters:
fieldName
- the name of the filter - typically the name of the AttivioDocument field. When the filter is used byIncludeExcludeDocumentFilter.isIncluded(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
public boolean isIncluded(java.lang.String nameSpaceValue, java.lang.String filterName)
Description copied from interface:IncludeExcludeDocumentFilter
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.- Specified by:
isIncluded
in interfaceIncludeExcludeDocumentFilter
- Returns:
-
isIncluded
public boolean isIncluded(IngestDocument doc, java.lang.String filterName)
Description copied from interface:IncludeExcludeDocumentFilter
The value of the field is evaluated by the filter to determine if the document should be published.- Specified by:
isIncluded
in interfaceIncludeExcludeDocumentFilter
filterName
- the name of the filter and the document field name- Returns:
- true if the document should be published.
-
-