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


Java DummyLayer类代码示例

本文整理汇总了Java中nl.vu.cs.ajira.datalayer.dummy.DummyLayer的典型用法代码示例。如果您正苦于以下问题:Java DummyLayer类的具体用法?Java DummyLayer怎么用?Java DummyLayer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DummyLayer类属于nl.vu.cs.ajira.datalayer.dummy包,在下文中一共展示了DummyLayer类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: applyTo

import nl.vu.cs.ajira.datalayer.dummy.DummyLayer; //导入依赖的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: setupAction

import nl.vu.cs.ajira.datalayer.dummy.DummyLayer; //导入依赖的package包/类
@Override
public void setupAction(InputQuery query, Object[] params,
		ActionController controller, ActionContext context) {

	int[] nodeIds = null;
	if (params[IA_NODE_IDS] == null) {
		nodeIds = new int[1];
		nodeIds[0] = -1;
		params[IA_NODE_IDS] = nodeIds;
	} else {
		nodeIds = ((TIntArray) params[IA_NODE_IDS]).getArray();
	}
	int[] bucketIds = ((TIntArray) params[IA_BUCKET_IDS]).getArray();

	if (nodeIds.length == 1) {
		query.setInputLayer(BucketsLayer.class);
		query.setQuery(new Query(new TInt(bucketIds[0]), new TInt(
				nodeIds[0])));

		controller.doNotAddCurrentAction();
	} else {
		// In this case, I need to fire more chains with a branch
		query.setInputLayer(DummyLayer.class);
		query.setQuery(new Query(new TInt(0)));
	}
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:27,代码来源:ReadFromBucket.java

示例3: setInputLayer

import nl.vu.cs.ajira.datalayer.dummy.DummyLayer; //导入依赖的package包/类
@Override
public void setInputLayer(Class<? extends InputLayer> clazz) {
	inputLayer = null;
	if (clazz == InputLayer.DEFAULT_LAYER) {
		buffer[32] = 0;
	} else if (clazz == BucketsLayer.class) {
		buffer[32] = 1;
	} else if (clazz == DummyLayer.class) {
		buffer[32] = 2;
	} else if (clazz == ChainSplitLayer.class) {
		buffer[32] = 3;
	} else {
		buffer[32] = -1;
		inputLayer = clazz.getName();
	}

}
 
开发者ID:jrbn,项目名称:ajira,代码行数:18,代码来源:Chain.java

示例4: getInputLayer

import nl.vu.cs.ajira.datalayer.dummy.DummyLayer; //导入依赖的package包/类
@Override
public Class<? extends InputLayer> getInputLayer() {
	switch (buffer[32]) {
	case 0:
		return InputLayer.DEFAULT_LAYER;
	case 1:
		return BucketsLayer.class;
	case 2:
		return DummyLayer.class;
	case 3:
		return ChainSplitLayer.class;
	default:
		try {
			return Class.forName(inputLayer).asSubclass(InputLayer.class);
		} catch (Throwable e) {
			throw new Error(
					"Could not load inputLayer class " + inputLayer, e);
		}
	}
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:21,代码来源:Chain.java

示例5: applyTo

import nl.vu.cs.ajira.datalayer.dummy.DummyLayer; //导入依赖的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: applyTo

import nl.vu.cs.ajira.datalayer.dummy.DummyLayer; //导入依赖的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

示例7: applyTo

import nl.vu.cs.ajira.datalayer.dummy.DummyLayer; //导入依赖的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

示例8: readFakeTuple

import nl.vu.cs.ajira.datalayer.dummy.DummyLayer; //导入依赖的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

示例9: readFakeTuple

import nl.vu.cs.ajira.datalayer.dummy.DummyLayer; //导入依赖的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


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