本文整理汇总了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);
}
示例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)));
}
}
示例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();
}
}
示例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);
}
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}