public void replaceData(int offset, int count, String arg) throws DOMException { try { buffer.replace(offset, offset + count, arg); } catch (ArrayIndexOutOfBoundsException ex) { throw new DOMException(DOMException.INDEX_SIZE_ERR, null); } }
public void set(DOMConfigurationImpl config, Object value) { if (!onlyValue.equals(value)) { throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Unsupported value: " + value); } } public boolean canSet(DOMConfigurationImpl config, Object value) {
public String substringData(int offset, int count) throws DOMException { try { return buffer.substring(offset, offset + count); } catch (ArrayIndexOutOfBoundsException ex) { throw new DOMException(DOMException.INDEX_SIZE_ERR, null); } }
public void insertData(int offset, String arg) throws DOMException { try { buffer.insert(offset, arg); } catch (ArrayIndexOutOfBoundsException ex) { throw new DOMException(DOMException.INDEX_SIZE_ERR, null); } }
protected void setPh(Element t, String ph) { if (!t.getTagName().equals(MaryXML.TOKEN)) throw new DOMException(DOMException.INVALID_ACCESS_ERR, "Only t elements allowed, received " + t.getTagName() + "."); if (t.hasAttribute("ph")) { String prevPh = t.getAttribute("ph"); // In previous sampa, replace star with sampa: String newPh = prevPh.replaceFirst("\\*", ph); t.setAttribute("ph", newPh); } else { t.setAttribute("ph", ph); } }
protected void setPh(Element t, String ph) { if (!t.getTagName().equals(MaryXML.TOKEN)) throw new DOMException(DOMException.INVALID_ACCESS_ERR, "Only t elements allowed, received " + t.getTagName() + "."); if (t.hasAttribute("ph")) { String prevPh = t.getAttribute("ph"); // In previous sampa, replace star with sampa: String newPh = prevPh.replaceFirst("\\*", ph); t.setAttribute("ph", newPh); } else { t.setAttribute("ph", ph); } }
protected void setPh(Element t, String ph) { if (!t.getTagName().equals(MaryXML.TOKEN)) throw new DOMException(DOMException.INVALID_ACCESS_ERR, "Only t elements allowed, received " + t.getTagName() + "."); if (t.hasAttribute("ph")) { String prevPh = t.getAttribute("ph"); // In previous sampa, replace star with sampa: String newPh = prevPh.replaceFirst("\\*", ph); t.setAttribute("ph", newPh); } else { t.setAttribute("ph", ph); } }
protected void setPh(Element t, String ph) { if (!t.getTagName().equals(MaryXML.TOKEN)) throw new DOMException(DOMException.INVALID_ACCESS_ERR, "Only t elements allowed, received " + t.getTagName() + "."); if (t.hasAttribute("ph")) { String prevPh = t.getAttribute("ph"); // In previous sampa, replace star with sampa: String newPh = prevPh.replaceFirst("\\*", ph); t.setAttribute("ph", newPh); } else { t.setAttribute("ph", ph); } }
public void setIdAttribute(String name, boolean isId) throws DOMException { AttrImpl attr = getAttributeNode(name); if (attr == null) { throw new DOMException(DOMException.NOT_FOUND_ERR, "No such attribute: " + name); } attr.isId = isId; }
/** * Throw a DOMException * * @param msg key of the error that occured. */ public void throwDOMException(short code, String msg) { String themsg = XSLMessages.createMessage(msg, null); throw new DOMException(code, themsg); }
public Attr removeAttributeNode(Attr oldAttr) throws DOMException { AttrImpl oldAttrImpl = (AttrImpl) oldAttr; if (oldAttrImpl.getOwnerElement() != this) { throw new DOMException(DOMException.NOT_FOUND_ERR, null); } attributes.remove(oldAttrImpl); oldAttrImpl.ownerElement = null; return oldAttrImpl; }
public Node setNamedItemNS(Node arg) throws DOMException { if (!(arg instanceof Attr)) { throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, null); } return ElementImpl.this.setAttributeNodeNS((Attr)arg); } }
public Object getParameter(String name) throws DOMException { Parameter parameter = PARAMETERS.get(name); if (parameter == null) { throw new DOMException(DOMException.NOT_FOUND_ERR, "No such parameter: " + name); } return parameter.get(this); }
public Node removeNamedItemNS(String namespaceURI, String localName) throws DOMException { int i = indexOfItemNS(namespaceURI, localName); if (i == -1) { throw new DOMException(DOMException.NOT_FOUND_ERR, null); } return ElementImpl.this.attributes.remove(i); }
public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException { AttrImpl attr = getAttributeNodeNS(namespaceURI, localName); if (attr == null) { throw new DOMException(DOMException.NOT_FOUND_ERR, "No such attribute: " + namespaceURI + " " + localName); } attr.isId = isId; }
public Node removeNamedItem(String name) throws DOMException { int i = indexOfItem(name); if (i == -1) { throw new DOMException(DOMException.NOT_FOUND_ERR, null); } return ElementImpl.this.attributes.remove(i); }
public Node setNamedItem(Node arg) throws DOMException { if (!(arg instanceof Attr)) { throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, null); } return ElementImpl.this.setAttributeNode((Attr)arg); }
public Node insertBefore(Node newChild, Node refChild) throws DOMException { LeafNodeImpl refChildImpl = (LeafNodeImpl) refChild; if (refChildImpl == null) { return appendChild(newChild); } if (refChildImpl.document != document) { throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, null); } if (refChildImpl.parent != this) { throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, null); } return insertChildAt(newChild, refChildImpl.index); }
public ClassWhichUsesSomeClassesInOrgW3CDomPackage() { Text document = null; DOMException exception = new DOMException((short) 1, "abc"); exception.getClass(); }
public Node renameNode(Node node, String namespaceURI, String qualifiedName) { if (node.getOwnerDocument() != this) { throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, null); } setNameNS((NodeImpl) node, namespaceURI, qualifiedName); notifyUserDataHandlers(UserDataHandler.NODE_RENAMED, node, null); return node; }