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

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

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

Graph.getAllStatements介绍

[英]Gets all statements in this graph.
[中]获取此图中的所有语句。

代码示例

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

public static Model graphToModel(Graph graph) {

    return graphToModel(graph.getAllStatements());
  }
}

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

/**
 * Creates a new message push result and adds it to this XDI message (template).
 * @param messagePushResultGraph The message push result graph to add to this XDI message (template).
 * @return The newly created message push result represented as an XDI inner root.
 */
public XdiInnerRoot createMessageDeferredPushResult(Graph messagePushResultGraph) {
  if (messagePushResultGraph == null) throw new NullPointerException();
  Iterator<XDIStatement> statements = new MappingXDIStatementIterator(new SelectingNotImpliedStatementIterator(messagePushResultGraph.getAllStatements()));
  XdiInnerRoot xdiInnerRoot = this.getXdiSubGraph().getXdiInnerRoot(XDIMessagingConstants.XDI_ADD_DEFER_PUSH, true);
  while (statements.hasNext()) xdiInnerRoot.getContextNode().setStatement(statements.next());
  return xdiInnerRoot;
}

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

/**
 * Creates a new operation result and adds it to this XDI message (template).
 * @param operationXDIAddress The operation address to use for the new operation result.
 * @param resultGraph The result graph to add to this XDI message (template).
 * @return The newly created operation result represented as an XDI inner root.
 */
public XdiInnerRoot createOperationResult(XDIAddress operationXDIAddress, Graph resultGraph) {
  if (resultGraph == null) throw new NullPointerException();
  Iterator<XDIStatement> statements = new MappingXDIStatementIterator(new SelectingNotImpliedStatementIterator(resultGraph.getAllStatements()));
  XdiInnerRoot xdiInnerRoot = this.getXdiSubGraph().getXdiInnerRoot(operationXDIAddress, true);
  while (statements.hasNext()) xdiInnerRoot.getContextNode().setStatement(statements.next());
  return xdiInnerRoot;
}

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

/**
 * Creates a new $push operation and adds it to this XDI message (template).
 * @param targetGraph The target graph with statements to which this operation applies.
 * @return The newly created $push operation.
 */
public PushOperation createPushOperation(Graph targetGraph) {
  return this.createPushOperation(new MappingXDIStatementIterator(new SelectingNotImpliedStatementIterator(targetGraph.getAllStatements())));
}

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

/**
 * Creates a new $do operation and adds it to this XDI message (template).
 * @param targetGraph The target graph with statements to which this operation applies.
 * @return The newly created $do operation.
 */
public DoOperation createDoOperation(Graph targetGraph) {
  return this.createDoOperation(new MappingXDIStatementIterator(new SelectingNotImpliedStatementIterator(targetGraph.getAllStatements())));
}

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

/**
 * Creates a new operation and adds it to this XDI message (template).
 * @param operationXDIAddress The operation address to use for the new operation.
 * @param targetGraph The target graph with statements to which this operation applies.
 * @return The newly created, empty operation, or null if the operation address is not valid.
 */
public Operation createOperation(XDIAddress operationXDIAddress, Graph targetGraph) {
  return this.createOperation(operationXDIAddress, new MappingXDIStatementIterator(new SelectingNotImpliedStatementIterator(targetGraph.getAllStatements())));
}

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

/**
 * Creates a new $del operation and adds it to this XDI message (template).
 * @param targetGraph The target graph with statements to which this operation applies.
 * @return The newly created $del operation.
 */
public DelOperation createDelOperation(Graph targetGraph) {
  return this.createDelOperation(new MappingXDIStatementIterator(new SelectingNotImpliedStatementIterator(targetGraph.getAllStatements())));
}

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

/**
 * Creates a new $get operation and adds it to this XDI message (template).
 * @param targetGraph The target graph with statements to which this operation applies.
 * @return The newly created $get operation.
 */
public GetOperation createGetOperation(Graph targetGraph) {
  return this.createGetOperation(new MappingXDIStatementIterator(new SelectingNotImpliedStatementIterator(targetGraph.getAllStatements())));
}

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

/**
 * Creates a new $set operation and adds it to this XDI message (template).
 * @param targetGraph The target graph with statements to which this operation applies.
 * @return The newly created $set operation.
 */
public SetOperation createSetOperation(Graph targetGraph) {
  return this.createSetOperation(new MappingXDIStatementIterator(new SelectingNotImpliedStatementIterator(targetGraph.getAllStatements())));
}

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

/**
 * Creates a new $connect operation and adds it to this XDI message (template).
 * @param targetGraph The target graph with statements to which this operation applies.
 * @return The newly created $connect operation.
 */
public ConnectOperation createConnectOperation(Graph targetGraph) {
  return this.createConnectOperation(new MappingXDIStatementIterator(new SelectingNotImpliedStatementIterator(targetGraph.getAllStatements())));
}

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

/**
 * Creates a new $send operation and adds it to this XDI message (template).
 * @param targetGraph The target graph with statements to which this operation applies.
 * @return The newly created $send operation.
 */
public SendOperation createSendOperation(Graph targetGraph) {
  return this.createSendOperation(new MappingXDIStatementIterator(new SelectingNotImpliedStatementIterator(targetGraph.getAllStatements())));
}

相关文章