Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update evoc to the lastest HEAD

  • Loading branch information...
commit daa0eb5d98c072af9409169ffacc2b5e18bec0e1 1 parent 4975ac3
Stephane Corlosquet authored
View
6 modules/contrib/evoc/evoc.info
@@ -7,9 +7,9 @@ package = RDF
core = 6.x
php = 5.2
-; Information added by drupal.org packaging script on 2009-03-02
-version = "6.x-1.0-alpha2"
+; Information added by drupal.org packaging script on 2009-07-12
+version = "6.x-1.x-dev"
core = "6.x"
project = "evoc"
-datestamp = "1235955921"
+datestamp = "1247357337"
View
22 modules/contrib/evoc/evoc.install
@@ -1,5 +1,5 @@
<?php
-// $Id: evoc.install,v 1.1.2.3 2009/02/24 03:49:18 scor Exp $
+// $Id: evoc.install,v 1.1.2.4 2009/06/21 12:53:17 scor Exp $
/**
* Implementation of hook_schema().
@@ -24,8 +24,8 @@ function evoc_schema() {
'id' => array('type' => 'varchar', 'length' => '32', 'not null' => TRUE),
'label' => array('type' => 'varchar', 'length' => '32', 'not null' => TRUE),
'comment' => array('type' => 'text', 'not null' => TRUE),
- 'domain' => array('type' => 'varchar', 'length' => '32', 'not null' => TRUE),
- 'range' => array('type' => 'varchar', 'length' => '32', 'not null' => TRUE),
+ 'rdf_domain' => array('type' => 'varchar', 'length' => '32', 'not null' => TRUE),
+ 'rdf_range' => array('type' => 'varchar', 'length' => '32', 'not null' => TRUE),
),
'primary key' => array(
'prefix',
@@ -63,4 +63,18 @@ function evoc_enable() {
evoc_import_vocabulary('http://purl.org/dc/elements/1.1/', 'dc');
evoc_import_vocabulary('http://xmlns.com/foaf/0.1/', 'foaf');
evoc_import_vocabulary('http://rdfs.org/sioc/ns#', 'sioc');
- }
+}
+
+/**
+ * Implementation of hook_update_N.
+ *
+ * Rename columns to avoid reserved word conflicts (specifically with MySQL 5.1)
+ */
+function evoc_update_6001() {
+ $ret = array();
+ $schema = evoc_schema();
+ $fields = $schema['evoc_rdf_properties']['fields'];
+ db_change_field($ret, 'evoc_rdf_properties', 'domain', 'rdf_domain', $fields['rdf_domain']);
+ db_change_field($ret, 'evoc_rdf_properties', 'range', 'rdf_range', $fields['rdf_range']);
+ return $ret;
+}
View
19 modules/contrib/evoc/evoc.module
@@ -1,5 +1,5 @@
<?php
-// $Id: evoc.module,v 1.1.2.7 2009/02/25 18:50:40 scor Exp $
+// $Id: evoc.module,v 1.1.2.10 2009/07/11 16:16:51 scor Exp $
/**
* @file
@@ -189,7 +189,7 @@ function evoc_fetch_vocabulary($vocabulary_uri, $vocabulary_prefix, $ignore_base
foreach ($term_queries as $query) {
$endpoint = 'http://demo.openlinksw.com/sparql/';
//$endpoint = 'http://www.sparql.org/sparql';
- //$endpoint = 'http://jena.hpl.hp.com:2020/sparql';
+ $endpoint = 'http://jena.hpl.hp.com:2020/sparql';
$sparql_res = sparql_request($endpoint, $query['query']);
if (!is_array($sparql_res)) {
@@ -211,17 +211,17 @@ function evoc_fetch_vocabulary($vocabulary_uri, $vocabulary_prefix, $ignore_base
$term = array();
$term['id'] = $term_qname_parts[1];
$term['type'] = $type;
- $term['label'] = $res_term['label']->value ? $res_term['label']->value : $res_term['label'];
- $term['comment'] = $res_term['comment']->value ? $res_term['comment']->value : $res_term['comment'];
+ $term['label'] = !empty($res_term['label']->value) ? $res_term['label']->value : NULL;
+ $term['comment'] = !empty($res_term['comment']->value) ? $res_term['comment']->value : NULL;
switch ($type) {
case 'class' :
- $term['superclass'] = rdf_uri_to_qname($res_term['superclass']->uri);
+ $term['superclass'] = !empty($res_term['superclass']->uri) ? rdf_uri_to_qname($res_term['superclass']->uri) : NULL;
break;
case 'property' :
// Extract some information like domain and range.
- $term['domain'] = rdf_uri_to_qname($res_term['domain']->uri);
- $term['range'] = rdf_uri_to_qname($res_term['range']->uri);
+ $term['rdf_domain'] = !empty($res_term['domain']->uri) ? rdf_uri_to_qname($res_term['domain']->uri) : NULL;
+ $term['rdf_range'] = !empty($res_term['range']->uri) ? rdf_uri_to_qname($res_term['range']->uri) : NULL;
break;
}
@@ -246,9 +246,10 @@ function _evoc_save_rdf_terms($ns, $prefix, $terms) {
// Get the existing namespaces stored in the system.
// Here we want to make sure we have the namespace stored in the db in case
// the module defining this ns in hook_rdf_namespaces() is disabled.
- $rdf_namespaces = rdf_db_rdf_namespaces();
+ // This function was renamed, leaving the old one for compatibility. To
+ // remove later.
+ $rdf_namespaces = function_exists('rdf_db_rdf_namespaces') ? rdf_db_rdf_namespaces() : rdf_rdf_namespaces();
- //var_dump($rdf_namespaces);
if (!in_array($ns, $rdf_namespaces)) { //FIXME: check also the prefix and raise a warning
db_query("INSERT INTO {rdf_namespaces} (prefix, uri) VALUES ('%s', '%s')", $prefix, $ns);
drupal_set_message(t("The namespace for $prefix has been created."));
View
6 modules/contrib/evoc/modules/evocreference/evocreference.info
@@ -8,9 +8,9 @@ dependencies[] = optionwidgets
package = CCK
core = 6.x
-; Information added by drupal.org packaging script on 2009-03-02
-version = "6.x-1.0-alpha2"
+; Information added by drupal.org packaging script on 2009-07-12
+version = "6.x-1.x-dev"
core = "6.x"
project = "evoc"
-datestamp = "1235955921"
+datestamp = "1247357337"
Please sign in to comment.
Something went wrong with that request. Please try again.