com.novell.admin.ns
Class SchemaDefinition

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

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

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


Field Summary
protected  java.util.Hashtable attributes
          Table of attribute definitions.
protected  java.util.Hashtable classes
          Table of class definitions.
 
Constructor Summary
SchemaDefinition()
           
 
Method Summary
abstract  boolean canContain(java.lang.String parentClass, java.lang.String childClass)
          Tests if objects of one class type may contain objects of another class type.
 java.lang.Object clone()
          Creates an exact duplicate of this object without creating a new object.
abstract  boolean equals(java.lang.Object obj)
          Checks this object against another SchemaDefinition object for equality.
abstract  AttributeDefinition getAttributeDefinition(java.lang.String attrName)
          Returns the AttributeDefinition object for a given attribute name.
abstract  AttributeDefinition[] getAttributeDefinitions()
          Returns an array containing all attribute definitions.
abstract  ClassDefinition[] getAuxiliaryClassDefinitions()
           
abstract  ClassDefinition getClassDefinition(java.lang.String className)
          Returns the ClassDefinition object for a given class name.
abstract  ClassDefinition[] getClassDefinitions()
           
abstract  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.
abstract  ClassDefinition[] getEffectiveClasses(java.lang.String parentClass)
          Returns the effective classes that may be instantiated relative to another class type.
abstract  int getNumberOfAttributes()
          Returns the number of attribute definitions in the schema definition.
abstract  int getNumberOfClasses()
          Returns the number of class definitions in the schema definition.
abstract  boolean isAttributeDefined(java.lang.String attrName)
          Determines if an attribute is defined.
abstract  boolean isClassDefined(java.lang.String className)
          Determines if a given class is defined.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

attributes

protected java.util.Hashtable attributes
Table of attribute definitions.

classes

protected java.util.Hashtable classes
Table of class definitions.
Constructor Detail

SchemaDefinition

public SchemaDefinition()
Method Detail

getNumberOfAttributes

public abstract int getNumberOfAttributes()
Returns the number of attribute definitions in the schema definition.
Returns:
The number of attributes.

getNumberOfClasses

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

getAuxiliaryClassDefinitions

public abstract ClassDefinition[] getAuxiliaryClassDefinitions()

getClassDefinitions

public abstract ClassDefinition[] getClassDefinitions()

getAttributeDefinitions

public abstract AttributeDefinition[] getAttributeDefinitions()
Returns an array containing all attribute definitions.
Returns:
A new array containing the attribute definitions.

getClassesUsingAttribute

public abstract 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.

getAttributeDefinition

public abstract 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.

canContain

public abstract 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.

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.

getEffectiveClasses

public abstract 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.

getClassDefinition

public abstract 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.

isClassDefined

public abstract 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.

isAttributeDefined

public abstract 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.

equals

public abstract 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 java.lang.Object

clone

public java.lang.Object clone()
Creates an exact duplicate of this object without creating a new object.
Returns:
A newly created SchemaDefinition object.
Overrides:
clone in class java.lang.Object


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.