org.apache.directory.api.ldap.model.schema
Class ObjectClass

java.lang.Object
  extended by org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
      extended by org.apache.directory.api.ldap.model.schema.ObjectClass
All Implemented Interfaces:
Serializable, SchemaObject
Direct Known Subclasses:
MutableObjectClass

public class ObjectClass
extends AbstractSchemaObject

An objectClass definition.

According to ldapbis [MODELS]:

  Object Class definitions are written according to the ABNF:

    ObjectClassDescription = LPAREN WSP
        numericoid                ; object identifier
        [ SP "NAME" SP qdescrs ]  ; short names (descriptors)
        [ SP "DESC" SP qdstring ] ; description
        [ SP "OBSOLETE" ]         ; not active
        [ SP "SUP" SP oids ]      ; superior object classes
        [ SP kind ]               ; kind of class
        [ SP "MUST" SP oids ]     ; attribute types
        [ SP "MAY" SP oids ]      ; attribute types
        extensions WSP RPAREN

     kind = "ABSTRACT" / "STRUCTURAL" / "AUXILIARY"

   where:
     [numericoid] is object identifier assigned to this object class;
     NAME [qdescrs] are short names (descriptors) identifying this object
         class;
     DESC [qdstring] is a short descriptive string;
     OBSOLETE indicates this object class is not active;
     SUP [oids] specifies the direct superclasses of this object class;
     the kind of object class is indicated by one of ABSTRACT,
         STRUCTURAL, or AUXILIARY, default is STRUCTURAL;
     MUST and MAY specify the sets of required and allowed attribute
         types, respectively; and
    [extensions] describe extensions.
 

Author:
Apache Directory Project
See Also:
RFC2252 Section 4.4, ldapbis [MODELS], DescriptionUtils.getDescription(ObjectClass), Serialized Form

Field Summary
protected  List<String> mayAttributeTypeOids
          The list of allowed AttributeType OIDs
protected  List<AttributeType> mayAttributeTypes
          The list of allowed AttributeTypes
protected  List<String> mustAttributeTypeOids
          The list of required AttributeType OIDs
protected  List<AttributeType> mustAttributeTypes
          The list of required AttributeTypes
protected  ObjectClassTypeEnum objectClassType
          The ObjectClass type : ABSTRACT, AUXILIARY or STRUCTURAL
protected  List<String> superiorOids
          The ObjectClass superior OIDs
protected  List<ObjectClass> superiors
          The ObjectClass superiors
 
Fields inherited from class org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
description, extensions, isEnabled, isObsolete, isReadOnly, locked, names, objectType, oid, schemaName, specification
 
Constructor Summary
ObjectClass(String oid)
          Creates a new instance of MatchingRuleUseDescription
 
Method Summary
 ObjectClass copy()
          Copy an ObjectClass
 boolean equals(Object o)
          
 List<String> getMayAttributeTypeOids()
           
 List<AttributeType> getMayAttributeTypes()
           
 List<String> getMustAttributeTypeOids()
           
 List<AttributeType> getMustAttributeTypes()
           
 List<String> getSuperiorOids()
          Gets the superclasses OIDsof this ObjectClass.
 List<ObjectClass> getSuperiors()
          Gets the superclasses of this ObjectClass.
 ObjectClassTypeEnum getType()
          Gets the type of this ObjectClass as a type safe enum.
 boolean isAbstract()
          Tells if the current ObjectClass is ABSTRACT
 boolean isAuxiliary()
          Tells if the current ObjectClass is AUXILIARY
 boolean isStructural()
          Tells if the current ObjectClass is STRUCTURAL
 String toString()
           
 
Methods inherited from class org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
addExtension, addExtension, addName, clear, compareOid, copy, getDescription, getExtensions, getName, getNames, getObjectType, getOid, getSchemaName, getSpecification, hashCode, isDisabled, isEnabled, isObsolete, isReadOnly, lock, setDescription, setEnabled, setExtensions, setNames, setNames, setObsolete, setOid, setReadOnly, setSchemaName, setSpecification, unlock
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

objectClassType

protected ObjectClassTypeEnum objectClassType
The ObjectClass type : ABSTRACT, AUXILIARY or STRUCTURAL


superiorOids

protected List<String> superiorOids
The ObjectClass superior OIDs


superiors

protected List<ObjectClass> superiors
The ObjectClass superiors


mayAttributeTypeOids

protected List<String> mayAttributeTypeOids
The list of allowed AttributeType OIDs


mayAttributeTypes

protected List<AttributeType> mayAttributeTypes
The list of allowed AttributeTypes


mustAttributeTypeOids

protected List<String> mustAttributeTypeOids
The list of required AttributeType OIDs


mustAttributeTypes

protected List<AttributeType> mustAttributeTypes
The list of required AttributeTypes

Constructor Detail

ObjectClass

public ObjectClass(String oid)
Creates a new instance of MatchingRuleUseDescription

Parameters:
oid - the OID for this objectClass
Method Detail

getMayAttributeTypeOids

public List<String> getMayAttributeTypeOids()
Returns:
the mayAttributeTypeOids

getMayAttributeTypes

public List<AttributeType> getMayAttributeTypes()
Returns:
the mayAttributeTypes

getMustAttributeTypeOids

public List<String> getMustAttributeTypeOids()
Returns:
the mustAttributeTypeOids

getMustAttributeTypes

public List<AttributeType> getMustAttributeTypes()
Returns:
the mustAttributeTypes

getSuperiors

public List<ObjectClass> getSuperiors()
Gets the superclasses of this ObjectClass.

Returns:
the superclasses

getSuperiorOids

public List<String> getSuperiorOids()
Gets the superclasses OIDsof this ObjectClass.

Returns:
the superclasses OIDs

getType

public ObjectClassTypeEnum getType()
Gets the type of this ObjectClass as a type safe enum.

Returns:
the ObjectClass type as an enum

isStructural

public boolean isStructural()
Tells if the current ObjectClass is STRUCTURAL

Returns:
true if the ObjectClass is STRUCTURAL

isAbstract

public boolean isAbstract()
Tells if the current ObjectClass is ABSTRACT

Returns:
true if the ObjectClass is ABSTRACT

isAuxiliary

public boolean isAuxiliary()
Tells if the current ObjectClass is AUXILIARY

Returns:
true if the ObjectClass is AUXILIARY

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

copy

public ObjectClass copy()
Copy an ObjectClass

Specified by:
copy in interface SchemaObject
Specified by:
copy in class AbstractSchemaObject
Returns:
The copied SchemaObject

equals

public boolean equals(Object o)
Description copied from interface: SchemaObject

Specified by:
equals in interface SchemaObject
Overrides:
equals in class AbstractSchemaObject
See Also:
Object.equals(Object)


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.