gpt4 book ai didi

xdi2.core.features.nodetypes.XdiEntity.getContextNode()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 19:46:40 25 4
gpt4 key购买 nike

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

XdiEntity.getContextNode介绍

暂无

代码示例

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

/**
 * Returns the underlying XDI entity to which this DDO is bound.
 * @return An XDI entity that represents the DDO.
 */
public ContextNode getContextNode() {
  return this.getXdiEntity().getContextNode();
}

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

/**
 * Returns the underlying context node to which this XDI link contract (template) is bound.
 * @return A context node that represents the XDI link contract (template).
 */
public ContextNode getContextNode() {
  return this.getXdiEntity().getContextNode();
}

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

/**
 * Returns the context node with XDI permissions.
 * @return A context node with XDI permissions.
 */
public ContextNode getPermissionsContextNode() {
  return this.getPermissionsXdiEntity().getContextNode();
}

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

/**
 * Returns the underlying context node to which this XDI policy is bound.
 * @return A context node that represents the XDI policy.
 */
public ContextNode getContextNode() {
  return this.getXdiEntity().getContextNode();
}

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

/**
 * Returns the underlying context node to which this XDI message (template) is bound.
 * @return A context node that represents the XDI message (template).
 */
public ContextNode getContextNode() {
  return this.getXdiSubGraph().getContextNode();
}

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

/**
 * Returns the context node with XDI operations.
 * @return A context node with XDI operations.
 */
public ContextNode getOperationsContextNode() {
  return this.getOperationsXdiEntity().getContextNode();
}

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

public static void setEntityIndexAggregation(XdiEntityCollection xdiEntityCollection, XdiEntity xdiEntity) {
  Aggregation.setAggregationContextNode(xdiEntityCollection.getContextNode(), xdiEntity.getContextNode());
}

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

public void addControl(XDIAddress control) {
  this.getXdiEntity().getContextNode().setRelation(XDI_ADD_CONTROL, control);
}

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

public void addControl(DID control) {
  this.getXdiEntity().getContextNode().setRelation(XDI_ADD_CONTROL, control.getXDIAddress());
}

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

public static void setVariableValue(XdiEntity variableValuesXdiEntity, XDIArc variableValueXDIArc, Object variableValue) {
  if (variableValuesXdiEntity == null) return;
  if (variableValue instanceof List<?>) {
    for (Object variableValueListValue : ((List<?>) variableValue)) {
      setVariableValue(variableValuesXdiEntity, variableValueXDIArc, variableValueListValue);
    }
    return;
  }
  if (variableValue instanceof XDIArc) {
    variableValue = XDIAddress.fromComponent((XDIArc) variableValue);
  }
  if (variableValue instanceof XDIAddress) {
    Equivalence.setIdentityContextNode(variableValuesXdiEntity.getContextNode().setContextNode(variableValueXDIArc), (XDIAddress) variableValue);
  } else {
    variableValuesXdiEntity.getContextNode().setContextNode(variableValueXDIArc).setLiteralNode(variableValue);
  }
}

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

/**
 * Factory method that creates an XDI message bound to a given XDI entity.
 * @param xdiEntity The XDI entity that is an XDI message.
 * @return The XDI message.
 */
public static Message fromXdiEntity(XdiEntity xdiEntity) {
  XdiEntityCollection xdiEntityCollection = XdiEntityCollection.fromContextNode(xdiEntity.getContextNode().getContextNode());
  MessageCollection messageCollection = xdiEntityCollection == null ? null : MessageCollection.fromXdiEntityCollection(xdiEntityCollection);
  if (messageCollection == null) return null;
  return fromMessageCollectionAndXdiEntity(messageCollection, xdiEntity);
}

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

public static Map<XDIArc, Object> getVariableValues(XdiEntity variableValuesXdiEntity) {
  if (variableValuesXdiEntity == null) return Collections.emptyMap();
  Map<XDIArc, Object> variableValues = new HashMap<XDIArc, Object> ();
  MappingContextNodeXdiVariableIterator xdiVariablesIterator = new MappingContextNodeXdiVariableIterator(variableValuesXdiEntity.getContextNode().getContextNodes());
  for (XdiVariable<?> xdiVariable : xdiVariablesIterator) {
    XDIArc variableValueXDIArc = xdiVariable.getXDIArc();
    ReadOnlyIterator<ContextNode> variableValueContextNodes = Equivalence.getIdentityContextNodes(xdiVariable.getContextNode());
    Object variableLiteralDataValue = xdiVariable.getContextNode().getLiteralData();
    if (variableValueContextNodes.hasNext() && variableLiteralDataValue != null) throw new Xdi2RuntimeException("Variable has both an XDI address and a literal data value.");
    if ((! variableValueContextNodes.hasNext()) && variableLiteralDataValue == null) throw new Xdi2RuntimeException("Variable has neither XDI address nor literal data value.");
    if (variableValueContextNodes.hasNext()) {
      List<XDIAddress> variableXDIAddressValues = new ArrayList<XDIAddress> ();
      variableValues.put(variableValueXDIArc, variableXDIAddressValues);
      for (ContextNode variableValueContextNode : variableValueContextNodes) {
        XDIAddress variableXDIAddressValue = variableValueContextNode.getXDIAddress();
        if (log.isDebugEnabled()) log.debug("Variable XDI address value: " + variableValueXDIArc + " --> " + variableXDIAddressValue);
        variableXDIAddressValues.add(variableXDIAddressValue);
      }
    }
    if (variableLiteralDataValue != null) {
      if (log.isDebugEnabled()) log.debug("Variable literal data value: " + variableValueXDIArc + " --> " + variableLiteralDataValue);
      variableValues.put(variableValueXDIArc, variableLiteralDataValue);
    }
  }
  return variableValues;
}

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

public List<XDIAddress> getControl() {
  return new IteratorListMaker<XDIAddress> (new MappingRelationTargetXDIAddressIterator(this.getXdiEntity().getContextNode().getRelations(XDI_ADD_CONTROL))).list();
}

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

new MappingCloudNameIterator(
    new MappingRelationTargetXDIAddressIterator(
        authorityXdiEntity.getContextNode().getRelations(XDIDictionaryConstants.XDI_ADD_IS_REF))));

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