org.ldaptive.schema
Class ObjectClass

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

public class ObjectClass
extends AbstractNamedSchemaElement

Bean for an object class schema element.

   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
 

Version:
$Revision: 3189 $ $Date: 2016-11-01 17:21:43 -0400 (Tue, 01 Nov 2016) $
Author:
Middleware Services

Field Summary
 
Fields inherited from class org.ldaptive.schema.AbstractSchemaElement
NO_WSP_REGEX, WSP_REGEX
 
Constructor Summary
ObjectClass(String s)
          Creates a new object class.
ObjectClass(String oid, String[] names, String description, boolean obsolete, String[] superiorClasses, ObjectClassType objectClassType, String[] requiredAttributes, String[] optionalAttributes, Extensions extensions)
          Creates a new object class.
 
Method Summary
 boolean equals(Object o)
          
 String format()
          Returns this schema element as formatted string per RFC 4512.
 ObjectClassType getObjectClassType()
          Returns the object class type.
 String getOID()
          Returns the oid.
 String[] getOptionalAttributes()
          Returns the optional attributes.
 String[] getRequiredAttributes()
          Returns the required attributes.
 String[] getSuperiorClasses()
          Returns the superior classes.
 int hashCode()
          
static ObjectClass parse(String definition)
          Parses the supplied definition string and creates an initialized object class.
 void setObjectClassType(ObjectClassType type)
          Sets the object class type.
 void setOptionalAttributes(String[] s)
          Sets the optional attributes.
 void setRequiredAttributes(String[] s)
          Sets the required attributes.
 void setSuperiorClasses(String[] s)
          Sets the superior classes.
 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, getDescription, getExtensions, setDescription, setExtensions
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectClass

public ObjectClass(String s)
Creates a new object class.

Parameters:
s - oid

ObjectClass

public ObjectClass(String oid,
                   String[] names,
                   String description,
                   boolean obsolete,
                   String[] superiorClasses,
                   ObjectClassType objectClassType,
                   String[] requiredAttributes,
                   String[] optionalAttributes,
                   Extensions extensions)
Creates a new object class.

Parameters:
oid - oid
names - names
description - description
obsolete - obsolete
superiorClasses - superior classes
objectClassType - object class type
requiredAttributes - required attributes
optionalAttributes - optional attributes
extensions - extensions
Method Detail

getOID

public String getOID()
Returns the oid.

Returns:
oid

getSuperiorClasses

public String[] getSuperiorClasses()
Returns the superior classes.

Returns:
superior classes

setSuperiorClasses

public void setSuperiorClasses(String[] s)
Sets the superior classes.

Parameters:
s - superior classes

getObjectClassType

public ObjectClassType getObjectClassType()
Returns the object class type.

Returns:
object class type

setObjectClassType

public void setObjectClassType(ObjectClassType type)
Sets the object class type.

Parameters:
type - object class type

getRequiredAttributes

public String[] getRequiredAttributes()
Returns the required attributes.

Returns:
required attributes

setRequiredAttributes

public void setRequiredAttributes(String[] s)
Sets the required attributes.

Parameters:
s - required attributes

getOptionalAttributes

public String[] getOptionalAttributes()
Returns the optional attributes.

Returns:
optional attributes

setOptionalAttributes

public void setOptionalAttributes(String[] s)
Sets the optional attributes.

Parameters:
s - optional attributes

parse

public static ObjectClass parse(String definition)
                         throws ParseException
Parses the supplied definition string and creates an initialized object class.

Parameters:
definition - to parse
Returns:
object class
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

equals

public boolean equals(Object o)

Overrides:
equals in class AbstractSchemaElement

hashCode

public int hashCode()
Description copied from class: AbstractSchemaElement

Specified by:
hashCode in class AbstractSchemaElement

toString

public String toString()

Overrides:
toString in class Object


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