本文整理了Java中org.dom4j.Node.setParent()
方法的一些代码示例,展示了Node.setParent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.setParent()
方法的具体详情如下:
包路径:org.dom4j.Node
类名称:Node
方法名:setParent
[英]setParent
sets the parent relationship of this node if the parent relationship is supported or does nothing if the parent relationship is not supported.
This method should only be called from inside an Element
implementation method and is not intended for general use.
[中]setParent
如果支持父关系,则设置此节点的父关系;如果不支持父关系,则不执行任何操作。
此方法只能从Element
实现方法内部调用,不适用于一般用途。
代码示例来源:origin: org.dom4j/dom4j
/**
* Called when a new child node is added to create any parent relationships
*
* @param node DOCUMENT ME!
*/
protected void childAdded(Node node) {
if (node != null) {
node.setParent(this);
}
}
代码示例来源:origin: org.dom4j/dom4j
protected void childRemoved(Node node) {
if (node != null) {
node.setParent(null);
node.setDocument(null);
}
}
代码示例来源:origin: org.dom4j/dom4j
public Object clone() {
if (isReadOnly()) {
return this;
} else {
try {
Node answer = (Node) super.clone();
answer.setParent(null);
answer.setDocument(null);
return answer;
} catch (CloneNotSupportedException e) {
// should never happen
throw new RuntimeException("This should never happen. Caught: "
+ e);
}
}
}
代码示例来源:origin: dom4j/dom4j
/**
* Called when a new child node is added to create any parent relationships
*
* @param node DOCUMENT ME!
*/
protected void childAdded(Node node) {
if (node != null) {
node.setParent(this);
}
}
代码示例来源:origin: org.dom4j/com.springsource.org.dom4j
/**
* Called when a new child node is added to create any parent relationships
*
* @param node
* DOCUMENT ME!
*/
protected void childAdded(Node node) {
if (node != null) {
node.setParent(this);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j
/**
* Called when a new child node is added to create any parent relationships
*
* @param node
* DOCUMENT ME!
*/
protected void childAdded(Node node) {
if (node != null) {
node.setParent(this);
}
}
代码示例来源:origin: maven/dom4j
/**
* Called when a new child node is added to create any parent relationships
*
* @param node
* DOCUMENT ME!
*/
protected void childAdded(Node node) {
if (node != null) {
node.setParent(this);
}
}
代码示例来源:origin: org.jenkins-ci.dom4j/dom4j
/**
* Called when a new child node is added to create any parent relationships
*
* @param node
* DOCUMENT ME!
*/
protected void childAdded(Node node) {
if (node != null) {
node.setParent(this);
}
}
代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand
/**
* Called when a new child node is added to create any parent relationships
*
* @param node
* DOCUMENT ME!
*/
protected void childAdded(Node node) {
if (node != null) {
node.setParent(this);
}
}
代码示例来源:origin: org.dom4j/org.motechproject.org.dom4j
/**
* Called when a new child node is added to create any parent relationships
*
* @param node
* DOCUMENT ME!
*/
protected void childAdded(Node node) {
if (node != null) {
node.setParent(this);
}
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Called when a new child node is added to create any parent relationships
*
* @param node DOCUMENT ME!
*/
protected void childAdded(Node node) {
if (node != null) {
node.setParent(this);
}
}
代码示例来源:origin: maven/dom4j
protected void childRemoved(Node node) {
if (node != null) {
node.setParent(null);
node.setDocument(null);
}
}
代码示例来源:origin: dom4j/dom4j
protected void childRemoved(Node node) {
if (node != null) {
node.setParent(null);
node.setDocument(null);
}
}
代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand
protected void childRemoved(Node node) {
if (node != null) {
node.setParent(null);
node.setDocument(null);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j
protected void childRemoved(Node node) {
if (node != null) {
node.setParent(null);
node.setDocument(null);
}
}
代码示例来源:origin: org.dom4j/com.springsource.org.dom4j
protected void childRemoved(Node node) {
if (node != null) {
node.setParent(null);
node.setDocument(null);
}
}
代码示例来源:origin: apache/servicemix-bundles
protected void childRemoved(Node node) {
if (node != null) {
node.setParent(null);
node.setDocument(null);
}
}
代码示例来源:origin: org.dom4j/org.motechproject.org.dom4j
protected void childRemoved(Node node) {
if (node != null) {
node.setParent(null);
node.setDocument(null);
}
}
代码示例来源:origin: org.jenkins-ci.dom4j/dom4j
protected void childRemoved(Node node) {
if (node != null) {
node.setParent(null);
node.setDocument(null);
}
}
代码示例来源:origin: stackoverflow.com
int depth = current.getDepth() + 1;
ArrayList<Node> succesors = current.getSuccessors(depth);
for (Node node : succesors) {
if (!closed.contains(node) && !open.contains(node)) {
node.setH(this.heuristic.calculate(node, goal));
node.setG(current.getG() + 1);
node.setParent(current);
open.add(node);
}
}
内容来源于网络,如有侵权,请联系作者删除!