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
public abstract class AbstractAmetysElement extends AbstractAmetysNode implements Element
Basic implementation ofElement.
-
-
Field Summary
Fields Modifier and Type Field Description protected Element_parentThe parent Element or null if none.-
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
Constructors Constructor Description AbstractAmetysElement()Constructor.AbstractAmetysElement(String tagName)Constructor.AbstractAmetysElement(String tagName, Element parent)Constructor.AbstractAmetysElement(Element parent)Constructor.
-
Method Summary
-
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
-
-
-
-
Constructor Detail
-
AbstractAmetysElement
public AbstractAmetysElement()
Constructor.
-
AbstractAmetysElement
public AbstractAmetysElement(String tagName)
Constructor.- Parameters:
tagName- the tag name.
-
AbstractAmetysElement
public AbstractAmetysElement(Element parent)
Constructor.- Parameters:
parent- the parentElement, if any.
-
AbstractAmetysElement
public AbstractAmetysElement(String tagName, Element parent)
Constructor.- Parameters:
tagName- the tag name.parent- the parentElement, if any.
-
-
Method Detail
-
getTagName
public String getTagName()
- Specified by:
getTagNamein interfaceElement
-
getNodeName
public String getNodeName()
- Specified by:
getNodeNamein interfaceNode
-
getLocalName
public String getLocalName()
- Specified by:
getLocalNamein interfaceNode- Overrides:
getLocalNamein classAbstractAmetysNode
-
getNodeType
public short getNodeType()
- Specified by:
getNodeTypein interfaceNode
-
getParentNode
public Node getParentNode()
- Specified by:
getParentNodein interfaceNode- Overrides:
getParentNodein classAbstractAmetysNode
-
getAttributes
public NamedNodeMap getAttributes()
- Specified by:
getAttributesin interfaceNode- Overrides:
getAttributesin classAbstractAmetysNode
-
getAttribute
public String getAttribute(String name)
- Specified by:
getAttributein interfaceElement
-
getAttributeNode
public Attr getAttributeNode(String name)
- Specified by:
getAttributeNodein interfaceElement
-
getAttributeNS
public String getAttributeNS(String namespaceURI, String localName) throws DOMException
- Specified by:
getAttributeNSin interfaceElement- Throws:
DOMException
-
getAttributeNodeNS
public Attr getAttributeNodeNS(String namespaceURI, String localName) throws DOMException
- Specified by:
getAttributeNodeNSin interfaceElement- Throws:
DOMException
-
hasAttributes
public boolean hasAttributes()
- Specified by:
hasAttributesin interfaceNode- Overrides:
hasAttributesin classAbstractAmetysNode
-
hasAttribute
public boolean hasAttribute(String name)
- Specified by:
hasAttributein interfaceElement
-
hasAttributeNS
public boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException
- Specified by:
hasAttributeNSin interfaceElement- Throws:
DOMException
-
getTextContent
public String getTextContent() throws DOMException
- Specified by:
getTextContentin interfaceNode- Throws:
DOMException
-
_lookupAttributes
protected abstract Map<String,AmetysAttribute> _lookupAttributes()
Returns a Map<name, value> corresponding to the attributes.- Returns:
- the name/value pairs
-
getSchemaTypeInfo
public TypeInfo getSchemaTypeInfo()
- Specified by:
getSchemaTypeInfoin interfaceElement
-
getElementsByTagName
public NodeList getElementsByTagName(String name)
- Specified by:
getElementsByTagNamein interfaceElement
-
getElementsByTagNameNS
public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException
- Specified by:
getElementsByTagNameNSin interfaceElement- Throws:
DOMException
-
setAttribute
public void setAttribute(String name, String value) throws DOMException
- Specified by:
setAttributein interfaceElement- Throws:
DOMException
-
removeAttribute
public void removeAttribute(String name) throws DOMException
- Specified by:
removeAttributein interfaceElement- Throws:
DOMException
-
setAttributeNode
public Attr setAttributeNode(Attr newAttr) throws DOMException
- Specified by:
setAttributeNodein interfaceElement- Throws:
DOMException
-
removeAttributeNode
public Attr removeAttributeNode(Attr oldAttr) throws DOMException
- Specified by:
removeAttributeNodein interfaceElement- Throws:
DOMException
-
setAttributeNS
public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException
- Specified by:
setAttributeNSin interfaceElement- Throws:
DOMException
-
removeAttributeNS
public void removeAttributeNS(String namespaceURI, String localName) throws DOMException
- Specified by:
removeAttributeNSin interfaceElement- Throws:
DOMException
-
setAttributeNodeNS
public Attr setAttributeNodeNS(Attr newAttr) throws DOMException
- Specified by:
setAttributeNodeNSin interfaceElement- Throws:
DOMException
-
setIdAttribute
public void setIdAttribute(String name, boolean isId) throws DOMException
- Specified by:
setIdAttributein interfaceElement- Throws:
DOMException
-
setIdAttributeNS
public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException
- Specified by:
setIdAttributeNSin interfaceElement- Throws:
DOMException
-
setIdAttributeNode
public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException
- Specified by:
setIdAttributeNodein interfaceElement- Throws:
DOMException
-
-