|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jbind.xml.dom3.core.ElementFactoryImpl
Constructor Summary | |
ElementFactoryImpl()
|
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 aPrefixMappings,
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 aLocalName)
Gets the data object of an attribute. |
IAttributeImpl |
getAttributeImpl(java.lang.String aNamespace,
java.lang.String aName)
Gets an attribute implementation. |
IImpl |
getChild(int anIndex)
|
IAnyTypeData |
getData()
|
ILocation |
getLocation()
|
java.lang.String |
getNamespace()
|
java.lang.String |
getNamespaceForPrefix(java.lang.String aPrefix)
Gets a namespace for a prefix. |
int |
getNbChildren()
|
int |
getNonDefaultedNbChildren()
|
IImplContainer |
getParentImpl()
|
java.lang.String |
getPartName()
Gets the attribute or element name. |
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 aLocalName)
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 |
setData(IAnyTypeData aData)
|
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 aValue)
Sets the textual content. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ElementFactoryImpl()
Method Detail |
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 IAttributeImpl addAttribute(java.lang.String aNamespace, java.lang.String aQName, ITextContentProvider aProvider, boolean anIsDefault, ILocation aLocation)
addAttribute
in interface IElementImpl
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 aPrefixMappings, ILocation aLocation)
IImplContainer
addElement
in interface IImplContainer
aNamespace
- (required).aQName
- (required).aPrefixMappings
- (required).aLocation
- (optional).
public ITextImpl addText(java.lang.String aText, ILocation aLocation)
IImplContainer
addText
in interface IImplContainer
aText
- (required).
public IAnyTypeData getAttributeData(java.lang.String aNamespace, java.lang.String aLocalName)
IImpl
getAttributeData
in interface IImpl
aNamespace
- (required).aLocalName
- (required).
public java.util.Iterator iterAttributes(java.lang.String aNamespace, java.lang.String aName)
IDataImpl
iterAttributes
in interface IDataImpl
aNamespace
- (optional).aName
- (optional).
IAnyTypeData
.public IAttributeImpl getAttributeImpl(java.lang.String aNamespace, java.lang.String aName)
IElementImpl
getAttributeImpl
in interface IElementImpl
aNamespace
- (required).aName
- (required).
public IImpl getChild(int anIndex)
public ILocation getLocation()
getLocation
in interface IHasLocation
public java.lang.String getNamespace()
getNamespace
in interface IDataImpl
public java.lang.String getNamespaceForPrefix(java.lang.String aPrefix)
IElementImpl
getNamespaceForPrefix
in interface IElementImpl
aPrefix
- (required).
public int getNbChildren()
public int getNonDefaultedNbChildren()
public IImplContainer getParentImpl()
getParentImpl
in interface IImplChild
public java.lang.String getPartName()
IDataImpl
getPartName
in interface IDataImpl
public java.lang.String getTextContent()
IImplWithText
getTextContent
in interface IImplWithText
public IAnyTypeData getData()
getData
in interface IDataImpl
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 boolean isDefault()
IImplWithText
isDefault
in interface IImplWithText
true
iff the data implementation is a default value.public boolean isNil()
IImpl
isNil
in interface IImpl
true
iff the data implementation was assigned
"nil".public java.util.Iterator iterAttributeImpls()
IElementImpl
iterAttributeImpls
in interface IElementImpl
IAttributeImpl
.public java.util.ListIterator iterChildren()
IImpl
iterChildren
in interface IImpl
IImpl
.public java.util.ListIterator iterElementData(java.lang.String aNamespace, java.lang.String aLocalName)
IImpl
iterElementData
in interface IImpl
aNamespace
- (required).aLocalName
- (required).
IAnyTypeData
.public void removeAttribute(java.lang.String aNamespace, java.lang.String aName)
removeAttribute
in interface IElementImpl
public void restoreTextContent(ITextContentMemento aMemento)
restoreTextContent
in interface IImplWithText
public ITextContentMemento saveTextContent()
saveTextContent
in interface IImplWithText
public void setDefaultAttrCreator(IDefaultAttrCreator aCreator)
setDefaultAttrCreator
in interface IElementImpl
public void setDefaultTextContent(java.lang.String aString)
setDefaultTextContent
in interface IElementImpl
public void setTextContent(java.lang.String aValue)
IImplWithText
setTextContent
in interface IImplWithText
aValue
- (required).public void setTextContent(ITextContentProvider aTextContentProvider)
IImplWithText
setTextContent
in interface IImplWithText
aTextContentProvider
- (required).public void setData(IAnyTypeData aData)
setData
in interface IDataImpl
public void accept(IDataImplVisitor aVisitor)
accept
in interface IImpl
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 java.util.Map getPrefixToNamespaceMapping()
IImpl
getPrefixToNamespaceMapping
in interface IImpl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |