nodeSet = getClassesWithProperty(workspace, propertyURI);
}
else if (range == INTERNAL_NODES_RANGE.allClassesRaw) {
final OntologyManager ontMgr = workspace.getOntologyManager();
final HashMap<String, Label> allClasses = ontMgr.getClasses();
UpdateContainer upd = new UpdateContainer(new AbstractUpdate() {
@Override
public void generateJson(String prefix, PrintWriter pw,
VWorkspace vWorkspace) {
JSONArray nodesArray = new JSONArray();
JSONObject obj = new JSONObject();
for (Entry<String, Label> entry : allClasses.entrySet()) {
JSONObject nodeObj = new JSONObject();
Label label = entry.getValue();
nodeObj.put(JsonKeys.nodeLabel.name(), label.getDisplayName());
nodeObj.put(JsonKeys.nodeId.name(), label.getUri());
nodeObj.put(JsonKeys.nodeUri.name(), label.getUri());
nodesArray.put(nodeObj);
}
obj.put(JsonKeys.nodes.name(), nodesArray);
pw.println(obj.toString());
}
});
return upd;
}
if (nodeSet == null) {
nodeSet = new HashSet<Node>();
}
final Set<Node> finalNodeSet = nodeSet;
UpdateContainer upd = new UpdateContainer(new AbstractUpdate() {
@Override
public void generateJson(String prefix, PrintWriter pw,
VWorkspace vWorkspace) {
JSONObject obj = new JSONObject();
JSONArray nodesArray = new JSONArray();