|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.shared.ldap.name.LdapDnParser
This class parses a DN. The DN MUST respect this BNF grammar (as of RFC2253,
par. 3, and RFC1779, fig. 1)
- <distinguishedName> ::= <name> | e
- <name> ::=
<name-component> <name-components>
- <name-components>
::= <spaces> <separator> <spaces> <name-component>
<name-components> | e
- <name-component> ::=
<attributeType> <spaces> '=' <spaces>
<attributeValue> <attributeTypeAndValues>
-
<attributeTypeAndValues> ::= <spaces> '+' <spaces>
<attributeType> <spaces> '=' <spaces>
<attributeValue> <attributeTypeAndValues> | e
-
<attributeType> ::= [a-zA-Z] <keychars> | <oidPrefix> [0-9]
<digits> <oids> | [0-9] <digits> <oids>
-
<keychars> ::= [a-zA-Z] <keychars> | [0-9] <keychars> | '-'
<keychars> | e
- <oidPrefix> ::= 'OID.' | 'oid.' | e
-
<oids> ::= '.' [0-9] <digits> <oids> | e
-
<attributeValue> ::= <pairs-or-strings> | '#' <hexstring>
|'"' <quotechar-or-pairs> '"'
- <pairs-or-strings> ::= '\'
<pairchar> <pairs-or-strings> | <stringchar>
<pairs-or-strings> | e
- <quotechar-or-pairs> ::=
<quotechar> <quotechar-or-pairs> | '\' <pairchar>
<quotechar-or-pairs> | e
- <pairchar> ::= ',' | '=' | '+' |
'<' | '>' | '#' | ';' | '\' | '"' | [0-9a-fA-F] [0-9a-fA-F]
-
<hexstring> ::= [0-9a-fA-F] [0-9a-fA-F] <hexpairs>
-
<hexpairs> ::= [0-9a-fA-F] [0-9a-fA-F] <hexpairs> | e
-
<digits> ::= [0-9] <digits> | e
- <stringchar> ::=
[0x00-0xFF] - [,=+<>#;\"\n\r]
- <quotechar> ::= [0x00-0xFF] -
[\"]
- <separator> ::= ',' | ';'
- <spaces> ::= ' '
<spaces> | e
Method Summary | |
static javax.naming.NameParser |
getNameParser()
Get a reference to the NameParser. |
javax.naming.Name |
parse(java.lang.String dn)
Parse a String and return a LdapDN if the String is a valid DN |
static void |
parseInternal(java.lang.String dn,
java.util.List rdns)
Parse a DN |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static javax.naming.NameParser getNameParser()
public static void parseInternal(java.lang.String dn, java.util.List rdns) throws javax.naming.InvalidNameException
dn
- The DN to be parsedrdns
- The list that will contain the RDNs
javax.naming.InvalidNameException
- If the DN is invalidpublic javax.naming.Name parse(java.lang.String dn) throws javax.naming.InvalidNameException
parse
in interface javax.naming.NameParser
dn
- The DN to parse
javax.naming.InvalidNameException
- If the String is not a valid DN
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |