com.novell.admin.ns
Class DefaultSchemaDefinition

java.lang.Object
  |
  +--com.novell.admin.ns.SchemaDefinition
        |
        +--com.novell.admin.ns.DefaultSchemaDefinition
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
NDSSchemaDefinition

public abstract class DefaultSchemaDefinition
extends SchemaDefinition
implements java.io.Serializable, java.lang.Cloneable

This is the base class that represents an in-memory model of an entire schema definition.


Fields inherited from class com.novell.admin.ns.SchemaDefinition
attributes, classes
 
Constructor Summary
DefaultSchemaDefinition()
          Constructor.
 
Method Summary
 boolean canContain(java.lang.String parentClass, java.lang.String childClass)
          Tests if objects of one class type may contain objects of another class type.
 boolean equals(java.lang.Object obj)
          Checks this object against another SchemaDefinition object for equality.
 AttributeDefinition getAttributeDefinition(java.lang.String attrName)
          Returns the AttributeDefinition object for a given attribute name.
 AttributeDefinition[] getAttributeDefinitions()
          Returns an array containing all attribute definitions.
 ClassDefinition[] getAuxiliaryClassDefinitions()
           
 ClassDefinition getClassDefinition(java.lang.String className)
          Returns the ClassDefinition object for a given class name.
 ClassDefinition[] getClassDefinitions()
           
 ClassDefinition[] getClassesUsingAttribute(java.lang.String attrName)
          Returns an array of class definitions that use a particular attribute.
abstract  ClassDefinition[] getContainmentClasses(java.lang.String className)
          Returns all containment classes for a specific class type.
 ClassDefinition[] getEffectiveClasses(java.lang.String parentClass)
          Returns the effective classes that may be instantiated relative to another class type.
 int getNumberOfAttributes()
          Returns the number of attribute definitions in the schema definition.
 int getNumberOfClasses()
          Returns the number of class definitions in the schema definition.
 boolean isAttributeDefined(java.lang.String attrName)
          Determines if an attribute is defined.
 boolean isClassDefined(java.lang.String className)
          Determines if a given class is defined.
 
Methods inherited from class com.novell.admin.ns.SchemaDefinition
clone
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSchemaDefinition

public DefaultSchemaDefinition()
Constructor.
Method Detail

getNumberOfAttributes

public final int getNumberOfAttributes()
Returns the number of attribute definitions in the schema definition.
Returns:
The number of attributes.
Overrides:
getNumberOfAttributes in class SchemaDefinition

getNumberOfClasses

public final int getNumberOfClasses()
Returns the number of class definitions in the schema definition.
Returns:
The number of classes.
Overrides:
getNumberOfClasses in class SchemaDefinition

getAuxiliaryClassDefinitions

public ClassDefinition[] getAuxiliaryClassDefinitions()
Overrides:
getAuxiliaryClassDefinitions in class SchemaDefinition

getClassDefinitions

public ClassDefinition[] getClassDefinitions()
Overrides:
getClassDefinitions in class SchemaDefinition

getAttributeDefinitions

public AttributeDefinition[] getAttributeDefinitions()
Returns an array containing all attribute definitions.
Returns:
A new array containing the attribute definitions.
Overrides:
getAttributeDefinitions in class SchemaDefinition

getClassesUsingAttribute

public ClassDefinition[] getClassesUsingAttribute(java.lang.String attrName)
Returns an array of class definitions that use a particular attribute.
Parameters:
attrName - The name of the attribute used.
Returns:
A new array containing class definitions.
Overrides:
getClassesUsingAttribute in class SchemaDefinition

getAttributeDefinition

public AttributeDefinition getAttributeDefinition(java.lang.String attrName)
                                           throws NamespaceException
Returns the AttributeDefinition object for a given attribute name.
Parameters:
attrName - The name of the attribute.
Returns:
The attribute definition, if it is found.
Throws:
NamespaceException - NamespaceException.ATTRIBUTE_NOT_DEFINED.
Overrides:
getAttributeDefinition in class SchemaDefinition

canContain

public boolean canContain(java.lang.String parentClass,
                          java.lang.String childClass)
Tests if objects of one class type may contain objects of another class type.
Parameters:
parentClass - The name of the parent class type.
childClass - The name of the child class type.
Returns:
True if the object based on the parent class type can contain the object based on the child class type, false otherwise.
Overrides:
canContain in class SchemaDefinition

getContainmentClasses

public abstract ClassDefinition[] getContainmentClasses(java.lang.String className)
                                                 throws NamespaceException
Returns all containment classes for a specific class type.
Parameters:
className - The name of the class to get containment classes for.
Returns:
An array of ClassDefinition objects representing those classes that may contain the specified class.
Throws:
NamespaceException - Refer to NamespaceException documentation.
Overrides:
getContainmentClasses in class SchemaDefinition

getEffectiveClasses

public ClassDefinition[] getEffectiveClasses(java.lang.String parentClass)
Returns the effective classes that may be instantiated relative to another class type.
Parameters:
parentClass - The name of the parent class.
Returns:
An array of ClassDefinition objects representing the class types that can be instantiated as children of the parent class.
Overrides:
getEffectiveClasses in class SchemaDefinition

getClassDefinition

public ClassDefinition getClassDefinition(java.lang.String className)
                                   throws NamespaceException
Returns the ClassDefinition object for a given class name.
Parameters:
className - The name of the class.
Returns:
The class definition, if found.
Throws:
NamespaceException - NamespaceException.CLASS_NOT_DEFINED.
Overrides:
getClassDefinition in class SchemaDefinition

isClassDefined

public final boolean isClassDefined(java.lang.String className)
Determines if a given class is defined.
Parameters:
className - The name of the class to check.
Returns:
True if the class is defined, false otherwise.
Overrides:
isClassDefined in class SchemaDefinition

isAttributeDefined

public final boolean isAttributeDefined(java.lang.String attrName)
Determines if an attribute is defined.
Parameters:
attrName - The name of the attribute to check.
Returns:
True if the attribute is defined, false otherwise.
Overrides:
isAttributeDefined in class SchemaDefinition

equals

public boolean equals(java.lang.Object obj)
Checks this object against another SchemaDefinition object for equality.
Parameters:
obj - The SchemaDefinition object to be checked against.
Returns:
True if the object is identical to this one, false otherwise.
Overrides:
equals in class SchemaDefinition


API Documentation Copyright © 1998-2003 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated December 17 2003 1746.