diff options
author | 2020-05-20 01:18:09 +0200 | |
---|---|---|
committer | 2020-05-20 01:18:09 +0200 | |
commit | a0c3b54089c935845c04abf67df911b9efacb868 (patch) | |
tree | a285f819db663b853a85310bf9c8310166a0409d /Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage | |
parent | Merge branch 'master' of https://github.com/viatra/VIATRA-Generator (diff) | |
download | VIATRA-Generator-a0c3b54089c935845c04abf67df911b9efacb868.tar.gz VIATRA-Generator-a0c3b54089c935845c04abf67df911b9efacb868.tar.zst VIATRA-Generator-a0c3b54089c935845c04abf67df911b9efacb868.zip |
FIx Boolean export to gml
Diffstat (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage')
1 files changed, 12 insertions, 4 deletions
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/visualisation/PartialInterpretation2Gml.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/visualisation/PartialInterpretation2Gml.xtend index 1e9cdcbe..bdf402f3 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/visualisation/PartialInterpretation2Gml.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/visualisation/PartialInterpretation2Gml.xtend | |||
@@ -5,15 +5,16 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation | |||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | 5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type |
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition | 6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition |
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink | 7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink |
8 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BooleanElement | ||
9 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.IntegerElement | ||
8 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialComplexTypeInterpretation | 10 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialComplexTypeInterpretation |
9 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | 11 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation |
10 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation | 12 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation |
13 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RealElement | ||
14 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.StringElement | ||
11 | import java.util.HashMap | 15 | import java.util.HashMap |
12 | import java.util.Map | 16 | import java.util.Map |
13 | import java.util.Set | 17 | import java.util.Set |
14 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.IntegerElement | ||
15 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RealElement | ||
16 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.StringElement | ||
17 | 18 | ||
18 | class PartialInterpretation2Gml { | 19 | class PartialInterpretation2Gml { |
19 | def private getElements(PartialInterpretation model) { | 20 | def private getElements(PartialInterpretation model) { |
@@ -110,9 +111,16 @@ class PartialInterpretation2Gml { | |||
110 | } | 111 | } |
111 | 112 | ||
112 | def protected dispatch transormTitle(DefinedElement object) { | 113 | def protected dispatch transormTitle(DefinedElement object) { |
113 | if(object.name!= null)object.name.replace("\"", "") | 114 | if(object.name !== null) object.name.replace("\"", "") |
114 | else "null" | 115 | else "null" |
115 | } | 116 | } |
117 | def protected dispatch transormTitle(BooleanElement object) { | ||
118 | if(object.valueSet) { | ||
119 | object.value.toString | ||
120 | } else { | ||
121 | "?" | ||
122 | } | ||
123 | } | ||
116 | def protected dispatch transormTitle(IntegerElement object) { | 124 | def protected dispatch transormTitle(IntegerElement object) { |
117 | if(object.valueSet) { | 125 | if(object.valueSet) { |
118 | object.value.toString | 126 | object.value.toString |