- String name = graph.getRelatedValue(r, L0.HasName, Bindings.STRING);
- DraftStatusBean draft = ModelingUtils.getDependencyDraftStatus(graph, r);
- result.add(new LibraryInfo(name, r, draft));
+ Resource model = r;
+ if(!graph.isInstanceOf(model, SIMU.Model)) {
+ model = graph.syncRequest(new IndexRoot(r));
+ if(!graph.isInstanceOf(model, SIMU.Model))
+ continue;
+ }
+ String name = graph.getRelatedValue(model, L0.HasName, Bindings.STRING);
+ DraftStatusBean draft = ModelingUtils.getDependencyDraftStatus(graph, model);
+ result.add(new LibraryInfo(name, model, draft));