LDAP Classes
Implements Java LDAP

com.novell.ldap
Class LDAPDITStructureRuleSchema

java.lang.Object
  extended bycom.novell.ldap.LDAPAttribute
      extended bycom.novell.ldap.LDAPSchemaElement
          extended bycom.novell.ldap.LDAPDITStructureRuleSchema
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, java.io.Externalizable, java.io.Serializable

public class LDAPDITStructureRuleSchema
extends LDAPSchemaElement

Represents the definition of a specific DIT (Directory Information Tree) structure rule in the directory schema.

The LDAPDITStructureRuleSchema class represents the definition of a DIT Structure Rule. It is used to discover or modify which object classes a particular object class may be subordinate to in the DIT.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.novell.ldap.LDAPSchemaElement
description, hashQualifier, names, obsolete, oid, qualifier
 
Constructor Summary
LDAPDITStructureRuleSchema()
          This constructor was added to support default Serialization
LDAPDITStructureRuleSchema(java.lang.String raw)
          Constructs a DIT structure rule from the raw string value returned from a schema query for dITStructureRules.
LDAPDITStructureRuleSchema(java.lang.String[] names, int ruleID, java.lang.String description, boolean obsolete, java.lang.String nameForm, java.lang.String[] superiorIDs)
          Constructs a DIT structure rule for adding to or deleting from the 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 getNameForm()
          Returns the NameForm that this structure rule controls.
 int getRuleID()
          Returns the rule ID for this structure rule.
 java.lang.String[] getSuperiors()
          Returns a list of all structure rules that are superior to this structure rule.
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, readExternal, removeValue, setValue, size, writeDSML, writeExternal
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LDAPDITStructureRuleSchema

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


LDAPDITStructureRuleSchema

public LDAPDITStructureRuleSchema(java.lang.String[] names,
                                  int ruleID,
                                  java.lang.String description,
                                  boolean obsolete,
                                  java.lang.String nameForm,
                                  java.lang.String[] superiorIDs)
Constructs a DIT structure rule for adding to or deleting from the schema.

Parameters:
names - The names of the structure rule.

ruleID - The unique identifier of the structure rule. NOTE: this is an integer, not a dotted numerical identifier. Structure rules aren't identified by OID.

description - An optional description of the structure rule.

obsolete - True if the structure rule is obsolete.

nameForm - Either the identifier or name of a name form. This is used to indirectly refer to the object class that this structure rule applies to.

superiorIDs - A list of superior structure rules - specified by their integer ID. The object class specified by this structure rule (via the nameForm parameter) may only be subordinate in the DIT to object classes of those represented by the structure rules here; it may be null.

LDAPDITStructureRuleSchema

public LDAPDITStructureRuleSchema(java.lang.String raw)
Constructs a DIT structure rule from the raw string value returned from a schema query for dITStructureRules.

Parameters:
raw - The raw string value returned from a schema query for dITStructureRules.
Method Detail

getRuleID

public int getRuleID()
Returns the rule ID for this structure rule.

The getRuleID method returns an integer rather than a dotted decimal OID. Objects of this class do not have an OID, thus getID can return null.

Returns:
The rule ID for this structure rule.

getNameForm

public java.lang.String getNameForm()
Returns the NameForm that this structure rule controls.

You can get the actual object class that this structure rule controls by calling the getNameForm.getObjectClass method.

Returns:
The NameForm that this structure rule controls.

getSuperiors

public java.lang.String[] getSuperiors()
Returns a list of all structure rules that are superior to this structure rule.

To resolve to an object class, you need to first resolve the superior ID to another structure rule, then call the getNameForm.getObjectClass method on that structure rule.

Returns:
A list of all structure rules that are superior to this structure rule.

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.

LDAP Classes
Implements Java LDAP

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