diff options
author | 2021-08-17 13:02:55 +0200 | |
---|---|---|
committer | 2021-08-17 13:02:55 +0200 | |
commit | 4028b56a14888c2e9ee284fce825c3954342c6f3 (patch) | |
tree | f1a3db5ca45f77c99be4b8b5345f5a873bf65ffe /model-data | |
parent | changed querytest to highlight query independence from model (diff) | |
download | refinery-4028b56a14888c2e9ee284fce825c3954342c6f3.tar.gz refinery-4028b56a14888c2e9ee284fce825c3954342c6f3.tar.zst refinery-4028b56a14888c2e9ee284fce825c3954342c6f3.zip |
renamed TupleRelationView -> KeyOnlyView
Diffstat (limited to 'model-data')
-rw-r--r-- | model-data/src/main/java/org/eclipse/viatra/solver/data/query/view/KeyOnlyRelationView.java (renamed from model-data/src/main/java/org/eclipse/viatra/solver/data/query/view/TupleRelationView.java) | 0 | ||||
-rw-r--r-- | model-data/src/test/java/org/eclipse/viatra/solver/data/query/test/QueryTest.java | 6 |
2 files changed, 3 insertions, 3 deletions
diff --git a/model-data/src/main/java/org/eclipse/viatra/solver/data/query/view/TupleRelationView.java b/model-data/src/main/java/org/eclipse/viatra/solver/data/query/view/KeyOnlyRelationView.java index bb1ddaa8..bb1ddaa8 100644 --- a/model-data/src/main/java/org/eclipse/viatra/solver/data/query/view/TupleRelationView.java +++ b/model-data/src/main/java/org/eclipse/viatra/solver/data/query/view/KeyOnlyRelationView.java | |||
diff --git a/model-data/src/test/java/org/eclipse/viatra/solver/data/query/test/QueryTest.java b/model-data/src/test/java/org/eclipse/viatra/solver/data/query/test/QueryTest.java index 7fa0708f..5555dac8 100644 --- a/model-data/src/test/java/org/eclipse/viatra/solver/data/query/test/QueryTest.java +++ b/model-data/src/test/java/org/eclipse/viatra/solver/data/query/test/QueryTest.java | |||
@@ -23,7 +23,7 @@ import org.eclipse.viatra.solver.data.query.RelationalScope; | |||
23 | import org.eclipse.viatra.solver.data.query.view.FilteredRelationView; | 23 | import org.eclipse.viatra.solver.data.query.view.FilteredRelationView; |
24 | import org.eclipse.viatra.solver.data.query.view.FunctionalRelationView; | 24 | import org.eclipse.viatra.solver.data.query.view.FunctionalRelationView; |
25 | import org.eclipse.viatra.solver.data.query.view.RelationView; | 25 | import org.eclipse.viatra.solver.data.query.view.RelationView; |
26 | import org.eclipse.viatra.solver.data.query.view.TupleRelationView; | 26 | import org.eclipse.viatra.solver.data.query.view.KeyOnlyRelationView; |
27 | import org.junit.jupiter.api.Test; | 27 | import org.junit.jupiter.api.Test; |
28 | 28 | ||
29 | class QueryTest { | 29 | class QueryTest { |
@@ -31,7 +31,7 @@ class QueryTest { | |||
31 | void minimalTest() { | 31 | void minimalTest() { |
32 | Relation<Boolean> person = new Relation<>("Person", 1, false); | 32 | Relation<Boolean> person = new Relation<>("Person", 1, false); |
33 | 33 | ||
34 | RelationView<Boolean> persionView = new TupleRelationView(person); | 34 | RelationView<Boolean> persionView = new KeyOnlyRelationView(person); |
35 | GenericQuerySpecification<GenericPatternMatcher> personQuery = (new RelationalQuery("PersonQuery")) | 35 | GenericQuerySpecification<GenericPatternMatcher> personQuery = (new RelationalQuery("PersonQuery")) |
36 | .addParameter("p", persionView).addConstraint(persionView, "p").build(); | 36 | .addParameter("p", persionView).addConstraint(persionView, "p").build(); |
37 | 37 | ||
@@ -69,7 +69,7 @@ class QueryTest { | |||
69 | assertTrue(model.get(person, Tuple.of(1))); | 69 | assertTrue(model.get(person, Tuple.of(1))); |
70 | assertFalse(model.get(person, Tuple.of(2))); | 70 | assertFalse(model.get(person, Tuple.of(2))); |
71 | 71 | ||
72 | RelationView<Boolean> persionView = new TupleRelationView(person); | 72 | RelationView<Boolean> persionView = new KeyOnlyRelationView(person); |
73 | RelationView<Integer> ageView = new FunctionalRelationView<>(age); | 73 | RelationView<Integer> ageView = new FunctionalRelationView<>(age); |
74 | RelationView<TruthValue> friendMustView = new FilteredRelationView<TruthValue>(friend, (k, v) -> v.must()); | 74 | RelationView<TruthValue> friendMustView = new FilteredRelationView<TruthValue>(friend, (k, v) -> v.must()); |
75 | RelationView<TruthValue> friendMayView = new FilteredRelationView<TruthValue>(friend, (k, v) -> v.may()); | 75 | RelationView<TruthValue> friendMayView = new FilteredRelationView<TruthValue>(friend, (k, v) -> v.may()); |