return Collections.emptyList();\r
\r
Collection<Resource> dependants;\r
- if(isInverted)\r
- dependants = getDependants(g, graph, r, sr.Variable_isTailOf, sr.Variable_HasHead, sr.Dependency);\r
- else {\r
- dependants = getDependants(g, graph, r, sr.Variable_isHeadOf, sr.Variable_HasTail, sr.Dependency);\r
- if (g.isInstanceOf(r, sr.Stock)) {\r
- dependants.addAll(getDependants(g, graph, r, sr.Variable_isTailOf, sr.Variable_HasHead, sr.Flow));\r
- dependants.addAll(getDependants(g, graph, r, sr.Variable_isHeadOf, sr.Variable_HasTail, sr.Flow));\r
- }\r
+ if(isInverted) {\r
+ dependants = getDependants(g, graph, r, sr.Variable_isTailOf, sr.Variable_HasHead, sr.Dependency);\r
+ if (g.isInstanceOf(r, sr.Valve)) {\r
+ dependants.addAll(getDependants(g, graph, r, sr.Variable_isTailOf, sr.Variable_HasHead, sr.Flow));\r
+ dependants.addAll(getDependants(g, graph, r, sr.Variable_isHeadOf, sr.Variable_HasTail, sr.Flow));\r
+ }\r
+ } else {\r
+ dependants = getDependants(g, graph, r, sr.Variable_isHeadOf, sr.Variable_HasTail, sr.Dependency);\r
+ if (g.isInstanceOf(r, sr.Stock)) {\r
+ dependants.addAll(getDependants(g, graph, r, sr.Variable_isTailOf, sr.Variable_HasHead, sr.Flow));\r
+ dependants.addAll(getDependants(g, graph, r, sr.Variable_isHeadOf, sr.Variable_HasTail, sr.Flow));\r
+ }\r
}\r
\r
return dependants;\r