Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

EasyRdf is a PHP library designed to make it easy to consume and produce RDF.

License

NotificationsYou must be signed in to change notification settings

easyrdf/easyrdf

Repository files navigation

EasyRdf is a PHP library designed to make it easy to consume and produceRDF.It was designed for use in mixed teams of experienced and inexperienced RDFdevelopers. It is written in Object Oriented PHP and has been testedextensively using PHPUnit.

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

Data is typically loaded into anEasyRdf\Graph object from source RDFdocuments, loaded from the web via HTTP. TheEasyRdf\GraphStore classsimplifies loading and saving data to a SPARQL 1.1 Graph Store.

SPARQL queries can be made over HTTP to a Triplestore using theEasyRdf\Sparql\Client class.SELECT andASK queries will return anEasyRdf\Sparql\Result object andCONSTRUCT andDESCRIBE queries will returnanEasyRdf\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 lateststable version of EasyRdf can bedownloaded from the EasyRdf website.

Links

Requirements

  • PHP 7.1 or higher

Features

  • API documentation written inphpdoc
  • Extensive unit tests written usingphpunit
  • Built-in parsers and serialisers: RDF/JSON, N-Triples, RDF/XML, Turtle
  • Optional parsing support for:ARC2,rapper
  • Optional support forZend\Http\Client
  • No required external dependencies upon other libraries (PEAR, Zend, etc...)
  • Complies with Zend Framework coding style.
  • Type mapper - resources of typefoaf:Person can be mapped into PHP object of classFoaf_Person
  • Support for visualisation of graphs usingGraphViz
  • Comes with a number of examples

List of Examples

Contributing

We welcome any contributions. For further information please readCONTRIBUTING.md.

For further information about extending / hack EasyRdf please readDEVELOPER.md.

Running Examples

The easiest way of trying out some of the examples is to use the PHP command torun a local web server on your computer.

php -S localhost:8080 -t examples

Then open the following URL in your browser:http://localhost:8080/

Licensing

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

About

EasyRdf is a PHP library designed to make it easy to consume and produce RDF.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp