use of annis.model.QueryNode in project ANNIS by korpling.
the class JoinListener method enterDirectNear.
@Override
public void enterDirectNear(AqlParser.DirectNearContext ctx) {
QueryNode left = relationChain.get(relationIdx);
QueryNode right = relationChain.get(relationIdx + 1);
String segmentationName = getLayerName(ctx.NAMED_NEAR());
left.addOutgoingJoin(addParsedLocation(ctx, new Near(right, 1, segmentationName)));
}
use of annis.model.QueryNode in project ANNIS by korpling.
the class JoinListener method nodeByDef.
private QueryNode nodeByDef(AqlParser.ReferenceNodeContext ctx) {
if (ctx.VAR_DEF() == null) {
QueryNode result = tokenPositions.get(alternativeIndex).get(ctx.variableExpr().getSourceInterval());
if (result == null) {
return null;
} else {
return result;
}
} else {
String varDefText = ctx.VAR_DEF().getText();
// remove trailing #
varDefText = varDefText.substring(0, varDefText.length() - 1);
return alternativeNodes.get(alternativeIndex).get(varDefText);
}
}
use of annis.model.QueryNode in project ANNIS by korpling.
the class JoinListener method enterIndirectDominance.
@Override
public void enterIndirectDominance(AqlParser.IndirectDominanceContext ctx) {
QueryNode left = relationChain.get(relationIdx);
QueryNode right = relationChain.get(relationIdx + 1);
String layer = getLayerName(ctx.NAMED_DOMINANCE());
left.addOutgoingJoin(addParsedLocation(ctx, new Dominance(right, layer)));
}
use of annis.model.QueryNode in project ANNIS by korpling.
the class JoinListener method enterArityTerm.
@Override
public void enterArityTerm(AqlParser.ArityTermContext ctx) {
QueryNode target = nodeByRef(ctx.left);
Preconditions.checkArgument(target != null, errorLHS("arity") + ": " + ctx.getText());
target.setArity(annisRangeFromARangeSpec(ctx.rangeSpec()));
}
use of annis.model.QueryNode in project ANNIS by korpling.
the class JoinListener method enterIndirectPointing.
@Override
public void enterIndirectPointing(AqlParser.IndirectPointingContext ctx) {
QueryNode left = relationChain.get(relationIdx);
QueryNode right = relationChain.get(relationIdx + 1);
String label = getLayerName(ctx.POINTING(), 2);
left.addOutgoingJoin(addParsedLocation(ctx, new PointingRelation(right, label)));
}
Aggregations