Package org.ldaptive.schema
Class DITStructureRule
- All Implemented Interfaces:
Freezable,NamedElement,SchemaElement<Integer>
Bean for a DIT content rule schema element.
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classParses a DIT structure rule definition using a char buffer.static classCreates a string representation of a DIT structure rule.static classParses a DIT structure rule definition using a regular expression. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final inthash code seed.private final intID.private StringName form.private int[]Superior rules. -
Constructor Summary
ConstructorsConstructorDescriptionDITStructureRule(int i) Creates a new DIT structure rule.DITStructureRule(int id, String[] names, String description, boolean obsolete, String nameForm, int[] superiorRules, Extensions extensions) Creates a new DIT structure rule. -
Method Summary
Modifier and TypeMethodDescriptionbooleanformat()Returns this schema element as formatted string per RFC 4512.format(SchemaElementFormatter<DITStructureRule> formatter) Returns a string representation of this element.Returns the key for this element.intgetID()Returns the id.Returns the name form.int[]Returns the superior rules.inthashCode()static DITStructureRuleParses the supplied definition string and creates an initialized DIT structure rule.voidSets the name form.voidsetSuperiorRules(int... i) Sets the superior rules.toString()Methods inherited from class org.ldaptive.schema.AbstractNamedSchemaElement
getName, getNames, hasName, isObsolete, setNames, setObsoleteMethods inherited from class org.ldaptive.schema.AbstractSchemaElement
containsBooleanExtension, freeze, getDescription, getExtensions, setDescription, setExtensionsMethods inherited from class org.ldaptive.AbstractFreezable
assertMutable, freeze, freeze, isFrozen
-
Field Details
-
HASH_CODE_SEED
private static final int HASH_CODE_SEEDhash code seed.- See Also:
-
id
private final int idID. -
nameForm
Name form. -
superiorRules
private int[] superiorRulesSuperior rules.
-
-
Constructor Details
-
DITStructureRule
public DITStructureRule(int i) Creates a new DIT structure rule.- Parameters:
i- id
-
DITStructureRule
public DITStructureRule(int id, String[] names, String description, boolean obsolete, String nameForm, int[] superiorRules, Extensions extensions) Creates a new DIT structure rule.- Parameters:
id- idnames- namesdescription- descriptionobsolete- obsoletenameForm- name formsuperiorRules- superior rulesextensions- extensions
-
-
Method Details
-
getElementKey
Description copied from interface:SchemaElementReturns the key for this element. Typically, an OID but may also be an integer.- Returns:
- element key
-
getID
public int getID()Returns the id.- Returns:
- id
-
getNameForm
Returns the name form.- Returns:
- name form
-
setNameForm
Sets the name form.- Parameters:
s- name form
-
getSuperiorRules
public int[] getSuperiorRules()Returns the superior rules.- Returns:
- superior rules
-
setSuperiorRules
public void setSuperiorRules(int... i) Sets the superior rules.- Parameters:
i- superior rules
-
parse
Parses the supplied definition string and creates an initialized DIT structure rule.- Parameters:
definition- to parse- Returns:
- DIT structure rule
- Throws:
SchemaParseException- if the supplied definition is invalid
-
format
Description copied from interface:SchemaElementReturns this schema element as formatted string per RFC 4512.- Returns:
- formatted string
-
format
Returns a string representation of this element.- Parameters:
formatter- to format this element- Returns:
- formatted schema element
-
equals
- Overrides:
equalsin classAbstractSchemaElement<Integer>
-
hashCode
public int hashCode()- Specified by:
hashCodein classAbstractSchemaElement<Integer>
-
toString
-