Initial commit

This commit is contained in:
Mauricio Dinarte 2024-12-04 10:11:27 -06:00
commit c5e731d8ae
2773 changed files with 600767 additions and 0 deletions

View file

@ -0,0 +1,12 @@
name = "RDF module tests"
description = "Support module for RDF module testing."
package = Testing
version = VERSION
core = 7.x
hidden = TRUE
dependencies[] = blog
; Information added by Drupal.org packaging script on 2024-03-06
version = "7.100"
project = "drupal"
datestamp = "1709734591"

View file

@ -0,0 +1,25 @@
<?php
/**
* @file
* Install, update and uninstall functions for the rdf module.
*/
/**
* Implements hook_install().
*/
function rdf_test_install() {
$rdf_mappings = array(
array(
'type' => 'node',
'bundle' => 'test_bundle_hook_install',
'mapping' => array(
'rdftype' => array('foo:mapping_install1', 'bar:mapping_install2'),
),
),
);
foreach ($rdf_mappings as $rdf_mapping) {
rdf_mapping_save($rdf_mapping);
}
}

View file

@ -0,0 +1,66 @@
<?php
/**
* @file
* Test API interaction with the RDF module.
*/
/**
* Implements hook_rdf_mapping().
*/
function rdf_test_rdf_mapping() {
return array(
array(
'type' => 'test_entity',
'bundle' => 'test_bundle',
'mapping' => array(
'rdftype' => array('sioc:Post'),
'title' => array(
'predicates' => array('dc:title'),
),
'created' => array(
'predicates' => array('dc:created'),
'datatype' => 'xsd:dateTime',
'callback' => 'date_iso8601',
),
'uid' => array(
'predicates' => array('sioc:has_creator', 'dc:creator'),
'type' => 'rel',
),
'foobar' => array(
'predicates' => array('foo:bar'),
),
'foobar1' => array(
'datatype' => 'foo:bar1type',
'predicates' => array('foo:bar1'),
),
'foobar_objproperty1' => array(
'predicates' => array('sioc:has_creator', 'dc:creator'),
'type' => 'rel',
),
'foobar_objproperty2' => array(
'predicates' => array('sioc:reply_of'),
'type' => 'rev',
),
),
),
array(
'type' => 'node',
'bundle' => 'blog',
'mapping' => array(
'rdftype' => array('sioct:Weblog'),
),
),
);
}
/**
* Implements hook_rdf_namespaces().
*/
function rdf_test_rdf_namespaces() {
return array(
'dc' => 'http://purl.org/conflicting/namespace',
'foaf' => 'http://xmlns.com/foaf/0.1/',
'foaf1' => 'http://xmlns.com/foaf/0.1/',
);
}