- @SuppressWarnings("unchecked")
- @Override
- public JSONObject perform(ReadGraph graph) throws DatabaseException {
-
- long s = System.nanoTime();
-
- Pair<JSONObject, Collection<Variable>> attribs = graph.syncRequest(new AttributesRequest(variable));
-
- JSONObject staticContent = attribs.first;
- if(attribs.second.isEmpty()) {
-
- if(DocumentRequest.PROFILE) {
- long dura = System.nanoTime()-s;
- if(dura > DocumentRequest.PROFILE_THRESHOLD_NODEREQUEST * 1e3) {
- System.err.println("NodeRequest " + System.identityHashCode(this) + " in " + 1e-6*dura + "ms. " + variable.getURI(graph));
- }
- }
-
- return staticContent;
- }
-
- Map<String,Object> dynamicContent = graph.syncRequest(new NodeRequestDynamic(variable));
- if(dynamicContent.isEmpty()) {
- return staticContent;
- }
-
- JSONObject result = staticContent.clone();
- result.add(dynamicContent);