Package org.ldaptive.schema
Class DITStructureRule
- java.lang.Object
-
- org.ldaptive.schema.AbstractSchemaElement
-
- org.ldaptive.schema.AbstractNamedSchemaElement
-
- org.ldaptive.schema.DITStructureRule
-
- All Implemented Interfaces:
SchemaElement
public class DITStructureRule extends AbstractNamedSchemaElement
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 Classes Modifier and Type Class Description static class
DITStructureRule.DefaultDefinitionFunction
Parses a DIT structure rule definition using a char buffer.static class
DITStructureRule.RegexDefinitionFunction
Parses a DIT structure rule definition using a regular expression.
-
Field Summary
Fields Modifier and Type Field Description private static int
HASH_CODE_SEED
hash code seed.private int
id
ID.private String
nameForm
Name form.private int[]
superiorRules
Superior rules.
-
Constructor Summary
Constructors Constructor Description DITStructureRule(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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
format()
Returns this schema element as formatted string per RFC 4512.int
getID()
Returns the id.String
getNameForm()
Returns the name form.int[]
getSuperiorRules()
Returns the superior rules.int
hashCode()
static DITStructureRule
parse(String definition)
Parses the supplied definition string and creates an initialized DIT structure rule.void
setNameForm(String s)
Sets the name form.void
setSuperiorRules(int[] i)
Sets the superior rules.String
toString()
-
Methods inherited from class org.ldaptive.schema.AbstractNamedSchemaElement
getName, getNames, hasName, isObsolete, setNames, setObsolete
-
Methods inherited from class org.ldaptive.schema.AbstractSchemaElement
containsBooleanExtension, getDescription, getExtensions, setDescription, setExtensions
-
-
-
-
Field Detail
-
HASH_CODE_SEED
private static final int HASH_CODE_SEED
hash code seed.- See Also:
- Constant Field Values
-
id
private final int id
ID.
-
nameForm
private String nameForm
Name form.
-
superiorRules
private int[] superiorRules
Superior rules.
-
-
Constructor Detail
-
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 Detail
-
getID
public int getID()
Returns the id.- Returns:
- id
-
getNameForm
public String getNameForm()
Returns the name form.- Returns:
- name form
-
setNameForm
public void setNameForm(String s)
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
public static DITStructureRule parse(String definition) throws SchemaParseException
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
public String format()
Description copied from interface:SchemaElement
Returns this schema element as formatted string per RFC 4512.- Returns:
- formatted string
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classAbstractSchemaElement
-
hashCode
public int hashCode()
- Specified by:
hashCode
in classAbstractSchemaElement
-
-