public static class SchemaDef.ClassDef extends java.lang.Object implements ConfigElement
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getASN1ID()
Return the ASN1 ID for the class, if any.
|
SchemaDef.AttrDef |
getAttrDef(java.lang.String attrName)
Get a
AttrDef instance from this ClassDef instance
based on attribute name. |
boolean |
getContainer()
Get the value for the "container" attribute.
|
java.lang.String |
getName()
Return the name of the class.
|
boolean |
hasBeenModified()
Return
true if this instance has been modified. |
java.util.Iterator |
iterator()
Return an
Iterator that will iterate over the AttrDef instances
in this ClassDef instance. |
SchemaDef.AttrDef |
newAttr(java.lang.String attrName)
Add a new
AttrDef instance. |
boolean |
removeAttr(java.lang.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(java.lang.String asn1id)
Set the ASN1 ID for the class.
|
void |
setContainer(boolean value)
Set the value for the "container" attribute.
|
org.w3c.dom.Element |
toXML(org.w3c.dom.Node parent)
Create an XML representation for this instance under the passed
Node. |
public java.lang.String getName()
public java.lang.String getASN1ID()
nullpublic void setASN1ID(java.lang.String asn1id)
asn1id - ID, or nullpublic boolean getContainer()
true or falsepublic void setContainer(boolean value)
value - true or falsepublic java.util.Iterator iterator()
Iterator that will iterate over the AttrDef instances
in this ClassDef instance.Iterator whose next() method returns AttrDef instancespublic SchemaDef.AttrDef getAttrDef(java.lang.String attrName)
AttrDef instance from this ClassDef instance
based on attribute name.attrName - the name of the attributenull or a AttrDef instancepublic SchemaDef.AttrDef newAttr(java.lang.String attrName) throws java.lang.IllegalStateException
AttrDef instance.attrName - name of new attributeAttrDef instancejava.lang.IllegalStateException - thrown if a AttrDef already exists with
the passed namepublic boolean removeAttr(java.lang.String attrName)
attrName - name of attribute to be removedAttrDef was removedpublic boolean hasBeenModified()
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:
resetModified() was last calledhasBeenModified in interface ConfigElementtrue or falseresetModified()public void resetModified()
hasBeenModified()
will return false.resetModified in interface ConfigElementhasBeenModified()public org.w3c.dom.Element toXML(org.w3c.dom.Node parent)
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().toXML in interface ConfigElementparent - Node under which to construct XML representation.ElementhasBeenModified(),
resetModified()