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
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 |
---|---|
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, equals, getDescription, getExtensions, setDescription, setExtensions
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 int hashCode()
hashCode
in class AbstractSchemaElement
Copyright © 2018. All rights reserved.