Lively Kernel canvas
Draft-VisualODataExplorer40true
savefalsenulltruenull
ServiceURL:14true
http://services.odata.org/(S(asp33mq1bcq1qqxbcgikeccu))/OData/OData.svc14true
Explore...falsenulltruefalsetrue
true
Wikicontroltruetrue
createLayer('SmartObjectLayer');layerClass(SmartObjectLayer,Object,{each:function(proceed,func){for(varkeyinthis){if(typeofthis[key]!='function'){func(key,this[key]);}}},select:function(proceed,func,asObject){asObject=asObject||false;varres;if(asObject)res={};elseres=[];for(varkeyinthis){if((typeofthis[key]!='function')&&func(key,this[key])){if(asObject)res[key]=this[key];elseres.push(key);}}returnres;},detect:function(proceed,func,asObject){asObject=asObject||false;varres=null;for(varkeyinthis){if((typeofthis[key]!='function')&&func(key,this[key])){if(asObject){res={};res[key]=this[key];}elseres=key;break;}}returnres;},});enableLayer(SmartObjectLayer);Object.subclass('XMLJSONPrettifier',{});Object.subclass('XMLJSONPrettifier',{});Object.extend(XMLJSONPrettifier,{makePretty:function(input){varoutput={};input.each(function(key,value){if((key=='children')&&(valueinstanceofArray)){varsubs=output;value.each(function(ea){vartagName=ea['tagName'];varns=undefined;if(tagName.indexOf(':')>=0){ns=tagName.substring(0,tagName.indexOf(':'));tagName=tagName.substring(tagName.indexOf(':')+1);}if(tagName&&(tagName!='textNode')){subs[tagName]=subs[tagName]||[];subs[tagName].push(XMLJSONPrettifier.makePretty(ea));}if(ns)subs[tagName]._namespace=ns;});}elseif(key.startsWith('xmlns:')){output['_namespaces']=output['_namespaces']||{};output['_namespaces'][key.substr(6)]=value;}elseif(key=='tagName'){//donothing}else{varns;if(key.indexOf(':')>=0){ns=key.substring(0,key.indexOf(':'));key=key.substring(key.indexOf(':')+1);}if(parseInt(value).toString()==value)output[key]=parseInt(value);elseif(value=='true')output[key]=true;elseif(value=='false')output[key]=false;elseoutput[key]=value;if(ns)output[key]._namespace=ns;}});returnoutput;}});= 0) {\n\t\t\t\t\t\tns = tagName.substring(0, tagName.indexOf(':'));\n\t\t\t\t\t\ttagName = tagName.substring(tagName.indexOf(':') + 1);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (tagName && (tagName != 'textNode')) {\n\t\t\t\t\t\tsubs[tagName] = subs[tagName] || [];\n\t\t\t\t\t\tsubs[tagName].push(XMLJSONPrettifier.makePretty(ea));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (ns)\n\t\t\t\t\t\tsubs[tagName]._namespace = ns;\n\t\t\t\t});\n\t\t\t} else if (key.startsWith('xmlns:')) {\n\t\t\t\toutput['_namespaces'] = output['_namespaces'] || {};\n\t\t\t\toutput['_namespaces'][key.substr(6)] = value;\n\t\t\t} else if (key == 'tagName') {\n\t\t\t\t// do nothing\n\t\t\t} else {\n\t\t\t\tvar ns;\n\t\t\t\tif (key.indexOf(':') >= 0) {\n\t\t\t\t\tns = key.substring(0, key.indexOf(':'));\n\t\t\t\t\tkey = key.substring(key.indexOf(':') + 1);\n\t\t\t\t}\n\n\t\t\t\tif (parseInt(value).toString() == value)\n\t\t\t\t\toutput[key] = parseInt(value);\n\t\t\t\telse if (value == 'true')\n\t\t\t\t\toutput[key] = true;\n\t\t\t\telse if (value == 'false')\n\t\t\t\t\toutput[key] = false;\n\t\t\t\telse\n\t\t\t\t\toutput[key] = value;\n\n\t\t\t\tif (ns)\n\t\t\t\t\toutput[key]._namespace = ns;\n\t\t\t}\n\t\t});\n\n\t\treturn output;\n\t}\n});"]]>= 0) {\n\t\t\t\t\t\tns = tagName.substring(0, tagName.indexOf(':'));\n\t\t\t\t\t\ttagName = tagName.substring(tagName.indexOf(':') + 1);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (tagName && (tagName != 'textNode')) {\n\t\t\t\t\t\tsubs[tagName] = subs[tagName] || [];\n\t\t\t\t\t\tsubs[tagName].push(XMLJSONPrettifier.makePretty(ea));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (ns)\n\t\t\t\t\t\tsubs[tagName]._namespace = ns;\n\t\t\t\t});\n\t\t\t} else if (key.startsWith('xmlns:')) {\n\t\t\t\toutput['_namespaces'] = output['_namespaces'] || {};\n\t\t\t\toutput['_namespaces'][key.substr(6)] = value;\n\t\t\t} else if (key == 'tagName') {\n\t\t\t\t// do nothing\n\t\t\t} else {\n\t\t\t\tvar ns;\n\t\t\t\tif (key.indexOf(':') >= 0) {\n\t\t\t\t\tns = key.substring(0, key.indexOf(':'));\n\t\t\t\t\tkey = key.substring(key.indexOf(':') + 1);\n\t\t\t\t}\n\n\t\t\t\tif (parseInt(value).toString() == value)\n\t\t\t\t\toutput[key] = parseInt(value);\n\t\t\t\telse if (value == 'true')\n\t\t\t\t\toutput[key] = true;\n\t\t\t\telse if (value == 'false')\n\t\t\t\t\toutput[key] = false;\n\t\t\t\telse\n\t\t\t\t\toutput[key] = value;\n\n\t\t\t\tif (ns)\n\t\t\t\t\toutput[key]._namespace = ns;\n\t\t\t}\n\t\t});\n\n\t\treturn output;\n\t}\n});"]]>truetruefalse
falsetruetruefalse
false00.11
true
false
truefalsenull
nullfalsetruenullfalse
XMLJSONPrettifierfalsenulltruefalse
Xfalsenulltrue
false
false
–falsenulltrue
false
falsenullfalsefalsefalse
ProtoVisDrawing.subclass('PieExplorerDiagram',{initialize:function($super,data){$super();this.data=data;},nodes:function(){if(this._rootNode)returnthis._rootNode;functioncreate(data){varignoreKeys=['_namespace','_namespaces','_layer_object_id','xmlns','Name'];varnode=newpv.Dom.Node;for(varkeyindata){varvalue=data[key];if(!data.hasOwnProperty(key)||ignoreKeys.member(key)||(typeofvalue=='function'))continue;varsubNode=node.appendChild((typeofvalue!='object')?newpv.Dom.Node(value):create(value));subNode.nodeName=key;}returnnode;}varroot=create(pv.dom(this.data).$map);root.nodeName='Metadata';this._rootNode=root;returnroot;},draw:function(){varw=680,h=680;varvis=newpv.Panel().width(w).height(h).margin(5).fillStyle("white").event("mousedown",pv.Behavior.pan()).event("mousewheel",pv.Behavior.zoom());varpartition=vis.add(pv.Layout.Partition.Fill).nodes(this.nodes().nodes()).size(function(d){returnd.firstChild?0:1;}).order("descending").orient("radial");partition.node.add(pv.Wedge).fillStyle(pv.Colors.category19().by(function(d){returnd.parentNode&&d.parentNode.nodeName;})).strokeStyle("#fff").lineWidth(.5).event("click",function(){selectedNode=this.data();console.log('Clickedon:'+this.data());});partition.label.add(pv.Label).visible(function(d){returnd.angle*d.outerRadius>=6;});returnvis;},});= 6; });\n\n\t\treturn vis;\n\t},\n});"]]>= 6; });\n\n\t\treturn vis;\n\t},\n});"]]>1truetruefalse
truetruefalse
false00.11
true
false
truefalse
nullfalsetruenullfalse
Visualizationfalsenulltruefalse
Xfalsenulltrue
false
false
–falsenulltrue
false
falsenullfalsefalsenullnullnullnullfalse
null228