Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.novell.nds.dirxml.shimhost
Class SchemaDef.ClassDef

    java.lang.Object
      com.novell.nds.dirxml.shimhost.SchemaDef.ClassDef

All Implemented Interfaces:
  ConfigElement

Enclosing class:
  SchemaDef

    public static class SchemaDef.ClassDef

extends Object
implements ConfigElement

Class encapsulating a DirXML <class-def> schema definition.

Method Summary
`String` | `getASN1ID()` Return the ASN1 ID for the class, if any.
`SchemaDef.AttrDef` | `getAttrDef(String attrName)` Get a `AttrDef` instance from this `ClassDef` instance based on attribute name.
`boolean` | `getContainer()` Get the value for the "container" attribute.
`String` | `getName()` Return the name of the class.
`boolean` | `hasBeenModified()` Return `true` if this instance has been modified.
`Iterator` | `iterator()` Return an `Iterator` that will iterate over the `AttrDef` instances in this `ClassDef` instance.
`SchemaDef.AttrDef` | `newAttr(String attrName)` Add a new `AttrDef` instance.
`boolean` | `removeAttr(String attrName)` Remove a AttrDef from this instance based on name.
`void` | `resetModified()` Reset the modified flag for this instance such that `hasBeenModified()` will return `false`.
`void` | `setASN1ID(String asn1id)` Set the ASN1 ID for the class.
`void` | `setContainer(boolean value)` Set the value for the "container" attribute.
`Element` | `toXML(Node parent)` Create an XML representation for this instance under the passed `Node`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getName

    public String getName()

  Return the name of the class.

  Returns:
    class name

### getASN1ID

    public String getASN1ID()

  Return the ASN1 ID for the class, if any.

  Returns:
    ASN1 ID or `null`

### setASN1ID

    public void setASN1ID(String asn1id)

  Set the ASN1 ID for the class.

  Parameters:
    `asn1id` - ID, or `null`

### getContainer

    public boolean getContainer()

  Get the value for the "container" attribute.

  Returns:
    `true` or `false`

### setContainer

    public void setContainer(boolean value)

  Set the value for the "container" attribute.

  Parameters:
    `value` - `true` or `false`

### iterator

    public Iterator iterator()

  Return an `Iterator` that will iterate over the `AttrDef` instances in this `ClassDef` instance.

  Returns:
    `Iterator` whose next() method returns `AttrDef` instances

### getAttrDef

    public SchemaDef.AttrDef getAttrDef(String attrName)

  Get a `AttrDef` instance from this `ClassDef` instance based on attribute name.

  Parameters:
    `attrName` - the name of the attribute
  Returns:
    `null` or a `AttrDef` instance

### newAttr

    public SchemaDef.AttrDef newAttr(String attrName)
                              throws IllegalStateException

  Add a new `AttrDef` instance.

  Parameters:
    `attrName` - name of new attribute
  Returns:
    newly-created `AttrDef` instance
  Throws:
    `IllegalStateException` - thrown if a `AttrDef` already exists with the passed name

### removeAttr

    public boolean removeAttr(String attrName)

  Remove a AttrDef from this instance based on name.

  Parameters:
    `attrName` - name of attribute to be removed
  Returns:
    true if a `AttrDef` was removed

### hasBeenModified

    public boolean hasBeenModified()

  Return `true` if this instance has been modified.

  The instance is considered to have been modified if a change was made that affects the persistent representation since:

  1. The instance was constructed from an XML representation.
  2. `resetModified()` was last called

  Specified by:
    `hasBeenModified` in interface `ConfigElement`
  Returns:
    `true` or `false`
  See Also:
    `resetModified()`

### resetModified

    public void resetModified()

  Reset the modified flag for this instance such that `hasBeenModified()` will return `false`.

  Specified by:
    `resetModified` in interface `ConfigElement`
  See Also:
    `hasBeenModified()`

### toXML

    public Element toXML(Node parent)

  Create an XML representation for this instance under the passed `Node`.

  Note that the act of creating an XML representation does not reset this instance's modified flag. It must be reset by calling `resetModified()`.

  Specified by:
    `toXML` in interface `ConfigElement`
  Parameters:
    `parent` - `Node` under which to construct XML representation.
  Returns:
    created `Element`
  See Also:
    `hasBeenModified()`, `resetModified()`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD