Class DitStructureRule
- java.lang.Object
-
- org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
-
- org.apache.directory.api.ldap.model.schema.DitStructureRule
-
- All Implemented Interfaces:
Serializable
,SchemaObject
public class DitStructureRule extends AbstractSchemaObject
A dITStructureRule definition. A dITStructureRules is a rule governing the structure of the DIT by specifying a permitted superior to subordinate entry relationship. A structure rule relates a nameForm, and therefore a STRUCTURAL objectClass, to superior dITStructureRules. This permits entries of the STRUCTURAL objectClass identified by the nameForm to exist in the DIT as subordinates to entries governed by the indicated superior dITStructureRules. Hence dITStructureRules only apply to structural object classes.According to ldapbis [MODELS]:
DIT structure rule descriptions are written according to the ABNF: DITStructureRuleDescription = LPAREN WSP ruleid ; rule identifier [ SP "NAME" SP qdescrs ] ; short names (descriptors) [ SP "DESC" SP qdstring ] ; description [ SP "OBSOLETE" ] ; not active SP "FORM" SP oid ; NameForm [ SP "SUP" ruleids ] ; superior rules extensions WSP RPAREN ; extensions ruleids = ruleid / ( LPAREN WSP ruleidlist WSP RPAREN ) ruleidlist = ruleid *( SP ruleid ) ruleid = number where: [ruleid] is the rule identifier of this DIT structure rule; NAME [qdescrs] are short names (descriptors) identifying this DIT structure rule; DESC [qdstring] is a short descriptive string; OBSOLETE indicates this DIT structure rule use is not active; FORM is specifies the name form associated with this DIT structure rule; SUP identifies superior rules (by rule id); and [extensions] describe extensions. If no superior rules are identified, the DIT structure rule applies to an autonomous administrative point (e.g. the root vertex of the subtree controlled by the subschema) [X.501].
- Author:
- Apache Directory Project
- See Also:
- RFC2252 Section 6.33, ldapbis [MODELS], Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static long
serialVersionUID
The mandatory serialVersionUID
-
Constructor Summary
Constructors Constructor Description DitStructureRule(int ruleId)
Creates a new instance of DitStructureRule
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSuperRule(Integer superRule)
Adds a new superior RuleIdvoid
clear()
Clear the current SchemaObject : remove all the references to other objects, and all the Maps.DitStructureRule
copy()
Copy the current SchemaObject on placeboolean
equals(Object o)
String
getForm()
String
getOid()
The DIT structure rule does not have an OID Gets usually what is the numeric object identifier assigned to this SchemaObject.int
getRuleId()
List<Integer>
getSuperRules()
int
hashCode()
void
setForm(String form)
Sets the associated NameForm's OIDvoid
setRuleId(int ruleId)
Sets the rule identifier of this DIT structure rule;void
setSuperRules(List<Integer> superRules)
Sets the list of superior RuleIdsString
toString()
-
Methods inherited from class org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
addExtension, addExtension, addName, copy, getDescription, getExtension, getExtensions, getName, getNames, getObjectType, getSchemaName, getSpecification, hasExtension, isDisabled, isEnabled, isObsolete, lock, setDescription, setEnabled, setExtensions, setNames, setNames, setObsolete, setOid, setSchemaName, setSpecification, unlock
-
-
-
-
Field Detail
-
serialVersionUID
public static final long serialVersionUID
The mandatory serialVersionUID- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DitStructureRule
public DitStructureRule(int ruleId)
Creates a new instance of DitStructureRule- Parameters:
ruleId
- The RuleId for this DitStructureRule
-
-
Method Detail
-
setForm
public void setForm(String form)
Sets the associated NameForm's OID- Parameters:
form
- The NameForm's OID
-
getRuleId
public int getRuleId()
- Returns:
- The Rule ID
-
setRuleId
public void setRuleId(int ruleId)
Sets the rule identifier of this DIT structure rule;- Parameters:
ruleId
- the rule identifier of this DIT structure rule;
-
getSuperRules
public List<Integer> getSuperRules()
- Returns:
- The list of superiors RuleIDs
-
setSuperRules
public void setSuperRules(List<Integer> superRules)
Sets the list of superior RuleIds- Parameters:
superRules
- the list of superior RuleIds
-
addSuperRule
public void addSuperRule(Integer superRule)
Adds a new superior RuleId- Parameters:
superRule
- The superior RuleID to add
-
getOid
public String getOid()
The DIT structure rule does not have an OID Gets usually what is the numeric object identifier assigned to this SchemaObject. All schema objects except for MatchingRuleUses have an OID assigned specifically to then. A MatchingRuleUse's OID really is the OID of it's MatchingRule and not specific to the MatchingRuleUse. This effects how MatchingRuleUse objects are maintained by the system.- Specified by:
getOid
in interfaceSchemaObject
- Overrides:
getOid
in classAbstractSchemaObject
- Returns:
- an OID for this SchemaObject or its MatchingRule if this SchemaObject is a MatchingRuleUse object
-
copy
public DitStructureRule copy()
Copy the current SchemaObject on place- Returns:
- The copied SchemaObject
-
hashCode
public int hashCode()
Description copied from class:AbstractSchemaObject
- Specified by:
hashCode
in interfaceSchemaObject
- Overrides:
hashCode
in classAbstractSchemaObject
- See Also:
Object.equals(Object)
-
equals
public boolean equals(Object o)
- Specified by:
equals
in interfaceSchemaObject
- Overrides:
equals
in classAbstractSchemaObject
-
clear
public void clear()
Clear the current SchemaObject : remove all the references to other objects, and all the Maps.- Specified by:
clear
in interfaceSchemaObject
- Overrides:
clear
in classAbstractSchemaObject
-
-