The definition of a DIT structure rule in the schema.
RFC 2252, Lightweight Directory Access Protocol (v3):
DIT Structure Rule Description covers the types of information
to specify when defining a DIT structure rule. According to the RFC,
the description of a DIT structure rule can include the following:
- 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
or int
)
- 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:
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
")"
LDAPDITStructureRuleSchema
protected LDAPDITStructureRuleSchema()
Constructs a blank element.
LDAPDITStructureRuleSchema
public LDAPDITStructureRuleSchema(String raw)
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.)
raw
- definition of the DIT structure rule in the
DITStructureRuleDescription format
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.
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.