Class LDAPDITStructureRuleSchema
- All Implemented Interfaces:
Serializable
- an OID identifying the attribute type
- a name identifying the attribute type
- a description of the attribute type
- the name of the parent attribute type
- the syntax used by the attribute (for example,
cis
orint
) - an indication of whether the attribute type is single-valued or multi-valued
When you construct an LDAPDITStructureRuleSchema
object, you can
specify these types of information as arguments to the constructor or
in the AttributeTypeDescription format specified in RFC 2252.
When an LDAP client searches an LDAP server for the schema, the server
returns schema information as an object with attribute values in this
format.
There are a number of additional optional description fields which are not explicitly accessible through LDAPDITStructureRuleSchema, but which can be managed with setQualifier, getQualifier, and getQualifierNames:
- OBSOLETE
To get the name, OID, and description of this DIT structure rule
, use the getName
, getOID
, and
getDescription
methods inherited from the abstract class
LDAPSchemaElement
. Optional and custom qualifiers are
accessed with getQualifier
and getQualifierNames
from LDAPSchemaElement
.
To add or remove this attribute type definition from the
schema, use the add
and remove
methods, which this class inherits from the LDAPSchemaElement
abstract class.
RFC 2252 defines DITStructureRuleDescription as follows:
DITStructureRuleDescription = "(" whsp ruleidentifier whsp ; DITStructureRule identifier [ "NAME" qdescrs ] [ "DESC" qdstring ] [ "OBSOLETE" whsp ] "FORM" woid whsp ; NameForm [ "SUP" ruleidentifiers whsp ] ; superior DITStructureRules ")"
- Version:
- 1.0
- See Also:
-
Field Summary
FieldsFields inherited from class netscape.ldap.LDAPSchemaElement
aliases, attrName, binary, binaryString, ces, cesString, cis, cisString, description, dn, dnString, integer, intString, name, novalsTable, OBSOLETE, oid, properties, rawValue, SUPERIOR, SYNTAX, telephone, telephoneString, unknown
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Constructs a blank element.Constructs a DIT structure rule definition based on a description in the DITStructureRuleDescription format.LDAPDITStructureRuleSchema
(String name, int ruleID, String description, boolean obsolete, String nameForm, String[] superiors) Constructs a DIT structure rule definition, using the specified information. -
Method Summary
Modifier and TypeMethodDescriptionReturns the NameForm that this structure rule controls.int
Returns the rule ID for this structure rule.String[]
Returns a list of all structure rules that are superior to this structure rule.getValue()
Prepares a value in RFC 2252 format for submission to a servertoString()
Gets the definition of the rule in a user friendly format.Methods inherited from class netscape.ldap.LDAPSchemaElement
add, add, getAliases, getCustomValues, getDescription, getID, getName, getOID, getOptionalValues, getQualifier, getQualifierNames, isObsolete, modify, modify, parseValue, remove, remove, setQualifier, setQualifier, update, update, update
-
Field Details
-
FORM
- See Also:
-
-
Constructor Details
-
LDAPDITStructureRuleSchema
protected LDAPDITStructureRuleSchema()Constructs a blank element. -
LDAPDITStructureRuleSchema
public LDAPDITStructureRuleSchema(String name, int ruleID, String description, boolean obsolete, String nameForm, String[] superiors) Constructs a DIT structure rule definition, using the specified information.- Parameters:
name
- name of the attribute typeruleID
- unique identifier of the structure rule.
NOTE: this is an integer, not a dotted numerical identifier. Structure rules aren't identified by OID.description
- description of attribute typeobsolete
-true
if the rule is obsoletenameForm
- 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.superiors
- 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.
-
LDAPDITStructureRuleSchema
Constructs a DIT structure rule definition based on a description in the DITStructureRuleDescription format. For information on this format, (see RFC 2252, Lightweight Directory Access Protocol (v3): DIT Structure Rule Description. This is the format that LDAP servers and clients use to exchange schema information. (For example, when you search an LDAP server for its schema, the server returns an entry with the attributes "objectclasses" and "attributetypes". The values of "attributetypes" are attribute type descriptions in this format.)- Parameters:
raw
- definition of the DIT structure rule in the DITStructureRuleDescription format
-
-
Method Details
-
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 getNameForm().getObjectClass() on that structure rule.- Returns:
- the structure rules that are superior to this structure rule.
-
getRuleID
public int getRuleID()Returns the rule ID for this structure rule. Note that this returns an integer rather than a dotted decimal OID. Objects of this class do not have an OID, thus getID will return null.- Returns:
- the rule ID for this structure rule.
-
getNameForm
Returns the NameForm that this structure rule controls. You can get the actual object class that this structure rule controls by calling getNameForm().getObjectClass().- Returns:
- the NameForm that this structure rule controls.
-
getValue
Prepares a value in RFC 2252 format for submission to a server- Overrides:
getValue
in classLDAPSchemaElement
- Returns:
- a String ready for submission to an LDAP server.
-
toString
Gets the definition of the rule in a user friendly format. This is the format that the rule definition uses when printing the attribute type or the schema.
-