org.ldaptive.schema
Class AttributeType

java.lang.Object
  extended by org.ldaptive.schema.AbstractSchemaElement
      extended by org.ldaptive.schema.AbstractNamedSchemaElement
          extended by org.ldaptive.schema.AttributeType
All Implemented Interfaces:
SchemaElement

public class AttributeType
extends AbstractNamedSchemaElement

Bean for an attribute type schema element.

   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
 

Version:
$Revision: 3120 $ $Date: 2015-10-01 11:50:02 -0400 (Thu, 01 Oct 2015) $
Author:
Middleware Services

Field Summary
 
Fields inherited from class org.ldaptive.schema.AbstractSchemaElement
NO_WSP_REGEX, WSP_REGEX
 
Constructor Summary
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.
 
Method Summary
 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()
          
 
Methods inherited from class org.ldaptive.schema.AbstractNamedSchemaElement
getName, getNames, hasName, isObsolete, setNames, setObsolete
 
Methods inherited from class org.ldaptive.schema.AbstractSchemaElement
containsBooleanExtension, equals, getDescription, getExtensions, setDescription, setExtensions
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeType

public AttributeType(String s)
Creates a new attribute type.

Parameters:
s - oid

AttributeType

public 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.

Parameters:
oid - oid
names - names
description - description
obsolete - obsolete
superiorType - superior type
equalityMatchingRule - equality matching rule
orderingMatchingRule - ordering matching rule
substringMatchingRule - substring matching rule
syntaxOID - syntax OID
singleValued - single valued
collective - collective
noUserModification - no user modification
usage - usage
extensions - extensions
Method Detail

getOID

public String getOID()
Returns the oid.

Returns:
oid

getSuperiorType

public String getSuperiorType()
Returns the superior type.

Returns:
superior type

setSuperiorType

public void setSuperiorType(String s)
Sets the superior type.

Parameters:
s - superior type

getEqualityMatchingRule

public String getEqualityMatchingRule()
Returns the equality matching rule.

Returns:
equality matching rule

setEqualityMatchingRule

public void setEqualityMatchingRule(String s)
Sets the equality matching rule.

Parameters:
s - equality matching rule

getOrderingMatchingRule

public String getOrderingMatchingRule()
Returns the ordering matching rule.

Returns:
ordering matching rule

setOrderingMatchingRule

public void setOrderingMatchingRule(String s)
Sets the ordering matching rule.

Parameters:
s - ordering matching rule

getSubstringMatchingRule

public String getSubstringMatchingRule()
Returns the substring matching rule.

Returns:
substring matching rule

setSubstringMatchingRule

public void setSubstringMatchingRule(String s)
Sets the substring matching rule.

Parameters:
s - substring matching rule

getSyntaxOID

public String getSyntaxOID()
Returns the syntax oid.

Returns:
syntax oid

getSyntaxOID

public String getSyntaxOID(boolean withBoundCount)
Returns the syntax oid.

Parameters:
withBoundCount - whether the bound count should be included
Returns:
syntax oid

getSyntaxOIDBoundCount

public int getSyntaxOIDBoundCount()
Returns the syntax oid bound count.

Returns:
syntax oid bound count

setSyntaxOID

public void setSyntaxOID(String s)
Sets the syntax oid.

Parameters:
s - syntax oid

isSingleValued

public boolean isSingleValued()
Returns whether this attribute type is single valued.

Returns:
whether this attribute type is single valued

setSingleValued

public void setSingleValued(boolean b)
Sets whether this attribute type is single valued.

Parameters:
b - whether this attribute type is single valued

isCollective

public boolean isCollective()
Returns whether this attribute type is collective.

Returns:
whether this attribute type is collective

setCollective

public void setCollective(boolean b)
Sets whether this attribute type is collective.

Parameters:
b - whether this attribute type is collective

isNoUserModification

public boolean isNoUserModification()
Returns whether this attribute type allows user modification.

Returns:
whether this attribute type allows user modification

setNoUserModification

public void setNoUserModification(boolean b)
Sets whether this attribute type allows user modification.

Parameters:
b - whether this attribute type allows user modification

getUsage

public AttributeUsage getUsage()
Returns the usage.

Returns:
usage

setUsage

public void setUsage(AttributeUsage u)
Sets the usage.

Parameters:
u - attribute usage

parse

public static AttributeType parse(String definition)
                           throws ParseException
Parses the supplied definition string and creates an initialized attribute type.

Parameters:
definition - to parse
Returns:
attribute type
Throws:
ParseException - if the supplied definition is invalid

format

public String format()
Returns this schema element as formatted string per RFC 4512.

Returns:
formatted string

hashCode

public int hashCode()

Specified by:
hashCode in class AbstractSchemaElement

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2003-2015 Virginia Tech. All Rights Reserved.