/** * Sets the parent node. * Throws a HIERARCHY_REQUEST_ERR {@link org.w3c.dom.DOMException}. */ public void setParentNode(Node v) { throw createDOMException(DOMException.HIERARCHY_REQUEST_ERR, "parent.not.allowed", new Object[] {(int) getNodeType(), getNodeName() }); }
/** * Returns the base URI of the referer element. */ protected String getRefererBaseURI(Element ref) { return ((AbstractNode) ref).getBaseURI(); }
/** * Returns the base URI of the referer element. */ protected String getRefererBaseURI(Element ref) { AbstractNode aref = (AbstractNode) ref; if (aref.getXblBoundElement() != null) { return null; } return aref.getBaseURI(); }
/** * <b>DOM</b>: Implements {@link org.w3c.dom.Node#setTextContent(String)}. */ public void setTextContent(String s) throws DOMException { if (isReadonly()) { throw createDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node", new Object[] {(int) getNodeType(), getNodeName() }); } if (getNodeType() != DOCUMENT_TYPE_NODE) { while (getFirstChild() != null) { removeChild(getFirstChild()); } appendChild(getOwnerDocument().createTextNode(s)); } }
if (nt != getNodeType() || !compareStrings(getNodeName(), other.getNodeName()) || !compareStrings(getLocalName(), other.getLocalName()) || !compareStrings(getPrefix(), other.getPrefix()) || !compareStrings(getNodeValue(), other.getNodeValue()) || !compareStrings(getNodeValue(), other.getNodeValue()) || !compareNamedNodeMaps(getAttributes(), other.getAttributes())) { return false; DocumentType dt1 = (DocumentType) this; DocumentType dt2 = (DocumentType) other; if (!compareStrings(dt1.getPublicId(), dt2.getPublicId()) || !compareStrings(dt1.getSystemId(), dt2.getSystemId()) || !compareStrings(dt1.getInternalSubset(), dt2.getInternalSubset()) || !compareNamedNodeMaps(dt1.getEntities(), dt2.getEntities()) || !compareNamedNodeMaps(dt1.getNotations(), dt2.getNotations())) { return false; Node n = getFirstChild(); Node m = other.getFirstChild(); if (n != null && m != null) { if (!((AbstractNode) n).isEqualNode(m)) { return false;
switch (getNodeType()) { case DOCUMENT_NODE: AbstractNode de = (AbstractNode) ((Document) this).getDocumentElement(); return de.lookupNamespaceURI(prefix); case ENTITY_NODE: case NOTATION_NODE: = (AbstractNode) ((Attr) this).getOwnerElement(); if (owner != null) { return owner.lookupNamespaceURI(prefix); NamedNodeMap nnm = getAttributes(); if (nnm != null) { for (int i = 0; i < nnm.getLength(); i++) { && compareStrings(localName, prefix) || XMLConstants.XMLNS_PREFIX.equals(localName) && prefix == null) { for (Node n = this.getParentNode(); n != null; n = n.getParentNode()) { if (n.getNodeType() == ELEMENT_NODE) { AbstractNode an = (AbstractNode) n; return an.lookupNamespaceURI(prefix);
/** * <b>DOM</b>: Implements * {@link org.w3c.dom.events.EventTarget#dispatchEvent(Event)}. */ public boolean dispatchEvent(Event evt) throws EventException { if (eventSupport == null) { initializeEventSupport(); } return eventSupport.dispatchEvent(this, evt); }
&& prefix != null) { String pns = ((AbstractNode) originalElement).lookupNamespaceURI(prefix); if (pns != null && pns.equals(namespaceURI)) { return prefix; String ln = attr.getLocalName(); AbstractNode oe = (AbstractNode) originalElement; String pns = oe.lookupNamespaceURI(ln); if (pns != null && pns.equals(namespaceURI)) { return ln; for (Node n = getParentNode(); n != null; n = n.getParentNode()) { if (n.getNodeType() == ELEMENT_NODE) { return ((AbstractNode) n).lookupNamespacePrefix (namespaceURI, originalElement);
= (XBLEventSupport) ((AbstractNode) boundElement).getEventSupport(); es.removeImplementationEventListenerNS (XMLConstants.XML_EVENTS_NAMESPACE_URI,
if (ancestors.length > 0) { int index = ancestors.length - 1; Node boundElement = targetNode.getXblBoundElement(); AbstractNode ancestorNode = (AbstractNode) ancestors[index]; if (!singleScope && ancestorNode.getXblBoundElement() != boundElement) { es[index] = retargetEvent(e, ancestors[index]); } else { boundElement = ancestorNode.getXblBoundElement(); AbstractNode nextAncestorNode = (AbstractNode) ancestors[index]; Node nextBoundElement = nextAncestorNode.getXblBoundElement(); if (!singleScope && nextBoundElement != boundElement) { es[index] = retargetEvent(es[index + 1], ancestors[index]);
/** * <b>DOM</b>: Implements * {@link org.w3c.dom.xpath.XPathNSResolver#lookupNamespaceURI(String)}. */ public String lookupNamespaceURI(String prefix) { return ((AbstractNode) contextNode).lookupNamespaceURI(prefix); } }
/** * Returns whether this timed element comes before the given timed * element in document order. */ public boolean isBefore(TimedElement other) { Element e = ((SVGTimedElement) other).getElement(); int pos = ((AbstractNode) element).compareDocumentPosition(e); return (pos & AbstractNode.DOCUMENT_POSITION_PRECEDING) != 0; }
/** * <b>DOM</b>: Implements {@link TreeWalker#setCurrentNode(Node)}. */ public void setCurrentNode(Node n) { if (n == null) { throw ((AbstractNode)root).createDOMException (DOMException.NOT_SUPPORTED_ERR, "null.current.node", null); } currentNode = n; }
args[i] = Context.jsToJava(args[i], paramTypes[i]); AbstractNode target = (AbstractNode) njo.unwrap(); target.addEventListenerNS ((String)args[0], (String)args[1], args[i] = Context.jsToJava(args[i], paramTypes[i]); AbstractNode target = (AbstractNode) njo.unwrap(); target.addEventListenerNS ((String)args[0], (String)args[1],
if (nt != getNodeType() || !compareStrings(getNodeName(), other.getNodeName()) || !compareStrings(getLocalName(), other.getLocalName()) || !compareStrings(getPrefix(), other.getPrefix()) || !compareStrings(getNodeValue(), other.getNodeValue()) || !compareStrings(getNodeValue(), other.getNodeValue()) || !compareNamedNodeMaps(getAttributes(), other.getAttributes())) { return false; DocumentType dt1 = (DocumentType) this; DocumentType dt2 = (DocumentType) other; if (!compareStrings(dt1.getPublicId(), dt2.getPublicId()) || !compareStrings(dt1.getSystemId(), dt2.getSystemId()) || !compareStrings(dt1.getInternalSubset(), dt2.getInternalSubset()) || !compareNamedNodeMaps(dt1.getEntities(), dt2.getEntities()) || !compareNamedNodeMaps(dt1.getNotations(), dt2.getNotations())) { return false; Node n = getFirstChild(); Node m = other.getFirstChild(); if (n != null && m != null) { if (!((AbstractNode) n).isEqualNode(m)) { return false;
/** * <b>DOM</b>: Implements {@link org.w3c.dom.Node#setTextContent(String)}. */ public void setTextContent(String s) throws DOMException { if (isReadonly()) { throw createDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node", new Object[] { new Integer(getNodeType()), getNodeName() }); } if (getNodeType() != DOCUMENT_TYPE_NODE) { while (getFirstChild() != null) { removeChild(getFirstChild()); } appendChild(getOwnerDocument().createTextNode(s)); } }
switch (getNodeType()) { case DOCUMENT_NODE: AbstractNode de = (AbstractNode) ((Document) this).getDocumentElement(); return de.lookupNamespaceURI(prefix); case ENTITY_NODE: case NOTATION_NODE: = (AbstractNode) ((Attr) this).getOwnerElement(); if (owner != null) { return owner.lookupNamespaceURI(prefix); NamedNodeMap nnm = getAttributes(); if (nnm != null) { for (int i = 0; i < nnm.getLength(); i++) { && compareStrings(localName, prefix) || XMLConstants.XMLNS_PREFIX.equals(localName) && prefix == null) { for (Node n = this.getParentNode(); n != null; n = n.getParentNode()) { if (n.getNodeType() == ELEMENT_NODE) { AbstractNode an = (AbstractNode) n; return an.lookupNamespaceURI(prefix);
/** * <b>DOM</b>: Implements * {@link org.w3c.dom.events.EventTarget#dispatchEvent(Event)}. */ public boolean dispatchEvent(Event evt) throws EventException { if (eventSupport == null) { initializeEventSupport(); } return eventSupport.dispatchEvent(this, evt); }
&& prefix != null) { String pns = ((AbstractNode) originalElement).lookupNamespaceURI(prefix); if (pns != null && pns.equals(namespaceURI)) { return prefix; String ln = attr.getLocalName(); AbstractNode oe = (AbstractNode) originalElement; String pns = oe.lookupNamespaceURI(ln); if (pns != null && pns.equals(namespaceURI)) { return ln; for (Node n = getParentNode(); n != null; n = n.getParentNode()) { if (n.getNodeType() == ELEMENT_NODE) { return ((AbstractNode) n).lookupNamespacePrefix (namespaceURI, originalElement);
= (XBLEventSupport) ((AbstractNode) boundElement).getEventSupport(); es.removeImplementationEventListenerNS (XMLConstants.XML_EVENTS_NAMESPACE_URI,