All LDAP Classes
Internal LDAP Classes

org.ietf.ldap
Class LDAPAttribute

java.lang.Object
  extended by org.ietf.ldap.LDAPAttribute
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable
Direct Known Subclasses:
LDAPSchemaElement

public class LDAPAttribute
extends java.lang.Object
implements java.lang.Cloneable, java.lang.Comparable

Represents the name and values of one attribute of a directory entry.

See Also:
com.novell.ldap.LDAPAttribute

Field Summary
private  LDAPAttribute attr
           
 
Constructor Summary
LDAPAttribute(LDAPAttribute attr)
          Constructs an attribute from a com.novell.ldap.LDAPAttribute
LDAPAttribute(LDAPAttribute attr)
          Constructs an attribute with copies of all values of the input attribute.
LDAPAttribute(java.lang.String attrName)
          Constructs an attribute with no values.
LDAPAttribute(java.lang.String attrName, byte[] attrBytes)
          Constructs an attribute with a byte-formatted value.
LDAPAttribute(java.lang.String attrName, java.lang.String attrString)
          Constructs an attribute that has a single string value.
LDAPAttribute(java.lang.String attrName, java.lang.String[] attrStrings)
          Constructs an attribute that has an array of string values.
 
Method Summary
 void addValue(byte[] attrBytes)
          Adds a byte-formatted value to the attribute.
 void addValue(java.lang.String attrString)
          Adds a string value to the attribute.
 java.lang.Object clone()
          Returns a clone of this object
 int compareTo(java.lang.Object attribute)
          Compares this object with the specified object for order.
 java.lang.String getBaseName()
          Returns the base name of the attribute.
static java.lang.String getBaseName(java.lang.String attrName)
          Returns the base name of the specified attribute.
 byte[][] getByteValueArray()
          Returns the values of the attribute as an array of bytes.
 java.util.Enumeration getByteValues()
          Returns an enumerator for the values of the attribute in byte format.
 java.lang.String getLangSubtype()
          Returns the language subtype of the attribute, if any.
 java.lang.String getName()
          Returns the name of the attribute.
 java.lang.String[] getStringValueArray()
          Returns the values of the attribute as an array of strings.
 java.util.Enumeration getStringValues()
          Returns an enumerator for the string values of an attribute.
 java.lang.String[] getSubtypes()
          Extracts the subtypes from the attribute name.
static java.lang.String[] getSubtypes(java.lang.String attrName)
          Extracts the subtypes from the specified attribute name.
(package private)  LDAPAttribute getWrappedObject()
          Gets the Novell LDAPAttribute class
 boolean hasSubtype(java.lang.String subtype)
          Reports if the attribute name contains the specified subtype.
 boolean hasSubtypes(java.lang.String[] subtypes)
          Reports if the attribute name contains all the specified subtypes.
 void removeValue(byte[] attrBytes)
          Removes a byte-formatted value from the attribute.
 void removeValue(java.lang.String attrString)
          Removes a string value from the attribute.
 int size()
          Returns the number of values in the attribute.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

attr

private LDAPAttribute attr
Constructor Detail

LDAPAttribute

LDAPAttribute(LDAPAttribute attr)
Constructs an attribute from a com.novell.ldap.LDAPAttribute


LDAPAttribute

public LDAPAttribute(LDAPAttribute attr)
Constructs an attribute with copies of all values of the input attribute.

See Also:
com.novell.ldap.LDAPAttribute.LDAPAttribute(LDAPAttribute)

LDAPAttribute

public LDAPAttribute(java.lang.String attrName)
Constructs an attribute with no values.

See Also:
com.novell.ldap.LDAPAttribute.LDAPAttribute(String)

LDAPAttribute

public LDAPAttribute(java.lang.String attrName,
                     byte[] attrBytes)
Constructs an attribute with a byte-formatted value.

See Also:
com.novell.ldap.LDAPAttribute.LDAPAttribute(String, byte[])

LDAPAttribute

public LDAPAttribute(java.lang.String attrName,
                     java.lang.String attrString)
Constructs an attribute that has a single string value.

See Also:
com.novell.ldap.LDAPAttribute.LDAPAttribute(String, String)

