gpt4 book ai didi

xdi2.core.syntax.XDIStatement.getTargetXDIAddress()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-25 02:37:05 29 4
gpt4 key购买 nike

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

XDIStatement.getTargetXDIAddress介绍

暂无

代码示例

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

private static XDIAddress targetXDIAddressForTargetXDIStatement(XDIStatement targetXDIStatement) {
  if (targetXDIStatement.isContextNodeStatement()) {
    return targetXDIStatement.getTargetXDIAddress();
  } else {
    return targetXDIStatement.getContextNodeXDIAddress();
  }
}

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

private static XDIAddress targetXDIAddressForTargetXDIStatement(XDIStatement targetXDIStatement) {
  if (targetXDIStatement.isContextNodeStatement()) {
    return targetXDIStatement.getTargetXDIAddress();
  } else {
    return targetXDIStatement.getContextNodeXDIAddress();
  }
}

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

private static XDIAddress targetXDIAddressForTargetXDIStatement(XDIStatement targetXDIStatement) {
  if (targetXDIStatement.isContextNodeStatement()) {
    return targetXDIStatement.getTargetXDIAddress();
  } else {
    return targetXDIStatement.getContextNodeXDIAddress();
  }
}

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

public void executeSetOnContextNodeStatement(XDIStatement targetStatement, SetOperation operation, Graph operationResultGraph, ExecutionContext executionContext) throws Xdi2MessagingException {
  XDIAddress targetXDIAddress = XDIAddressUtil.concatXDIAddresses(targetStatement.getTargetXDIAddress());
  this.executeSetOnAddress(targetXDIAddress, operation, operationResultGraph, executionContext);
}

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

@Override
public XDIStatement targetStatement(XDIStatement targetStatement, Operation operation, Graph operationResultGraph, ExecutionContext executionContext) throws Xdi2MessagingException {
  XDIAddress contextNodeXDIAddress;
  if (targetStatement.isContextNodeStatement()) 
    contextNodeXDIAddress = targetStatement.getTargetXDIAddress();
  else
    contextNodeXDIAddress = targetStatement.getContextNodeXDIAddress();
  this.checkReadOnly(operation, contextNodeXDIAddress, executionContext);
  return targetStatement;
}

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

@Override
public void executeGetOnContextNodeStatement(XDIStatement contextNodeStatement, GetOperation operation, Graph operationResultGraph, ExecutionContext executionContext) throws Xdi2MessagingException {
  XDIAddress targetXDIAddress = contextNodeStatement.getTargetXDIAddress();
  ContextNode contextNode = this.getGraph().getDeepContextNode(targetXDIAddress, false);
  if (contextNode == null) return;
  CopyUtil.copyStatement(contextNode.getStatement(), operationResultGraph, null);
}

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

@Override
public void executeSetOnRelationStatement(XDIStatement relationStatement, SetOperation operation, Graph operationResultGraph, ExecutionContext executionContext) throws Xdi2MessagingException {
  XDIAddress contextNodeXDIAddress = relationStatement.getContextNodeXDIAddress();
  XDIAddress relationXDIaddress = relationStatement.getRelationXDIAddress();
  XDIAddress targetXDIAddress = relationStatement.getTargetXDIAddress();
  this.getGraph().setDeepContextNode(contextNodeXDIAddress).setRelation(relationXDIaddress, targetXDIAddress);
}

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

