public abstract class ClassDefinition
extends java.lang.Object
implements java.io.Serializable
Objects of this type are immutablem and any extensions to this class must enforce the immutable nature.
| Modifier and Type | Field and Description |
|---|---|
protected java.util.ArrayList |
aliasNames
List of alias names.
|
protected boolean |
auxiliary |
protected java.util.ArrayList |
classContainmentNameList
List of classes that may contain this class.
|
protected java.lang.String |
className
Name of the class.
|
protected boolean |
container
Flags associated with this class.
|
protected boolean |
effective |
protected boolean |
expanded
Expanded flag means the tables above contain inherited attributes
and classes in addition to the ones defined directly by the class.
|
protected java.util.HashMap |
mandatoryAttributeTable
Table of mandatory attributes.
|
protected java.util.HashMap |
namingAttributeTable
Table of naming attributes.
|
protected boolean |
nonRemove |
protected java.util.HashMap |
optionalAttributeTable
Table of optional attributes.
|
protected SchemaDefinition |
schemaDef
Reference to the SchemaDefinition object for this class.
|
protected java.util.ArrayList |
superClassNameList
List of classes that this class extends.
|
protected java.util.ArrayList |
validAuxClassesList
List of valid auxiliary classes for this object class.
|
| Constructor and Description |
|---|
ClassDefinition(java.lang.String name,
java.lang.String[] classContainmentNames,
AttributeDefinition[] mandatoryAttributes,
AttributeDefinition[] namingAttributes,
AttributeDefinition[] optionalAttributes)
Constructs a ClassDefinition object for a class.
|
ClassDefinition(java.lang.String name,
java.lang.String[] classContainmentNames,
AttributeDefinition[] mandatoryAttributes,
AttributeDefinition[] namingAttributes,
AttributeDefinition[] optionalAttributes,
boolean container,
boolean effective,
boolean nonRemove,
boolean auxiliary)
Constructs a ClassDefinition object for a class.
|
ClassDefinition(java.lang.String name,
java.lang.String[] aliasArray,
java.lang.String[] classContainmentNames,
java.lang.String[] superClassNames,
AttributeDefinition[] mandatoryAttributes,
AttributeDefinition[] namingAttributes,
AttributeDefinition[] optionalAttributes,
boolean container,
boolean effective,
boolean nonRemove,
boolean auxiliary,
SchemaDefinition schemaDef)
Constructs a ClassDefinition object for a class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addContainmentClass(java.lang.String className)
Adds a naming containment class to the class definition.
|
void |
addNamingAttribute(AttributeDefinition attrDef)
Adds a naming attribute to the class definition.
|
void |
addValidAuxClasses(java.lang.String[] auxClasses)
Add a list of valid auxiliary classes to this class definition.
|
boolean |
canBeContainedBy(java.lang.String parentClass)
Checks to see if this class can be contained by another.
|
java.lang.String[] |
getAliasNames()
Retrieves the alias names of the schema class.
|
java.lang.String[] |
getContainmentClasses()
Retrieves the classes that this class can be contained in.
|
boolean |
getExpanded()
Tests to see if this class definition is expanded or not.
|
AttributeDefinition[] |
getMandatoryAttributes()
Retrieves the mandatory attributes of the schema class.
|
java.lang.String |
getName()
Retrieves the name of the schema class.
|
AttributeDefinition[] |
getNamingAttributes()
Retrieves the naming attributes of the schema class.
|
AttributeDefinition[] |
getOptionalAttributes()
Retrieves the optional attributes of the schema class.
|
java.lang.String[] |
getSuperClasses()
Retrieves the super classes of this schema class.
|
java.lang.String[] |
getValidAuxClasses()
Retrieves the valid auxiliary classes for this schema class.
|
void |
initAuxClasses()
Initialize the valid aux classes to an empty list, meaning there are
no valid aux classes for this object class.
|
boolean |
isAttributeMandatory(java.lang.String attrName)
Checks to see if a particular attribute is mandatory.
|
boolean |
isAttributeOptional(java.lang.String attrName)
Checks to see if a particular attribute is optional.
|
boolean |
isAuxiliary()
Tests to see if this is an Auxiliary class.
|
boolean |
isClassUsingAttribute(java.lang.String attrName)
Checks to see if a particular attribute is being used by this class.
|
boolean |
isContainer()
Tests to see if this is a container class.
|
boolean |
isEffective()
Tests to see if this is an effective class.
|
boolean |
isInheritedFrom(java.lang.String className)
Check to see if this is inherited from another specific class.
|
boolean |
isNamedBy(java.lang.String attrName)
Checks to see if an attribute is listed as a naming attribute.
|
boolean |
isNonRemovable()
Tests to see if this is an effective class.
|
boolean |
isNonRemoveable()
Tests to see if this is an effective class.
|
void |
setExpanded(boolean expanded)
Set the expanded flag.
|
java.lang.String |
toString()
Retrieves the name of the schema class.
|
protected java.lang.String className
protected java.util.ArrayList aliasNames
protected java.util.HashMap mandatoryAttributeTable
protected java.util.HashMap optionalAttributeTable
protected java.util.HashMap namingAttributeTable
protected java.util.ArrayList classContainmentNameList
protected java.util.ArrayList superClassNameList
protected java.util.ArrayList validAuxClassesList
protected boolean container
protected boolean effective
protected boolean nonRemove
protected boolean auxiliary
protected boolean expanded
protected SchemaDefinition schemaDef
public ClassDefinition(java.lang.String name,
java.lang.String[] aliasArray,
java.lang.String[] classContainmentNames,
java.lang.String[] superClassNames,
AttributeDefinition[] mandatoryAttributes,
AttributeDefinition[] namingAttributes,
AttributeDefinition[] optionalAttributes,
boolean container,
boolean effective,
boolean nonRemove,
boolean auxiliary,
SchemaDefinition schemaDef)
name - The name of the schema class.aliasArray - The alternate names which can be used to access the class.classContainmentNames - Names of classes that this class can be contained by.superClassNames - Names of classes this class inherits from.mandatoryAttributes - Array of mandatory attribute definitions.
This array may either be 'null' or empty if there are no mandatory attributes.namingAttributes - Array of naming attribute definitions.optionalAttributes - Array of optional attributes definitions.
This array may either be 'null' or empty if there are no optional attributes.container - Flag indicating a container class.effective - Flag indicating an effective class.nonRemove - Flag indicating a non-removeable class.auxiliary - Flag indicating an auxiliary class.schemaDef - Reference to the SchemaDefinition object for this class.public ClassDefinition(java.lang.String name,
java.lang.String[] classContainmentNames,
AttributeDefinition[] mandatoryAttributes,
AttributeDefinition[] namingAttributes,
AttributeDefinition[] optionalAttributes,
boolean container,
boolean effective,
boolean nonRemove,
boolean auxiliary)
name - The name of the schema class.classContainmentNames - Names of classes that this class can be contained by.mandatoryAttributes - Array of mandatory attribute definitions.
This array may either be 'null' or empty if there are no mandatory attributes.namingAttributes - Array of naming attribute definitions.optionalAttributes - Array of optional attributes definitions.
This array may either be 'null' or empty if there are no optional attributes.container - Flag indicating a container class.effective - Flag indicating an effective class.nonRemove - Flag indicating a non-removeable class.auxiliary - Flag indicating an auxiliary class.public ClassDefinition(java.lang.String name,
java.lang.String[] classContainmentNames,
AttributeDefinition[] mandatoryAttributes,
AttributeDefinition[] namingAttributes,
AttributeDefinition[] optionalAttributes)
name - The name of the schema class.classContainmentNames - Names of classes that this class can be contained by.mandatoryAttributes - Array of mandatory attribute definitions.
This array may either be 'null' or empty if there are no mandatory attributes.namingAttributes - Array of naming attribute definitions.optionalAttributes - Array of optional attributes definitions.
This array may either be 'null' or empty if there are no optional attributes.public java.lang.String getName()
public java.lang.String[] getAliasNames()
public AttributeDefinition[] getMandatoryAttributes()
public AttributeDefinition[] getOptionalAttributes()
public AttributeDefinition[] getNamingAttributes()
public void addNamingAttribute(AttributeDefinition attrDef)
public java.lang.String[] getContainmentClasses()
public void addContainmentClass(java.lang.String className)
public java.lang.String[] getSuperClasses()
public void initAuxClasses()
public java.lang.String[] getValidAuxClasses()
public void addValidAuxClasses(java.lang.String[] auxClasses)
auxClasses - The String array of aux classes. If null, no action is taken.
For internal use.public boolean isAttributeMandatory(java.lang.String attrName)
attrName - Name of the attribute to look for.public boolean isAttributeOptional(java.lang.String attrName)
attrName - Name of the attribute to look for.public boolean isClassUsingAttribute(java.lang.String attrName)
attrName - Name of the attribute to look for.public boolean isNamedBy(java.lang.String attrName)
attrName - name of the attribute being looked for.public boolean isInheritedFrom(java.lang.String className)
className - name of the class to check.public boolean canBeContainedBy(java.lang.String parentClass)
This call should be done with an expanded class definition in order to properly test inherited containment rules.
This method cannot check that the parent class is a container. The preferred method is SchemaDefinition.canContain(parentClass, childClass)
If no containment rules have been given, we assume containment is possible.
parentClass - name of the class to check.
Must be the standard class name, not an alias.public boolean isContainer()
public boolean isEffective()
public boolean isNonRemovable()
public boolean isNonRemoveable()
public boolean isAuxiliary()
public boolean getExpanded()
public void setExpanded(boolean expanded)
expanded - true if this class definition is expanded, false otherwise.public java.lang.String toString()
toString in class java.lang.Object
API Documentation Copyright © 1998-2004 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated ${TODAY} ${TSTAMP}.