Created
November 8, 2015 20:04
-
-
Save melvincarvalho/145897284806507921a8 to your computer and use it in GitHub Desktop.
clip.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $rdf = require('rdflib'); | |
| var CHAT = $rdf.Namespace("https://ns.rww.io/chat#"); | |
| var CURR = $rdf.Namespace("https://w3id.org/cc#"); | |
| var DCT = $rdf.Namespace("http://purl.org/dc/terms/"); | |
| var FACE = $rdf.Namespace("https://graph.facebook.com/schema/~/"); | |
| var FOAF = $rdf.Namespace("http://xmlns.com/foaf/0.1/"); | |
| var LIKE = $rdf.Namespace("http://ontologi.es/like#"); | |
| var LDP = $rdf.Namespace("http://www.w3.org/ns/ldp#"); | |
| var MBLOG = $rdf.Namespace("http://www.w3.org/ns/mblog#"); | |
| var OWL = $rdf.Namespace("http://www.w3.org/2002/07/owl#"); | |
| var PIM = $rdf.Namespace("http://www.w3.org/ns/pim/space#"); | |
| var RDF = $rdf.Namespace("http://www.w3.org/1999/02/22-rdf-syntax-ns#"); | |
| var RDFS = $rdf.Namespace("http://www.w3.org/2000/01/rdf-schema#"); | |
| var SIOC = $rdf.Namespace("http://rdfs.org/sioc/ns#"); | |
| var SOLID = $rdf.Namespace("http://www.w3.org/ns/solid/app#"); | |
| var TMP = $rdf.Namespace("urn:tmp:"); | |
| var storageURI = 'https://clip.databox.me/Public/.clip/Public/test'; | |
| var TIMEOUT = 2000; | |
| var g = $rdf.graph(); | |
| var f = $rdf.fetcher(g, TIMEOUT); | |
| f.nowOrWhenFetched(storageURI, undefined, function(ok, body) { | |
| var clipboard = g.any($rdf.sym(storageURI + '#this'), TMP('clipboard')); | |
| console.log(clipboard); | |
| }); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
installation