|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jbind.xml.instance.impl.Impl org.jbind.xml.instance.impl.DataImpl org.jbind.xml.instance.impl.ElementImpl
Constructor Summary | |
ElementImpl(IImplContainer aParent,
java.lang.String aNamespace,
java.lang.String aName,
java.util.Map aPrefixMapping,
ILocation aLocation)
|
Method Summary | |
void |
accept(IDataImplVisitor aVisitor)
|
IAttributeImpl |
addAttribute(java.lang.String aNamespace,
java.lang.String aQName,
ITextContentProvider aProvider,
boolean anIsDefault,
ILocation aLocation)
|
IAttributeImpl |
addAttribute(java.lang.String aNamespace,
java.lang.String aQName,
java.lang.String aValue,
boolean anIsDefault,
ILocation aLocation)
Adds an attribute. |
IElementImpl |
addElement(java.lang.String aNamespace,
java.lang.String aQName)
Adds a new element. |
IElementImpl |
addElement(java.lang.String aNamespace,
java.lang.String aQName,
java.util.Map aPrefixMapping,
ILocation aLocation)
Adds a new element implementation. |
ITextImpl |
addText(java.lang.String aText,
ILocation aLocation)
Adds a new text implementation. |
IAnyTypeData |
getAttributeData(java.lang.String aNamespace,
java.lang.String aName)
Gets the data object of an attribute. |
IAttributeImpl |
getAttributeImpl(java.lang.String aNamespace,
java.lang.String aName)
Gets an attribute implementation. |
java.lang.String |
getDefaultTextContent()
|
java.lang.String |
getNamespaceForPrefix(java.lang.String aPrefix)
Gets a namespace for a prefix. |
java.lang.String |
getPrefixForNamespace(java.lang.String aNamespace,
boolean aCreate)
Gets a prefix for a namespace. |
java.util.Map |
getPrefixToNamespaceMapping()
Gets the prefix to namespace mapping. |
java.lang.String |
getTextContent()
Gets the textual content. |
boolean |
hasTextContent()
Checks if the implementation has textual content. |
boolean |
isDefault()
Checks if the data implementation is a default value or if a value was assigned explicitly. |
boolean |
isNil()
Indicates if the data implementation was assigned "nil". |
java.util.Iterator |
iterAttributeImpls()
Iterates the attribute implementations. |
java.util.Iterator |
iterAttributes(java.lang.String aNamespace,
java.lang.String aName)
Iterates the attribute data objects for the specified namespace and name. |
java.util.ListIterator |
iterChildren()
Iterates the children. |
java.util.ListIterator |
iterElementData(java.lang.String aNamespace,
java.lang.String aName)
Iterates the data objects for the specified namespace and element name. |
void |
removeAttribute(java.lang.String aNamespace,
java.lang.String aName)
|
void |
restoreTextContent(ITextContentMemento aMemento)
|
ITextContentMemento |
saveTextContent()
|
void |
setDefaultAttrCreator(IDefaultAttrCreator aCreator)
|
void |
setDefaultTextContent(java.lang.String aString)
|
void |
setTextContent(ITextContentProvider aTextContentProvider)
Sets the textual content by specifiying a provider for lazy evaluation. |
void |
setTextContent(java.lang.String aString)
Sets the textual content. |
Methods inherited from class org.jbind.xml.instance.impl.DataImpl |
getData, getNamespace, getParent, getParentImpl, getPartName, setData |
Methods inherited from class org.jbind.xml.instance.impl.Impl |
getLocation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jbind.xml.core.bridge.IDataImpl |
getData, getNamespace, getPartName, setData |
Methods inherited from interface org.jbind.xml.base.IHasLocation |
getLocation |
Methods inherited from interface org.jbind.xml.core.bridge.IImplChild |
getParentImpl |
Constructor Detail |
public ElementImpl(IImplContainer aParent, java.lang.String aNamespace, java.lang.String aName, java.util.Map aPrefixMapping, ILocation aLocation)
Method Detail |
public void accept(IDataImplVisitor aVisitor) throws XmlException
accept
in interface IImpl
XmlException
public IElementImpl addElement(java.lang.String aNamespace, java.lang.String aQName)
IImplContainer
addElement(aNamespace, aName, aPrefixMappings, aLocation)
with the prefix
mappings of this data implementation and the location set to null
.
addElement
in interface IImplContainer
aNamespace
- (required).public IElementImpl addElement(java.lang.String aNamespace, java.lang.String aQName, java.util.Map aPrefixMapping, ILocation aLocation)
IImplContainer
addElement
in interface IImplContainer
aNamespace
- (required).aQName
- (required).aPrefixMapping
- (required).aLocation
- (optional).
public java.util.ListIterator iterChildren()
IImpl
iterChildren
in interface IImpl
IImpl
.public java.util.ListIterator iterElementData(java.lang.String aNamespace, java.lang.String aName)
IImpl
iterElementData
in interface IImpl
aNamespace
- (required).aName
- (required).
IAnyTypeData
.public boolean isNil()
IImpl
isNil
in interface IImpl
true
iff the data implementation was assigned
"nil".public IAttributeImpl addAttribute(java.lang.String aNamespace, java.lang.String aQName, ITextContentProvider aProvider, boolean anIsDefault, ILocation aLocation)
addAttribute
in interface IElementImpl
public IAttributeImpl addAttribute(java.lang.String aNamespace, java.lang.String aQName, java.lang.String aValue, boolean anIsDefault, ILocation aLocation)
IElementImpl
addAttribute
in interface IElementImpl
aNamespace
- (required).aQName
- (required).aValue
- (required).aLocation
- (optional).
public IAnyTypeData getAttributeData(java.lang.String aNamespace, java.lang.String aName)
IImpl
getAttributeData
in interface IImpl
aNamespace
- (required).aName
- (required).
public IAttributeImpl getAttributeImpl(java.lang.String aNamespace, java.lang.String aName)
IElementImpl
getAttributeImpl
in interface IElementImpl
aNamespace
- (required).aName
- (required).
public java.util.Iterator iterAttributeImpls()
IElementImpl
iterAttributeImpls
in interface IElementImpl
IAttributeImpl
.public void removeAttribute(java.lang.String aNamespace, java.lang.String aName) throws XmlException
removeAttribute
in interface IElementImpl
XmlException
public void setDefaultAttrCreator(IDefaultAttrCreator aCreator)
setDefaultAttrCreator
in interface IElementImpl
public java.util.Iterator iterAttributes(java.lang.String aNamespace, java.lang.String aName)
IDataImpl
iterAttributes
in interface IDataImpl
aNamespace
- (optional).aName
- (optional).
IAnyTypeData
.public java.lang.String getDefaultTextContent()
public void setDefaultTextContent(java.lang.String aString)
setDefaultTextContent
in interface IElementImpl
public ITextImpl addText(java.lang.String aText, ILocation aLocation)
IImplContainer
addText
in interface IImplContainer
aText
- (required).
public boolean isDefault()
IImplWithText
isDefault
in interface IImplWithText
true
iff the data implementation is a default value.public java.util.Map getPrefixToNamespaceMapping()
IImpl
getPrefixToNamespaceMapping
in interface IImpl
public java.lang.String getNamespaceForPrefix(java.lang.String aPrefix)
IElementImpl
getNamespaceForPrefix
in interface IElementImpl
aPrefix
- (required).
public java.lang.String getPrefixForNamespace(java.lang.String aNamespace, boolean aCreate)
IElementImpl
getPrefixForNamespace
in interface IElementImpl
aNamespace
- (required).aCreate
- If the create parameter is true
then a new
mapping is created for the prefix if there is not already one.
public boolean hasTextContent()
IImplWithText
Attribute implementations will always return true
because
attributes take their default values only if they are not present in the
instance.
Element implementation will return true
iff their text content
is null
or equal to the empty string. In other words the default
value of an element is used when the element is empty.
(cf. the note at W3C XML-Schema-Structure specification section 3.1.1).
hasTextContent
in interface IImplWithText
true
iff there is textual content.public ITextContentMemento saveTextContent()
saveTextContent
in interface IImplWithText
public void restoreTextContent(ITextContentMemento aMemento)
restoreTextContent
in interface IImplWithText
public java.lang.String getTextContent()
IImplWithText
getTextContent
in interface IImplWithText
public void setTextContent(ITextContentProvider aTextContentProvider)
IImplWithText
setTextContent
in interface IImplWithText
aTextContentProvider
- (required).public void setTextContent(java.lang.String aString)
IImplWithText
setTextContent
in interface IImplWithText
aString
- (required).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |