Java 类org.w3c.dom.UserDataHandler 实例源码

项目:Push2Display    文件:AbstractNode.java   
/**
 * Fire any UserDataHandlers on the given oldNode.
 */
protected void fireUserDataHandlers(short type,
                                    Node oldNode,
                                    Node newNode) {
    AbstractNode an = (AbstractNode) oldNode;
    if (an.userData != null) {
        Iterator i = an.userData.entrySet().iterator();
        while (i.hasNext()) {
            Map.Entry e = (Map.Entry) i.next();
            UserDataHandler h
                = (UserDataHandler) an.userDataHandlers.get(e.getKey());
            if (h != null) {
                h.handle(type,
                         (String) e.getKey(),
                         e.getValue(),
                         oldNode,
                         newNode);
            }
        }
    }
}
项目:javify    文件:GnomeDocument.java   
public Node adoptNode(Node source)
  throws DOMException
{
  if (source == null || !(source instanceof GnomeNode))
    {
      return null;
    }
  Node ret = xmljAdoptNode(source);
  if (source instanceof GnomeNode)
    {
      ((GnomeNode) source).
        notifyUserDataHandlers(UserDataHandler.NODE_ADOPTED,
                               source, ret);
    }
  return ret;
}
项目:javify    文件:GnomeNode.java   
public Object setUserData(String key, Object data, UserDataHandler handler)
{
  // TODO handler
  if (userData == null)
    {
      userData = new HashMap();
    }
  if (handler != null)
    {
      if (userDataHandlers == null)
        {
          userDataHandlers = new HashMap();
        }
      userDataHandlers.put(key, handler);
    }
  return userData.put(key, data);
}
项目:javify    文件:DomNode.java   
/**
 * <b>DOM L1</b>
 * Returns a clone of this node which optionally includes cloned
 * versions of child nodes.  Clones are always mutable, except for
 * entity reference nodes.
 */
public Node cloneNode(boolean deep)
{
  if (deep)
    {
      return cloneNodeDeepInternal(true, null);
    }

  DomNode node = (DomNode) clone();
  if (nodeType == ENTITY_REFERENCE_NODE)
    {
      node.makeReadonly();
    }
  notifyUserDataHandlers(UserDataHandler.NODE_CLONED, this, node);
  return node;
}
项目:javify    文件:DomNode.java   
public Object setUserData(String key, Object data, UserDataHandler handler)
{
  if (userData == null)
    {
      userData = new HashMap();
    }
  if (handler != null)
    {
      if (userDataHandlers == null)
        {
          userDataHandlers = new HashMap();
        }
      userDataHandlers.put(key, handler);
    }
  return userData.put(key, data);
}
项目:jvm-stm    文件:GnomeDocument.java   
public Node adoptNode(Node source)
  throws DOMException
{
  if (source == null || !(source instanceof GnomeNode))
    {
      return null;
    }
  Node ret = xmljAdoptNode(source);
  if (source instanceof GnomeNode)
    {
      ((GnomeNode) source).
        notifyUserDataHandlers(UserDataHandler.NODE_ADOPTED,
                               source, ret);
    }
  return ret;
}
项目:jvm-stm    文件:GnomeNode.java   
public Object setUserData(String key, Object data, UserDataHandler handler)
{
  // TODO handler
  if (userData == null)
    {
      userData = new HashMap();
    }
  if (handler != null)
    {
      if (userDataHandlers == null)
        {
          userDataHandlers = new HashMap();
        }
      userDataHandlers.put(key, handler);
    }
  return userData.put(key, data);
}
项目:jvm-stm    文件:DomNode.java   
/**
 * <b>DOM L1</b>
 * Returns a clone of this node which optionally includes cloned
 * versions of child nodes.  Clones are always mutable, except for
 * entity reference nodes.
 */
public Node cloneNode(boolean deep)
{
  if (deep)
    {
      return cloneNodeDeepInternal(true, null);
    }

  DomNode node = (DomNode) clone();
  if (nodeType == ENTITY_REFERENCE_NODE)
    {
      node.makeReadonly();
    }
  notifyUserDataHandlers(UserDataHandler.NODE_CLONED, this, node);
  return node;
}
项目:jvm-stm    文件:DomNode.java   
public Object setUserData(String key, Object data, UserDataHandler handler)
{
  if (userData == null)
    {
      userData = new HashMap();
    }
  if (handler != null)
    {
      if (userDataHandlers == null)
        {
          userDataHandlers = new HashMap();
        }
      userDataHandlers.put(key, handler);
    }
  return userData.put(key, data);
}
项目:Push2Display    文件:AbstractNode.java   
/**
 * Fire any UserDataHandlers on the given oldNode.
 */
protected void fireUserDataHandlers(short type,
                                    Node oldNode,
                                    Node newNode) {
    AbstractNode an = (AbstractNode) oldNode;
    if (an.userData != null) {
        Iterator i = an.userData.entrySet().iterator();
        while (i.hasNext()) {
            Map.Entry e = (Map.Entry) i.next();
            UserDataHandler h
                = (UserDataHandler) an.userDataHandlers.get(e.getKey());
            if (h != null) {
                h.handle(type,
                         (String) e.getKey(),
                         e.getValue(),
                         oldNode,
                         newNode);
            }
        }
    }
}
项目:feathers-sdk    文件:AbstractNode.java   
/**
 * Fire any UserDataHandlers on the given oldNode.
 */
protected void fireUserDataHandlers(short type,
                                    Node oldNode,
                                    Node newNode) {
    AbstractNode an = (AbstractNode) oldNode;
    if (an.userData != null) {
        Iterator i = an.userData.entrySet().iterator();
        while (i.hasNext()) {
            Map.Entry e = (Map.Entry) i.next();
            UserDataHandler h
                = (UserDataHandler) an.userDataHandlers.get(e.getKey());
            if (h != null) {
                h.handle(type,
                         (String) e.getKey(),
                         e.getValue(),
                         oldNode,
                         newNode);
            }
        }
    }
}
项目:JamVM-PH    文件:GnomeDocument.java   
public Node adoptNode(Node source)
  throws DOMException
{
  if (source == null || !(source instanceof GnomeNode))
    {
      return null;
    }
  Node ret = xmljAdoptNode(source);
  if (source instanceof GnomeNode)
    {
      ((GnomeNode) source).
        notifyUserDataHandlers(UserDataHandler.NODE_ADOPTED,
                               source, ret);
    }
  return ret;
}
项目:JamVM-PH    文件:GnomeNode.java   
public Object setUserData(String key, Object data, UserDataHandler handler)
{
  // TODO handler
  if (userData == null)
    {
      userData = new HashMap();
    }
  if (handler != null)
    {
      if (userDataHandlers == null)
        {
          userDataHandlers = new HashMap();
        }
      userDataHandlers.put(key, handler);
    }
  return userData.put(key, data);
}
项目:JamVM-PH    文件:DomNode.java   
/**
 * <b>DOM L1</b>
 * Returns a clone of this node which optionally includes cloned
 * versions of child nodes.  Clones are always mutable, except for
 * entity reference nodes.
 */
public Node cloneNode(boolean deep)
{
  if (deep)
    {
      return cloneNodeDeepInternal(true, null);
    }

  DomNode node = (DomNode) clone();
  if (nodeType == ENTITY_REFERENCE_NODE)
    {
      node.makeReadonly();
    }
  notifyUserDataHandlers(UserDataHandler.NODE_CLONED, this, node);
  return node;
}
项目:JamVM-PH    文件:DomNode.java   
public Object setUserData(String key, Object data, UserDataHandler handler)
{
  if (userData == null)
    {
      userData = new HashMap();
    }
  if (handler != null)
    {
      if (userDataHandlers == null)
        {
          userDataHandlers = new HashMap();
        }
      userDataHandlers.put(key, handler);
    }
  return userData.put(key, data);
}
项目:classpath    文件:GnomeNode.java   
public Object setUserData(String key, Object data, UserDataHandler handler)
{
  // TODO handler
  if (userData == null)
    {
      userData = new HashMap();
    }
  if (handler != null)
    {
      if (userDataHandlers == null)
        {
          userDataHandlers = new HashMap();
        }
      userDataHandlers.put(key, handler);
    }
  return userData.put(key, data);
}
项目:classpath    文件:DomNode.java   
/**
 * <b>DOM L1</b>
 * Returns a clone of this node which optionally includes cloned
 * versions of child nodes.  Clones are always mutable, except for
 * entity reference nodes.
 */
public Node cloneNode(boolean deep)
{
  if (deep)
    {
      return cloneNodeDeepInternal(true, null);
    }

  DomNode node = (DomNode) clone();
  if (nodeType == ENTITY_REFERENCE_NODE)
    {
      node.makeReadonly();
    }
  notifyUserDataHandlers(UserDataHandler.NODE_CLONED, this, node);
  return node;
}
项目:CustomOreGen    文件:ValidatorRoot.java   
protected boolean validateChildren() throws ParserException
{
    super.validateChildren();
    Node parent = this.getNode().getParentNode();

    if (parent != null && parent.getNodeType() == 9)
    {
        this.getNode().setUserData("validated", true, (UserDataHandler)null);

        if (this._topLevelNodes != null)
        {
            for (String nodeName : this._topLevelNodes) {
                this.validateNamedChildren(2, nodeName, (IValidatorFactory<?>)null);
            }
        }
    }

    return true;
}
项目:CustomOreGen    文件:LineAwareSAXHandler.java   
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
{
    Node current = this.nodeStack.peek();
    Document doc = current.getNodeType() == 9 ? (Document)current : current.getOwnerDocument();
    int lineNumber = this.locator.getLineNumber();
    String filename = this.locator.getSystemId();
    Element newElement = doc.createElementNS(uri, qName);
    newElement.setUserData("line-number", lineNumber, (UserDataHandler)null);
    newElement.setUserData("filename", filename, (UserDataHandler)null);
    current.appendChild(newElement);

    for (int c = 0; c < attributes.getLength(); ++c)
    {
        Attr attr = doc.createAttributeNS(attributes.getURI(c), attributes.getQName(c));
        attr.setValue(attributes.getValue(c));
        attr.setUserData("line-number", lineNumber, (UserDataHandler)null);
        attr.setUserData("filename", filename, (UserDataHandler)null);
        newElement.setAttributeNodeNS(attr);
    }

    this.nodeStack.push(newElement);
}
项目:CustomOreGen    文件:ValidatorRefOption.java   
protected boolean validateChildren() throws ParserException
{
    super.validateChildren();
    String optionName = (String)this.validateRequiredAttribute(String.class, "name", true);
    ConfigOption option = this.getParser().target.getConfigOption(optionName);

    if (option == null)
    {
        throw new ParserException("Option \'" + optionName + "\' is not a recognized option.", this.getNode());
    }
    else
    {
        this.getNode().setUserData("validated", Boolean.valueOf(true), (UserDataHandler)null);
        this.checkChildrenValid();
        Object value = option.getValue();
        this.replaceWithNode(new Node[] {value == null ? null : this.getNode().getOwnerDocument().createTextNode(value.toString())});
        return false;
    }
}
项目:OpenJSharp    文件:IIOMetadataNode.java   
/**
 * This DOM Level 3 method is not supported for {@code IIOMetadataNode}
 * and will throw a {@code DOMException}.
 * @throws DOMException - always.
 */
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) throws DOMException {
    throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
                           "Method not supported");
}
项目:OpenJSharp    文件:NodeImpl.java   
/**
 * Returns a duplicate of a given node. You can consider this a
 * generic "copy constructor" for nodes. The newly returned object should
 * be completely independent of the source object's subtree, so changes
 * in one after the clone has been made will not affect the other.
 * <P>
 * Note: since we never have any children deep is meaningless here,
 * ParentNode overrides this behavior.
 * @see ParentNode
 *
 * <p>
 * Example: Cloning a Text node will copy both the node and the text it
 * contains.
 * <p>
 * Example: Cloning something that has children -- Element or Attr, for
 * example -- will _not_ clone those children unless a "deep clone"
 * has been requested. A shallow clone of an Attr node will yield an
 * empty Attr of the same name.
 * <p>
 * NOTE: Clones will always be read/write, even if the node being cloned
 * is read-only, to permit applications using only the DOM API to obtain
 * editable copies of locked portions of the tree.
 */
public Node cloneNode(boolean deep) {

    if (needsSyncData()) {
        synchronizeData();
    }

    NodeImpl newnode;
    try {
        newnode = (NodeImpl)clone();
    }
    catch (CloneNotSupportedException e) {
        // if we get here we have an error in our program we may as well
        // be vocal about it, so that people can take appropriate action.
        throw new RuntimeException("**Internal Error**" + e);
    }

    // Need to break the association w/ original kids
    newnode.ownerNode      = ownerDocument();
    newnode.isOwned(false);

    // By default we make all clones readwrite,
    // this is overriden in readonly subclasses
    newnode.isReadOnly(false);

    ownerDocument().callUserDataHandlers(this, newnode,
                                         UserDataHandler.NODE_CLONED);

    return newnode;

}
项目:jdk8u-jdk    文件:IIOMetadataNode.java   
/**
 * This DOM Level 3 method is not supported for {@code IIOMetadataNode}
 * and will throw a {@code DOMException}.
 * @throws DOMException - always.
 */
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) throws DOMException {
    throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
                           "Method not supported");
}
项目:openjdk-jdk10    文件:IIOMetadataNode.java   
/**
 * This DOM Level 3 method is not supported for {@code IIOMetadataNode}
 * and will throw a {@code DOMException}.
 * @throws DOMException always.
 */
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) throws DOMException {
    throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
                           "Method not supported");
}
项目:openjdk-jdk10    文件:NodeImpl.java   
/**
 * Returns a duplicate of a given node. You can consider this a
 * generic "copy constructor" for nodes. The newly returned object should
 * be completely independent of the source object's subtree, so changes
 * in one after the clone has been made will not affect the other.
 * <P>
 * Note: since we never have any children deep is meaningless here,
 * ParentNode overrides this behavior.
 * @see ParentNode
 *
 * <p>
 * Example: Cloning a Text node will copy both the node and the text it
 * contains.
 * <p>
 * Example: Cloning something that has children -- Element or Attr, for
 * example -- will _not_ clone those children unless a "deep clone"
 * has been requested. A shallow clone of an Attr node will yield an
 * empty Attr of the same name.
 * <p>
 * NOTE: Clones will always be read/write, even if the node being cloned
 * is read-only, to permit applications using only the DOM API to obtain
 * editable copies of locked portions of the tree.
 */
public Node cloneNode(boolean deep) {

    if (needsSyncData()) {
        synchronizeData();
    }

    NodeImpl newnode;
    try {
        newnode = (NodeImpl)clone();
    }
    catch (CloneNotSupportedException e) {
        // if we get here we have an error in our program we may as well
        // be vocal about it, so that people can take appropriate action.
        throw new RuntimeException("**Internal Error**" + e);
    }

    // Need to break the association w/ original kids
    newnode.ownerNode      = ownerDocument();
    newnode.isOwned(false);

    // By default we make all clones readwrite,
    // this is overriden in readonly subclasses
    newnode.isReadOnly(false);

    ownerDocument().callUserDataHandlers(this, newnode,
                                         UserDataHandler.NODE_CLONED);

    return newnode;

}
项目:openjdk9    文件:IIOMetadataNode.java   
/**
 * This DOM Level 3 method is not supported for {@code IIOMetadataNode}
 * and will throw a {@code DOMException}.
 * @throws DOMException always.
 */
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) throws DOMException {
    throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
                           "Method not supported");
}
项目:openjdk9    文件:NodeImpl.java   
/**
 * Returns a duplicate of a given node. You can consider this a
 * generic "copy constructor" for nodes. The newly returned object should
 * be completely independent of the source object's subtree, so changes
 * in one after the clone has been made will not affect the other.
 * <P>
 * Note: since we never have any children deep is meaningless here,
 * ParentNode overrides this behavior.
 * @see ParentNode
 *
 * <p>
 * Example: Cloning a Text node will copy both the node and the text it
 * contains.
 * <p>
 * Example: Cloning something that has children -- Element or Attr, for
 * example -- will _not_ clone those children unless a "deep clone"
 * has been requested. A shallow clone of an Attr node will yield an
 * empty Attr of the same name.
 * <p>
 * NOTE: Clones will always be read/write, even if the node being cloned
 * is read-only, to permit applications using only the DOM API to obtain
 * editable copies of locked portions of the tree.
 */
