| Package | Description |
|---|---|
| org.apache.directory.api.ldap.model.entry | |
| org.apache.directory.api.ldap.model.filter | |
| org.apache.directory.api.ldap.model.name | |
| org.apache.directory.api.util |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
AttributeUtils.parseAttribute(byte[] str,
Position pos,
boolean withOption,
boolean relaxed)
Parse an attribute.
|
private static boolean |
AttributeUtils.parseNumber(byte[] filter,
Position pos)
Parse a number :
number = '0' | '1'..'9' digits
digits = '0'..'9'*
|
private static void |
AttributeUtils.parseOID(byte[] str,
Position pos)
Parse an OID.
|
private static void |
AttributeUtils.parseOptions(byte[] str,
Position pos)
Parse attribute's options :
options = *( ';' option )
option = 1*keychar
keychar = 'a'-z' | 'A'-'Z' / '0'-'9' / '-'
|
| Modifier and Type | Method and Description |
|---|---|
static ExprNode |
FilterParser.parse(SchemaManager schemaManager,
java.lang.String filter,
Position pos) |
private static Value<?> |
FilterParser.parseAssertionValue(SchemaManager schemaManager,
byte[] filter,
Position pos)
An assertion value :
assertionvalue = valueencoding
valueencoding = 0*(normal / escaped)
normal = UTF1SUBSET / UTFMB
escaped = '\' HEX HEX
HEX = '0'-'9' / 'A'-'F' / 'a'-'f'
UTF1SUBSET = %x01-27 / %x2B-5B / %x5D-7F (Everything but '\0', '*', '(', ')' and '\')
UTFMB = UTF2 / UTF3 / UTF4
UTF0 = %x80-BF
UTF2 = %xC2-DF UTF0
UTF3 = %xE0 %xA0-BF UTF0 / %xE1-EC UTF0 UTF0 / %xED %x80-9F UTF0 / %xEE-EF UTF0 UTF0
UTF4 = %xF0 %x90-BF UTF0 UTF0 / %xF1-F3 UTF0 UTF0 UTF0 / %xF4 %x80-8F UTF0 UTF0
With the specific constraints (RFC 4515):
"The
|
private static Value<?> |
FilterParser.parseAssertionValue(SchemaManager schemaManager,
java.lang.String attribute,
byte[] filter,
Position pos)
An assertion value :
assertionvalue = valueencoding
valueencoding = 0*(normal / escaped)
normal = UTF1SUBSET / UTFMB
escaped = '\' HEX HEX
HEX = '0'-'9' / 'A'-'F' / 'a'-'f'
UTF1SUBSET = %x01-27 / %x2B-5B / %x5D-7F (Everything but '\0', '*', '(', ')' and '\')
UTFMB = UTF2 / UTF3 / UTF4
UTF0 = %x80-BF
UTF2 = %xC2-DF UTF0
UTF3 = %xE0 %xA0-BF UTF0 / %xE1-EC UTF0 UTF0 / %xED %x80-9F UTF0 / %xEE-EF UTF0 UTF0
UTF4 = %xF0 %x90-BF UTF0 UTF0 / %xF1-F3 UTF0 UTF0 UTF0 / %xF4 %x80-8F UTF0 UTF0
With the specific constraints (RFC 4515):
"The
|
private static ExprNode |
FilterParser.parseBranchNode(SchemaManager schemaManager,
ExprNode node,
byte[] filter,
Position pos,
boolean relaxed)
Parse AND, OR and NOT nodes :
and = '&' filterlist
or = '|' filterlist
not = '!' filter
filterlist = 1*filter
|
private static ExprNode |
FilterParser.parseExtensible(SchemaManager schemaManager,
java.lang.String attribute,
byte[] filter,
Position pos,
boolean relaxed)
Parse an extensible
extensible = ( attr [":dn"] [':' oid] ":=" assertionvalue )
/ ( [":dn"] ':' oid ":=" assertionvalue )
matchingrule = ":" oid
|
private static ExprNode |
FilterParser.parseFilterComp(SchemaManager schemaManager,
byte[] filter,
Position pos,
boolean relaxed)
filtercomp = and / or / not / item
and = '&' filterlist
or = '|' filterlist
not = '!' filter
item = simple / present / substring / extensible
simple = attr filtertype assertionvalue
present = attr EQUALS ASTERISK
substring = attr EQUALS [initial] any [final]
extensible = ( attr [dnattrs]
[matchingrule] COLON EQUALS assertionvalue )
/ ( [dnattrs]
matchingrule COLON EQUALS assertionvalue )
|
private static ExprNode |
FilterParser.parseFilterInternal(SchemaManager schemaManager,
byte[] filter,
Position pos,
boolean relaxed)
Pasre the grammar rule :
filter ::= '(' filterComp ')'
|
private static ExprNode |
FilterParser.parseItem(SchemaManager schemaManager,
byte[] filter,
Position pos,
byte b,
boolean relaxed)
Parse the following grammar :
item = simple / present / substring / extensible
simple = attr filtertype assertionvalue
filtertype = '=' / '~=' / '>=' / '<='
present = attr '=' '*'
substring = attr '=' [initial] any [final]
extensible = ( attr [":dn"] [':' oid] ":=" assertionvalue )
/ ( [":dn"] ':' oid ":=" assertionvalue )
matchingrule = ":" oid
An item starts with an attribute or a colon.
|
private static ExprNode |
FilterParser.parsePresenceEqOrSubstring(SchemaManager schemaManager,
java.lang.String attribute,
byte[] filter,
Position pos)
Here is the grammar to parse :
simple ::= '=' assertionValue
present ::= '=' '*'
substring ::= '=' [initial] any [final]
initial ::= assertionValue
any ::= '*' ( assertionValue '*')*
As we can see, there is an ambiguity in the grammar : attr=* can be
seen as a present or as a substring.
|
private static ExprNode |
FilterParser.parseSubstring(SchemaManager schemaManager,
java.lang.String attribute,
Value<?> initial,
byte[] filter,
Position pos)
Parse a substring
|
| Modifier and Type | Method and Description |
|---|---|
private static boolean |
FastDnParser.hasMoreChars(Position pos)
Checks if there are more characters.
|
private static java.lang.String |
FastDnParser.matchAttributeType(char[] name,
Position pos)
Matches attribute type.
|
private static java.lang.String |
FastDnParser.matchAttributeTypeDescr(char[] name,
Position pos)
Matches attribute type descr.
|
private static java.lang.String |
FastDnParser.matchAttributeTypeNumericOid(char[] name,
Position pos)
Matches attribute type numeric OID.
|
private static void |
FastDnParser.matchEquals(char[] name,
Position pos)
Matches the equals character.
|
private static void |
FastDnParser.matchSpaces(char[] name,
Position pos)
Matches and forgets optional spaces.
|
private static java.lang.String |
FastDnParser.matchValue(char[] name,
Position pos)
Matches the assertion value.
|
private static char |
FastDnParser.nextChar(char[] name,
Position pos,
boolean increment)
Gets the next character.
|
private static void |
FastDnParser.parseRdnInternal(java.lang.String name,
Position pos,
Rdn rdn) |
| Modifier and Type | Method and Description |
|---|---|
static void |
Strings.trimLeft(byte[] bytes,
Position pos)
Removes spaces (char <= 32) from a position in this array, handling
null by returning null. |
static void |
Strings.trimLeft(java.lang.String string,
Position pos)
Removes spaces (char <= 32) from a position in this array, handling
null by returning null. |
static java.lang.String |
Strings.trimRight(byte[] bytes,
Position pos)
Removes spaces (char <= 32) from end of this string, handling
null by returning null. |
static java.lang.String |
Strings.trimRight(java.lang.String string,
Position pos)
Removes spaces (char <= 32) from end of this string, handling
null by returning null. |