use of annis.model.QueryNode in project ANNIS by korpling.
the class ComponentSearchRelationNormalizer method replicateFromJoinTarget.
private void replicateFromJoinTarget(Join join, QueryNode targetNode, List<QueryNode> nodes, AtomicLong maxID) {
QueryNode newTargetNode = new QueryNode(maxID.incrementAndGet(), targetNode, false);
newTargetNode.setArtificial(true);
newTargetNode.setVariable("x" + newTargetNode.getId() + "(" + targetNode.getVariable() + ")");
newTargetNode.setThisNodeAsTarget(join);
Identical identJoin = new Identical(newTargetNode);
targetNode.addOutgoingJoin(identJoin);
nodes.add(newTargetNode);
}
use of annis.model.QueryNode in project ANNIS by korpling.
the class ComponentSearchRelationNormalizer method createJoinMap.
private Multimap<QueryNode, Join> createJoinMap(List<QueryNode> nodes) {
Multimap<QueryNode, Join> result = HashMultimap.create();
for (QueryNode n : nodes) {
for (Join j : n.getOutgoingJoins()) {
if (j instanceof Dominance || j instanceof PointingRelation) {
if (j.getTarget() != null) {
result.put(n, j);
result.put(j.getTarget(), j);
}
}
}
}
return result;
}
use of annis.model.QueryNode in project ANNIS by korpling.
the class JoinListener method enterRootTerm.
@Override
public void enterRootTerm(AqlParser.RootTermContext ctx) {
QueryNode target = nodeByRef(ctx.left);
Preconditions.checkArgument(target != null, errorLHS("root") + ": " + ctx.getText());
target.setRoot(true);
}
use of annis.model.QueryNode in project ANNIS by korpling.
the class JoinListener method enterNotequalvalue.
@Override
public void enterNotequalvalue(annis.ql.AqlParser.NotequalvalueContext ctx) {
QueryNode left = relationChain.get(relationIdx);
QueryNode right = relationChain.get(relationIdx + 1);
left.addOutgoingJoin(addParsedLocation(ctx, new NotEqualValue(right)));
}
use of annis.model.QueryNode in project ANNIS by korpling.
the class JoinListener method enterCommonparent.
@Override
public void enterCommonparent(AqlParser.CommonparentContext ctx) {
QueryNode left = relationChain.get(relationIdx);
QueryNode right = relationChain.get(relationIdx + 1);
String label = ctx.label == null ? null : ctx.label.getText();
left.addOutgoingJoin(addParsedLocation(ctx, new Sibling(right, label)));
}
Aggregations