org.ldaptive.schema
Class NameForm

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

public class NameForm
extends AbstractNamedSchemaElement

Bean for a name form schema element.

   NameFormDescription = LPAREN WSP
     numericoid                 ; object identifier
     [ SP "NAME" SP qdescrs ]   ; short names (descriptors)
     [ SP "DESC" SP qdstring ]  ; description
     [ SP "OBSOLETE" ]          ; not active
     SP "OC" SP oid             ; structural object class
     SP "MUST" SP oids          ; attribute types
     [ SP "MAY" SP oids ]       ; attribute types
     extensions WSP RPAREN      ; extensions
 

Version:
$Revision: 3120 $ $Date: 2015-10-01 11:50:02 -0400 (Thu, 01 Oct 2015) $
Author:
Middleware Services

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

Constructor Detail

NameForm

public NameForm(String s)
Creates a new name form.

Parameters:
s - oid

NameForm

public NameForm(String oid,
                String[] names,
                String description,
                boolean obsolete,
                String structuralClass,
                String[] requiredAttributes,
                String[] optionalAttributes,
                Extensions extensions)
Creates a new name form.

Parameters:
oid - oid
names - names
description - description
obsolete - obsolete
structuralClass - structural object class
requiredAttributes - required attributes
optionalAttributes - optional attributes
extensions - extensions
Method Detail

getOID

public String getOID()
Returns the oid.

Returns:
oid

getStructuralClass

public String getStructuralClass()
Returns the structural object class.

Returns:
structural object class

setStructuralClass

public void setStructuralClass(String s)
Sets the structural object class.

Parameters:
s - structural object class

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 NameForm parse(String definition)
                      throws ParseException
Parses the supplied definition string and creates an initialized name form.

Parameters:
definition - to parse
Returns:
name form
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

hashCode

public int hashCode()

Specified by:
hashCode in class AbstractSchemaElement

toString

public String toString()

Overrides:
toString in class Object


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