public Node cloneNode(boolean deep) {

    if (needsSyncData()) {
        synchronizeData();
    }

    NodeImpl newnode;
    try {
        newnode = (NodeImpl)clone();
    }
    catch (CloneNotSupportedException e) {
        // if we get here we have an error in our program we may as well
        // be vocal about it, so that people can take appropriate action.
        throw new RuntimeException("**Internal Error**" + e);
    }

    // Need to break the association w/ original kids
    newnode.ownerNode      = ownerDocument();
    newnode.isOwned(false);

    // By default we make all clones readwrite,
    // this is overriden in readonly subclasses
    newnode.isReadOnly(false);

    ownerDocument().callUserDataHandlers(this, newnode,
                                         UserDataHandler.NODE_CLONED);

    return newnode;

}
项目:Java8CN    文件:IIOMetadataNode.java   
/**
 * This DOM Level 3 method is not supported for {@code IIOMetadataNode}
 * and will throw a {@code DOMException}.
 * @throws DOMException - always.
 */
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) throws DOMException {
    throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
                           "Method not supported");
}
项目:Push2Display    文件:AbstractDocument.java   
/**
 * <b>DOM</b>: Implements {@link org.w3c.dom.Node#cloneNode(boolean)}.
 */
public Node cloneNode(boolean deep) {
    Document n = (Document)newNode();
    copyInto(n);
    fireUserDataHandlers(UserDataHandler.NODE_CLONED, this, n);
    if (deep) {
        for (Node c = getFirstChild();
             c != null;
             c = c.getNextSibling()) {
            n.appendChild(n.importNode(c, deep));
        }
    }
    return n;
}
项目:Push2Display    文件:AbstractDocument.java   
/**
 * Helper function for {@link #adoptNode(Node)}.
 */
protected void adoptNode1(AbstractNode n) {
    n.ownerDocument = this;
    switch (n.getNodeType()) {
        case Node.ATTRIBUTE_NODE:
            AbstractAttr attr = (AbstractAttr) n;
            attr.ownerElement = null;
            attr.unspecified = false;
            break;
        case Node.ELEMENT_NODE:
            NamedNodeMap nnm = n.getAttributes();
            int len = nnm.getLength();
            for (int i = 0; i < len; i++) {
                attr = (AbstractAttr) nnm.item(i);
                if (attr.getSpecified()) {
                    adoptNode1(attr);
                }
            }
            break;
        case Node.ENTITY_REFERENCE_NODE:
            while (n.getFirstChild() != null) {
                n.removeChild(n.getFirstChild());
            }
            break;
    }

    fireUserDataHandlers(UserDataHandler.NODE_ADOPTED, n, null);

    for (Node m = n.getFirstChild(); m != null; m = m.getNextSibling()) {
        switch (m.getNodeType()) {
            case Node.DOCUMENT_TYPE_NODE:
            case Node.ENTITY_NODE:
            case Node.NOTATION_NODE:
                return;
        }
        adoptNode1((AbstractNode) m);
    }
}
项目:Push2Display    文件:AbstractNode.java   
/**
 * <b>DOM</b>: Implements
 * {@link org.w3c.dom.Node#setUserData(String,Object,UserDataHandler)}.
 */
public Object setUserData(String key, Object data, UserDataHandler handler) {
    if (userData == null) {
        userData = new HashMap();
        userDataHandlers = new HashMap();
    }
    if (data == null) {
        userData.remove(key);
        return userDataHandlers.remove(key);
    }
    userDataHandlers.put(key, handler);
    return userData.put(key, data);
}
项目:jdk8u_jdk    文件:IIOMetadataNode.java   
/**
 * This DOM Level 3 method is not supported for {@code IIOMetadataNode}
 * and will throw a {@code DOMException}.
 * @throws DOMException - always.
 */
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) throws DOMException {
    throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
                           "Method not supported");
}
项目:lookaside_java-1.8.0-openjdk    文件:IIOMetadataNode.java   
/**
 * This DOM Level 3 method is not supported for {@code IIOMetadataNode}
 * and will throw a {@code DOMException}.
 * @throws DOMException - always.
 */
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) throws DOMException {
    throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
                           "Method not supported");
}
项目:lookaside_java-1.8.0-openjdk    文件:NodeImpl.java   
/**
 * Returns a duplicate of a given node. You can consider this a
 * generic "copy constructor" for nodes. The newly returned object should
 * be completely independent of the source object's subtree, so changes
 * in one after the clone has been made will not affect the other.
 * <P>
 * Note: since we never have any children deep is meaningless here,
 * ParentNode overrides this behavior.
 * @see ParentNode
 *
 * <p>
 * Example: Cloning a Text node will copy both the node and the text it
 * contains.
 * <p>
 * Example: Cloning something that has children -- Element or Attr, for
 * example -- will _not_ clone those children unless a "deep clone"
 * has been requested. A shallow clone of an Attr node will yield an
 * empty Attr of the same name.
 * <p>
 * NOTE: Clones will always be read/write, even if the node being cloned
 * is read-only, to permit applications using only the DOM API to obtain
 * editable copies of locked portions of the tree.
 */
