cgutteridge/graphite

Friendly API to work with RDF data using ARC2

2.0 2015-07-20 15:16 UTC

This package is not auto-updated.

Last update: 2024-12-17 06:23:15 UTC


README

Graphite is LGPL. 

Graphite is a friendly API for working with graph data (RDF).

Copyright 2010-2012 University of Southampton and Christopher Gutteridge.
Homepage: http://graphite.ecs.soton.ac.uk/
Github: https://github.com/cgutteridge/Graphite

Icons in prettyLink example by Yusuke Kamiyamane. All rights reserved. Licensed under a Creative Commons Attribution 3.0 License. http://p.yusukekamiyamane.com/

To use: (see examples for more)
    <?php

    require_once("path/to/arc/ARC2.php");
    require_once("Graphite.php");

    $graph = new Graphite();
    $graph->load( "http://id.ecs.soton.ac.uk/person/1248" );
    $me = $graph->resource( "http://id.ecs.soton.ac.uk/person/1248" );


    print "<h1>".$me->prettyLink()."</h1>";
    print "<p>default, built-in icons.</p>";
    print "<div>".$me->get( "foaf:mbox" )->prettyLink()."</div>";
    print "<div>".$me->get( "foaf:phone" )->prettyLink()."</div>";



    print "<h1>".$me->prettyLink()."</h1>";
    print '<p>The following icons by <a href="http://p.yusukekamiyamane.com/">Yusuke Kamiyamane</a>. All rights reserved. Licensed under a <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 License</a>.</p>';
    $graph->mailtoIcon( "icons/mail.png" );
    $graph->telIcon( "icons/telephone-handset.png" );
    print "<div>".$me->get( "foaf:mbox" )->prettyLink()."</div>";
    print "<div>".$me->get( "foaf:phone" )->prettyLink()."</div>";

# Dev dependencies
$ pear config-set auto_discover 1
$ pear install pear.phpqatools.org/phpqatools pear.netpirates.net/phpDox
$ pear install PEAR_PackageFileManager_Cli

# To test:
$ ant phpunit

To build/prepare a release:
$ pfm
$ ant