Class NameForm
java.lang.Object
org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
org.apache.directory.api.ldap.model.schema.NameForm
- All Implemented Interfaces:
Serializable, SchemaObject
A nameForm description. NameForms define the relationship between a
STRUCTURAL objectClass definition and the attributeTypes allowed to be used
for the naming of an Entry of that objectClass: it defines which attributes
can be used for the Rdn.
According to ldapbis [MODELS]:
4.1.7.2. Name Forms
A name form "specifies a permissible Rdn for entries of a particular
structural object class. A name form identifies a named object
class and one or more attribute types to be used for naming (i.e.
for the Rdn). Name forms are primitive pieces of specification
used in the definition of DIT structure rules" [X.501].
Each name form indicates the structural object class to be named,
a set of required attribute types, and a set of allowed attributes
types. A particular attribute type cannot be listed in both sets.
Entries governed by the form must be named using a value from each
required attribute type and zero or more values from the allowed
attribute types.
Each name form is identified by an object identifier (OID) and,
optionally, one or more short names (descriptors).
Name form descriptions are written according to the ABNF:
NameFormDescription = LPAREN WSP
numericoid ; object identifier
[ SP "NAME" SP qdescrs ] ; short names (descriptors)
[ SP "DESC" SP qdstring ] ;String description
[ SP "OBSOLETE" ] ; not active
SP "OC" SP oid ; structural object class
SP "MUST" SP oids ; attribute types
[ SP "MAY" SP oids ] ; attribute types
extensions WSP RPAREN ; extensions
where:
[numericoid] is object identifier which identifies this name form;
NAME [qdescrs] are short names (descriptors) identifying this name
form;
DESC [qdstring] is a short descriptive string;
OBSOLETE indicates this name form is not active;
OC identifies the structural object class this rule applies to,
MUST and MAY specify the sets of required and allowed, respectively,
naming attributes for this name form; and
[extensions] describe extensions.
All attribute types in the required ("MUST") and allowed ("MAY") lists
shall be different.
- Author:
- Apache Directory Project
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longDeclares the Serial Version UidFields inherited from class AbstractSchemaObject
description, extensions, h, isEnabled, isObsolete, locked, names, objectType, oid, schemaName, specification -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd an allowed AttributeTypevoidaddMayAttributeTypes(AttributeType attributeType) Add an allowed AttributeTypevoidAdd a required AttributeType OIDvoidaddMustAttributeTypes(AttributeType attributeType) Add a required AttributeTypevoidclear()Clear the current SchemaObject : remove all the references to other objects, and all the Maps.copy()Copy a NameFormbooleanGets all the AttributeTypes OIDs of the attribute this NameForm specifies as being usable without requirement in the given objectClass for naming: as part of the Rdn.Gets all the AttributeTypes of the attribute this NameForm specifies as being useable without requirement in the given objectClass for naming: as part of the Rdn.Gets all the AttributeTypes OIDs of the attributes this NameForm specifies as having to be used in the given objectClass for naming: as part of the Rdn.Gets all the AttributeTypes of the attributes this NameForm specifies as having to be used in the given objectClass for naming: as part of the Rdn.Gets the STRUCTURAL ObjectClass this name form specifies naming attributes for.Gets the STRUCTURAL ObjectClass this name form specifies naming attributes for.voidrehash()Compute the hashcode, and store it in the 'h' variablevoidsetMayAttributeTypeOids(List<String> mayAttributeTypeOids) Sets the list of allowed AttributeTypesvoidsetMayAttributeTypes(List<AttributeType> mayAttributeTypes) Sets the list of allowed AttributeTypesvoidsetMustAttributeTypeOids(List<String> mustAttributeTypeOids) Sets the list of required AttributeTypes OIDsvoidsetMustAttributeTypes(List<AttributeType> mustAttributeTypes) Sets the list of required AttributeTypesvoidsetStructuralObjectClass(ObjectClass structuralObjectClass) Sets the structural object class this rule applies tovoidsetStructuralObjectClassOid(String structuralObjectClassOid) Sets the structural object class this rule applies totoString()Methods inherited from class AbstractSchemaObject
addExtension, addExtension, addName, compareOid, copy, getDescription, getExtension, getExtensions, getName, getNames, getObjectType, getOid, getSchemaName, getSpecification, hasExtension, hashCode, isDisabled, isEnabled, isObsolete, lock, rehashBase, setDescription, setEnabled, setExtensions, setNames, setNames, setObsolete, setOid, setSchemaName, setSpecification, unlock
-
Field Details
-
serialVersionUID
public static final long serialVersionUIDDeclares the Serial Version Uid- See Also:
-
-
Constructor Details
-
NameForm
Creates a new instance of MatchingRule.- Parameters:
oid- The MatchingRule OID
-
-
Method Details
-
getStructuralObjectClassOid
Gets the STRUCTURAL ObjectClass this name form specifies naming attributes for.- Returns:
- the ObjectClass's oid this NameForm is for
-
getStructuralObjectClass
Gets the STRUCTURAL ObjectClass this name form specifies naming attributes for.- Returns:
- the ObjectClass this NameForm is for
-
setStructuralObjectClassOid
Sets the structural object class this rule applies to- Parameters:
structuralObjectClassOid- the structural object class to set
-
setStructuralObjectClass
Sets the structural object class this rule applies to- Parameters:
structuralObjectClass- the structural object class to set
-
getMustAttributeTypeOids
-
getMustAttributeTypes
Gets all the AttributeTypes of the attributes this NameForm specifies as having to be used in the given objectClass for naming: as part of the Rdn.- Returns:
- the AttributeTypes of the must use attributes
-
setMustAttributeTypeOids
-
setMustAttributeTypes
Sets the list of required AttributeTypes- Parameters:
mustAttributeTypes- the list of required AttributeTypes
-
addMustAttributeTypeOids
Add a required AttributeType OID- Parameters:
oid- The attributeType OID
-
addMustAttributeTypes
Add a required AttributeType- Parameters:
attributeType- The attributeType
-
getMayAttributeTypeOids
-
getMayAttributeTypes
Gets all the AttributeTypes of the attribute this NameForm specifies as being useable without requirement in the given objectClass for naming: as part of the Rdn.- Returns:
- the AttributeTypes of the may use attributes
-
setMayAttributeTypeOids
-
setMayAttributeTypes
Sets the list of allowed AttributeTypes- Parameters:
mayAttributeTypes- the list of allowed AttributeTypes
-
addMayAttributeTypeOids
Add an allowed AttributeType- Parameters:
oid- The attributeType oid
-
addMayAttributeTypes
Add an allowed AttributeType- Parameters:
attributeType- The attributeType
-
toString
-
copy
-
rehash
public void rehash()Description copied from class:AbstractSchemaObjectCompute the hashcode, and store it in the 'h' variable- Overrides:
rehashin classAbstractSchemaObject- See Also:
-
equals
Description copied from class:AbstractSchemaObject- Specified by:
equalsin interfaceSchemaObject- Overrides:
equalsin classAbstractSchemaObject- See Also:
-
clear
public void clear()Clear the current SchemaObject : remove all the references to other objects, and all the Maps.- Specified by:
clearin interfaceSchemaObject- Overrides:
clearin classAbstractSchemaObject
-