public class DITStructureRule extends AbstractNamedSchemaElement
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
Modifier and Type | Field and Description |
---|---|
private static Pattern |
DEFINITION_PATTERN
Pattern to match definitions.
|
private static int |
HASH_CODE_SEED
hash code seed.
|
private int |
id
ID.
|
private String |
nameForm
Name form.
|
private int[] |
superiorRules
Superior rules.
|
NO_WSP_REGEX, WSP_REGEX
Constructor and 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.
|
Modifier and Type | Method and 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() |
getName, getNames, hasName, isObsolete, setNames, setObsolete
containsBooleanExtension, getDescription, getExtensions, setDescription, setExtensions
private static final int HASH_CODE_SEED
private static final Pattern DEFINITION_PATTERN
private final int id
private String nameForm
private int[] superiorRules
public DITStructureRule(int i)
i
- idpublic DITStructureRule(int id, String[] names, String description, boolean obsolete, String nameForm, int[] superiorRules, Extensions extensions)
id
- idnames
- namesdescription
- descriptionobsolete
- obsoletenameForm
- name formsuperiorRules
- superior rulesextensions
- extensionspublic int getID()
public String getNameForm()
public void setNameForm(String s)
s
- name formpublic int[] getSuperiorRules()
public void setSuperiorRules(int[] i)
i
- superior rulespublic static DITStructureRule parse(String definition) throws ParseException
definition
- to parseParseException
- if the supplied definition is invalidpublic String format()
SchemaElement
public boolean equals(Object o)
equals
in class AbstractSchemaElement
public int hashCode()
hashCode
in class AbstractSchemaElement
Copyright © 2003-2019 Virginia Tech. All Rights Reserved.