- if(tgSourceRepresentation != null) items.add(tgSourceRepresentation);
-
- if(resources.size() == 1) {
- Collection<Representation> representations = graph.syncRequest(new ResourceRead<Collection<Representation>>(resources.iterator().next()) {
- @Override
- public Collection<Representation> perform(ReadGraph graph) throws DatabaseException {
- ArrayList<Representation> result = new ArrayList<Representation>();
- Layer0X L0X = Layer0X.getInstance(graph);
- for(Resource adapter : graph.getObjects(resource, L0X.HasRepresentation)) {
- result.add(graph.adapt(adapter, Representation.class));
- }
- return result;
- }
- });
+ if (tgSourceRepresentation != null)
+ items.add(tgSourceRepresentation);
+ subMonitor.worked(2);
+
+ if (resources.size() == 1) {
+ SubMonitor splittedChild = subMonitor.split(6);
+ Collection<Representation> representations = graph
+ .syncRequest(new ResourceRead<Collection<Representation>>(resources.iterator().next()) {
+ @Override
+ public Collection<Representation> perform(ReadGraph graph) throws DatabaseException {
+ ArrayList<Representation> result = new ArrayList<Representation>();
+ Layer0X L0X = Layer0X.getInstance(graph);
+ for (Resource adapter : graph.getObjects(resource, L0X.HasRepresentation)) {
+ result.add(graph.adapt(adapter, Representation.class));
+ splittedChild.worked(1);
+ }
+ return result;
+ }
+ });