diff options
author | Márton Golej <golejmarci@gmail.com> | 2021-10-19 19:11:44 +0200 |
---|---|---|
committer | Márton Golej <golejmarci@gmail.com> | 2021-10-19 19:13:49 +0200 |
commit | 277a6e768fff0f1d77e3183f25914e2db47f6b0f (patch) | |
tree | 1388fdd7d68a59b625decc5ed185f5eeb4bda732 /language-to-store | |
parent | First try to fix bugs (diff) | |
download | refinery-277a6e768fff0f1d77e3183f25914e2db47f6b0f.tar.gz refinery-277a6e768fff0f1d77e3183f25914e2db47f6b0f.tar.zst refinery-277a6e768fff0f1d77e3183f25914e2db47f6b0f.zip |
findingRelationInDTO changed up
Diffstat (limited to 'language-to-store')
-rw-r--r-- | language-to-store/src/main/java/tools/refinery/language/mapping/PartialModelMapper.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/language-to-store/src/main/java/tools/refinery/language/mapping/PartialModelMapper.java b/language-to-store/src/main/java/tools/refinery/language/mapping/PartialModelMapper.java index 9a4d0aa7..ba32921a 100644 --- a/language-to-store/src/main/java/tools/refinery/language/mapping/PartialModelMapper.java +++ b/language-to-store/src/main/java/tools/refinery/language/mapping/PartialModelMapper.java | |||
@@ -128,12 +128,10 @@ public class PartialModelMapper { | |||
128 | //Searches for and gives back a relation in a PartialModelMapperDTO | 128 | //Searches for and gives back a relation in a PartialModelMapperDTO |
129 | private tools.refinery.language.model.problem.Relation findingRelationInDTO(PartialModelMapperDTO partialModelMapperDTO, String searchedRelation, String errorText) | 129 | private tools.refinery.language.model.problem.Relation findingRelationInDTO(PartialModelMapperDTO partialModelMapperDTO, String searchedRelation, String errorText) |
130 | throws PartialModelMapperException { | 130 | throws PartialModelMapperException { |
131 | tools.refinery.language.model.problem.Relation relation = null; | ||
132 | for (tools.refinery.language.model.problem.Relation r : partialModelMapperDTO.getRelationMap().keySet()) { | 131 | for (tools.refinery.language.model.problem.Relation r : partialModelMapperDTO.getRelationMap().keySet()) { |
133 | if (r.getName().equals(searchedRelation)) relation = r; | 132 | if (searchedRelation.equals(r.getName())) return r; |
134 | } | 133 | } |
135 | if(relation == null) throw new PartialModelMapperException(errorText); | 134 | throw new PartialModelMapperException(errorText); |
136 | return relation; | ||
137 | } | 135 | } |
138 | 136 | ||
139 | //Processing assertions and placing them in the model | 137 | //Processing assertions and placing them in the model |