decideLinkContractPermission(XDILinkContractConstants.XDI_ADD_SET_REF, targetXDIStatement.getTargetXDIAddress(), linkContract, this.getLinkContractsGraph(executionContext))) {
  if (log.isDebugEnabled()) log.debug("Authorization succeeded, because of " + XDILinkContractConstants.XDI_ADD_SET_REF + " permission on target addresses " + targetXDIStatement.getContextNodeXDIAddress() + " and " + targetXDIStatement.getTargetXDIAddress());
} else if (decideLinkContractPermission(XDILinkContractConstants.XDI_ADD_SET_REF, targetXDIStatement, linkContract)) {
  if (log.isDebugEnabled()) log.debug("Authorization failed, because of missing " + XDILinkContractConstants.XDI_ADD_SET_REF + " permissions on either target addresses " + targetXDIStatement.getContextNodeXDIAddress() + " and " + targetXDIStatement.getTargetXDIAddress() + ", or target statement " + targetXDIStatement);

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

@Override
public ContributorResult executeDoOnRelationStatement(XDIAddress[] contributorAddresses, XDIAddress contributorsAddress, XDIStatement relativeTargetStatement, DoOperation operation, Graph operationResultGraph, ExecutionContext executionContext) throws Xdi2MessagingException {
  XDIAddress targetXDIAddress = relativeTargetStatement.getTargetXDIAddress();

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

! Arrays.asList(contributorMount.targetXDIAddresses()).contains(relativeTargetXDIStatement.getTargetXDIAddress())) {
if (log.isDebugEnabled()) log.debug("Skipping contributor (doesn't like target context node address " + relativeTargetXDIStatement.getTargetXDIAddress() + ") " + contributor.getClass().getSimpleName() + " with operation " + operation.getOperationXDIAddress() + " on contributor address " + contributorAddress + " and relative target statement " + relativeTargetXDIStatement + ".");
continue;
  ! Arrays.asList(contributorMount.targetXDIAddresses()).contains(relativeTargetXDIStatement.getTargetXDIAddress())) {
if (log.isDebugEnabled()) log.debug("Skipping contributor (doesn't like target context node address " + relativeTargetXDIStatement.getTargetXDIAddress() + ") " + contributor.getClass().getSimpleName() + " with operation " + operation.getOperationXDIAddress() + " on contributor address " + contributorAddress + " and relative target statement " + relativeTargetXDIStatement + ".");
continue;

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

@Override
public void executeGetOnRelationStatement(XDIStatement relationStatement, GetOperation operation, Graph operationResultGraph, ExecutionContext executionContext) throws Xdi2MessagingException {
  XDIAddress contextNodeXDIAddress = relationStatement.getContextNodeXDIAddress();
  XDIAddress relationXDIaddress = relationStatement.getRelationXDIAddress();
  XDIAddress targetXDIAddress = relationStatement.getTargetXDIAddress();
  ContextNode contextNode = this.getGraph().getDeepContextNode(contextNodeXDIAddress);
  if (contextNode == null) return;
  if (XDIConstants.XDI_ADD_COMMON_VARIABLE.equals(targetXDIAddress)) {
    Iterator<Relation> relations;
    if (XDIConstants.XDI_ADD_COMMON_VARIABLE.equals(relationXDIaddress)) {
      relations = contextNode.getRelations();
    } else {
      relations = contextNode.getRelations(relationXDIaddress);
    }
    while (relations.hasNext()) CopyUtil.copyStatement(relations.next().getStatement(), operationResultGraph, null);
  } else {
    Relation relation = contextNode.getRelation(relationXDIaddress, targetXDIAddress);
    if (relation == null) return;
    CopyUtil.copyStatement(relation.getStatement(), operationResultGraph, null);
  }
}

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

@Override
public Statement setStatement(XDIStatement statement) {
  // set the statement
  if (statement.isContextNodeStatement()) {
    ContextNode contextNode = (ContextNode) this.setDeepNode(statement.getTargetXDIAddress());
    return contextNode.getStatement();
  } else if (statement.isRelationStatement()) {
    ContextNode contextNode = (ContextNode) this.setDeepNode(statement.getContextNodeXDIAddress());
    Relation relation = contextNode.setRelation(statement.getRelationXDIAddress(), statement.getTargetXDIAddress());
    return relation.getStatement();
  } else if (statement.isLiteralStatement()) {
    ContextNode contextNode = (ContextNode) this.setDeepNode(statement.getContextNodeXDIAddress());
    LiteralNode literalNode = contextNode.setLiteralNode(statement.getLiteralData());
    return literalNode.getStatement();
  } else {
    throw new Xdi2GraphException("Invalid statement: " + statement);
  }
}

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

@Override
public void executeDelOnRelationStatement(XDIStatement relationStatement, DelOperation operation, Graph operationResultGraph, ExecutionContext executionContext) throws Xdi2MessagingException {
  XDIAddress contextNodeXDIAddress = relationStatement.getContextNodeXDIAddress();
  XDIAddress relationXDIaddress = relationStatement.getRelationXDIAddress();
  XDIAddress targetXDIAddress = relationStatement.getTargetXDIAddress();
  ContextNode contextNode = this.getGraph().getDeepContextNode(contextNodeXDIAddress, false);
  if (contextNode == null) return;
  if (XDIConstants.XDI_ADD_COMMON_VARIABLE.equals(targetXDIAddress)) {
    if (XDIConstants.XDI_ADD_COMMON_VARIABLE.equals(relationXDIaddress)) {
      contextNode.delRelations();
    } else {
      contextNode.delRelations(relationXDIaddress);
    }
  } else {
    contextNode.delRelation(relationXDIaddress, targetXDIAddress);
  }
}

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

XDIAddress targetXDIAddress = XDIstatement.getTargetXDIAddress();

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

XDIAddress objectXDIAddress = XDIstatement.getTargetXDIAddress();

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

@Override
public Statement getStatement(XDIStatement statement) {
  ContextNode baseContextNode = this.getDeepContextNode(statement.getSubject(), false);
  if (baseContextNode == null) return null;
  if (statement.isContextNodeStatement()) {
    ContextNode contextNode = baseContextNode.getContextNode(statement.getContextNodeXDIArc(), false);
    return contextNode == null ? null : contextNode.getStatement();
  } else if (statement.isRelationStatement()) {
    Relation relation = baseContextNode.getRelation(statement.getRelationXDIAddress(), statement.getTargetXDIAddress());
    return relation == null ? null : relation.getStatement();
  } else if (statement.isLiteralStatement()) {
    LiteralNode literalNode = baseContextNode.getLiteralNode(statement.getLiteralData());
    return literalNode == null ? null : literalNode.getStatement();
  }
  return null;
}

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

if (XDIDictionaryConstants.XDI_ADD_IS_REP.equals(targetStatement.getRelationXDIAddress())) doFollowTargetObject = false;
if (! targetStatement.isRelationStatement()) doFollowTargetObject = false;
if (targetStatement.isRelationStatement() && XDIConstants.XDI_ADD_COMMON_VARIABLE.equals(targetStatement.getTargetXDIAddress())) doFollowTargetObject = false;

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

assertNull(statement.getTargetXDIAddress());
assertEquals(statement.getLiteralData(), "xxx");

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com