org.apache.directory.shared.converter.schema
Class AttributeTypeHolder

java.lang.Object
  extended by org.apache.directory.shared.converter.schema.SchemaElementImpl
      extended by org.apache.directory.shared.converter.schema.AttributeTypeHolder
All Implemented Interfaces:
SchemaElement

public class AttributeTypeHolder
extends SchemaElementImpl

A bean used to hold the literal values of an AttributeType parsed out of an OpenLDAP schema configuration file.

Version:
$Rev: 476875 $
Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.shared.converter.schema.SchemaElementImpl
description, extensions, names, obsolete, oid
 
Constructor Summary
AttributeTypeHolder(java.lang.String oid)
          Create an instance of an attributeType
 
Method Summary
 java.lang.String dnToLdif(java.lang.String schemaName)
           
 java.lang.String getEquality()
          Get the equality Matching Rule
 int getOidLen()
          Get the attributeType's syntax length
 java.lang.String getOrdering()
          Get the ordering Matching Rule
 java.lang.String getSubstr()
          Get the substring Matching Rule
 java.lang.String getSuperior()
          Get the optional attributeType's superior
 java.lang.String getSyntax()
          Get the attributeType's syntax
 UsageEnum getUsage()
          Get the attributeType's usage
 boolean isCollective()
          Tells if the attributeType is collectove or not
 boolean isNoUserModification()
          Tellse if the attributeType is mutable or not
 boolean isSingleValue()
          Tells if the attribute is single-valued
 void setCollective(boolean collective)
          Set the attributeType collective flag
 void setEquality(java.lang.String equality)
          Set the equality Matching Rule
 void setNoUserModification(boolean noUserModification)
          Set the attributeType noUserModification flag
 void setOidLen(int oidLen)
          Set the attributeType's syntax length
 void setOrdering(java.lang.String ordering)
          Set the ordering Matching Rule
 void setSingleValue(boolean singleValue)
          Set the attributeType singleValue flag
 void setSubstr(java.lang.String substr)
          Set the substring Matching Rule
 void setSuperior(java.lang.String superior)
          Set the attributeType's superior
 void setSyntax(java.lang.String syntax)
          Set the attributeType's syntax
 void setUsage(UsageEnum usage)
          Set the attributeType's usage
 java.lang.String toLdif(java.lang.String schemaName)
          Convert this attributeType to a Ldif string
 java.lang.String toString()
          Return a String representing this AttributeType.
 
Methods inherited from class org.apache.directory.shared.converter.schema.SchemaElementImpl
extensionsToLdif, getDescription, getExtensions, getNames, getOid, isObsolete, schemaToLdif, setDescription, setExtensions, setNames, setObsolete
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeTypeHolder

public AttributeTypeHolder(java.lang.String oid)
Create an instance of an attributeType

Parameters:
oid - The attributeType's OID
Method Detail

isSingleValue

public boolean isSingleValue()
Tells if the attribute is single-valued

Returns:
true if the attribute is single-valued, false otherwise

setSingleValue

public void setSingleValue(boolean singleValue)
Set the attributeType singleValue flag

Parameters:
singleValue - The value for this flag

isCollective

public boolean isCollective()
Tells if the attributeType is collectove or not

Returns:
True if the attributeType is collective, false otherwise

setCollective

public void setCollective(boolean collective)
Set the attributeType collective flag

Parameters:
collective - The value for this flag

isNoUserModification

public boolean isNoUserModification()
Tellse if the attributeType is mutable or not

Returns:
True if the attributeType is immutable, false otherwise

setNoUserModification

public void setNoUserModification(boolean noUserModification)
Set the attributeType noUserModification flag

Parameters:
noUserModification - The value for this flag

getSuperior

public java.lang.String getSuperior()
Get the optional attributeType's superior

Returns:
The attributeType's superior, if any

setSuperior

public void setSuperior(java.lang.String superior)
Set the attributeType's superior

Parameters:
superior - The attributeType's superior

getEquality

public java.lang.String getEquality()
Get the equality Matching Rule

Returns:
The equality matchingRule

setEquality

public void setEquality(java.lang.String equality)
Set the equality Matching Rule

Parameters:
equality - The equality Matching Rule

getOrdering

public java.lang.String getOrdering()
Get the ordering Matching Rule

Returns:
The ordering matchingRule

setOrdering

public void setOrdering(java.lang.String ordering)
Set the ordering Matching Rule

Parameters:
ordering - The ordering Matching Rule

getSubstr

public java.lang.String getSubstr()
Get the substring Matching Rule

Returns:
The substring matchingRule

setSubstr

public void setSubstr(java.lang.String substr)
Set the substring Matching Rule

Parameters:
substr - The substring Matching Rule

getSyntax

public java.lang.String getSyntax()
Get the attributeType's syntax

Returns:
The attributeType's syntax

setSyntax

public void setSyntax(java.lang.String syntax)
Set the attributeType's syntax

Parameters:
syntax - The attributeType's syntax

getUsage

public UsageEnum getUsage()
Get the attributeType's usage

Returns:
The attributeType's usage

setUsage

public void setUsage(UsageEnum usage)
Set the attributeType's usage

Parameters:
usage - The attributeType's usage

getOidLen

public int getOidLen()
Get the attributeType's syntax length

Returns:
The attributeType's syntax length

setOidLen

public void setOidLen(int oidLen)
Set the attributeType's syntax length

Parameters:
oidLen - The attributeType's syntax length

toLdif

public java.lang.String toLdif(java.lang.String schemaName)
                        throws javax.naming.NamingException
Convert this attributeType to a Ldif string

Parameters:
schemaName - The name of the schema file containing this attributeType
Returns:
A ldif formatted string
Throws:
javax.naming.NamingException - If any error occurs.

toString

public java.lang.String toString()
Return a String representing this AttributeType.

Overrides:
toString in class java.lang.Object

dnToLdif

public java.lang.String dnToLdif(java.lang.String schemaName)
                          throws javax.naming.NamingException
Specified by:
dnToLdif in class SchemaElementImpl
Returns:
The dn as a ldif line
Throws:
javax.naming.NamingException


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.