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

Variable Index

 o base
Stores base LDAP url of this search, used for constructor of subtrees
 o results
Stores original search results enumeration

Constructor Index

 o LDAPEnumeration(Enumeration, String)
Initialises object with a search result set and LDAP url wherefrom this result-set was generated

Method Index

 o decodeString(String)
Decodes a string, reversing the action of encodeString
 o decodeStrings(String)
Creates an array of strings from a ';' separated encoded string
 o encodeString(String)
Encodes a string so that all ';' are escaped as '\;'
 o encodeStrings(Enumeration)
Same as array version of encodeStrings, but takes strings from an enumeration of strings
 o encodeStrings(String[])
Represent a string array as a ';' separated string
 o hasMoreElements()
Returns whether there are more entries in the result set
 o LDAPEntry2ArcLabel(LDAPEntry)
Converts the information of an LDAP entry into an ArcLabel
 o next()
Same as nextElement, typed
 o nextElement()
Converts next LDAPEntry into an [arc-label tree] pair
 o tester()
Method to test internal methods

Variables

 o results
 private Enumeration results
Stores original search results enumeration

 o base
 private String base
Stores base LDAP url of this search, used for constructor of subtrees

Constructors

 o 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

Methods

 o 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
 o nextElement
 public Object nextElement()
Converts next LDAPEntry into an [arc-label tree] pair

Returns:
[arc-label tree] pair (java.lang.Object)
 o next
 public Pair next()
Same as nextElement, typed

Returns:
[arc-label tree] pair (weboql.util.Pair)
 o 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)
 o 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
 o 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
 o 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
 o 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
 o 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
 o tester
 private static void tester()
Method to test internal methods


All Packages  Class Hierarchy  This Package  Previous  Next  Index