- JSONObject result = staticContent.clone();
- result.add(dynamicContent);
-
- if(dynamicContent.containsKey(ERRORS) || staticContent.getJSONField(ERRORS) != null) {
- ArrayList<String> errorList = new ArrayList<>();
-
- if(dynamicContent.containsKey(ERRORS))
- errorList.addAll((List<String>)dynamicContent.get(ERRORS));
-
- if(staticContent.getJSONField(ERRORS) != null)
- errorList.addAll((List<String>)staticContent.getJSONField(ERRORS));
-
- result.addJSONField(ERRORS, errorList);
- }
-
- 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));
- }
- }