Class FilterParser
- java.lang.Object
-
- org.apache.directory.api.ldap.model.filter.FilterParser
-
public final class FilterParser extends Object
This class parse a Ldap filter. The grammar is given in RFC 4515- Author:
- Apache Directory Project
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ExprNode
parse(String filter)
Parses a search filter from it's string representation to an expression node object.static ExprNode
parse(String filter, boolean relaxed)
Parses a search filter from it's string representation to an expression node object.static ExprNode
parse(SchemaManager schemaManager, String filter)
Parses a search filter from it's string representation to an expression node object, using the provided SchemaManagerstatic ExprNode
parse(SchemaManager schemaManager, String filter, boolean relaxed)
Parses a search filter from it's string representation to an expression node object, using the provided SchemaManager
-
-
-
Method Detail
-
parse
public static ExprNode parse(String filter) throws ParseException
Parses a search filter from it's string representation to an expression node object.- Parameters:
filter
- the search filter in it's string representation- Returns:
- the expression node object
- Throws:
ParseException
- If the filter is invalid
-
parse
public static ExprNode parse(String filter, boolean relaxed) throws ParseException
Parses a search filter from it's string representation to an expression node object. Inrelaxed
mode the filter may violate RFC 4515, e.g. the underscore in attribute names is allowed.- Parameters:
filter
- the search filter in it's string representationrelaxed
-true
to parse the filter in relaxed mode- Returns:
- the expression node object
- Throws:
ParseException
- If the filter is invalid
-
parse
public static ExprNode parse(SchemaManager schemaManager, String filter) throws ParseException
Parses a search filter from it's string representation to an expression node object, using the provided SchemaManager- Parameters:
schemaManager
- The SchemaManager to usefilter
- the search filter in it's string representation- Returns:
- the expression node object
- Throws:
ParseException
- If the filter is invalid
-
parse
public static ExprNode parse(SchemaManager schemaManager, String filter, boolean relaxed) throws ParseException
Parses a search filter from it's string representation to an expression node object, using the provided SchemaManager- Parameters:
schemaManager
- The SchemaManager to usefilter
- the search filter in it's string representationrelaxed
-true
to parse the filter in relaxed mode- Returns:
- the expression node object
- Throws:
ParseException
- If the filter is invalid
-
-