Package org.ametys.core.util.dom
Class AbstractAmetysElement
java.lang.Object
org.ametys.core.util.dom.AbstractAmetysNode
org.ametys.core.util.dom.AbstractAmetysElement
- Direct Known Subclasses:
AbstractWrappingAmetysElement
,EmptyElement
,MapElement
,OdfReferenceTableElement
,StringElement
Basic implementation of
Element
.-
Field Summary
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
-
Constructor Summary
ConstructorDescriptionConstructor.AbstractAmetysElement
(String tagName) Constructor.AbstractAmetysElement
(String tagName, Element parent) Constructor.AbstractAmetysElement
(Element parent) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Map<String,
AmetysAttribute> Returns a Map<name, value> corresponding to the attributes.getAttribute
(String name) getAttributeNode
(String name) getAttributeNodeNS
(String namespaceURI, String localName) getAttributeNS
(String namespaceURI, String localName) getElementsByTagName
(String name) getElementsByTagNameNS
(String namespaceURI, String localName) short
boolean
hasAttribute
(String name) boolean
hasAttributeNS
(String namespaceURI, String localName) boolean
void
removeAttribute
(String name) removeAttributeNode
(Attr oldAttr) void
removeAttributeNS
(String namespaceURI, String localName) void
setAttribute
(String name, String value) setAttributeNode
(Attr newAttr) setAttributeNodeNS
(Attr newAttr) void
setAttributeNS
(String namespaceURI, String qualifiedName, String value) void
setIdAttribute
(String name, boolean isId) void
setIdAttributeNode
(Attr idAttr, boolean isId) void
setIdAttributeNS
(String namespaceURI, String localName, boolean isId) Methods inherited from class org.ametys.core.util.dom.AbstractAmetysNode
_getChildNodes, appendChild, cloneNode, compareDocumentPosition, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getPrefix, getPreviousSibling, getUserData, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getPrefix, getPreviousSibling, getUserData, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
-
Field Details
-
_parent
The parent Element or null if none.
-
-
Constructor Details
-
AbstractAmetysElement
public AbstractAmetysElement()Constructor. -
AbstractAmetysElement
Constructor.- Parameters:
tagName
- the tag name.
-
AbstractAmetysElement
Constructor.- Parameters:
parent
- the parentElement
, if any.
-
AbstractAmetysElement
Constructor.- Parameters:
tagName
- the tag name.parent
- the parentElement
, if any.
-
-
Method Details
-
getTagName
- Specified by:
getTagName
in interfaceElement
-
getNodeName
- Specified by:
getNodeName
in interfaceNode
-
getLocalName
- Specified by:
getLocalName
in interfaceNode
- Overrides:
getLocalName
in classAbstractAmetysNode
-
getNodeType
- Specified by:
getNodeType
in interfaceNode
-
getParentNode
- Specified by:
getParentNode
in interfaceNode
- Overrides:
getParentNode
in classAbstractAmetysNode
-
getAttributes
- Specified by:
getAttributes
in interfaceNode
- Overrides:
getAttributes
in classAbstractAmetysNode
-
getAttribute
- Specified by:
getAttribute
in interfaceElement
-
getAttributeNode
- Specified by:
getAttributeNode
in interfaceElement
-
getAttributeNS
- Specified by:
getAttributeNS
in interfaceElement
- Throws:
DOMException
-
getAttributeNodeNS
- Specified by:
getAttributeNodeNS
in interfaceElement
- Throws:
DOMException
-
hasAttributes
- Specified by:
hasAttributes
in interfaceNode
- Overrides:
hasAttributes
in classAbstractAmetysNode
-
hasAttribute
- Specified by:
hasAttribute
in interfaceElement
-
hasAttributeNS
- Specified by:
hasAttributeNS
in interfaceElement
- Throws:
DOMException
-
getTextContent
- Specified by:
getTextContent
in interfaceNode
- Throws:
DOMException
-
_lookupAttributes
Returns a Map<name, value> corresponding to the attributes.- Returns:
- the name/value pairs
-
getSchemaTypeInfo
- Specified by:
getSchemaTypeInfo
in interfaceElement
-
getElementsByTagName
- Specified by:
getElementsByTagName
in interfaceElement
-
getElementsByTagNameNS
- Specified by:
getElementsByTagNameNS
in interfaceElement
- Throws:
DOMException
-
setAttribute
- Specified by:
setAttribute
in interfaceElement
- Throws:
DOMException
-
removeAttribute
- Specified by:
removeAttribute
in interfaceElement
- Throws:
DOMException
-
setAttributeNode
- Specified by:
setAttributeNode
in interfaceElement
- Throws:
DOMException
-
removeAttributeNode
- Specified by:
removeAttributeNode
in interfaceElement
- Throws:
DOMException
-
setAttributeNS
public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException - Specified by:
setAttributeNS
in interfaceElement
- Throws:
DOMException
-
removeAttributeNS
- Specified by:
removeAttributeNS
in interfaceElement
- Throws:
DOMException
-
setAttributeNodeNS
- Specified by:
setAttributeNodeNS
in interfaceElement
- Throws:
DOMException
-
setIdAttribute
- Specified by:
setIdAttribute
in interfaceElement
- Throws:
DOMException
-
setIdAttributeNS
public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException - Specified by:
setIdAttributeNS
in interfaceElement
- Throws:
DOMException
-
setIdAttributeNode
- Specified by:
setIdAttributeNode
in interfaceElement
- Throws:
DOMException
-