Class AttributeTypeHolder
- java.lang.Object
-
- org.apache.directory.api.ldap.schema.converter.SchemaElementImpl
-
- org.apache.directory.api.ldap.schema.converter.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.- Author:
- Apache Directory Project
-
-
Field Summary
-
Fields inherited from class org.apache.directory.api.ldap.schema.converter.SchemaElementImpl
description, extensions, names, obsolete, oid
-
-
Constructor Summary
Constructors Constructor Description AttributeTypeHolder(String oid)Create an instance of an attributeType
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringdnToLdif(String schemaName)Transform a schema name to a Dn pointing to the correct position in the DITStringgetEquality()Get the equality Matching RulelonggetOidLen()Get the attributeType's syntax lengthStringgetOrdering()Get the ordering Matching RuleStringgetSubstr()Get the substring Matching RuleStringgetSuperior()Get the optional attributeType's superiorStringgetSyntax()Get the attributeType's syntaxUsageEnumgetUsage()Get the attributeType's usagebooleanisCollective()Tells if the attributeType is collectove or notbooleanisNoUserModification()Tells if the attributeType is mutable or notbooleanisSingleValue()Tells if the attribute is single-valuedvoidsetCollective(boolean collective)Set the attributeType collective flagvoidsetEquality(String equality)Set the equality Matching RulevoidsetNoUserModification(boolean noUserModification)Set the attributeType noUserModification flagvoidsetOidLen(long oidLen)Set the attributeType's syntax lengthvoidsetOrdering(String ordering)Set the ordering Matching RulevoidsetSingleValue(boolean singleValue)Set the attributeType singleValue flagvoidsetSubstr(String substr)Set the substring Matching RulevoidsetSuperior(String superior)Set the attributeType's superiorvoidsetSyntax(String syntax)Set the attributeType's syntaxvoidsetUsage(UsageEnum usage)Set the attributeType's usageStringtoLdif(String schemaName)Convert this attributeType to a Ldif stringStringtoString()-
Methods inherited from class org.apache.directory.api.ldap.schema.converter.SchemaElementImpl
extensionsToLdif, getDescription, getExtension, getExtensions, getNames, getOid, isObsolete, schemaToLdif, setDescription, setExtensions, setNames, setObsolete
-
-
-
-
Constructor Detail
-
AttributeTypeHolder
public AttributeTypeHolder(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()
Tells 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 String getSuperior()
Get the optional attributeType's superior- Returns:
- The attributeType's superior, if any
-
setSuperior
public void setSuperior(String superior)
Set the attributeType's superior- Parameters:
superior- The attributeType's superior
-
getEquality
public String getEquality()
Get the equality Matching Rule- Returns:
- The equality matchingRule
-
setEquality
public void setEquality(String equality)
Set the equality Matching Rule- Parameters:
equality- The equality Matching Rule
-
getOrdering
public String getOrdering()
Get the ordering Matching Rule- Returns:
- The ordering matchingRule
-
setOrdering
public void setOrdering(String ordering)
Set the ordering Matching Rule- Parameters:
ordering- The ordering Matching Rule
-
getSubstr
public String getSubstr()
Get the substring Matching Rule- Returns:
- The substring matchingRule
-
setSubstr
public void setSubstr(String substr)
Set the substring Matching Rule- Parameters:
substr- The substring Matching Rule
-
getSyntax
public String getSyntax()
Get the attributeType's syntax- Returns:
- The attributeType's syntax
-
setSyntax
public void setSyntax(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 long getOidLen()
Get the attributeType's syntax length- Returns:
- The attributeType's syntax length
-
setOidLen
public void setOidLen(long oidLen)
Set the attributeType's syntax length- Parameters:
oidLen- The attributeType's syntax length
-
toLdif
public String toLdif(String schemaName) throws LdapException
Convert this attributeType to a Ldif string- Parameters:
schemaName- The name of the schema file containing this attributeType- Returns:
- A ldif formatted string
- Throws:
LdapException- If something went wrong
-
toString
public String toString()
-
dnToLdif
public String dnToLdif(String schemaName) throws LdapException
Transform a schema name to a Dn pointing to the correct position in the DIT- Specified by:
dnToLdifin classSchemaElementImpl- Parameters:
schemaName- The schema name- Returns:
- the Dn associated with this schema in the DIT
- Throws:
LdapException- If the conversion goes wrong
-
-