{"id":247,"date":"2010-03-30T14:39:00","date_gmt":"2010-03-30T14:39:00","guid":{"rendered":"http:\/\/blog.soton.ac.uk\/webteam\/?p=247"},"modified":"2010-03-30T14:39:00","modified_gmt":"2010-03-30T14:39:00","slug":"graphite-updates","status":"publish","type":"post","link":"https:\/\/blog.soton.ac.uk\/webteam\/2010\/03\/30\/graphite-updates\/","title":{"rendered":"Graphite Updates"},"content":{"rendered":"<p>I&#8217;ve done some more work on my Graphite PHP library. It now works a bit more like jQuery, which is nice. The general design philosophy is to try to make it as easy as possible to start doing something interesting.<\/p>\n<ul>\n<li><a href=\"http:\/\/graphite.ecs.soton.ac.uk\/\">http:\/\/graphite.ecs.soton.ac.uk\/<\/a><\/li>\n<\/ul>\n<p>I really like the following bit of code:<\/p>\n<blockquote>\n<pre style=\"font-family: monospace\"><span style=\"color: #b1b100\">print<\/span> <span style=\"color: #000088\">$graph<\/span><span style=\"color: #339933\">-&gt;<\/span><span style=\"color: #004000\">allOfType<\/span><span style=\"color: #009900\">(<\/span> <span style=\"color: #0000ff\">\"foaf:Person\"<\/span> <span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">-&gt;<\/span><span style=\"color: #004000\">get<\/span><span style=\"color: #009900\">(<\/span> <span style=\"color: #0000ff\">\"foaf:name\"<\/span> <span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">-&gt;<\/span><span style=\"color: #004000\">join<\/span><span style=\"color: #009900\">(<\/span> <span style=\"color: #0000ff\">\", \"<\/span> <span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">.<\/span><span style=\"color: #0000ff\">\".<span style=\"color: #000099;font-weight: bold\">\\n<\/span>\"<\/span><span style=\"color: #339933\">;\r\n<\/span><\/pre>\n<\/blockquote>\n<p>Which prints out the list of all the peoples names. No loops! I even wrote documentation for it!<\/p>\n<h2>Graphite Browser<\/h2>\n<p>On Friday I needed a quick and easy linked-data browser and most of the ones out there I find bothersome and complicated, and I wanted something for a teaching aid, so I wrote this:<\/p>\n<ul>\n<li><a href=\"http:\/\/graphite.ecs.soton.ac.uk\/browser\/\">http:\/\/graphite.ecs.soton.ac.uk\/browser\/<\/a><\/li>\n<\/ul>\n<p>Which is very quick &amp; dirty but I&#8217;m quite liking it to just look inside RDF &amp; RDFa documents. It just does a regexp so all the hyperlinks go to http:\/\/graphite.ecs.soton.ac.uk\/browser\/?uri=XXXX instead of XXXX.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve done some more work on my Graphite PHP library. It now works a bit more like jQuery, which is nice. The general design philosophy is to try to make it as easy as possible to start doing something interesting. http:\/\/graphite.ecs.soton.ac.uk\/ I really like the following bit of code: print $graph-&gt;allOfType( &#8220;foaf:Person&#8221; )-&gt;get( &#8220;foaf:name&#8221; )-&gt;join( [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[281,138],"tags":[],"class_list":["post-247","post","type-post","status-publish","format-standard","hentry","category-graphite","category-php"],"_links":{"self":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/247","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/comments?post=247"}],"version-history":[{"count":1,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/247\/revisions"}],"predecessor-version":[{"id":248,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/247\/revisions\/248"}],"wp:attachment":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/media?parent=247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/categories?post=247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/tags?post=247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}