All Packages Class Hierarchy This Package Previous Next Index
Class wrappers.LDAPEnumeration
java.lang.Object
|
+----wrappers.LDAPEnumeration
- public final class LDAPEnumeration
- extends Object
- implements Enumeration
Enumerates the LDAP search results, as
[label, tree] pairs, which WebOQL can use.
- Version:
- 1.0
- Author:
- Rimon Barr
- See Also:
- LDAP
-
base
- Stores base LDAP url of this search, used for
constructor of subtrees
-
results
- Stores original search results enumeration
-
LDAPEnumeration(Enumeration, String)
- Initialises object with a search result set and
LDAP url wherefrom this result-set was generated
-
decodeString(String)
- Decodes a string, reversing the action of encodeString
-
decodeStrings(String)
-
Creates an array of strings from a ';' separated encoded string
-
encodeString(String)
- Encodes a string so that all ';' are escaped as '\;'
-
encodeStrings(Enumeration)
- Same as array version of encodeStrings, but takes strings
from an enumeration of strings
-
encodeStrings(String[])
- Represent a string array as a ';' separated string
-
hasMoreElements()
- Returns whether there are more entries in the result set
-
LDAPEntry2ArcLabel(LDAPEntry)
- Converts the information of an LDAP entry into an ArcLabel
-
next()
- Same as nextElement, typed
-
nextElement()
- Converts next LDAPEntry into an [arc-label tree] pair
-
tester()
- Method to test internal methods
results
private Enumeration results
- Stores original search results enumeration
base
private String base
- Stores base LDAP url of this search, used for
constructor of subtrees
LDAPEnumeration
public LDAPEnumeration(Enumeration results,
String base)
- Initialises object with a search result set and
LDAP url wherefrom this result-set was generated
- Parameters:
- results - LDAP
result set, usually instance of LDAPSearchResults (non-null)
- base - LDAP
url corresponding to results (non-null)
- Throws: NullPointerException
- If either results or base is null
- See Also:
- LDAPSearchResults, LDAPConnection
hasMoreElements
public boolean hasMoreElements()
- Returns whether there are more entries in the result set
- Returns:
- Whether there are more entries in the result
set to convert to [arc-label tree] pairs
nextElement
public Object nextElement()
- Converts next LDAPEntry into an [arc-label tree] pair
- Returns:
- [arc-label tree] pair (java.lang.Object)
next
public Pair next()
- Same as nextElement, typed
- Returns:
- [arc-label tree] pair (weboql.util.Pair)
LDAPEntry2ArcLabel
private ArcLabel LDAPEntry2ArcLabel(LDAPEntry entry)
- Converts the information of an LDAP entry into an ArcLabel
- Returns:
- Arc label representation of LDAP entry (weboql.tree.ArcLabel)
encodeString
private static String encodeString(String str)
- Encodes a string so that all ';' are escaped as '\;'
- Parameters:
- str - String to be encoded
- Returns:
- Encoded string
- See Also:
- decodeString
decodeString
private static String decodeString(String str)
- Decodes a string, reversing the action of encodeString
- Parameters:
- str - String to be decoded
- Returns:
- Decoded string
- See Also:
- encodeString
encodeStrings
private static String encodeStrings(String str[])
- Represent a string array as a ';' separated string
- Parameters:
- str - Input array of strings
- Returns:
- String representing encoded string array
- See Also:
- decodeStrings
encodeStrings
private static String encodeStrings(Enumeration str)
- Same as array version of encodeStrings, but takes strings
from an enumeration of strings
- Parameters:
- str - Enumeration of strings
decodeStrings
private static String[] decodeStrings(String str)
- Creates an array of strings from a ';' separated encoded string
- Parameters:
- str - Encoded string representation of string array
- Returns:
- Decoded string array
tester
private static void tester()
- Method to test internal methods
All Packages Class Hierarchy This Package Previous Next Index