@Override public Conclusion getPremise(int index, Factory factory) { switch (index) { case 0: return getFirstPremise(factory); case 1: return getSecondPremise(factory); case 2: return getThirdPremise(factory); case 3: return getFourthPremise(factory); default: return failGetPremise(index); } }
@Override public IndexedComplexPropertyChain getComposition() { return getChain(); }
@Override public ClassConclusion visit(ForwardLinkComposition inference) { return inference.getConclusion(conclusionFactory_); }
@Override public O visit(ForwardLinkComposition inference) { conclusionVisitor_.visit(inference.getFirstPremise(conclusionFactory_)); if (inference.getOrigin() == inference.getDestination()) { conclusionVisitor_ .visit(inference.getThirdPremise(conclusionFactory_)); } return null; }
@Override public Boolean visit(ForwardLinkComposition conclusion) { // looking for the composition S o H -> SS o HH SubPropertyChain left = conclusion.getSecondPremise(FACTORY_); SubPropertyChain right = conclusion.getFourthPremise(FACTORY_); return conclusion.getTarget().equals(dIndexed) && left.getSubChain().equals(sIndexed) && left.getSuperChain().equals(ssIndexed) && right.getSubChain().equals(hIndexed) && right.getSuperChain().equals(hhIndexed) && conclusion.getChain().equals(sshhIndexed); }
public SubPropertyChainMatch1 getSecondPremiseMatch( ConclusionMatchExpressionFactory factory) { return factory.getSubPropertyChainMatch1( getParent().getParent().getSecondPremise(factory), getParent().getFirstProperty(), 0); }
public SubPropertyChainMatch1 getFourthPremiseMatch( ConclusionMatchExpressionFactory factory) { return factory.getSubPropertyChainMatch1( getParent().getParent().getParent().getFourthPremise(factory), getParent().getParent().getFullCompositionMatch(), getParent().getParent().getCompositionStartPos() + 1); }
@Override public SubPropertyChain getSecondPremise(SubPropertyChain.Factory factory) { return factory.getSubPropertyChain(backwardRelation_, getComposition().getFirstProperty()); }
public BackwardLinkMatch1 getFirstPremiseMatch( ConclusionMatchExpressionFactory factory) { return factory.getBackwardLinkMatch1( getParent().getFirstPremise(factory), getDestinationMatch()); }
public ForwardLinkMatch1 getThirdPremiseMatch( ConclusionMatchExpressionFactory factory) { return factory.getForwardLinkMatch1( getParent().getParent().getParent().getParent().getThirdPremise( factory), getParent().getParent().getOriginMatch(), fullPremiseForwardChainMatch_, premiseForwardChainStartPos_); }
@Override public IndexedContextRoot getPremiseTarget() { return getTarget(); }
public static void produceComposedLink(ClassInferenceProducer producer, IndexedContextRoot source, IndexedObjectProperty backwardRelation, IndexedContextRoot inferenceRoot, IndexedPropertyChain forwardRelation, IndexedContextRoot target, IndexedComplexPropertyChain composition) { if (composition.getSaturated() .getNonRedundantCompositionsByLeftSubProperty().isEmpty() && composition.getSaturated() .getRedundantCompositionsByLeftSubProperty() .isEmpty()) { // composition cannot be composed further, even using redundant // compositions (tracing); create only backward links List<IndexedObjectProperty> toldSuperProperties = composition .getToldSuperProperties(); List<ElkAxiom> toldSuperPropertiesReasons = composition .getToldSuperPropertiesReasons(); for (int i = 0; i < toldSuperProperties.size(); i++) { producer.produce(new BackwardLinkComposition(source, backwardRelation, inferenceRoot, forwardRelation, target, composition, toldSuperProperties.get(i), toldSuperPropertiesReasons.get(i))); } } else { producer.produce(new ForwardLinkComposition(source, backwardRelation, inferenceRoot, forwardRelation, target, composition)); } }
@Override public O visit(ForwardLinkComposition inference) { conclusionVisitor_.visit(inference.getFirstPremise(conclusionFactory_)); if (inference.getOrigin() == inference.getDestination()) { conclusionVisitor_ .visit(inference.getThirdPremise(conclusionFactory_)); } return null; }
public SubPropertyChainMatch1 getSecondPremiseMatch( ConclusionMatchExpressionFactory factory) { return factory.getSubPropertyChainMatch1( getParent().getParent().getSecondPremise(factory), getParent().getFirstProperty(), 0); }
public SubPropertyChainMatch1 getFourthPremiseMatch( ConclusionMatchExpressionFactory factory) { return factory.getSubPropertyChainMatch1( getParent().getParent().getParent().getFourthPremise(factory), getParent().getParent().getFullCompositionMatch(), getParent().getParent().getCompositionStartPos() + 1); }
@Override public SubPropertyChain getSecondPremise(SubPropertyChain.Factory factory) { return factory.getSubPropertyChain(backwardRelation_, getComposition().getFirstProperty()); }
public BackwardLinkMatch1 getFirstPremiseMatch( ConclusionMatchExpressionFactory factory) { return factory.getBackwardLinkMatch1( getParent().getFirstPremise(factory), getDestinationMatch()); }
public ForwardLinkMatch1 getThirdPremiseMatch( ConclusionMatchExpressionFactory factory) { return factory.getForwardLinkMatch1( getParent().getParent().getParent().getParent().getThirdPremise( factory), getParent().getParent().getOriginMatch(), fullPremiseForwardChainMatch_, premiseForwardChainStartPos_); }