You are here

function evoc_import_core in RDF Extensions 7.2

Provide a callback for batch importing the vocabularies used in core.

1 string reference to 'evoc_import_core'
evoc_menu in evoc/evoc.module
Implements hook_menu().

File

evoc/evoc.pages.inc, line 105
Page callbacks for importing a vocabulary.

Code

function evoc_import_core() {
  $vocabularies = rdf_rdf_namespaces();
  $operations = array();
  foreach ($vocabularies as $prefix => $namespace_uri) {
    $operations[] = array(
      '_evoc_install_batch_process',
      array(
        $namespace_uri,
        $prefix,
      ),
    );
  }
  $batch = array(
    'title' => t('Downloading RDF vocabularies'),
    'init_message' => t('Preparing to download the core RDF vocabularies'),
    'operations' => $operations,
    'finished' => '_evoc_install_batch_finished',
    'file' => drupal_get_path('module', 'evoc') . '/evoc.pages.inc',
  );
  batch_set($batch);
  batch_process('evoc/import');
}