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

java.lang.Object
  extended by org.apache.directory.shared.converter.schema.SchemaElementImpl
All Implemented Interfaces:
SchemaElement
Direct Known Subclasses:
AttributeTypeHolder, ObjectClassHolder

public abstract class SchemaElementImpl
extends java.lang.Object
implements SchemaElement

An abstract SchemaElement implementation. It contains shared elements from AttributeType and ObjectClass, like obsolete, oid, description, names and extensions (not implemented)

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Field Summary
protected  java.lang.String description
          The schema element description
protected  java.util.List<java.lang.String> extensions
          The optional list of extensions
protected  java.util.List<java.lang.String> names
          The list of names for this schemaElements
protected  boolean obsolete
          The obsolete flag
protected  java.lang.String oid
          The schema element oid
 
Constructor Summary
SchemaElementImpl()
           
 
Method Summary
abstract  java.lang.String dnToLdif(java.lang.String schemaName)
           
protected  java.lang.String extensionsToLdif(java.lang.String ID)
          Return the extensions formated as Ldif lines
 java.lang.String getDescription()
           
 java.util.List<java.lang.String> getExtensions()
           
 java.util.List<java.lang.String> getNames()
           
 java.lang.String getOid()
          Returns the schema element's OID
 boolean isObsolete()
          Tells if the attributeType is obsolete
protected  java.lang.String schemaToLdif(java.lang.String schemaName, java.lang.String type)
           
 void setDescription(java.lang.String description)
          Set the schema element's description
 void setExtensions(java.util.List<java.lang.String> extensions)
          Set a list of extensions for a schemaElement
 void setNames(java.util.List<java.lang.String> names)
          Set a list of names for a schemaElement
 void setObsolete(boolean obsolete)
          Set the obsolete flag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.directory.shared.converter.schema.SchemaElement
toLdif
 

Field Detail

oid

protected java.lang.String oid
The schema element oid


description

protected java.lang.String description
The schema element description


names

protected java.util.List<java.lang.String> names
The list of names for this schemaElements


obsolete

protected boolean obsolete
The obsolete flag


extensions

protected java.util.List<java.lang.String> extensions
The optional list of extensions

Constructor Detail

SchemaElementImpl

public SchemaElementImpl()
Method Detail

isObsolete

public boolean isObsolete()
Description copied from interface: SchemaElement
Tells if the attributeType is obsolete

Specified by:
isObsolete in interface SchemaElement
Returns:
true if the schema element is obsolete, folse otherwise
See Also:
SchemaElement.isObsolete()

setObsolete

public void setObsolete(boolean obsolete)
Description copied from interface: SchemaElement
Set the obsolete flag

Specified by:
setObsolete in interface SchemaElement
Parameters:
obsolete - The value to be set
See Also:
SchemaElement.setObsolete(boolean)

getOid

public java.lang.String getOid()
Description copied from interface: SchemaElement
Returns the schema element's OID

Specified by:
getOid in interface SchemaElement
See Also:
SchemaElement.getOid()

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface SchemaElement
Returns:
Return the schema element description
See Also:
SchemaElement.getDescription()

setDescription

public void setDescription(java.lang.String description)
Description copied from interface: SchemaElement
Set the schema element's description

Specified by:
setDescription in interface SchemaElement
Parameters:
description - The schema element's description
See Also:
SchemaElement.setDescription(String)

getNames

public java.util.List<java.lang.String> getNames()
Specified by:
getNames in interface SchemaElement
Returns:
The list of names for the schemaElement
See Also:
SchemaElement.getNames()

setNames

public void setNames(java.util.List<java.lang.String> names)
Description copied from interface: SchemaElement
Set a list of names for a schemaElement

Specified by:
setNames in interface SchemaElement
Parameters:
names - The list of names of this schemaElement
See Also:
SchemaElement.setNames(List)

getExtensions

public java.util.List<java.lang.String> getExtensions()
Specified by:
getExtensions in interface SchemaElement
Returns:
The list of extensions for the schemaElement
See Also:
SchemaElement.getExtensions()

setExtensions

public void setExtensions(java.util.List<java.lang.String> extensions)
Description copied from interface: SchemaElement
Set a list of extensions for a schemaElement

Specified by:
setExtensions in interface SchemaElement
Parameters:
extensions - The list of extensions of this schemaElement
See Also:
SchemaElement.setExtensions(List)

dnToLdif

public abstract java.lang.String dnToLdif(java.lang.String schemaName)
                                   throws LdapException
Returns:
The dn as a ldif line
Throws:
LdapException

extensionsToLdif

protected java.lang.String extensionsToLdif(java.lang.String ID)
                                     throws LdapException
Return the extensions formated as Ldif lines

Parameters:
ID - The attributeId : can be m-objectClassExtension or m-attributeTypeExtension
Returns:
The extensions formated as ldif lines
Throws:
LdapException - If the conversion goes wrong

schemaToLdif

protected java.lang.String schemaToLdif(java.lang.String schemaName,
                                        java.lang.String type)
                                 throws LdapException
Throws:
LdapException


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