public class ObjectClass extends AbstractNamedSchemaElement
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
| Modifier and Type | Field and Description |
|---|---|
private static Pattern |
DEFINITION_PATTERN
Pattern to match definitions.
|
private static int |
HASH_CODE_SEED
hash code seed.
|
private ObjectClassType |
objectClassType
Object class type.
|
private String |
oid
OID.
|
private String[] |
optionalAttributes
Optional attributes.
|
private String[] |
requiredAttributes
Required attributes.
|
private String[] |
superiorClasses
Superior classes.
|
NO_WSP_REGEX, WSP_REGEX| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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() |
getName, getNames, hasName, isObsolete, setNames, setObsoletecontainsBooleanExtension, getDescription, getExtensions, setDescription, setExtensionsprivate static final int HASH_CODE_SEED
private static final Pattern DEFINITION_PATTERN
private final String oid
private String[] superiorClasses
private ObjectClassType objectClassType
private String[] requiredAttributes
private String[] optionalAttributes
public ObjectClass(String s)
s - oidpublic ObjectClass(String oid, String[] names, String description, boolean obsolete, String[] superiorClasses, ObjectClassType objectClassType, String[] requiredAttributes, String[] optionalAttributes, Extensions extensions)
oid - oidnames - namesdescription - descriptionobsolete - obsoletesuperiorClasses - superior classesobjectClassType - object class typerequiredAttributes - required attributesoptionalAttributes - optional attributesextensions - extensionspublic String getOID()
public String[] getSuperiorClasses()
public void setSuperiorClasses(String[] s)
s - superior classespublic ObjectClassType getObjectClassType()
public void setObjectClassType(ObjectClassType type)
type - object class typepublic String[] getRequiredAttributes()
public void setRequiredAttributes(String[] s)
s - required attributespublic String[] getOptionalAttributes()
public void setOptionalAttributes(String[] s)
s - optional attributespublic static ObjectClass parse(String definition) throws ParseException
definition - to parseParseException - if the supplied definition is invalidpublic String format()
SchemaElementpublic boolean equals(Object o)
equals in class AbstractSchemaElementpublic int hashCode()
hashCode in class AbstractSchemaElementCopyright © 2003-2019 Virginia Tech. All Rights Reserved.