window.onload = function() {
var limit = 5;
var count = 0;
$.each(LinkData.getWorks(), function(workKey, workValue) {
$("#result").append("<h3>Work: " + workValue + "</h3>");
$.each(LinkData.getFiles(workValue), function(fileKey, fileValue) {
$("#result").append("<h4>File: " + fileValue + "</h4>");
$.each(LinkData.getSubjects(workValue, fileValue), function(subjKey, subjValue) {
count = 0;
$.each(LinkData.getProperties(workValue, fileValue), function(propKey, propValue) {
if(count++ > limit) {
return false;
}
$("#result").append("<div style='padding-top:10px;'>Subject : " + subjValue + "</div>");
$("#result").append("<div style='padding-left:10px;'>Property : " + propValue + "</div>");
$("#result").append("<div style='padding-left:20px;'>Objects</div>");
$.each(LinkData.getObjects(workValue, fileValue, subjValue, propValue), function(objKey, objValue) {
$("#result").append("<div style='padding-left:30px;'>" + objValue + "</div>");
});
});
});
});
});
};