Package org.ldaptive.schema
Class NameForm
- java.lang.Object
- 
- org.ldaptive.AbstractFreezable
- 
- org.ldaptive.schema.AbstractSchemaElement
- 
- org.ldaptive.schema.AbstractNamedSchemaElement
- 
- org.ldaptive.schema.NameForm
 
 
 
 
- 
- All Implemented Interfaces:
- Freezable,- SchemaElement
 
 public final 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
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classNameForm.DefaultDefinitionFunctionParses a name form definition using a char buffer.static classNameForm.RegexDefinitionFunctionParses a name form definition using a regular expression.
 - 
Field SummaryFields Modifier and Type Field Description private static intHASH_CODE_SEEDhash code seed.private StringoidOID.private String[]optionalAttributesOptional attributes.private String[]requiredAttributesRequired attributes.private StringstructuralClassStructural object class.
 - 
Constructor SummaryConstructors Constructor Description 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 SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Stringformat()Returns this schema element as formatted string per RFC 4512.StringgetOID()Returns the oid.String[]getOptionalAttributes()Returns the optional attributes.String[]getRequiredAttributes()Returns the required attributes.StringgetStructuralClass()Returns the structural object class.inthashCode()static NameFormparse(String definition)Parses the supplied definition string and creates an initialized name form.voidsetOptionalAttributes(String[] s)Sets the optional attributes.voidsetRequiredAttributes(String[] s)Sets the required attributes.voidsetStructuralClass(String s)Sets the structural object class.StringtoString()- 
Methods inherited from class org.ldaptive.schema.AbstractNamedSchemaElementgetName, getNames, hasName, isObsolete, setNames, setObsolete
 - 
Methods inherited from class org.ldaptive.schema.AbstractSchemaElementcontainsBooleanExtension, freeze, getDescription, getExtensions, setDescription, setExtensions
 - 
Methods inherited from class org.ldaptive.AbstractFreezableassertMutable, freeze, freeze, isFrozen
 
- 
 
- 
- 
- 
Field Detail- 
HASH_CODE_SEEDprivate static final int HASH_CODE_SEED hash code seed.- See Also:
- Constant Field Values
 
 - 
oidprivate final String oid OID.
 - 
structuralClassprivate String structuralClass Structural object class.
 - 
requiredAttributesprivate String[] requiredAttributes Required attributes.
 - 
optionalAttributesprivate String[] optionalAttributes Optional attributes.
 
- 
 - 
Constructor Detail- 
NameFormpublic NameForm(String s) Creates a new name form.- Parameters:
- s- oid
 
 - 
NameFormpublic 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- 
getOIDpublic String getOID() Returns the oid.- Returns:
- oid
 
 - 
getStructuralClasspublic String getStructuralClass() Returns the structural object class.- Returns:
- structural object class
 
 - 
setStructuralClasspublic void setStructuralClass(String s) Sets the structural object class.- Parameters:
- s- structural object class
 
 - 
getRequiredAttributespublic String[] getRequiredAttributes() Returns the required attributes.- Returns:
- required attributes
 
 - 
setRequiredAttributespublic void setRequiredAttributes(String[] s) Sets the required attributes.- Parameters:
- s- required attributes
 
 - 
getOptionalAttributespublic String[] getOptionalAttributes() Returns the optional attributes.- Returns:
- optional attributes
 
 - 
setOptionalAttributespublic void setOptionalAttributes(String[] s) Sets the optional attributes.- Parameters:
- s- optional attributes
 
 - 
parsepublic static NameForm parse(String definition) throws SchemaParseException Parses the supplied definition string and creates an initialized name form.- Parameters:
- definition- to parse
- Returns:
- name form
- Throws:
- SchemaParseException- if the supplied definition is invalid
 
 - 
formatpublic String format() Description copied from interface:SchemaElementReturns this schema element as formatted string per RFC 4512.- Returns:
- formatted string
 
 - 
equalspublic boolean equals(Object o) - Overrides:
- equalsin class- AbstractSchemaElement
 
 - 
hashCodepublic int hashCode() - Specified by:
- hashCodein class- AbstractSchemaElement
 
 
- 
 
-