当前位置: 首页>>代码示例>>Java>>正文


Java ActionConf.setParamWritable方法代码示例

本文整理汇总了Java中nl.vu.cs.ajira.actions.ActionConf.setParamWritable方法的典型用法代码示例。如果您正苦于以下问题:Java ActionConf.setParamWritable方法的具体用法?Java ActionConf.setParamWritable怎么用?Java ActionConf.setParamWritable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在nl.vu.cs.ajira.actions.ActionConf的用法示例。


在下文中一共展示了ActionConf.setParamWritable方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: applyTo

import nl.vu.cs.ajira.actions.ActionConf; //导入方法依赖的package包/类
public static final void applyTo(RDFTerm v1, RDFTerm v2, RDFTerm v3,
		ActionSequence actions) throws ActionNotConfiguredException {
	ActionConf c = ActionFactory.getActionConf(QueryInputLayer.class);
	c.setParamString(QueryInputLayer.S_INPUTLAYER,
			DummyLayer.class.getName());
	c.setParamWritable(
			QueryInputLayer.W_QUERY,
			new nl.vu.cs.ajira.actions.support.Query(TupleFactory.newTuple(
					v1, v2, v3, new TInt(0))));
	actions.add(c);

	c = ActionFactory.getActionConf(QSQBCAlgo.class);
	actions.add(c);

	actions.add(ActionFactory.getActionConf(QSQRemoveLastTerm.class));
	
	c = ActionFactory.getActionConf(CollectToNode.class);
	c.setParamStringArray(CollectToNode.SA_TUPLE_FIELDS,
			RDFTerm.class.getName(), RDFTerm.class.getName(),
			RDFTerm.class.getName());
	actions.add(c);
}
 
开发者ID:jrbn,项目名称:querypie,代码行数:23,代码来源:QSQBCAlgo.java

示例2: getResultsQuery

import nl.vu.cs.ajira.actions.ActionConf; //导入方法依赖的package包/类
public static ActionSequence getResultsQuery(ActionSequence chain,
		Tuple tuple, boolean converge) throws ActionNotConfiguredException {
	// Get the pattern

	Query q = new Query(tuple);
	ActionConf c = ActionFactory.getActionConf(QueryInputLayer.class);
	c.setParamWritable(QueryInputLayer.W_QUERY, q);
	c.setParamString(QueryInputLayer.S_INPUTLAYER,
			QueryInputLayer.DEFAULT_LAYER);
	chain.add(c);

	if (converge) {
		c = ActionFactory.getActionConf(CollectToNode.class);
		c.setParamStringArray(CollectToNode.SA_TUPLE_FIELDS,
				RDFTerm.class.getName(), RDFTerm.class.getName(),
				RDFTerm.class.getName());
		c.setParamBoolean(CollectToNode.B_SORT, true);
		chain.add(c);
		chain.add(ActionFactory.getActionConf(RemoveDuplicates.class));
	}

	return chain;
}
 
开发者ID:jrbn,项目名称:querypie,代码行数:24,代码来源:ReasoningUtils.java

示例3: generateSequence

