+
+ @SCLValue(type = "ReadGraph -> Resource -> a -> [Resource]")
+ public static List<Resource> standardIssueContexts(ReadGraph graph, Resource converter, Object property) throws DatabaseException {
+ if (property instanceof Variable) {
+ return IssueUtils.getContextsForProperty(graph, (Variable) property);
+ } else if (property instanceof Resource) {
+ Resource issue = (Resource) property;
+ IssueResource ISSUE = IssueResource.getInstance(graph);
+ Resource list = graph.getPossibleObject(issue, ISSUE.Issue_HasContexts);
+ if(list != null)
+ return ListUtils.toList(graph, list);
+ else
+ return Collections.emptyList();
+ }
+ throw new IllegalArgumentException("Unsupported property type: " + property);
+ }
+