Skip to content

Commit

Permalink
Global rename of .sf to .fetcher to make API more usable. Improvement…
Browse files Browse the repository at this point in the history
…s to link-following query in rdf.
  • Loading branch information
Tim Berners-Lee committed Feb 4, 2015
1 parent b04326e commit da7fed7
Show file tree
Hide file tree
Showing 22 changed files with 1,446 additions and 1,469 deletions.
84 changes: 42 additions & 42 deletions calendar.html
@@ -1,42 +1,42 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html id='docHTML'>
<head>
<title>Tabulator: Async Javascript And Semantic Web</title>
<link rel="stylesheet" href="chrome://tabulator/content/js/calView/assets/calendar.css" type="text/css" />
<link rel="stylesheet" href="chrome://tabulator/content/js/calView/assets/bigCal.css" type="text/css" />
<link rel="stylesheet" href="chrome://tabulator/content/tabbedtab.css" type="text/css" />
<script src="js/views/timeutil.js" type="text/javascript"></script>
<script src="js/views/calView.js" type="text/javascript"></script>
<script src="js/views/calView/timeline/api/timeline-api.js" type="text/javascript"></script>
<script src="js/views/calView/timeline/api/timelineView.js" type="text/javascript"></script>
<script src="js/views/calView/calView.js" type="text/javascript"></script>
<script src="js/rdf/util.js" type="text/javascript"></script>
<script src="js/tab/util-nonlib.js" type="text/javascript"></script>
</head>

<body>
<div class="viewArea" id="viewArea">
</div>
<div id="divCal" class="divCal" style="display:none">
</div>
</body>

<script type="application/x-javascript">
function calLoader() {
tabulator = Components.classes["@dig.csail.mit.edu/tabulator;1"].getService(Components.interfaces.nsISupports).wrappedJSObject;
//Horrible global vars :(
kb = tabulator.kb;
sf = tabulator.sf;
qs = tabulator.qs;
var myCalView = new calView(document.getElementById('viewArea'));
qs.addListener(myCalView);
//extract the query ID Here!

var q = qs.queries[getURIQueryParameters(window.location)['query']];
myCalView.drawQuery(q);
}
document.onLoad=calLoader();
</script>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html id='docHTML'>
<head>
<title>Tabulator: Async Javascript And Semantic Web</title>
<link rel="stylesheet" href="chrome://tabulator/content/js/calView/assets/calendar.css" type="text/css" />
<link rel="stylesheet" href="chrome://tabulator/content/js/calView/assets/bigCal.css" type="text/css" />
<link rel="stylesheet" href="chrome://tabulator/content/tabbedtab.css" type="text/css" />
<script src="js/views/timeutil.js" type="text/javascript"></script>
<script src="js/views/calView.js" type="text/javascript"></script>
<script src="js/views/calView/timeline/api/timeline-api.js" type="text/javascript"></script>
<script src="js/views/calView/timeline/api/timelineView.js" type="text/javascript"></script>
<script src="js/views/calView/calView.js" type="text/javascript"></script>
<script src="js/rdf/util.js" type="text/javascript"></script>
<script src="js/tab/util-nonlib.js" type="text/javascript"></script>
</head>

<body>
<div class="viewArea" id="viewArea">
</div>
<div id="divCal" class="divCal" style="display:none">
</div>
</body>

<script type="application/x-javascript">
function calLoader() {
tabulator = Components.classes["@dig.csail.mit.edu/tabulator;1"].getService(Components.interfaces.nsISupports).wrappedJSObject;
//Horrible global vars :(
kb = tabulator.kb;
sf = tabulator.fetcher;
qs = tabulator.qs;
var myCalView = new calView(document.getElementById('viewArea'));
qs.addListener(myCalView);
//extract the query ID Here!

var q = qs.queries[getURIQueryParameters(window.location)['query']];
myCalView.drawQuery(q);
}
document.onLoad=calLoader();
</script>
</html>
37 changes: 4 additions & 33 deletions js/init/init-mashup.js
Expand Up @@ -4,41 +4,14 @@ tabulator = {};
tabulator.isExtension = false;

// base for icons etc
tabulator.scriptBase = 'https://raw.github.com/linkeddata/tabulator/master/';

/*
tabulator.getScriptName = function () {
var error = new Error()
, source
, lastStackFrameRegex = new RegExp(/.+\/(.*?):\d+(:\d+)*$/)
, currentStackFrameRegex = new RegExp(/getScriptName \(.+\/(.*):\d+:\d+\)/);
if((source = lastStackFrameRegex.exec(error.stack.trim())) && source[1] != "")
return source[1];
else if((source = currentStackFrameRegex.exec(error.stack.trim())))
return source[1];
else if(error.fileName != undefined)
return error.fileName;
}
*/
// tabulator.scriptBase = tabulato.getScriptName();
// tabulator.scriptBase = tabulator.scriptBase.split('/').slice(0,-1).join('/') + '/';
tabulator.scriptBase = 'https://raw.github.com/linkeddata/tabulator/master/'; // @@ now broken - set explictly in HTML page

tabulator.iconPrefix = tabulator.scriptBase;

// Dump exists in ff but not safari.
if (typeof dump == 'undefined') dump = function(x) {};

var complain = function complain(message, style){
if (style == undefined) style = 'color: grey';
var pre = document.createElement("pre");
pre.setAttribute('style', style);
document.lastChild.appendChild(pre);
pre.appendChild(document.createTextNode(message));
}
if (typeof dump == 'undefined') dump = function(x) {console.log(x)};

tabulator.setup = function() {
// complain("@@ init.js test 40 )");

//Before anything else, load up the logger so that errors can get logged.
tabulator.loadScript("js/tab/log.js");
Expand Down Expand Up @@ -74,17 +47,15 @@ tabulator.setup = function() {
tabulator.loadScript("js/tab/labeler.js");
tabulator.loadScript("js/tab/request.js");
tabulator.loadScript("js/tab/outlineinit.js");
// tabulator.loadScript("js/tab/updateCenter.js"); obsolete, moved to rdf/sparqlUpdate.js
tabulator.loadScript("js/tab/userinput.js");
tabulator.loadScript("js/tab/outline.js");

//Oh, and the views!
//@@ jambo commented this out to pare things down temporarily.
tabulator.loadScript("js/init/views.js");

tabulator.kb = new tabulator.rdf.IndexedFormula();
tabulator.sf = new tabulator.rdf.Fetcher(tabulator.kb);
tabulator.kb.sf = tabulator.sf;
tabulator.sf = tabulator.fetcher = new tabulator.rdf.Fetcher(tabulator.kb); // .sf deprecated

tabulator.qs = new tabulator.rdf.QuerySource();
// tabulator.sourceWidget = new SourceWidget();
tabulator.sourceURI = "resource://tabulator/";
Expand Down

0 comments on commit da7fed7

Please sign in to comment.