diff options
author | OszkarSemerath <oszka@152.66.252.189> | 2017-09-27 21:10:32 +0200 |
---|---|---|
committer | OszkarSemerath <oszka@152.66.252.189> | 2017-09-27 21:10:32 +0200 |
commit | 5a286dab2c1d23e16aad6e96e3ad93d0e15cb931 (patch) | |
tree | 6e881a862bd6cdda182774f55d4a32ddfbdbe886 /Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2PartialInterpretation.xtend | |
parent | If a query is not supported query exception. (diff) | |
download | VIATRA-Generator-5a286dab2c1d23e16aad6e96e3ad93d0e15cb931.tar.gz VIATRA-Generator-5a286dab2c1d23e16aad6e96e3ad93d0e15cb931.tar.zst VIATRA-Generator-5a286dab2c1d23e16aad6e96e3ad93d0e15cb931.zip |
PS with outgoing references to excluded objects are supported now
Diffstat (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2PartialInterpretation.xtend')
1 files changed, 5 insertions, 3 deletions
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2PartialInterpretation.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2PartialInterpretation.xtend index 1bda1f49..d9c1b8f6 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2PartialInterpretation.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2PartialInterpretation.xtend | |||
@@ -82,8 +82,10 @@ class InstanceModel2PartialInterpretation { | |||
82 | if(reference.isMany) { | 82 | if(reference.isMany) { |
83 | val listOfTargets = source.eGet(reference) as List<? extends EObject> | 83 | val listOfTargets = source.eGet(reference) as List<? extends EObject> |
84 | for(target : listOfTargets) { | 84 | for(target : listOfTargets) { |
85 | val targetElement = target.lookup(object2DefinedElement) | 85 | if(target !== null && object2DefinedElement.containsKey(target)) { |
86 | translateLink(interpretation,sourceElement,targetElement) | 86 | val targetElement = target.lookup(object2DefinedElement) |
87 | translateLink(interpretation,sourceElement,targetElement) | ||
88 | } | ||
87 | } | 89 | } |
88 | } else { | 90 | } else { |
89 | val target = source.eGet(reference) as EObject | 91 | val target = source.eGet(reference) as EObject |
@@ -95,7 +97,7 @@ class InstanceModel2PartialInterpretation { | |||
95 | } | 97 | } |
96 | 98 | ||
97 | // Transforming the attributes | 99 | // Transforming the attributes |
98 | for(attribute : source.eClass.EAllAttributes.filter[referencesUsed.contains(it)]) { | 100 | for(attribute : source.eClass.EAllAttributes.filter[attributesUsed.contains(it)]) { |
99 | val type = ecore2Logic.relationOfAttribute(ecore2LogicTrace,attribute) | 101 | val type = ecore2Logic.relationOfAttribute(ecore2LogicTrace,attribute) |
100 | val interpretation = type.lookup(partialInterpretationTrace.relation2Interpretation) | 102 | val interpretation = type.lookup(partialInterpretationTrace.relation2Interpretation) |
101 | val sourceElement = source.lookup(object2DefinedElement) | 103 | val sourceElement = source.lookup(object2DefinedElement) |