xdi2.core.Graph.getDeepNode()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(353)

本文整理了Java中xdi2.core.Graph.getDeepNode()方法的一些代码示例,展示了Graph.getDeepNode()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graph.getDeepNode()方法的具体详情如下:
包路径:xdi2.core.Graph
类名称:Graph
方法名:getDeepNode

Graph.getDeepNode介绍

暂无

代码示例

代码示例来源:origin: projectdanube/xdi2

@Override
public void executeGetOnAddress(XDIAddress targetXDIAddress, GetOperation operation, Graph operationResultGraph, ExecutionContext executionContext) throws Xdi2MessagingException {
  Node node = this.getGraph().getDeepNode(targetXDIAddress, true);
  if (node == null) return;
  if (node instanceof ContextNode) {
    CopyUtil.copyContextNode((ContextNode) node, operationResultGraph, null);
  } else if (node instanceof LiteralNode) {
    CopyUtil.copyLiteralNode((LiteralNode) node, operationResultGraph, null);
  }
}

代码示例来源:origin: projectdanube/xdi2

@Override
public Node follow() {
  XDIAddress targetXDIAddress = this.getTargetXDIAddress();
  ContextNode targetContextNode = (ContextNode) this.getGraph().getDeepNode(targetXDIAddress.getContextNodeXDIAddress(), false);
  if (targetContextNode == null) {
    if (log.isWarnEnabled()) log.warn("Relation points to non-existent target node " + targetXDIAddress);
    return null;
  }
  if (targetXDIAddress.isLiteralNodeXDIAddress()) {
    return targetContextNode.getLiteralNode();
  } else {
    return targetContextNode;
  }
}

代码示例来源:origin: projectdanube/xdi2

/**
 * Factory method that finds or creates an XDI link contract template for a graph.
 * @return The XDI link contract template.
 */
public static LinkContractTemplate findLinkContractTemplate(Graph graph, XDIAddress templateAuthorityAndId, boolean create) {
  XDIAddress linkContractTemplateXDIAddress = createLinkContractTemplateXDIAddress(templateAuthorityAndId);
  ContextNode linkContractTemplateContextNode = create ? (ContextNode) graph.setDeepNode(linkContractTemplateXDIAddress) : (ContextNode) graph.getDeepNode(linkContractTemplateXDIAddress, true);
  if (linkContractTemplateContextNode == null) return null;
  return new LinkContractTemplate(XdiEntitySingleton.Variable.fromContextNode(linkContractTemplateContextNode));
}

代码示例来源:origin: projectdanube/xdi2

/**
 * When a relation is deleted, its inner root has to be deleted too.
 */
protected void delRelationDelInnerRoot(XDIAddress XDIaddress, XDIAddress targetXDIAddress) {
  XdiContext<?> xdiContext = XdiAbstractContext.fromContextNode(this);
  XdiInnerRoot xdiInnerRoot = xdiContext.getXdiInnerRoot(XDIaddress, false);
  if (xdiInnerRoot == null) return;
  if (xdiInnerRoot.getXDIAddress().equals(targetXDIAddress)) {
    this.getGraph().getDeepNode(targetXDIAddress, false).delete();
  }
}

代码示例来源:origin: projectdanube/xdi2

Node tempNode = tempResultGraph.getDeepNode(tempNodeXDIAddress, true);

代码示例来源:origin: projectdanube/xdi2

Node tempNode = tempResultGraph.getDeepNode(tempNodeXDIAddress, true);

代码示例来源:origin: projectdanube/xdi2

Node referenceNode = referenceGraph.getDeepNode(target);
CopyUtil.copyNode(referenceNode, tempGraph, null);

相关文章