drupal/core/vendor/easyrdf/easyrdf
webchick 02b19f340a Issue #2173653 by kay_v, scor: Update easyrdf/easyrdf to 0.8.0. 2014-01-23 23:04:41 -08:00
..
lib Issue #2173653 by kay_v, scor: Update easyrdf/easyrdf to 0.8.0. 2014-01-23 23:04:41 -08:00
scripts Issue #2173653 by kay_v, scor: Update easyrdf/easyrdf to 0.8.0. 2014-01-23 23:04:41 -08:00
CHANGELOG.md Issue #2173653 by kay_v, scor: Update easyrdf/easyrdf to 0.8.0. 2014-01-23 23:04:41 -08:00
DEVELOPER.md Issue #2173653 by kay_v, scor: Update easyrdf/easyrdf to 0.8.0. 2014-01-23 23:04:41 -08:00
LICENSE.md Issue #1875818 by Berdir: Update composer.json to use the latest stable 3.0.x version of Guzzle. 2013-01-16 14:42:23 -08:00
README.md Issue #2173653 by kay_v, scor: Update easyrdf/easyrdf to 0.8.0. 2014-01-23 23:04:41 -08:00
composer.json Issue #2173653 by kay_v, scor: Update easyrdf/easyrdf to 0.8.0. 2014-01-23 23:04:41 -08:00
doap.php Issue #2173653 by kay_v, scor: Update easyrdf/easyrdf to 0.8.0. 2014-01-23 23:04:41 -08:00

README.md

EasyRdf

EasyRdf is a PHP library designed to make it easy to consume and produce RDF. It was designed for use in mixed teams of experienced and inexperienced RDF developers. It is written in Object Oriented PHP and has been tested extensively using PHPUnit.

After parsing EasyRdf builds up a graph of PHP objects that can then be walked around to get the data to be placed on the page. Dump methods are available to inspect what data is available during development.

Data is typically loaded into a EasyRdf_Graph object from source RDF documents, loaded from the web via HTTP. The EasyRdf_GraphStore class simplifies loading and saving data to a SPARQL 1.1 Graph Store.

SPARQL queries can be made over HTTP to a Triplestore using the EasyRdf_Sparql_Client class. SELECT and ASK queries will return an EasyRdf_Sparql_Result object and CONSTRUCT and DESCRIBE queries will return an EasyRdf_Graph object.

Example

$foaf = new EasyRdf_Graph("http://njh.me/foaf.rdf");
$foaf->load();
$me = $foaf->primaryTopic();
echo "My name is: ".$me->get('foaf:name')."\n";

Downloads

The latest stable version of EasyRdf can be downloaded from the EasyRdf website.

Requirements

  • PHP 5.2.8 or higher

Features

  • API documentation written in phpdoc
  • Extensive unit tests written using phpunit
    • Automated testing against PHP 5.2, 5.3 and 5.4
  • Built-in parsers and serialisers: RDF/JSON, N-Triples, RDF/XML, Turtle
  • Optional parsing support for: ARC2, Redland Bindings, rapper
  • Optional support for Zend_Http_Client
  • No required external dependancies upon other libraries (PEAR, Zend, etc...)
  • Complies with Zend Framework coding style.
  • Type mapper - resources of type foaf:Person can be mapped into PHP object of class Foaf_Person
  • Support for visualisation of graphs using GraphViz
  • Comes with a number of examples

More Examples

Licensing

The EasyRdf library and tests are licensed under the BSD-3-Clause license. The examples are in the public domain, for more information see UNLICENSE.