4 * Hook definitions for Linked Data Tools
6 * @copyright Copyright(c) 2012 Christopher Skne
7 * @license GPL v2 http://www.fsf.org/licensing/licenses/gpl.html
8 * @author Chris Skene chris at xtfer dot com
12 * Provide information about library plugins for working with Linked Data.
14 * Defines hook_ldt_library_wrapper().
16 * This hook only needs to be implemented by providers of linked data libraries
20 * An array of library configurations. Each library should provide two
22 * 'name' - The human readable name of the library. May be wrapped in t() if
24 * 'class' - The class to load for working with data.
26 function hook_ldt_library_wrappers() {
29 $wrappers['easyrdf'] = array(
31 'class' => '\Drupal\ldt\Plugins\EasyRdf',
38 * Define data formats accepted by LDT.
40 * Linked Data comes in different formats. This function returns an array
41 * of supported formats. Some formats may not be compatible with some plugins,
42 * it is up to the implementer to know which, currently.
44 * Defines hook_ldt_data_formats().
47 * An array of format definitions. Each definition includes:
48 * 'name' - Human readable name.
49 * 'accept' - an array of mime type accept headers to set for requests
50 * 'uri' - a URI for the format definition
51 * 'extensions' - an array of possible file extensiosn
52 * The 'uri' and 'extensions' keys are not used by the default EasyRDF plugin
53 * however it provides its own data here, and the information is provided for
54 * use by other plugins.
56 function hook_ldt_data_formats() {
59 $formats['rdf+xml'] = array(
61 'accept' => 'application/rdf+xml',