@Override public ForwardLinkCompositionMatch1 getForwardLinkCompositionMatch1( ForwardLinkComposition parent, ForwardLinkMatch1 conclusionMatch) { return new ForwardLinkCompositionMatch1(parent, conclusionMatch); }
ForwardLinkMatch1 getConclusionMatch( ConclusionMatchExpressionFactory factory) { return factory.getForwardLinkMatch1(getParent().getConclusion(factory), getDestinationMatch(), getFullCompositionMatch(), getCompositionStartPos()); }
public BackwardLinkMatch1 getFirstPremiseMatch( ConclusionMatchExpressionFactory factory) { return factory.getBackwardLinkMatch1( getParent().getFirstPremise(factory), getDestinationMatch()); }
ElkObjectPropertyExpression getFirstProperty() { final int startPos = getCompositionStartPos(); // TODO: more rigorous matching checks return getFullCompositionMatch().accept( new ElkSubObjectPropertyExpressionVisitor<ElkObjectPropertyExpression>() { @Override public ElkObjectPropertyExpression visit( ElkObjectPropertyChain expression) { return expression.getObjectPropertyExpressions() .get(startPos); } @Override public ElkObjectPropertyExpression visit( ElkObjectInverseOf expression) { return expression; } @Override public ElkObjectPropertyExpression visit( ElkObjectProperty expression) { return expression; } }); }
public SubPropertyChainMatch1 getFourthPremiseMatch( ConclusionMatchExpressionFactory factory) { return factory.getSubPropertyChainMatch1( getParent().getParent().getParent().getFourthPremise(factory), getParent().getParent().getFullCompositionMatch(), getParent().getParent().getCompositionStartPos() + 1); }
public SubPropertyChainMatch1 getSecondPremiseMatch( ConclusionMatchExpressionFactory factory) { return factory.getSubPropertyChainMatch1( getParent().getParent().getSecondPremise(factory), getParent().getFirstProperty(), 0); }
ForwardLinkCompositionMatch1(ForwardLinkComposition parent, ForwardLinkMatch1 conclusionMatch) { super(parent); this.destinationMatch_ = conclusionMatch.getDestinationMatch(); this.fullCompositionMatch_ = conclusionMatch.getFullChainMatch(); this.compositionStartPos_ = conclusionMatch.getChainStartPos(); checkEquals(conclusionMatch, getConclusionMatch(DEBUG_FACTORY)); }
@Override public Void visit(ForwardLinkCompositionMatch1 inferenceMatch1) { BackwardLinkMatch1 conclusionMatch1 = inferenceMatch1 .getFirstPremiseMatch(conclusionFactory_); inferences_.add(conclusionMatch1, inferenceMatch1); for (BackwardLinkMatch2 child : hierarchy_ .getChildren(conclusionMatch1)) { (new BackwardLinkMatch2InferenceVisitor(inferenceFactory_, child)) .visit(inferenceMatch1); } return null; }
@Override public String visit(ForwardLinkCompositionMatch1 inferenceMatch1) { return inferenceMatch1.getParent() + " | "; }
public ForwardLinkMatch2 getConclusionMatch( ConclusionMatchExpressionFactory factory) { return factory.getForwardLinkMatch2( getParent().getParent().getParent().getParent() .getConclusionMatch(factory), getConclusionTargetMatch()); }
public SubPropertyChainMatch1 getFourthPremiseMatch( ConclusionMatchExpressionFactory factory) { return factory.getSubPropertyChainMatch1( getParent().getParent().getParent().getFourthPremise(factory), getParent().getParent().getFullCompositionMatch(), getParent().getParent().getCompositionStartPos() + 1); }
ElkObjectPropertyExpression getFirstProperty() { final int startPos = getCompositionStartPos(); // TODO: more rigorous matching checks return getFullCompositionMatch().accept( new ElkSubObjectPropertyExpressionVisitor<ElkObjectPropertyExpression>() { @Override public ElkObjectPropertyExpression visit( ElkObjectPropertyChain expression) { return expression.getObjectPropertyExpressions() .get(startPos); } @Override public ElkObjectPropertyExpression visit( ElkObjectInverseOf expression) { return expression; } @Override public ElkObjectPropertyExpression visit( ElkObjectProperty expression) { return expression; } }); }
public SubPropertyChainMatch1 getSecondPremiseMatch( ConclusionMatchExpressionFactory factory) { return factory.getSubPropertyChainMatch1( getParent().getParent().getSecondPremise(factory), getParent().getFirstProperty(), 0); }
public BackwardLinkMatch1 getFirstPremiseMatch( ConclusionMatchExpressionFactory factory) { return factory.getBackwardLinkMatch1( getParent().getFirstPremise(factory), getDestinationMatch()); }
ForwardLinkCompositionMatch1(ForwardLinkComposition parent, ForwardLinkMatch1 conclusionMatch) { super(parent); this.destinationMatch_ = conclusionMatch.getDestinationMatch(); this.fullCompositionMatch_ = conclusionMatch.getFullChainMatch(); this.compositionStartPos_ = conclusionMatch.getChainStartPos(); checkEquals(conclusionMatch, getConclusionMatch(DEBUG_FACTORY)); }
BackwardLinkMatch2 getFirstPremiseMatch( ConclusionMatchExpressionFactory factory) { return factory.getBackwardLinkMatch2( getParent().getFirstPremiseMatch(factory), getPremiseBackwardRelationMatch(), getOriginMatch()); }
@Override public String visit(ForwardLinkCompositionMatch1 inferenceMatch1) { return inferenceMatch1.getParent() + " | "; }
public ForwardLinkMatch2 getConclusionMatch( ConclusionMatchExpressionFactory factory) { return factory.getForwardLinkMatch2( getParent().getParent().getParent().getParent() .getConclusionMatch(factory), getConclusionTargetMatch()); }
ForwardLinkMatch1 getConclusionMatch( ConclusionMatchExpressionFactory factory) { return factory.getForwardLinkMatch1(getParent().getConclusion(factory), getDestinationMatch(), getFullCompositionMatch(), getCompositionStartPos()); }
public SubPropertyChainMatch1 getFourthPremiseMatch( ConclusionMatchExpressionFactory factory) { return factory.getSubPropertyChainMatch1( getParent().getParent().getParent().getFourthPremise(factory), getParent().getParent().getFullCompositionMatch(), getParent().getParent().getCompositionStartPos() + 1); }