- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中xdi2.core.features.nodetypes.XdiEntity.getXdiEntitySingleton()
方法的一些代码示例,展示了XdiEntity.getXdiEntitySingleton()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XdiEntity.getXdiEntitySingleton()
方法的具体详情如下:
包路径:xdi2.core.features.nodetypes.XdiEntity
类名称:XdiEntity
方法名:getXdiEntitySingleton
暂无
代码示例来源:origin: projectdanube/xdi2
/**
* Returns the XDI entity with XDI operations.
* @return A XDI entity with XDI operations.
*/
public XdiEntity getOperationsXdiEntity() {
return this.getXdiSubGraph().getXdiEntitySingleton(XDIMessagingConstants.XDI_ARC_DO, true);
}
代码示例来源:origin: projectdanube/xdi2
/**
* Returns the XDI entity with XDI permissions.
* @return A XDI entity with XDI permissions.
*/
public XdiEntity getPermissionsXdiEntity() {
return this.getXdiEntity().getXdiEntitySingleton(XDILinkContractConstants.XDI_ARC_DO, true);
}
代码示例来源:origin: projectdanube/xdi2
/**
* Returns an existing XDI defer policy root in this XDI link contract (template), or creates a new one.
* @param create Whether to create an XDI defer policy root if it does not exist.
* @return The existing or newly created XDI defer policy root.
*/
public PolicyRoot getDeferPolicyRoot(boolean create) {
XdiEntitySingleton xdiEntitySingleton = this.getXdiEntity().getXdiEntitySingleton(XDIPolicyConstants.XDI_ADD_DEFER, create);
if (xdiEntitySingleton == null) return null;
xdiEntitySingleton = xdiEntitySingleton.getXdiEntitySingleton(XDIPolicyConstants.XDI_ARC_IF, create);
if (xdiEntitySingleton == null) return null;
return PolicyRoot.fromXdiEntity(xdiEntitySingleton);
}
代码示例来源:origin: projectdanube/xdi2
/**
* Returns an existing XDI root policy in this XDI message (template), or creates a new one.
* @param create Whether to create an XDI root policy if it does not exist.
* @return The existing or newly created XDI root policy.
*/
public PolicyRoot getPolicyRoot(boolean create) {
XdiEntitySingleton xdiEntitySingleton = this.getXdiSubGraph().getXdiEntitySingleton(XDIPolicyConstants.XDI_ADD_DO, create);
if (xdiEntitySingleton == null) return null;
xdiEntitySingleton = xdiEntitySingleton.getXdiEntitySingleton(XDIPolicyConstants.XDI_ARC_IF, create);
if (xdiEntitySingleton == null) return null;
return PolicyRoot.fromXdiEntity(xdiEntitySingleton);
}
代码示例来源:origin: projectdanube/xdi2
/**
* Returns an existing XDI defer push policy root in this XDI link contract (template), or creates a new one.
* @param create Whether to create an XDI defer push policy root if it does not exist.
* @return The existing or newly created XDI defer push policy root.
*/
public PolicyRoot getDeferPushPolicyRoot(boolean create) {
XdiEntitySingleton xdiEntitySingleton = this.getXdiEntity().getXdiEntitySingleton(XDIPolicyConstants.XDI_ADD_DEFER_PUSH, create);
if (xdiEntitySingleton == null) return null;
xdiEntitySingleton = xdiEntitySingleton.getXdiEntitySingleton(XDIPolicyConstants.XDI_ARC_IF, create);
if (xdiEntitySingleton == null) return null;
return PolicyRoot.fromXdiEntity(xdiEntitySingleton);
}
代码示例来源:origin: projectdanube/xdi2
/**
* Returns an existing XDI policy root in this XDI link contract (template), or creates a new one.
* @param create Whether to create an XDI policy root if it does not exist.
* @return The existing or newly created XDI policy root.
*/
public PolicyRoot getPolicyRoot(boolean create) {
XdiEntitySingleton xdiEntitySingleton = this.getXdiEntity().getXdiEntitySingleton(XDIPolicyConstants.XDI_ADD_DO, create);
if (xdiEntitySingleton == null) return null;
xdiEntitySingleton = xdiEntitySingleton.getXdiEntitySingleton(XDIPolicyConstants.XDI_ARC_IF, create);
if (xdiEntitySingleton == null) return null;
return PolicyRoot.fromXdiEntity(xdiEntitySingleton);
}
代码示例来源:origin: projectdanube/xdi2
/**
* Returns an existing XDI delete policy root in this XDI link contract (template), or creates a new one.
* @param create Whether to create an XDI delete policy root if it does not exist.
* @return The existing or newly created XDI delete policy root.
*/
public PolicyRoot getDeletePolicyRoot(boolean create) {
XdiEntitySingleton xdiEntitySingleton = this.getXdiEntity().getXdiEntitySingleton(XDIPolicyConstants.XDI_ADD_DEL, create);
if (xdiEntitySingleton == null) return null;
xdiEntitySingleton = xdiEntitySingleton.getXdiEntitySingleton(XDIPolicyConstants.XDI_ARC_IF, create);
if (xdiEntitySingleton == null) return null;
return PolicyRoot.fromXdiEntity(xdiEntitySingleton);
}
代码示例来源:origin: projectdanube/xdi2
public void setVariableValue(XDIArc variableValueXDIArc, Object variableValue) {
XdiEntitySingleton variableValuesXdiEntity = this.getMessageBase().getOperationsXdiEntity().getXdiEntitySingleton(this.getOperationXDIAddress(), true);
XdiAbstractVariable.setVariableValue(variableValuesXdiEntity, variableValueXDIArc, variableValue);
}
代码示例来源:origin: projectdanube/xdi2
public Map<XDIArc, Object> getVariableValues() {
XdiEntitySingleton variableValuesXdiEntity = this.getMessageBase().getOperationsXdiEntity().getXdiEntitySingleton(this.getOperationXDIAddress(), true);
return XdiAbstractVariable.getVariableValues(variableValuesXdiEntity);
}
代码示例来源:origin: projectdanube/xdi2
/**
* Sets a parameter value of this operation.
* @param parameterXDIAddress The parameter identifier.
* @param parameterValue The parameter value.
*/
public void setParameter(XDIAddress parameterXDIAddress, Object parameterValue) {
XdiEntitySingleton parameterXdiEntity = this.getMessageBase().getOperationsXdiEntity().getXdiEntitySingleton(this.getOperationXDIAddress(), true);
XdiAttributeSingleton parameterXdiAttribute = parameterXdiEntity.getXdiAttributeSingleton(parameterXDIAddress, true);
parameterXdiAttribute.setLiteralData(parameterValue);
}
代码示例来源:origin: projectdanube/xdi2
private LiteralNode getParameterLiteralNode(XDIAddress parameterXDIAddress) {
XdiEntitySingleton parameterXdiEntity = this.getMessageBase().getOperationsXdiEntity().getXdiEntitySingleton(this.getOperationXDIAddress(), false);
if (parameterXdiEntity == null) return null;
XdiAttributeSingleton parameterXdiAttribute = parameterXdiEntity.getXdiAttributeSingleton(parameterXDIAddress, false);
if (parameterXdiAttribute == null) return null;
LiteralNode parameterLiteral = parameterXdiAttribute.getLiteralNode();
if (parameterLiteral == null) return null;
return parameterLiteral;
}
代码示例来源:origin: projectdanube/xdi2
/**
* Checks if an XDI entity is a valid XDI message.
* @param xdiEntity The XDI entity to check.
* @return True if the XDI entity is a valid XDI message.
*/
public static boolean isValid(XdiEntity xdiEntity) {
if (xdiEntity instanceof XdiEntitySingleton) {
if (! xdiEntity.getXDIArc().equals(XDIMessagingConstants.XDI_ADD_MSG)) return false;
} else if (xdiEntity instanceof XdiEntityInstance) {
XdiEntityCollection xdiCollection = ((XdiEntityInstance) xdiEntity).getXdiCollection();
if (! xdiCollection.getXDIArc().equals(XDIMessagingConstants.XDI_ADD_EC_MSG)) return false;
} else {
return false;
}
if (xdiEntity.getXdiEntitySingleton(XDIMessagingConstants.XDI_ARC_DO, false) == null) return false;
return true;
}
代码示例来源:origin: projectdanube/xdi2
/**
* Returns the XDI policies underneath this XDI policy.
*/
public ReadOnlyIterator<Policy> getPolicies() {
List<Iterator<? extends Policy>> iterators = new ArrayList<Iterator<? extends Policy>> ();
// add policies that are XDI entity singletons
XdiEntitySingleton policyAndEntitySingleton = this.getXdiEntity().getXdiEntitySingleton(XdiEntitySingleton.createXDIArc(XDIPolicyConstants.XDI_ARC_AND), false);
XdiEntitySingleton policyOrEntitySingleton = this.getXdiEntity().getXdiEntitySingleton(XdiEntitySingleton.createXDIArc(XDIPolicyConstants.XDI_ARC_OR), false);
XdiEntitySingleton policyNotEntitySingleton = this.getXdiEntity().getXdiEntitySingleton(XdiEntitySingleton.createXDIArc(XDIPolicyConstants.XDI_ARC_NOT), false);
if (policyAndEntitySingleton != null) iterators.add(new SingleItemIterator<Policy> (PolicyAnd.fromXdiEntity(policyAndEntitySingleton)));
if (policyOrEntitySingleton != null) iterators.add(new SingleItemIterator<Policy> (PolicyOr.fromXdiEntity(policyOrEntitySingleton)));
if (policyNotEntitySingleton != null) iterators.add(new SingleItemIterator<Policy> (PolicyNot.fromXdiEntity(policyNotEntitySingleton)));
// add policies that are XDI entity instances
XdiEntityCollection policyAndEntityCollection = this.getXdiEntity().getXdiEntityCollection(XdiEntityCollection.createXDIArc(XDIPolicyConstants.XDI_ARC_AND), false);
XdiEntityCollection policyOrEntityCollection = this.getXdiEntity().getXdiEntityCollection(XdiEntityCollection.createXDIArc(XDIPolicyConstants.XDI_ARC_OR), false);
XdiEntityCollection policyNotEntityCollection = this.getXdiEntity().getXdiEntityCollection(XdiEntityCollection.createXDIArc(XDIPolicyConstants.XDI_ARC_NOT), false);
if (policyAndEntityCollection != null) iterators.add(new MappingXdiEntityPolicyAndIterator(policyAndEntityCollection.getXdiInstancesDeref()));
if (policyOrEntityCollection != null) iterators.add(new MappingXdiEntityPolicyOrIterator(policyOrEntityCollection.getXdiInstancesDeref()));
if (policyNotEntityCollection != null) iterators.add(new MappingXdiEntityPolicyNotIterator(policyNotEntityCollection.getXdiInstancesDeref()));
return new CompositeIterator<Policy> (iterators.iterator());
}
代码示例来源:origin: projectdanube/xdi2
/**
* Creates an XDI $or policy.
*/
public PolicyOr createOrPolicy(boolean singleton) {
XdiEntity policyOrXdiEntity;
if (singleton)
policyOrXdiEntity = this.getXdiEntity().getXdiEntitySingleton(XdiEntitySingleton.createXDIArc(XDIPolicyConstants.XDI_ARC_OR), true);
else
policyOrXdiEntity = this.getXdiEntity().getXdiEntityCollection(XdiEntityCollection.createXDIArc(XDIPolicyConstants.XDI_ARC_OR), true).setXdiInstanceUnordered(true, false);
return PolicyOr.fromXdiEntity(policyOrXdiEntity);
}
代码示例来源:origin: projectdanube/xdi2
/**
* Creates an XDI $and policy.
*/
public PolicyAnd createAndPolicy(boolean singleton) {
XdiEntity policyAndXdiEntity;
if (singleton)
policyAndXdiEntity = this.getXdiEntity().getXdiEntitySingleton(XdiEntitySingleton.createXDIArc(XDIPolicyConstants.XDI_ARC_AND), true);
else
policyAndXdiEntity = this.getXdiEntity().getXdiEntityCollection(XdiEntityCollection.createXDIArc(XDIPolicyConstants.XDI_ARC_AND), true).setXdiInstanceUnordered(true, false);
return PolicyAnd.fromXdiEntity(policyAndXdiEntity);
}
代码示例来源:origin: projectdanube/xdi2
/**
* Creates an XDI $not policy.
*/
public PolicyNot createNotPolicy(boolean singleton) {
XdiEntity policyNotXdiEntity;
if (singleton)
policyNotXdiEntity = this.getXdiEntity().getXdiEntitySingleton(XdiEntitySingleton.createXDIArc(XDIPolicyConstants.XDI_ARC_NOT), true);
else
policyNotXdiEntity = this.getXdiEntity().getXdiEntityCollection(XdiEntityCollection.createXDIArc(XDIPolicyConstants.XDI_ARC_NOT), true).setXdiInstanceUnordered(true, false);
return PolicyNot.fromXdiEntity(policyNotXdiEntity);
}
本文整理了Java中xdi2.core.features.nodetypes.XdiEntity.getXdiEntitySingleton()方法的一些代码示例,展示了XdiEntity.getXd
我是一名优秀的程序员,十分优秀!