Language
Login
Language Setting
X
English
日本語 [Japanese]
about this App
testapp
useful
0
Loading...
/* This is a Example program to retrieve and display the data. Press the Run button on the right of the screen (described the behavior of the Example program below). Please create a new application rewrite this program work. */ if(typeof Example==="undefined"||!Example){var Example = {};} var data = {}; data.limit = 1; data.count = 0; data.workIds = []; data.fileNames = []; data.subjects = []; data.properties = []; Example.getWorks = function() { var callback = function(res) { $.each(res, function(key, workId) { data.workIds.push(workId); }); $.each(data.workIds, function(key, workId) { Example.getFiles(workId); }); } LinkData.getWorks(callback); }; Example.getFiles = function(workId) { var callback = function(res) { $.each(res, function(fileKey, fileName) { Example.getSubjects(workId, fileName); }); } LinkData.getFiles(workId, callback); }; Example.getSubjects = function(workId, fileName) { var callback = function(res) { $.each(res, function(subjectKey, subjectValue) { data.subjects.push(subjectValue); }); Example.getProperties(workId, fileName); } LinkData.getSubjects(workId, fileName, callback); }; Example.getProperties = function(workId, fileName) { var callback = function(res) { $.each(res, function(propertyKey, propertyValue) { data.properties.push(propertyValue); }); Example.getObjectList(workId, fileName); } LinkData.getProperties(workId, fileName, callback); }; Example.getObjectList = function(workId, fileName) { $.each(data.subjects, function(sKey, sValue) { data.count = 0; $.each(data.properties, function(pKey, pValue) { if(data.count++ > data.limit) { return false; } Example.getObjects(workId, fileName, sValue, pValue); }); }); } Example.getObjects = function(workId, fileName, subject, property) { var callback = function(res) { $("#result").append("<div style='padding-top:10px;'>Subject : " + subject + "</div>"); $("#result").append("<div style='padding-left:10px;'>Property : " + property + "</div>"); $("#result").append("<div style='padding-left:20px;'>Objects</div>"); $.each(res, function(objectKey, objectValue) { $("#result").append("<div style='padding-left:30px;'>" + objectValue + "</div>"); }); } LinkData.getObjects(workId, fileName, subject, property, callback); }; window.onload = function() { Example.getWorks(); }
<div id="result"></div>
Preview
Input Data
ReadMe
Snapshots
LinkData Work
Table Data
ハンズオンテスト
Contributor:takaya_deguchi
Update:Dec 15, 2012
197 Downloads, 1 Applications
shisetsu_template_test
Add LinkData work(LinkData)
Link http://app.linkdata.org/run/app1s139i?tab=readme
Initial content
jquery-1.7.1.min.js
Work
Add
Clear
insert work id or work name.