LDAPAttribute

public LDAPAttribute(java.lang.String attrName,
                     java.lang.String[] attrStrings)
Constructs an attribute that has an array of string values.

See Also:
com.novell.ldap.LDAPAttribute.LDAPAttribute(String, String[])
Method Detail

getWrappedObject

LDAPAttribute getWrappedObject()
Gets the Novell LDAPAttribute class

Returns:
the com.novell.ldap.LDAPAttribute class

addValue

public void addValue(java.lang.String attrString)
Adds a string value to the attribute.

See Also:
com.novell.ldap.LDAPAttribute.addValue(String)

addValue

public void addValue(byte[] attrBytes)
Adds a byte-formatted value to the attribute.

See Also:
com.novell.ldap.LDAPAttribute.addValue(byte[])

getByteValues

public java.util.Enumeration getByteValues()
Returns an enumerator for the values of the attribute in byte format.

See Also:
com.novell.ldap.LDAPAttribute.getByteValues()

getStringValues

public java.util.Enumeration getStringValues()
Returns an enumerator for the string values of an attribute.

See Also:
com.novell.ldap.LDAPAttribute.getStringValues()

getByteValueArray

public byte[][] getByteValueArray()
Returns the values of the attribute as an array of bytes.

See Also:
com.novell.ldap.LDAPAttribute.getByteValueArray()

getStringValueArray

public java.lang.String[] getStringValueArray()
Returns the values of the attribute as an array of strings.

See Also:
com.novell.ldap.LDAPAttribute.getStringValueArray()

getLangSubtype

public java.lang.String getLangSubtype()
Returns the language subtype of the attribute, if any.

See Also:
com.novell.ldap.LDAPAttribute.getLangSubtype()

getBaseName

public java.lang.String getBaseName()
Returns the base name of the attribute.

See Also:
com.novell.ldap.LDAPAttribute.getBaseName()

getBaseName

public static java.lang.String getBaseName(java.lang.String attrName)
Returns the base name of the specified attribute.

See Also:
com.novell.ldap.LDAPAttribute.getBaseName(String)

getName

public java.lang.String getName()
Returns the name of the attribute.

See Also:
com.novell.ldap.LDAPAttribute.getName()

getSubtypes

public java.lang.String[] getSubtypes()
Extracts the subtypes from the attribute name.

See Also:
com.novell.ldap.LDAPAttribute.getSubtypes()

getSubtypes

public static java.lang.String[] getSubtypes(java.lang.String attrName)
Extracts the subtypes from the specified attribute name.

See Also:
com.novell.ldap.LDAPAttribute.getSubtypes(String)

hasSubtype

public boolean hasSubtype(java.lang.String subtype)
Reports if the attribute name contains the specified subtype.

See Also:
com.novell.ldap.LDAPAttribute.hasSubtype(String)

hasSubtypes

public boolean hasSubtypes(java.lang.String[] subtypes)
Reports if the attribute name contains all the specified subtypes.

See Also:
com.novell.ldap.LDAPAttribute.hasSubtypes(String[])

removeValue

public void removeValue(java.lang.String attrString)
Removes a string value from the attribute.

See Also:
com.novell.ldap.LDAPAttribute.removeValue(String)

removeValue

public void removeValue(byte[] attrBytes)
Removes a byte-formatted value from the attribute.

See Also:
com.novell.ldap.LDAPAttribute.removeValue(byte[])

size

public int size()
Returns the number of values in the attribute.

See Also:
com.novell.ldap.LDAPAttribute.size()

compareTo

public int compareTo(java.lang.Object attribute)
Compares this object with the specified object for order.

Specified by:
compareTo in interface java.lang.Comparable
See Also:
com.novell.ldap.LDAPAttribute.compareTo(Object)

clone

public java.lang.Object clone()
Returns a clone of this object

Overrides:
clone in class java.lang.Object
See Also:
com.novell.ldap.LDAPAttribute.clone()

All LDAP Classes
Internal LDAP Classes

Copyright ? 2002 Novell, Inc. All Rights Reserved.
Novell, Inc.
1800 South Novell Place
Provo, Ut 84606
Phone: (801) 861-5000