public Node cloneNode(boolean deep) {

    if (needsSyncData()) {
        synchronizeData();
    }

    NodeImpl newnode;
    try {
        newnode = (NodeImpl)clone();
    }
    catch (CloneNotSupportedException e) {
        // if we get here we have an error in our program we may as well
        // be vocal about it, so that people can take appropriate action.
        throw new RuntimeException("**Internal Error**" + e);
    }

    // Need to break the association w/ original kids
    newnode.ownerNode      = ownerDocument();
    newnode.isOwned(false);

    // By default we make all clones readwrite,
    // this is overriden in readonly subclasses
    newnode.isReadOnly(false);

    ownerDocument().callUserDataHandlers(this, newnode,
                                         UserDataHandler.NODE_CLONED);

    return newnode;

}
项目:javify    文件:GnomeDocument.java   
public Node importNode(Node importedNode, boolean deep)
  throws DOMException
{
  Node ret = xmljImportNode(importedNode, deep);
  if (importedNode instanceof GnomeNode)
    {
      ((GnomeNode) importedNode)
        .notifyUserDataHandlers(UserDataHandler.NODE_IMPORTED,
                                importedNode, ret);
    }
  return ret;
}
项目:javify    文件:GnomeNode.java   
void notifyUserDataHandlers(short op, Node src, Node dst)
{
  if (userDataHandlers != null)
    {
      for (Iterator i = userDataHandlers.entrySet().iterator(); i.hasNext(); )
        {
          Map.Entry entry = (Map.Entry) i.next();
          String key = (String) entry.getKey();
          UserDataHandler handler = (UserDataHandler) entry.getValue();
          Object data = userData.get(key);
          handler.handle(op, key, data, src, dst);
        }
    }
}
项目:javify    文件:DomNode.java   
/**
 * Returns a deep clone of this node.
 */
private DomNode cloneNodeDeepInternal(boolean root, DomDocument doc)
{
  DomNode node = (DomNode) clone();
  boolean building = false; // Never used unless root is true
  if (root)
    {
      doc = (nodeType == DOCUMENT_NODE) ? (DomDocument) node : node.owner;
      building = doc.building;
      doc.building = true; // Permit certain structural rules
    }
  node.owner = doc;
  for (DomNode ctx = first; ctx != null; ctx = ctx.next)
    {
      DomNode newChild = ctx.cloneNodeDeepInternal(false, doc);
      node.appendChild(newChild);
    }
  if (nodeType == ENTITY_REFERENCE_NODE)
    {
      node.makeReadonly();
    }
  if (root)
    {
      doc.building = building;
    }
  notifyUserDataHandlers(UserDataHandler.NODE_CLONED, this, node);
  return node;
}
项目:javify    文件:DomNode.java   
void notifyUserDataHandlers(short op, Node src, Node dst)
{
  if (userDataHandlers != null)
    {
      for (Iterator i = userDataHandlers.entrySet().iterator(); i.hasNext(); )
        {
          Map.Entry entry = (Map.Entry) i.next();
          String key = (String) entry.getKey();
          UserDataHandler handler = (UserDataHandler) entry.getValue();
          Object data = userData.get(key);
          handler.handle(op, key, data, src, dst);
        }
    }
}
项目:jvm-stm    文件:GnomeDocument.java   
public Node importNode(Node importedNode, boolean deep)
  throws DOMException
{
  Node ret = xmljImportNode(importedNode, deep);
  if (importedNode instanceof GnomeNode)
    {
      ((GnomeNode) importedNode)
        .notifyUserDataHandlers(UserDataHandler.NODE_IMPORTED,
                                importedNode, ret);
    }
  return ret;
}
项目:jvm-stm    文件:GnomeNode.java   
void notifyUserDataHandlers(short op, Node src, Node dst)
{
  if (userDataHandlers != null)
    {
      for (Iterator i = userDataHandlers.entrySet().iterator(); i.hasNext(); )
        {
          Map.Entry entry = (Map.Entry) i.next();
          String key = (String) entry.getKey();
          UserDataHandler handler = (UserDataHandler) entry.getValue();
          Object data = userData.get(key);
          handler.handle(op, key, data, src, dst);
        }
    }
}