@Override public void add(ForwardLinkMatch2 conclusion, ForwardLinkMatch2Watch inference) { watchedInferences_.add(conclusion, inference); }
private Collection<? extends InferenceMatch> getWatchInferences( ConclusionMatch conclusion) { // need this method since some java compilers have problems for casting // directly return watchedInferences_.get(conclusion); }
@Override public boolean contains(Key key, Value value) { return multimap_.contains(key, value); }
/** * Prints key-value entries present in the first {@link Multimap} but not in * the second {@link Multimap} using the given {@link Writer} and prefixing * all messages with a given prefix. * * @param first * @param second * @param writer * @param prefix * @throws IOException */ public static <K, V> void dumpDiff(Multimap<K, V> first, Multimap<K, V> second, Writer writer, String prefix) throws IOException { for (K key : first.keySet()) { Collection<V> firstValues = first.get(key); Collection<V> secondValues = second.get(key); dumpDiff(firstValues, secondValues, writer, prefix + key + "->"); } }
/** * checking that all compositions of this property to the right are computed * in the saturations for the respective right properties * * @param ip */ public static void testRightCompositions(IndexedObjectProperty ip, AsymmetricCompositionHook hook) { SaturatedPropertyChain saturation = ip.getSaturated(); Multimap<IndexedPropertyChain, IndexedComplexPropertyChain> compositionsByRight = saturation .getNonRedundantCompositionsByRightSubProperty(); for (IndexedPropertyChain right : compositionsByRight.keySet()) { for (IndexedComplexPropertyChain composition : compositionsByRight .get(right)) { SaturatedPropertyChain rightSaturation = right.getSaturated(); Multimap<IndexedObjectProperty, IndexedComplexPropertyChain> compositionsByLeft = rightSaturation .getNonRedundantCompositionsByLeftSubProperty(); if (!compositionsByLeft.contains(ip, composition)) { hook.error(ip, right, composition, ip); } } } }
@Override public boolean isEmpty() { return multimap_.isEmpty(); }
@Override public Collection<Value> remove(Object key) { return multimap_.remove(key); }
@Override public Set<Key> keySet() { return multimap_.keySet(); }
@Override public void clear() { multimap_.clear(); }
/** * Prints key-value entries present in the first {@link Multimap} but not in * the second {@link Multimap} using the given {@link Writer} and prefixing * all messages with a given prefix. * * @param first * @param second * @param writer * @param prefix * @throws IOException */ public static <K, V> void dumpDiff(Multimap<K, V> first, Multimap<K, V> second, Writer writer, String prefix) throws IOException { for (K key : first.keySet()) { Collection<V> firstValues = first.get(key); Collection<V> secondValues = second.get(key); dumpDiff(firstValues, secondValues, writer, prefix + key + "->"); } }
/** * checking that all compositions of this property to the left are computed * in the saturations for the respective left properties * * @param ipc */ public static void testLeftCompositions(IndexedPropertyChain ipc, AsymmetricCompositionHook hook) { SaturatedPropertyChain saturation = ipc.getSaturated(); Multimap<IndexedObjectProperty, IndexedComplexPropertyChain> compositionsByLeft = saturation .getNonRedundantCompositionsByLeftSubProperty(); for (IndexedObjectProperty left : compositionsByLeft.keySet()) { for (IndexedComplexPropertyChain composition : compositionsByLeft .get(left)) { SaturatedPropertyChain leftSaturation = left.getSaturated(); Multimap<IndexedPropertyChain, IndexedComplexPropertyChain> compositionsByRight = leftSaturation .getNonRedundantCompositionsByRightSubProperty(); if (!compositionsByRight.contains(ipc, composition)) { hook.error(left, ipc, composition, ipc); } } } }
@Override public boolean isEmpty() { return multimap_.isEmpty(); }
@Override public boolean remove(Object key, Object value) { return multimap_.remove(key, value); }
@Override public Set<Key> keySet() { return multimap_.keySet(); }
@Override public void clear() { multimap_.clear(); }
/** * Prints key-value entries present in the first {@link Multimap} but not in * the second {@link Multimap} using the given {@link Writer} and prefixing * all messages with a given prefix. * * @param first * @param second * @param writer * @param prefix * @throws IOException */ public static <K, V> void dumpDiff(Multimap<K, V> first, Multimap<K, V> second, Writer writer, String prefix) throws IOException { for (K key : first.keySet()) { Collection<V> firstValues = first.get(key); Collection<V> secondValues = second.get(key); dumpDiff(firstValues, secondValues, writer, prefix + key + "->"); } }
@Override public void add(IndexedEquivalentClassesAxiomMatch1 conclusion, IndexedEquivalentClassesAxiomMatch1Watch inference) { watchedInferences_.add(conclusion, inference); }
private Collection<? extends InferenceMatch> getWatchInferences( ConclusionMatch conclusion) { // need this method since some java compilers have problems for casting // directly return watchedInferences_.get(conclusion); }
@Override public boolean isEmpty() { return multimap_.isEmpty(); }