|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jibx.schema.elements.SchemaBase
org.jibx.schema.elements.OpenAttrBase
public abstract class OpenAttrBase
Base class for all element structures in schema definition which allow arbitrary attributes from outside the schema namespace.
Field Summary | |
---|---|
private java.util.ArrayList |
m_attributes
Extra attributes associated with element (lazy create, null if unused). |
private LazyList |
m_children
Child element list (lazy create, null if not used) |
Fields inherited from interface org.jibx.schema.IComponent |
---|
SCHEMA_NAMESPACE |
Constructor Summary | |
---|---|
protected |
OpenAttrBase(int type)
Constructor. |
Method Summary | |
---|---|
void |
addExtraAttribute(java.lang.String name,
java.lang.String uri,
java.lang.String value)
Add extra attribute. |
void |
clearExtraAttributes()
Clear extra attribute list. |
void |
compactChildren()
Compact the list of child elements. |
SchemaBase |
detachChild(int index)
Detach child by index. |
SchemaBase |
getChild(int index)
Get child by index. |
int |
getChildCount()
Get count of child elements. |
java.util.Iterator |
getChildIterator()
Get read-only iterator for child elements. |
protected LazyList |
getChildrenWritable()
Get modifiable list of child elements. |
java.util.List |
getExtraAttributes()
Get read-only list of extra attributes. |
protected void |
preget(IMarshallingContext ictx)
Pre-get method called during marshalling. |
SchemaBase |
replaceChild(int index,
SchemaBase repl)
Replace child by index. |
protected void |
validateAttributes(IUnmarshallingContext ictx,
StringArray attrs)
Validate attributes of element from schema namespace. |
Methods inherited from class org.jibx.schema.elements.SchemaBase |
---|
addNamespaceDeclaration, bit, clearNamespaceDeclarations, getExtension, getNamespaceDeclarations, getParent, getSchema, isGlobal, name, preset, prevalidate, readNamespaces, setExtension, setParent, type, validate, validateAttributes, writeNamespaces |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private LazyList m_children
null
if not used)
private java.util.ArrayList m_attributes
null
if unused).
Constructor Detail |
---|
protected OpenAttrBase(int type)
type
- element typeMethod Detail |
---|
public final int getChildCount()
getChildCount
in class SchemaBase
public java.util.Iterator getChildIterator()
getChildIterator
in class SchemaBase
public SchemaBase getChild(int index)
index
-
public SchemaBase replaceChild(int index, SchemaBase repl)
index
- repl
- replacement element
public SchemaBase detachChild(int index)
null
in the child list, leaving
the list in an illegal state for most purposes. After using this method, compactChildren()
must be
called to remove the null
(s) from the list and restore it to a legal state. These methods are
provided to avoid the overhead otherwise associated with multiple removals from a list.
index
-
public void compactChildren()
null
values (which should only be present if
detachChild(int)
was called) from the list.
protected void preget(IMarshallingContext ictx) throws JiBXException
preget
in class SchemaBase
ictx
- marshalling context
JiBXException
- on marshalling errorprotected final LazyList getChildrenWritable()
public final java.util.List getExtraAttributes()
public final void clearExtraAttributes()
public final void addExtraAttribute(java.lang.String name, java.lang.String uri, java.lang.String value)
name
- attribute nameuri
- attribute namespace URIvalue
- attribute valueprotected void validateAttributes(IUnmarshallingContext ictx, StringArray attrs) throws JiBXException
ictx
- unmarshalling contextattrs
- attributes array
JiBXException
- on unmarshalling error
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |