Language
ログイン
言語設定
X
English
日本語 [Japanese]
アプリの説明へ
Expression data handler
いいね!
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() { console.log('getworks'); var callback = function(res) { console.log(res); console.log('inside callback'); $.each(res, function(key, workId) { console.log("enumerating work : " + workId); data.workIds.push(workId); }); $.each(data.workIds, function(key, workId) { console.log("file will be loaded for " + workId); var files = Example.getFiles(workId); console.log(files); }); } LinkData.getWorks(callback); }; Example.getFiles = function(workId) { var callback = function(res) { console.log("getfiles callback"); console.log(res); if (typeof res[workId] != 'undefined') { $.each(res[workId], function(key, fileName) { Example.getSubjects(workId, fileName); }); } } LinkData.getFiles(workId, callback); }; Example.getSubjects = function(workId, fileName) { var callback = function(res) { $("#result").append("<h3>Subject List</h3>"); $.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) { $("#result").append("<h3>Property List</h3>"); $.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>
実行画面
入力データ
概要
保存した実行結果
データ作品
テーブルデータ
Brain region specific expression
作者:taendo
更新日:2012年9月6日
173 ダウンロード, 3 アプリケーション
linkdata
データ作品を追加する
Link http://app.linkdata.org/run/app1s90i?tab=readme
Initial content
jquery-1.7.1.min.js
Work
追加
クリア
insert work id or work name.