All LDAP Classes
Internal LDAP Classes

com.novell.ldap
Class LDAPObjectClassSchema

java.lang.Object
  extended by com.novell.ldap.LDAPAttribute
      extended by com.novell.ldap.LDAPSchemaElement
          extended by com.novell.ldap.LDAPObjectClassSchema
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable

public class LDAPObjectClassSchema
extends LDAPSchemaElement

The schema definition of an object class in a directory server.

The LDAPObjectClassSchema class represents the definition of an object class. It is used to query the syntax of an object class.

See Also:
LDAPSchemaElement, LDAPSchema, Serialized Form

Field Summary
static int ABSTRACT
          This class definition defines an abstract schema class.
static int AUXILIARY
          This class definition defines an auxiliary schema class.
(package private)  java.lang.String[] optional
           
(package private)  java.lang.String[] required
           
static int STRUCTURAL
          This class definition defines a structural schema class.
(package private)  java.lang.String[] superiors
           
(package private)  int type
           
 
Fields inherited from class com.novell.ldap.LDAPSchemaElement
description, hashQualifier, names, obsolete, oid, qualifier
 
Constructor Summary
LDAPObjectClassSchema()
          This constructor was added to support default Serialization
LDAPObjectClassSchema(java.lang.String raw)
          Constructs an object class definition from the raw string value returned from a directory query for "objectClasses".
LDAPObjectClassSchema(java.lang.String[] names, java.lang.String oid, java.lang.String[] superiors, java.lang.String description, java.lang.String[] required, java.lang.String[] optional, int type, boolean obsolete)
          Constructs an object class definition for adding to or deleting from a directory's schema.
 
Method Summary
protected  java.lang.String formatString()
          Returns a string in a format suitable for directly adding to a directory, as a value of the particular schema element class.
 java.lang.String[] getOptionalAttributes()
          Returns a list of optional attributes but not required of an entry with this object class.
 java.lang.String[] getRequiredAttributes()
          Returns a list of attributes required for an entry with this object class.
 java.lang.String[] getSuperiors()
          Returns the object classes from which this one derives.
private static LDAPXMLHandler getTopXMLHandler(java.lang.String tagname, LDAPXMLHandler parenthandler)
           
 int getType()
          Returns the type of object class.
(package private) static LDAPXMLHandler getXMLHandler(java.lang.String tagname, LDAPXMLHandler parenthandler)
          This method return the LDAPHandler which handles the XML (DSML) tags for this class
static java.lang.Object readDSML(java.io.InputStream input)
          This method is used to deserialize the DSML encoded representation of this class.
protected  void setDeserializedValues(java.io.BufferedInputStream istream)
           
protected  void writeValue(java.lang.StringBuffer buff)
           
protected  void writeValue(java.io.Writer out)
           
 
Methods inherited from class com.novell.ldap.LDAPSchemaElement
addValue, addValue, getDescription, getID, getNames, getQualifier, getQualifierNames, isObsolete, removeValue, removeValue, setQualifier, toString
 
Methods inherited from class com.novell.ldap.LDAPAttribute
addBase64Value, addBase64Value, addBase64Value, addURLValue, addURLValue, addValue, clone, compareTo, getBaseName, getBaseName, getByteValue, getByteValueArray, getByteValues, getLangSubtype, getName, getStringValue, getStringValueArray, getStringValues, getSubtypes, getSubtypes, hasSubtype, hasSubtypes, newLine, readExternal, removeValue, setValue, size, writeDSML, writeExternal
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

superiors

java.lang.String[] superiors

required

java.lang.String[] required

optional

java.lang.String[] optional

type

int type

ABSTRACT

public static final int ABSTRACT
This class definition defines an abstract schema class.

This is equivalent to setting the Novell eDirectory effective class flag to true.

See Also:
Constant Field Values

STRUCTURAL

public static final int STRUCTURAL
This class definition defines a structural schema class.

This is equivalent to setting the Novell eDirectory effective class flag to true.

See Also:
Constant Field Values

AUXILIARY

public static final int AUXILIARY
This class definition defines an auxiliary schema class.

See Also:
Constant Field Values
Constructor Detail

LDAPObjectClassSchema

public LDAPObjectClassSchema()
This constructor was added to support default Serialization


LDAPObjectClassSchema

public LDAPObjectClassSchema(java.lang.String[] names,
                             java.lang.String oid,
                             java.lang.String[] superiors,
                             java.lang.String description,
                             java.lang.String[] required,
                             java.lang.String[] optional,
                             int type,
                             boolean obsolete)
Constructs an object class definition for adding to or deleting from a directory's schema.

Parameters:
names - Name(s) of the object class.

oid - Object Identifer of the object class - in dotted-decimal format.

description - Optional description of the object class.

superiors - The object classes from which this one derives.

required - A list of attributes required for an entry with this object class.

optional - A list of attributes acceptable but not required for an entry with this object class.

type - One of ABSTRACT, AUXILIARY, or STRUCTURAL. These constants are defined in LDAPObjectClassSchema.

obsolete - true if this object is obsolete

LDAPObjectClassSchema

public LDAPObjectClassSchema(java.lang.String raw)
Constructs an object class definition from the raw string value returned from a directory query for "objectClasses".

Parameters:
raw - The raw string value returned from a directory query for "objectClasses".
Method Detail

getSuperiors

public java.lang.String[] getSuperiors()
Returns the object classes from which this one derives.

Returns:
The object classes superior to this class.

getRequiredAttributes

public java.lang.String[] getRequiredAttributes()
Returns a list of attributes required for an entry with this object class.

Returns:
The list of required attributes defined for this class.

getOptionalAttributes

public java.lang.String[] getOptionalAttributes()
Returns a list of optional attributes but not required of an entry with this object class.

Returns:
The list of optional attributes defined for this class.

getType

public int getType()
Returns the type of object class.

The getType method returns one of the following constants defined in LDAPObjectClassSchema:

See the LDAPSchemaElement.getQualifier method for information on obtaining the X-NDS flags.

Returns:
The type of object class.

formatString

protected java.lang.String formatString()
Returns a string in a format suitable for directly adding to a directory, as a value of the particular schema element class.

Specified by:
formatString in class LDAPSchemaElement
Returns:
A string representation of the class' definition.

setDeserializedValues

protected void setDeserializedValues(java.io.BufferedInputStream istream)
                              throws java.io.IOException
Overrides:
setDeserializedValues in class LDAPAttribute
Throws:
java.io.IOException

writeValue

protected void writeValue(java.io.Writer out)
                   throws java.io.IOException
Overrides:
writeValue in class LDAPAttribute
Throws:
java.io.IOException

writeValue

protected void writeValue(java.lang.StringBuffer buff)
Overrides:
writeValue in class LDAPAttribute

readDSML

public static java.lang.Object readDSML(java.io.InputStream input)
                                 throws java.io.IOException
This method is used to deserialize the DSML encoded representation of this class.

Parameters:
input - InputStream for the DSML formatted data.
Returns:
Deserialized form of this class.
Throws:
java.io.IOException - when serialization fails.

getTopXMLHandler

private static LDAPXMLHandler getTopXMLHandler(java.lang.String tagname,
                                               LDAPXMLHandler parenthandler)

getXMLHandler

static LDAPXMLHandler getXMLHandler(java.lang.String tagname,
                                    LDAPXMLHandler parenthandler)
This method return the LDAPHandler which handles the XML (DSML) tags for this class

Parameters:
tagname - Name of the Root tag used to represent this class.
parenthandler - Parent LDAPXMLHandler for this tag.
Returns:
LDAPXMLHandler to handle this element.

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