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 java.util.regex.Pattern |
DEFINITION_PATTERN
Pattern to match definitions.
|
private java.lang.String |
equalityMatchingRule
Equality matching rule.
|
private static int |
HASH_CODE_SEED
hash code seed.
|
private boolean |
noUserModification
No user modification.
|
private java.lang.String |
oid
OID.
|
private java.lang.String |
orderingMatchingRule
Ordering matching rule.
|
private boolean |
singleValued
Single valued.
|
private java.lang.String |
substringMatchingRule
Substring matching rule.
|
private java.lang.String |
superiorType
Superior type.
|
private java.lang.String |
syntaxOID
Syntax OID.
|
private AttributeUsage |
usage
Usage.
|
NO_WSP_REGEX, WSP_REGEX| Constructor and Description |
|---|
AttributeType(java.lang.String s)
Creates a new attribute type.
|
AttributeType(java.lang.String oid,
java.lang.String[] names,
java.lang.String description,
boolean obsolete,
java.lang.String superiorType,
java.lang.String equalityMatchingRule,
java.lang.String orderingMatchingRule,
java.lang.String substringMatchingRule,
java.lang.String syntaxOID,
boolean singleValued,
boolean collective,
boolean noUserModification,
AttributeUsage usage,
Extensions extensions)
Creates a new attribute type.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
format()
Returns this schema element as formatted string per RFC 4512.
|
java.lang.String |
getEqualityMatchingRule()
Returns the equality matching rule.
|
java.lang.String |
getOID()
Returns the oid.
|
java.lang.String |
getOrderingMatchingRule()
Returns the ordering matching rule.
|
java.lang.String |
getSubstringMatchingRule()
Returns the substring matching rule.
|
java.lang.String |
getSuperiorType()
Returns the superior type.
|
java.lang.String |
getSyntaxOID()
Returns the syntax oid.
|
java.lang.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(java.lang.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(java.lang.String s)
Sets the equality matching rule.
|
void |
setNoUserModification(boolean b)
Sets whether this attribute type allows user modification.
|
void |
setOrderingMatchingRule(java.lang.String s)
Sets the ordering matching rule.
|
void |
setSingleValued(boolean b)
Sets whether this attribute type is single valued.
|
void |
setSubstringMatchingRule(java.lang.String s)
Sets the substring matching rule.
|
void |
setSuperiorType(java.lang.String s)
Sets the superior type.
|
void |
setSyntaxOID(java.lang.String s)
Sets the syntax oid.
|
void |
setUsage(AttributeUsage u)
Sets the usage.
|
java.lang.String |
toString() |
getName, getNames, hasName, isObsolete, setNames, setObsoletecontainsBooleanExtension, equals, getDescription, getExtensions, setDescription, setExtensionsprivate static final int HASH_CODE_SEED
private static final java.util.regex.Pattern DEFINITION_PATTERN
private final java.lang.String oid
private java.lang.String superiorType
private java.lang.String equalityMatchingRule
private java.lang.String orderingMatchingRule
private java.lang.String substringMatchingRule
private java.lang.String syntaxOID
private boolean singleValued
private boolean collective
private boolean noUserModification
private AttributeUsage usage
public AttributeType(java.lang.String s)
s - oidpublic AttributeType(java.lang.String oid,
java.lang.String[] names,
java.lang.String description,
boolean obsolete,
java.lang.String superiorType,
java.lang.String equalityMatchingRule,
java.lang.String orderingMatchingRule,
java.lang.String substringMatchingRule,
java.lang.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 java.lang.String getOID()
public java.lang.String getSuperiorType()
public void setSuperiorType(java.lang.String s)
s - superior typepublic java.lang.String getEqualityMatchingRule()
public void setEqualityMatchingRule(java.lang.String s)
s - equality matching rulepublic java.lang.String getOrderingMatchingRule()
public void setOrderingMatchingRule(java.lang.String s)
s - ordering matching rulepublic java.lang.String getSubstringMatchingRule()
public void setSubstringMatchingRule(java.lang.String s)
s - substring matching rulepublic java.lang.String getSyntaxOID()
public java.lang.String getSyntaxOID(boolean withBoundCount)
withBoundCount - whether the bound count should be includedpublic int getSyntaxOIDBoundCount()
public void setSyntaxOID(java.lang.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(java.lang.String definition) throws java.text.ParseException
definition - to parsejava.text.ParseException - if the supplied definition is invalidpublic java.lang.String format()
SchemaElementpublic int hashCode()
hashCode in class AbstractSchemaElementpublic java.lang.String toString()
toString in class java.lang.Object