summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
77fb299)
gitlab #28
TODO:
* UI for listing stored queries
* UI for defining/editing queries
* UI for executing queries
Change-Id: Ie1c3892d77313c452560f7015b387825a9d34e9e
import org.simantics.db.layer0.variable.Variable;
import org.simantics.db.layer0.variable.Variables;
import org.simantics.diagram.stubs.DiagramResource;
import org.simantics.db.layer0.variable.Variable;
import org.simantics.db.layer0.variable.Variables;
import org.simantics.diagram.stubs.DiagramResource;
+import org.simantics.district.network.ontology.DistrictNetworkResource;
import org.simantics.district.region.ontology.DiagramRegionsResource;
import org.simantics.district.selection.ElementSelector.AggregateCondition.Type;
import org.simantics.layer0.Layer0;
import org.simantics.district.region.ontology.DiagramRegionsResource;
import org.simantics.district.selection.ElementSelector.AggregateCondition.Type;
import org.simantics.layer0.Layer0;
static StructuralResource2 STR;
static ModelingResources MOD;
static DiagramResource DIA;
static StructuralResource2 STR;
static ModelingResources MOD;
static DiagramResource DIA;
+ static DistrictNetworkResource DN;
ElementSelector(ReadGraph graph, Resource resource) throws DatabaseException {
super();
ElementSelector(ReadGraph graph, Resource resource) throws DatabaseException {
super();
STR = StructuralResource2.getInstance(graph);
MOD = ModelingResources.getInstance(graph);
DIA = DiagramResource.getInstance(graph);
STR = StructuralResource2.getInstance(graph);
MOD = ModelingResources.getInstance(graph);
DIA = DiagramResource.getInstance(graph);
+ DN = DistrictNetworkResource.getInstance(graph);
this.resource = resource;
this.count = -1;
this.resource = resource;
this.count = -1;
if (value != null)
return value.doubleValue();
}
if (value != null)
return value.doubleValue();
}
+
+ // No property found - try possible mapped element property as well
+ Resource mappedElement = graph.getPossibleObject(element, DN.MappedComponent);
+ if (mappedElement != null)
+ return getPropertyValue(graph, mappedElement, propertyName);
}
catch (DatabaseException e) {
}
}
catch (DatabaseException e) {
}