import nl.vu.cs.ajira.actions.ActionConf; //导入方法依赖的package包/类
private static final ActionSequence generateSequence() throws Exception {
  ActionSequence seq = new ActionSequence();
  RandomInputAction.addToChain(10, seq);
  EmptyActionBefore.addToChain(seq);

  ActionSequence seq2 = new ActionSequence();
  RandomInputAction.addToChain(20, seq2);
  EmptyActionBefore.addToChain(seq2);

  ActionConf a = ActionFactory.getActionConf(Branch.class);
  a.setParamWritable(Branch.W_BRANCH, seq2);
  seq.add(a);

  a = ActionFactory.getActionConf(CollectToNode.class);
  a.setParamStringArray(CollectToNode.SA_TUPLE_FIELDS, TInt.class.getName());
  seq.add(a);

  EmptyActionAfter.addToChain(seq);
  return seq;
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:21,代码来源:CollectToNodeTest.java

示例4: process

import nl.vu.cs.ajira.actions.ActionConf; //导入方法依赖的package包/类
@Override
public void process(Tuple tuple, ActionContext context, ActionOutput actionOutput) throws Exception {
	if (first) {
		first = false;
		for (int i = 1; i < tasks; ++i) {
			ActionConf c = ActionFactory.getActionConf(QueryInputLayer.class);
			c.setParamString(QueryInputLayer.S_INPUTLAYER, "DEFAULT");

			Tuple t = query.getTuple();
			SimpleData[] newTuple = new SimpleData[5];
			newTuple[0] = t.get(0);
			newTuple[1] = t.get(1);
			newTuple[2] = t.get(2);
			newTuple[3] = new TInt(i);
			newTuple[4] = new TInt(tasks);
			t.set(newTuple);

			c.setParamWritable(QueryInputLayer.W_QUERY, query);
			c.setParamStringArray(QueryInputLayer.SA_SIGNATURE_QUERY, t.getSignature());
			actionOutput.branch(new ActionSequence(c));
		}
	}
	actionOutput.output(tuple);
}
 
开发者ID:jrbn,项目名称:dynamite,代码行数:25,代码来源:ReadFromBtree.java

示例5: applyTo

import nl.vu.cs.ajira.actions.ActionConf; //导入方法依赖的package包/类
public static void applyTo(RDFTerm v1, RDFTerm v2, RDFTerm v3,
		boolean explicit, int typeRules, long iteration,
		ActionSequence actions) throws ActionNotConfiguredException {

	ActionConf c = ActionFactory.getActionConf(QueryInputLayer.class);
	c.setParamString(QueryInputLayer.S_INPUTLAYER,
			DummyLayer.class.getName());
	c.setParamWritable(
			QueryInputLayer.W_QUERY,
			new nl.vu.cs.ajira.actions.support.Query(TupleFactory.newTuple(
					v1, v2, v3, new TInt(0))));
	actions.add(c);

	c = ActionFactory.getActionConf(ExpandQuery.class);
	c.setParamBoolean(ExpandQuery.B_EXPLICIT, explicit);
	c.setParamInt(ExpandQuery.I_TYPE_RULES, typeRules);
	actions.add(c);

	c = ActionFactory.getActionConf(CollectToNode.class);
	c.setParamStringArray(CollectToNode.SA_TUPLE_FIELDS,
			RDFTerm.class.getName(), RDFTerm.class.getName(),
			RDFTerm.class.getName(), TBoolean.class.getName());
	c.setParamBoolean(CollectToNode.B_SORT, true);
	actions.add(c);

	actions.add(ActionFactory.getActionConf(RemoveDuplicates.class));

	c = ActionFactory.getActionConf(OptimalBCAlgo.class);
	c.setParamLong(OptimalBCAlgo.L_FIELD1, v1.getValue());
	c.setParamLong(OptimalBCAlgo.L_FIELD2, v2.getValue());
	c.setParamLong(OptimalBCAlgo.L_FIELD3, v3.getValue());
	c.setParamBoolean(OptimalBCAlgo.B_EXPLICIT, explicit);
	c.setParamLong(OptimalBCAlgo.L_ITERATION, iteration);
	actions.add(c);
}
 
开发者ID:jrbn,项目名称:querypie,代码行数:36,代码来源:OptimalBCAlgo.java

示例6: reloadRulesOnOtherNodes

import nl.vu.cs.ajira.actions.ActionConf; //导入方法依赖的package包/类
private void reloadRulesOnOtherNodes(ActionOutput output, String newList)
		throws Exception {

	if (log.isDebugEnabled()) {
		log.debug("reloadRulesOnOtherNodes");
	}
	ActionSequence sequence = new ActionSequence();

	ActionConf c = ActionFactory.getActionConf(QueryInputLayer.class);
	c.setParamString(QueryInputLayer.S_INPUTLAYER,
			RDFStorage.class.getName());
	c.setParamWritable(
			QueryInputLayer.W_QUERY,
			new nl.vu.cs.ajira.actions.support.Query(TupleFactory.newTuple(
					new RDFTerm(Schema.CLOSURE_BROADCASTFLAG), new RDFTerm(
							0), new RDFTerm(0), new TInt(0))));
	sequence.add(c);

	// Action which reloads the rules and sends nothing
	c = ActionFactory.getActionConf(ReloadRules.class);
	c.setParamString(ReloadRules.S_FILE, newList);
	sequence.add(c);

	// CollectToNode
	c = ActionFactory.getActionConf(CollectToNode.class);
	c.setParamStringArray(CollectToNode.SA_TUPLE_FIELDS,
			TLong.class.getName());
	sequence.add(c);

	// Action that increase the lock in the stopProcess
	sequence.add(ActionFactory.getActionConf(IncreaseLock.class));

	output.branch(sequence);
}
 
开发者ID:jrbn,项目名称:querypie,代码行数:35,代码来源:CalculateClosure.java

示例7: applyTo

import nl.vu.cs.ajira.actions.ActionConf; //导入方法依赖的package包/类
public static void applyTo(RDFTerm v1, RDFTerm v2, RDFTerm v3,
		boolean explicit, ActionSequence actions)
				throws ActionNotConfiguredException {

	ActionConf c = ActionFactory.getActionConf(QueryInputLayer.class);
	c.setParamString(QueryInputLayer.S_INPUTLAYER,
			DummyLayer.class.getName());
	c.setParamWritable(
			QueryInputLayer.W_QUERY,
			new nl.vu.cs.ajira.actions.support.Query(TupleFactory.newTuple(
					v1, v2, v3, new TInt(0))));
	actions.add(c);

	c = ActionFactory.getActionConf(ExpandQuery.class);
	c.setParamBoolean(ExpandQuery.B_EXPLICIT, explicit);
	c.setParamBoolean(ExpandQuery.B_FORCERESTART, true);
	actions.add(c);

	c = ActionFactory.getActionConf(CollectToNode.class);
	c.setParamStringArray(CollectToNode.SA_TUPLE_FIELDS,
			RDFTerm.class.getName(), RDFTerm.class.getName(),
			RDFTerm.class.getName(), TBoolean.class.getName());
	actions.add(c);

	// AddIntermediateTriples.applyTo(v1.getValue(), v2.getValue(),
	// v3.getValue(), actions);

	c = ActionFactory.getActionConf(RuleBCAlgo.class);
	c.setParamLong(L_FIELD1, v1.getValue());
	c.setParamLong(L_FIELD2, v2.getValue());
	c.setParamLong(L_FIELD3, v3.getValue());
	c.setParamBoolean(B_EXPLICIT, explicit);
	actions.add(c);
}
 
开发者ID:jrbn,项目名称:querypie,代码行数:35,代码来源:RuleBCAlgo.java

示例8: applyTo

import nl.vu.cs.ajira.actions.ActionConf; //导入方法依赖的package包/类
public static final void applyTo(RDFTerm v1, RDFTerm v2, RDFTerm v3,
		int posSet, long nameSet, ActionSequence actions)
				throws ActionNotConfiguredException {

	// Get the query
	ActionConf c = ActionFactory.getActionConf(QueryInputLayer.class);
	c.setParamString(QueryInputLayer.S_INPUTLAYER,
			DummyLayer.class.getName());
	c.setParamWritable(
			QueryInputLayer.W_QUERY,
			new nl.vu.cs.ajira.actions.support.Query(TupleFactory.newTuple(
					v1, v2, v3, new TInt(0))));
	actions.add(c);

	// Expand it in incremental fashion
	c = ActionFactory.getActionConf(ExpandQuery.class);
	c.setParamBoolean(ExpandQuery.B_EXPLICIT, true);
	c.setParamInt(ExpandQuery.I_TYPE_RULES, TreeExpander.ONLY_FIRST_SECOND);
	c.setParamBoolean(ExpandQuery.B_ALLOWRECURSION, false);
	actions.add(c);

	// Collect to node
	c = ActionFactory.getActionConf(CollectToNode.class);
	c.setParamStringArray(CollectToNode.SA_TUPLE_FIELDS,
			RDFTerm.class.getName(), RDFTerm.class.getName(),
			RDFTerm.class.getName(), TBoolean.class.getName());
	actions.add(c);

	// Check whether we should repeat the process
	c = ActionFactory.getActionConf(IncrRuleBCAlgo.class);
	c.setParamLong(L_NAMESET, nameSet);
	c.setParamInt(I_POSSET, posSet);
	c.setParamLong(L_FIELD1, v1.getValue());
	c.setParamLong(L_FIELD2, v2.getValue());
	c.setParamLong(L_FIELD3, v3.getValue());
	actions.add(c);
}
 
开发者ID:jrbn,项目名称:querypie,代码行数:38,代码来源:IncrRuleBCAlgo.java

示例9: addBranchIfNeeded

import nl.vu.cs.ajira.actions.ActionConf; //导入方法依赖的package包/类
private static void addBranchIfNeeded(ActionSequence sequence, OperatorInfo info, ExecutionPath path) throws Exception {
  if (path.hasBranchPath(info)) {
    ExecutionPath branchPath = path.getBranchPath(info);
    ActionSequence branchSequence = generateSequenceFrom(branchPath);
    ActionConf actionConf = ActionFactory.getActionConf(Branch.class);
    actionConf.setParamWritable(Branch.W_BRANCH, branchSequence);
    sequence.add(actionConf);
  }
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:10,代码来源:JobGenerator.java

示例10: addSplit

import nl.vu.cs.ajira.actions.ActionConf; //导入方法依赖的package包/类
private static void addSplit(ActionSequence sequence, OperatorInfo info, ExecutionPath path) throws Exception {
  SplitExecutionPath splitPath = path.getSplitPath(info);
  ActionSequence splitSequence = generateSequenceFrom(splitPath);
  ActionConf actionConf = ActionFactory.getActionConf(Split.class);
  actionConf.setParamWritable(Split.W_SPLIT, splitSequence);
  actionConf.setParamInt(Split.I_RECONNECT_AFTER_ACTIONS, splitPath.getReconnectAfter());
  sequence.add(actionConf);
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:9,代码来源:JobGenerator.java

示例11: readEverythingFromBTree

import nl.vu.cs.ajira.actions.ActionConf; //导入方法依赖的package包/类
public static void readEverythingFromBTree(ActionSequence actions)
		throws ActionNotConfiguredException {
	ActionConf c = ActionFactory.getActionConf(ReadFromBtree.class);
	c.setParamInt(ReadFromBtree.I_PARALLEL_TASKS,
			nl.vu.cs.dynamite.reasoner.support.Consts.READ_NUM_THREADS);
	c.setParamWritable(ReadFromBtree.W_TUPLE, new Query(new TLong(-1),
			new TLong(-1), new TLong(-1)));
	actions.add(c);
}
 
开发者ID:jrbn,项目名称:dynamite,代码行数:10,代码来源:ActionsHelper.java

示例12: readFakeTuple

import nl.vu.cs.ajira.actions.ActionConf; //导入方法依赖的package包/类
public static void readFakeTuple(ActionSequence actions)
		throws ActionNotConfiguredException {
	ActionConf a = ActionFactory.getActionConf(QueryInputLayer.class);
	a.setParamString(QueryInputLayer.S_INPUTLAYER,
			DummyLayer.class.getName());
	a.setParamWritable(QueryInputLayer.W_QUERY, new Query());
	actions.add(a);
}
 
开发者ID:jrbn,项目名称:dynamite,代码行数:9,代码来源:ActionsHelper.java

示例13: writeSchemaTriplesInBtree

import nl.vu.cs.ajira.actions.ActionConf; //导入方法依赖的package包/类
public static void writeSchemaTriplesInBtree(ActionSequence actions)
		throws ActionNotConfiguredException {
	ActionSequence seq = new ActionSequence();
	seq.add(ActionFactory.getActionConf(FilterSchema.class));
	WriteDerivationsAllBtree.addToChain(seq);

	ActionConf c = ActionFactory.getActionConf(Split.class);
	c.setParamWritable(Split.W_SPLIT, seq);
	c.setParamInt(Split.I_RECONNECT_AFTER_ACTIONS, 1);
	actions.add(c);
}
 
开发者ID:jrbn,项目名称:dynamite,代码行数:12,代码来源:ActionsHelper.java

示例14: readFakeTuple

import nl.vu.cs.ajira.actions.ActionConf; //导入方法依赖的package包/类
public static void readFakeTuple(ActionSequence actions) throws ActionNotConfiguredException {
  ActionConf a = ActionFactory.getActionConf(QueryInputLayer.class);
  a.setParamString(QueryInputLayer.S_INPUTLAYER, DummyLayer.class.getName());
  a.setParamWritable(QueryInputLayer.W_QUERY, new Query());
  actions.add(a);
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:7,代码来源:ActionsHelper.java

示例15: addToChain

import nl.vu.cs.ajira.actions.ActionConf; //导入方法依赖的package包/类
public static void addToChain(Filter filter, ActionSequence actions) throws ActionNotConfiguredException {
  ActionConf c = ActionFactory.getActionConf(FilterOperator.class);
  c.setParamWritable(W_FILTER, filter);
  actions.add(c);
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:6,代码来源:FilterOperator.java


注:本文中的nl.vu.cs.ajira.actions.ActionConf.setParamWritable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。