SearchDocumentFilter

Inheritance: java.lang.Object

public class SearchDocumentFilter

Contains methods for creating search document filters.

Learn more

Constructors

Constructor Description
SearchDocumentFilter()

Methods

Method Description
createFilePathRegularExpression(String pattern) Creates a filter for skipping documents that are not match a regular expression.
createFilePathRegularExpression(String pattern, int options) Creates a filter for skipping documents that are not match a regular expression.
createFileExtension(String[] extensions) Creates a filter for skipping documents that are not in the specified list of possible extensions.
createNot(ISearchDocumentFilter innerFilter) Creates a filter that has inverse logic in relation to the specified inner filter.
createAnd(ISearchDocumentFilter[] filters) Creates a logical conjunction of the specified filters.
createOr(ISearchDocumentFilter[] filters) Creates a logical disjunction of the specified filters.
createAttribute(String[] attributes) Creates a filter for skipping documents that do not have any value from the specified list of allowable attributes.

SearchDocumentFilter()

public SearchDocumentFilter()

createFilePathRegularExpression(String pattern)

public static ISearchDocumentFilter createFilePathRegularExpression(String pattern)

Creates a filter for skipping documents that are not match a regular expression. The regular expression is applied to the full path of a document.

Parameters:

Parameter Type Description
pattern java.lang.String The regular expression pattern.

Returns: ISearchDocumentFilter - A search document filter by file name.

createFilePathRegularExpression(String pattern, int options)

public static ISearchDocumentFilter createFilePathRegularExpression(String pattern, int options)

Creates a filter for skipping documents that are not match a regular expression. The regular expression is applied to the full path of a document.

Parameters:

Parameter Type Description
pattern java.lang.String The regular expression pattern.
options int The regular expression options.

Returns: ISearchDocumentFilter - A search document filter by file name.

createFileExtension(String[] extensions)

public static ISearchDocumentFilter createFileExtension(String[] extensions)

Creates a filter for skipping documents that are not in the specified list of possible extensions.

Parameters:

Parameter Type Description
extensions java.lang.String[] The list of possible extensions.

Returns: ISearchDocumentFilter - A search document filter by document extension.

createNot(ISearchDocumentFilter innerFilter)

public static ISearchDocumentFilter createNot(ISearchDocumentFilter innerFilter)

Creates a filter that has inverse logic in relation to the specified inner filter.

Parameters:

Parameter Type Description
innerFilter ISearchDocumentFilter The inner search document filter.

Returns: ISearchDocumentFilter - An inverted search document filter.

createAnd(ISearchDocumentFilter[] filters)

public static ISearchDocumentFilter createAnd(ISearchDocumentFilter[] filters)

Creates a logical conjunction of the specified filters.

Parameters:

Parameter Type Description
filters ISearchDocumentFilter[] The search document filters.

Returns: ISearchDocumentFilter - A search document filter that represents result of conjunction of the specified filters.

createOr(ISearchDocumentFilter[] filters)

public static ISearchDocumentFilter createOr(ISearchDocumentFilter[] filters)

Creates a logical disjunction of the specified filters.

Parameters:

Parameter Type Description
filters ISearchDocumentFilter[] The search document filters.

Returns: ISearchDocumentFilter - A search document filter that represents result of disjunction of the specified filters.

createAttribute(String[] attributes)

public static ISearchDocumentFilter createAttribute(String[] attributes)

Creates a filter for skipping documents that do not have any value from the specified list of allowable attributes.

Parameters:

Parameter Type Description
attributes java.lang.String[] The list of allowable attributes.

Returns: ISearchDocumentFilter - A search document filter by document attribute.