public class AttributeType extends AbstractNamedSchemaElement
AttributeTypeDescription = LPAREN WSP numericoid ; object identifier [ SP "NAME" SP qdescrs ] ; short names (descriptors) [ SP "DESC" SP qdstring ] ; description [ SP "OBSOLETE" ] ; not active [ SP "SUP" SP oid ] ; supertype [ SP "EQUALITY" SP oid ] ; equality matching rule [ SP "ORDERING" SP oid ] ; ordering matching rule [ SP "SUBSTR" SP oid ] ; substrings matching rule [ SP "SYNTAX" SP noidlen ] ; value syntax [ SP "SINGLE-VALUE" ] ; single-value [ SP "COLLECTIVE" ] ; collective [ SP "NO-USER-MODIFICATION" ] ; not user modifiable [ SP "USAGE" SP usage ] ; usage extensions WSP RPAREN ; extensions
Modifier and Type | Field and Description |
---|---|
private boolean |
collective
Collective.
|
private static Pattern |
DEFINITION_PATTERN
Pattern to match definitions.
|
private String |
equalityMatchingRule
Equality matching rule.
|
private static int |
HASH_CODE_SEED
hash code seed.
|
private boolean |
noUserModification
No user modification.
|
private String |
oid
OID.
|
private String |
orderingMatchingRule
Ordering matching rule.
|
private boolean |
singleValued
Single valued.
|
private String |
substringMatchingRule
Substring matching rule.
|
private String |
superiorType
Superior type.
|
private String |
syntaxOID
Syntax OID.
|
private AttributeUsage |
usage
Usage.
|
NO_WSP_REGEX, WSP_REGEX
Constructor and Description |
---|
AttributeType(String s)
Creates a new attribute type.
|
AttributeType(String oid,
String[] names,
String description,
boolean obsolete,
String superiorType,
String equalityMatchingRule,
String orderingMatchingRule,
String substringMatchingRule,
String syntaxOID,
boolean singleValued,
boolean collective,
boolean noUserModification,
AttributeUsage usage,
Extensions extensions)
Creates a new attribute type.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
format()
Returns this schema element as formatted string per RFC 4512.
|
String |
getEqualityMatchingRule()
Returns the equality matching rule.
|
String |
getOID()
Returns the oid.
|
String |
getOrderingMatchingRule()
Returns the ordering matching rule.
|
String |
getSubstringMatchingRule()
Returns the substring matching rule.
|
String |
getSuperiorType()
Returns the superior type.
|
String |
getSyntaxOID()
Returns the syntax oid.
|
String |
getSyntaxOID(boolean withBoundCount)
Returns the syntax oid.
|
int |
getSyntaxOIDBoundCount()
Returns the syntax oid bound count.
|
AttributeUsage |
getUsage()
Returns the usage.
|
int |
hashCode() |
boolean |
isCollective()
Returns whether this attribute type is collective.
|
boolean |
isNoUserModification()
Returns whether this attribute type allows user modification.
|
boolean |
isSingleValued()
Returns whether this attribute type is single valued.
|
static AttributeType |
parse(String definition)
Parses the supplied definition string and creates an initialized attribute type.
|
void |
setCollective(boolean b)
Sets whether this attribute type is collective.
|
void |
setEqualityMatchingRule(String s)
Sets the equality matching rule.
|
void |
setNoUserModification(boolean b)
Sets whether this attribute type allows user modification.
|
void |
setOrderingMatchingRule(String s)
Sets the ordering matching rule.
|
void |
setSingleValued(boolean b)
Sets whether this attribute type is single valued.
|
void |
setSubstringMatchingRule(String s)
Sets the substring matching rule.
|
void |
setSuperiorType(String s)
Sets the superior type.
|
void |
setSyntaxOID(String s)
Sets the syntax oid.
|
void |
setUsage(AttributeUsage u)
Sets the usage.
|
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 String oid
private String superiorType
private String equalityMatchingRule
private String orderingMatchingRule
private String substringMatchingRule
private String syntaxOID
private boolean singleValued
private boolean collective
private boolean noUserModification
private AttributeUsage usage
public AttributeType(String s)
s
- oidpublic AttributeType(String oid, String[] names, String description, boolean obsolete, String superiorType, String equalityMatchingRule, String orderingMatchingRule, String substringMatchingRule, String syntaxOID, boolean singleValued, boolean collective, boolean noUserModification, AttributeUsage usage, Extensions extensions)
oid
- oidnames
- namesdescription
- descriptionobsolete
- obsoletesuperiorType
- superior typeequalityMatchingRule
- equality matching ruleorderingMatchingRule
- ordering matching rulesubstringMatchingRule
- substring matching rulesyntaxOID
- syntax OIDsingleValued
- single valuedcollective
- collectivenoUserModification
- no user modificationusage
- usageextensions
- extensionspublic String getOID()
public String getSuperiorType()
public void setSuperiorType(String s)
s
- superior typepublic String getEqualityMatchingRule()
public void setEqualityMatchingRule(String s)
s
- equality matching rulepublic String getOrderingMatchingRule()
public void setOrderingMatchingRule(String s)
s
- ordering matching rulepublic String getSubstringMatchingRule()
public void setSubstringMatchingRule(String s)
s
- substring matching rulepublic String getSyntaxOID()
public String getSyntaxOID(boolean withBoundCount)
withBoundCount
- whether the bound count should be includedpublic int getSyntaxOIDBoundCount()
public void setSyntaxOID(String s)
s
- syntax oidpublic boolean isSingleValued()
public void setSingleValued(boolean b)
b
- whether this attribute type is single valuedpublic boolean isCollective()
public void setCollective(boolean b)
b
- whether this attribute type is collectivepublic boolean isNoUserModification()
public void setNoUserModification(boolean b)
b
- whether this attribute type allows user modificationpublic AttributeUsage getUsage()
public void setUsage(AttributeUsage u)
u
- attribute usagepublic static AttributeType 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.