diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml
new file mode 100644
index 000000000..fe461b424
--- /dev/null
+++ b/.github/workflows/dependency-review.yml
@@ -0,0 +1,20 @@
+# Dependency Review Action
+#
+# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
+#
+# Source repository: https://github.com/actions/dependency-review-action
+# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
+name: 'Dependency Review'
+on: [pull_request]
+
+permissions:
+ contents: read
+
+jobs:
+ dependency-review:
+ runs-on: ubuntu-latest
+ steps:
+ - name: 'Checkout Repository'
+ uses: actions/checkout@v3
+ - name: 'Dependency Review'
+ uses: actions/dependency-review-action@v2
diff --git a/.htaccess b/.htaccess
index eee07900b..6cb557cb8 100644
--- a/.htaccess
+++ b/.htaccess
@@ -1,2 +1,11 @@
Options -Indexes
+
'.print_r($e->GetValidationErrors(),true).''; +// RRE @TODO: Multiple errors in the xml validation + // $error_str='Validation Error
'.print_r($e->GetValidationErrors(),true).''; + $arr_errors=$e->GetValidationErrors(); + $error_str='Validation Error
';
+ foreach ($arr_errors as $key_error) {
+ $error_str.=$key_error['message'].'
';
+ }
+ $error_str.='';
$this->session->set_flashdata('error', $error_str);
- redirect('admin/catalog/add_study','refresh');return;
+ //redirect('admin/catalog/add_study','refresh');return;
+ //redirect('admin/catalog/upload','refresh');
+
+ return NULL;
}
- catch(Exception $e){
+ catch (Exception $e){
$this->session->set_flashdata('error', $e->getMessage());
- redirect('admin/catalog/add_study','refresh');return;
+ //redirect('admin/catalog/add_study','refresh');return;
+ //redirect('admin/catalog/upload','refresh');
+ return NULL;
+ }
+ finally {
+ // @TODO: Review if this is OK.
+ unlink($ddi_path);
+
}
}
@@ -413,7 +491,7 @@ function add_study()
private function upload_rdf_file($sid)
{
$this->load->library('catalog_admin');
-
+
//upload class configurations for RDF
$config['upload_path'] = $this->get_temp_upload_folder();
$config['overwrite'] = FALSE;
@@ -423,7 +501,8 @@ private function upload_rdf_file($sid)
$this->upload->initialize($config);
//process uploaded rdf file
- $rdf_upload_result=$this->upload->do_upload('rdf');
+ //$rdf_upload_result=$this->upload->do_upload('rdf');
+ $rdf_upload_result=$this->upload->do_upload('rdf-file');
$uploaded_rdf_path='';
@@ -445,9 +524,9 @@ private function upload_rdf_file($sid)
return true;
}
-
+
/**
- *
+ *
* Sanitize file name
*/
private function sanitize_filename($name)
@@ -481,9 +560,9 @@ private function __replace_ddi($sid,$new_ddi_file)
'file_type'=>'survey',
'file_path'=>$new_ddi_file
);
-
+
$this->load->library('Metadata_parser', $parser_params);
-
+
//parser to read metadata
$parser=$this->metadata_parser->get_reader();
@@ -493,7 +572,7 @@ private function __replace_ddi($sid,$new_ddi_file)
if ($new_idno!==$this->sanitize_filename($new_idno)){
throw new Exception(t('IDNO_INVALID_FORMAT').': '.$new_idno);
}
-
+
//check if the study already exists, find the sid
$new_ddi_sid=$this->dataset_manager->find_by_idno($new_idno);
@@ -638,14 +717,14 @@ function refresh($id=NULL)
}
}
-
+
/**
*
* Clear files from the imports folder
**/
function clear_import_folder()
- {
+ {
$this->load->helper('file');
$import_folder=$this->config->item('ddi_import_folder');
@@ -680,17 +759,16 @@ function process_batch_uploads()
{
//import folder path
$import_folder=$this->config->item('ddi_import_folder');
-
if (!file_exists($import_folder)){
show_error('FOLDER-NOT-SET');
}
$config = array(
- 'max_tmp_file_age' => 900,
- 'max_execution_time' => 300,
- 'target_dir' => $import_folder,
+ 'max_tmp_file_age' => 900,
+ 'max_execution_time' => 300,
+ 'target_dir' => $import_folder,
'allowed_extensions' =>'xml|rdf',
- 'overwrite_file' =>TRUE
+ 'overwrite_file' =>TRUE
);
$this->load->library('Chunked_uploader', $config, 'uploader');
@@ -720,7 +798,6 @@ function process_batch_uploads()
}
-
/**
* Imports multiple ddi files from the server folder
*
@@ -739,20 +816,27 @@ function batch_import()
$import_folder=$this->config->item('ddi_import_folder');
if (!file_exists($import_folder) ){
- $import_folder="/datasets";
+ // @TODO: Review datasets directory does not exist either
+ // @TODO: Review if this default should set config->item('ddi_import_folder')
+ // The next calls to config->item('ddi_import_folder') will fail if this is not set.
+ // $import_folder="/datasets";
+ $import_folder="/datafiles/tmp";
}
//read files
$files['files']=get_dir_file_info($import_folder);
if ( $files['files']){
- foreach($files['files'] as $key=>$value){
- if (substr($value['name'],-4)!='.xml'){
+ foreach($files['files'] as $key=>$value){
+ //if (substr($value['name'],-4)!='.xml'){
+ //if (! in_array(pathinfo($value['name'], PATHINFO_EXTENSION), array('xml','rdf'))) {
+ if (! in_array(pathinfo($value['name'], PATHINFO_EXTENSION), array('xml'))) {
+ // @TODO: Check if rdf files should be processed
unset($files['files'][$key]);
}
}
}
-
+
$options=array(
'repositories'=>$this->Repository_model->select_all(),
'files'=>$files['files'],
@@ -792,10 +876,10 @@ function do_batch_import()
echo json_encode(array('error'=>t('REPO_ACCESS_DENIED')) );
exit;
}
-
+
$this->load->model("Data_file_model");
$this->load->library('DDI2_import');
-
+
$user=$this->ion_auth->current_user();
$ddi_path=$ddi_file;
@@ -827,7 +911,7 @@ function do_batch_import()
'message'=>$e->getMessage(),
'errors'=>$e->GetValidationErrors()
);
-
+
$error=print_r($e->GetValidationErrors(),true);
echo json_encode(array('error'=>$error) );
die();
@@ -839,7 +923,7 @@ function do_batch_import()
}
}
-
+
/**
*
diff --git a/application/controllers/admin/Dataaccess_whitelist.php b/application/controllers/admin/Dataaccess_whitelist.php
new file mode 100644
index 000000000..f3c7226d2
--- /dev/null
+++ b/application/controllers/admin/Dataaccess_whitelist.php
@@ -0,0 +1,63 @@
+template->set_template('admin5');
+ $this->load->model("Data_access_whitelist_model");
+ $this->load->model("Repository_model");
+ $this->load->helper(array ('querystring_helper','url', 'form') );
+ $this->load->library( array('acl_manager','form_validation','pagination') );
+
+ $this->lang->load('general');
+ //$this->output->enable_profiler(TRUE);
+ }
+
+ function index()
+ {
+ $this->acl_manager->has_access_or_die('citation', 'view');
+ $options['rows']=$this->Data_access_whitelist_model->select_all();
+ $options['collections']=$this->Repository_model->list_all();
+
+ $content=$this->load->view('dataaccess_whitelist/index', $options,true);
+ $this->template->write('title', t('Data access whitelist'),true);
+ $this->template->write('content', $content,true);
+ $this->template->render();
+ }
+
+
+ function create()
+ {
+ $user_id=$this->Data_access_whitelist_model->get_user_id($this->input->post("email"));
+ $repository_id=$this->input->post("repository_id");
+
+ if(!$repository_id || !$user_id){
+ $this->session->set_flashdata('error', t('Invalid values for `collection_name` or `email`'));
+ redirect("admin/dataaccess_whitelist","refresh");
+ }
+
+ try{
+ $result=$this->Data_access_whitelist_model->insert($repository_id,$user_id);
+ }
+ catch(Exception $e){
+ $this->session->set_flashdata('error', $e->getMessage());
+ redirect("admin/dataaccess_whitelist","refresh");
+ }
+ $this->session->set_flashdata('message', t('form_update_success'));
+ redirect("admin/dataaccess_whitelist","refresh");
+ }
+
+
+ function delete($id)
+ {
+ $this->Data_access_whitelist_model->delete_by_id($id);
+ $this->session->set_flashdata('message', t('form_update_success'));
+ redirect("admin/dataaccess_whitelist","refresh");
+ }
+
+
+}
+/* End of file Dataaccess_whitelist.php */
+/* Location: ./controllers/admin/Dataaccess_whitelist.php */
diff --git a/application/controllers/api/Dataaccess_whitelist.php b/application/controllers/api/Dataaccess_whitelist.php
new file mode 100644
index 000000000..e71d09a28
--- /dev/null
+++ b/application/controllers/api/Dataaccess_whitelist.php
@@ -0,0 +1,132 @@
+load->helper("date");
+ $this->load->model('Dataset_model');
+ $this->load->model("Survey_resource_model");
+ $this->load->model("Data_access_whitelist_model");
+ $this->is_admin_or_die();
+ }
+
+ //override authentication to support both session authentication + api keys
+ function _auth_override_check()
+ {
+ if ($this->session->userdata('user_id')){
+ return true;
+ }
+
+ parent::_auth_override_check();
+ }
+
+
+ /**
+ *
+ * List
+ *
+ **/
+ function index_get()
+ {
+ try{
+ $result=$this->Data_access_whitelist_model->select_all();
+
+ $response=array(
+ 'status'=>'success',
+ 'result'=>$result
+ );
+
+ $this->set_response($response, REST_Controller::HTTP_OK);
+ }
+ catch(Exception $e){
+ $this->set_response($e->getMessage(), REST_Controller::HTTP_BAD_REQUEST);
+ }
+ }
+
+
+ /**
+ *
+ *
+ * Create
+ *
+ *
+ */
+ function index_post()
+ {
+ try{
+ $options=$this->raw_json_input();
+
+ $collection_name=isset($options['collection_name']) ? $options['collection_name'] :null;
+ $email=isset($options['email']) ? $options['email'] : null;
+
+ $repository_id=$this->Data_access_whitelist_model->get_repo_id($collection_name);
+ $user_id=$this->Data_access_whitelist_model->get_user_id($email);
+
+ if(!$repository_id || !$user_id){
+ throw new Exception("Invalid values for `collection_name` or `email`");
+ }
+
+ $result=$this->Data_access_whitelist_model->insert($repository_id,$user_id);
+
+ $output=array(
+ 'status'=>'success',
+ 'result'=>$result
+ );
+ $this->set_response($output, REST_Controller::HTTP_OK);
+ }
+ catch(Exception $e){
+ $error_output=array(
+ 'status'=>'failed',
+ 'message'=>$e->getMessage()
+ );
+ $this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
+ }
+ }
+
+
+ function index_delete()
+ {
+ try{
+
+ $options=$this->raw_json_input();
+
+ $collection_name=isset($options['collection_name']) ? $options['collection_name'] :null;
+ $email=isset($options['email']) ? $options['email'] : null;
+
+ $repository_id=$this->Data_access_whitelist_model->get_repo_id($collection_name);
+ $user_id=$this->Data_access_whitelist_model->get_user_id($email);
+
+ if(!$repository_id || !$user_id){
+ throw new Exception("Invalid values for `collection_name` or `email`");
+ }
+
+ $result=$this->Data_access_whitelist_model->delete($repository_id,$user_id);
+
+ $response=array(
+ 'status'=>'success',
+ 'message'=>'DELETED',
+ 'result'=>$result
+ );
+
+ $this->set_response($response, REST_Controller::HTTP_OK);
+ }
+ catch(Exception $e){
+ $error_output=array(
+ 'status'=>'failed',
+ 'message'=>$e->getMessage()
+ );
+ $this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
+ }
+ }
+
+
+}
diff --git a/application/controllers/api/Datadeposits.php b/application/controllers/api/Datadeposits.php
index 5fdd74dd1..4544111b0 100644
--- a/application/controllers/api/Datadeposits.php
+++ b/application/controllers/api/Datadeposits.php
@@ -1,101 +1,21 @@
load->model('Catalog_model');
$this->load->helper("date");
$this->load->model('DD_project_model');
$this->load->model('DD_resource_model');
$this->load->model('DD_citation_model');
+ $this->is_admin_or_die();
}
- //return raw json input
- private function raw_json_input()
- {
- $data=$this->input->raw_input_stream;
- //$data = file_get_contents("php://input");
-
- if(!$data || trim($data)==""){
- return null;
- }
-
- $json=json_decode($data,true);
-
- if (!$json){
- throw new Exception("INVALID_JSON_INPUT");
- }
-
- return $json;
- }
-
-
- private function get_api_user_id()
- {
- if(isset($this->_apiuser) && isset($this->_apiuser->user_id)){
- return $this->_apiuser->user_id;
- }
-
- return false;
- }
-
-
-
- /**
- *
- * Check if user has access to project
- *
- * @is_project_locked - true/false - if set to true, check if user can update project or not
- *
- */
- private function get_user_project_or_die($project_id,$is_project_locked=false)
- {
- $user_id=$this->get_api_user_id();
- $project=$this->DD_project_model->select_single($project_id, $user_id);
-
- if (!$project){
- throw new Exception("PROJECT_NOT_FOUND");
- }
-
- if($is_project_locked){
- if (strtolower(trim($project['status']))!=='draft'){
- throw new Exception("PROJECT_IS_LOCKED");
- }
- }
-
- return $project;
- }
-
-
- /**
- *
- *
- * Check project status
- *
- * User can only edit a project in DRAFT mode
- *
- */
- private function is_project_locked($project_id)
- {
- $status=$this->DD_project_model->get_project_status($project_id);
- if (strtolower(trim($status))=='draft'){
- return false;
- }
- return true;
- }
-
-
-
-
-
- /////////////////////////////////// PROJECT ///////////////////////////////
-
/**
*
@@ -114,10 +34,7 @@ public function index_get($pid=null)
$user_id=$this->get_api_user_id();
//get all projects for current user
- $projects=$this->DD_project_model->get_projects($user_id);
-
- //convert date fields to GMT
- array_walk($projects, 'unix_date_to_gmt',array('created','changed'));
+ $projects=$this->DD_project_model->all_projects($user_id);
$response=array(
'items'=>$projects
@@ -141,10 +58,10 @@ public function project_get($pid=null,$user_id=null)
throw new Exception("MISSING_PARAM: PID");
}
- $project=$this->get_user_project_or_die($pid);
+ $project=$this->DD_project_model->get_by_id($pid);
//format dates
- array_walk($project, 'unix_date_to_gmt_row',array('created','changed','submitted_date','administer_date'));
+ array_walk($project, 'unix_date_to_gmt_row',array('created_on','last_modified','submitted_date','administer_date'));
$response=array(
'project'=>$project
@@ -163,924 +80,125 @@ public function project_get($pid=null,$user_id=null)
-
- /**
- *
- *
- * Create new project
- *
- */
- public function index_post()
- {
- try{
- //post data
- //$options=$this->input->post();
-
- //raw data
- $options=$this->raw_json_input();
-
- $user_id=$this->get_api_user_id();
- $options['created_by']=$user_id;
- $options['changed_by']=$user_id;
-
- //validate
- if ($this->DD_project_model->validate_project($options)){
- $project_id=$this->DD_project_model->insert($options);
- $project=$this->DD_project_model->select_single($project_id);
-
- $response=array(
- 'status'=>'success',
- 'project'=>$project
- );
-
- $this->set_response($response, REST_Controller::HTTP_OK);
- }
- }
- catch(ValidationException $e){
- $error_output=array(
- 'status'=>'failed',
- 'message'=>$e->getMessage(),
- 'errors'=>$e->GetValidationErrors()
- );
- $this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
- }
- catch(Exception $e){
- $error_output=array(
- 'status'=>'failed',
- 'message'=>$e->getMessage()
- );
- $this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
- }
- }
-
-
-
-
- /**
+ /**
*
- * Update project
*
- * Note: PUT method does work with formData
+ * Get all resources by the project
*
+ * @pid - (required) project ID
+ * @resource_id - (optional) resource ID
*
- */
- function index_put($project_id=null)
- {
- try{
- if (!$project_id){
- throw new Exception("MISSING_PARAM: PID");
- }
-
- $options=$this->raw_json_input();
- $user_id=$this->get_api_user_id();
- $options['changed_by']=$user_id;
-
- $project=$this->get_user_project_or_die($project_id);
-
- //validate
- if ($this->DD_project_model->validate_project($options,$is_new=false)){
- //update project
- $this->DD_project_model->update($project_id,$options);
- //reload project
- $project=$this->DD_project_model->select_single($project_id);
-
- $response=array(
- 'status'=>'success',
- 'project'=>$project
- );
+ **/
+ public function resources_get($pid=null, $resource_id=null)
+ {
+ //get single resource if resource id is provided
+ if(is_numeric($pid) && is_numeric($resource_id)){
+ return $this->resource_get($pid,$resource_id);
+ }
+
+ try{
+ $project=$this->DD_project_model->get_by_id($pid);
+ $resources=$this->DD_resource_model->get_project_resources($pid);
+
+ array_walk($resources, 'unix_date_to_gmt',array('created','changed'));
+
+ $response=array(
+ 'items'=>$resources
+ );
- $this->set_response($response, REST_Controller::HTTP_OK);
- }
- }
- catch(ValidationException $e){
- $error_output=array(
- 'status'=>'error',
- 'message'=>$e->getMessage(),
- 'errors'=>$e->GetValidationErrors()
- );
- $this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
- }
- catch(Exception $e){
+ $this->set_response($response, REST_Controller::HTTP_OK);
+ }
+ catch(Exception $e){
$error_output=array(
'status'=>'error',
'message'=>$e->getMessage()
);
$this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
}
- }
+ }
/**
*
+ * Get a single resource
*
- * Delete a project
*
- * @id project ID
*
*/
- function index_delete($id=null)
+ public function resource_get($project_id=null,$resource_id=null)
{
try{
- if (!$id){
- throw new Exception("MISSING_PARAM: PID");
- }
-
- $project=$this->get_user_project_or_die($pid);
-
- $this->DD_project_model->delete($id);
- $result=array(
- 'status'=>'success',
- 'message'=>'project deleted successfully!!!'
- );
- $this->set_response($result, REST_Controller::HTTP_OK);
- }
- catch(Exception $e){
- $error_output=array(
- 'status'=>'failed',
- 'message'=>$e->getMessage()
- );
- $this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
- }
- }
-
-
-
-
- /**
- *
- *
- * Submit project
- *
- * Note: Submitting a project, locks the project for any further edits
- *
- *
- *
- */
- function submit_put($project_id=null)
- {
- try{
- if (!$project_id){
- throw new Exception("MISSING_PARAM: PID");
- }
-
- $user_id=$this->get_api_user_id();
- $options['changed_by']=$user_id;
-
- $project=$this->get_user_project_or_die($project_id,true);
-
- //submit project
- if ($this->DD_project_model->submit_project($project_id,$email_notifications=true)){
- //reload project
- $project=$this->DD_project_model->select_single($project_id);
-
- $response=array(
- 'status'=>'success',
- 'project'=>$project
- );
+ $project=$this->DD_project_model->get_by_id($project_id);
- $this->set_response($response, REST_Controller::HTTP_OK);
- }
- }
- catch(Exception $e){
- $error_output=array(
- 'status'=>'error',
- 'message'=>$e->getMessage()
- );
- $this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
- }
- }
-
-
- /**
- *
- *
- * update project status
- *
- * TODO: to be removed. Added for testing the api
- *
- *
- *
- */
- function project_status_put($project_id=null,$status=null)
- {
- try{
- if (!$project_id){
- throw new Exception("MISSING_PARAM: PROJECT_ID");
- }
- if (!$status){
- throw new Exception("MISSING_PARAM: STATUS");
- }
-
- $user_id=$this->get_api_user_id();
- $options['changed_by']=$user_id;
-
- $project=$this->get_user_project_or_die($project_id);
-
- //submit project
- if ($this->DD_project_model->set_project_status($project_id,$status,$options)){
- //reload project
- $project=$this->DD_project_model->select_single($project_id);
-
- $response=array(
- 'status'=>'success',
- 'project'=>$project
- );
-
- $this->set_response($response, REST_Controller::HTTP_OK);
+ if(!$project){
+ throw new Exception("Project not found");
}
+
+ $resource=$this->DD_resource_model->get_project_resource($resource_id);
+ $this->set_response($resource, REST_Controller::HTTP_OK);
}
catch(Exception $e){
$error_output=array(
'status'=>'error',
- 'message'=>$e->getMessage()
+ 'message'=>$e->getMessage()
);
$this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
}
- }
-
+ }
- /**
- *
- * Update project access policy
- *
- *
- */
- function access_policy_put($project_id=null)
+ function download_get($project_id=null,$resource_id=null)
{
try{
- if (!$project_id){
- throw new Exception("MISSING_PARAM: PID");
- }
-
- $project=$this->get_user_project_or_die($project_id);
+ $project=$this->DD_project_model->get_by_id($project_id);
- $options=$this->raw_json_input();
- $user_id=$this->get_api_user_id();
- $options['changed_by']=$user_id;
-
- //validate
- if ($this->DD_project_model->validate_project($options,$is_new=false)){
- //update project
- $this->DD_project_model->update($project_id,$options);
- //reload project
- $project=$this->DD_project_model->select_single($project_id);
+ if(!$project){
+ throw new Exception("Project not found");
+ }
- $response=array(
- 'status'=>'success',
- 'project'=>$project
- );
+ $user=$this->api_user();
- $this->set_response($response, REST_Controller::HTTP_OK);
+ if(!$user){
+ throw new Exception("USER_NOT_LOGGEDIN");
}
- }
- catch(ValidationException $e){
- $error_output=array(
- 'status'=>'error',
- 'message'=>$e->getMessage(),
- 'errors'=>$e->GetValidationErrors()
- );
- $this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
- }
- catch(Exception $e){
- $error_output=array(
- 'status'=>'error',
- 'message'=>$e->getMessage()
- );
- $this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
- }
- }
- /**
- *
- * get project access policy
- *
- *
- */
- function access_policy_get($project_id=null)
- {
- try{
- if (!$project_id){
- throw new Exception("MISSING_PARAM: PID");
+ if(!$resource_id){
+ throw new Exception("PARAM_NOT_SET: resource_id");
}
-
- $project=$this->get_user_project_or_die($project_id);
- $options=$this->raw_json_input();
- $user_id=$this->get_api_user_id();
- $options['changed_by']=$user_id;
+ //get project data folder path
+ $project_folder_path=$this->DD_project_model->get_project_fullpath($project_id);
- $access_policy=$this->DD_project_model->get_access_policy_info($project_id,$user_id);
-
- $response=array(
- 'status'=>'success',
- 'access_policy'=>$access_policy
- );
-
- $this->set_response($response, REST_Controller::HTTP_OK);
- }
- catch(Exception $e){
- $error_output=array(
- 'status'=>'error',
- 'message'=>$e->getMessage()
- );
- $this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
- }
- }
-
-
-
- /**
- *
- *
- * Get projects by user
- *
- *
- *
- *
- */
- public function user_projects_get($user_id=null)
- {
- try{
- //get current user ID
- if(!$user_id){
- $user_id=$this->get_api_user_id();
+ if (!$project_folder_path){
+ throw new Exception("PROJECT_DATA_FOLDER_NOT_SET");
}
-
- $projects=$this->DD_project_model->get_user_projects($user_id);
-
- if (!$project){
- throw new Exception("PROJECT_NOT_FOUND");
+
+ $this->load->helper('download');
+ $this->load->model('DD_resource_model');
+ $this->lang->load("resource_manager");
+ $this->load->model('managefiles_model');
+
+ $resource = $this->DD_resource_model->get_project_resource($resource_id);
+
+ if (!$resource){
+ throw new Exception("FILE_NOT_FOUND");
}
-
- //convert date fields to GMT
- array_walk($projects, 'unix_date_to_gmt',array('created','changed'));
- $response=array(
- 'items'=>$projects
- );
+ $resource_path=unix_path($project_folder_path.'/'.$resource[0]->filename);
+
+ if (!file_exists($resource_path)){
+ throw new Exception("FILE_NOT_FOUND:".$resource_path);
+ }
- $this->set_response($response, REST_Controller::HTTP_OK);
+ force_download3($resource_path,$resource[0]->filename);
}
catch(Exception $e){
- $error_output=array(
+ $output=array(
'status'=>'error',
'message'=>$e->getMessage()
);
- $this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
+ $this->set_response($output, REST_Controller::HTTP_BAD_REQUEST);
}
+ }
- }
-
-
-
-
-
- /**
- *
- *
- * Update project metadata
- *
- *
- *
- * */
- public function metadata_post($project_id=null)
- {
- try{
- //raw data
- $data = file_get_contents("php://input");
-
- if (trim($data)==""){
- throw new Exception("NO_INPUT_DATA");
- }
-
- //decode to JSON to validate JSON is valid
- $json=json_decode($data,true);
- if (!$json){
- throw new Exception("INVALID_JSON_INPUT");
- }
- $project=$this->get_user_project_or_die($project_id);
-
- //store JSON as is - no encoding/decoding
- $this->DD_project_model->set_metadata($project_id,$data);
- $this->set_response($json, REST_Controller::HTTP_OK);
- }
- catch(Exception $e){
- $error_output=array(
- 'status'=>'error',
- 'message'=>$e->getMessage()
- );
- $this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
- }
- }
-
-
- /**
- *
- *
- * Get project metadata
- *
- *
- */
- function metadata_get($project_id)
- {
- try{
- $project=$this->get_user_project_or_die($project_id);
- $metadata=$this->DD_project_model->get_metadata($project_id);
-
- //when there is no metadata
- if (trim($metadata)==""){
- $metadata='{}';
- }
-
- header('Content-Type: application/json');
- echo $metadata;
- die();
- }
- catch(Exception $e){
- $error_output=array(
- 'status'=>'error',
- 'message'=>$e->getMessage()
- );
- $this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
- }
-
- }
-
-
- ///////////////////////////////////////////////////////////////////////
- /// CITATIONS
- ///////////////////////////////////////////////////////////////////////
- /**
- *
- * [GET] citations - list of resources
- * [POST] citations - upload one or more files
- * [PUT] citations/id - update resource metadata - no file uploads
- * [GET] citations/id - Get a single resource
- * [DELETE] citations/id - delete a single resource + attachment
- *
- *
- */
-
- /**
- *
- * Get project citations
- *
- *
- */
- public function citations_get($project_id=null, $citation_id=null)
- {
- //get single resource if resource id is provided
- if(is_numeric($project_id) && is_numeric($citation_id)){
- return $this->citation_get($project_id,$citation_id);
- }
-
- try{
- $project=$this->get_user_project_or_die($project_id);
- $citations=$this->DD_citation_model->get_project_citations($project_id);
- array_walk($citations, 'unix_date_to_gmt',array('created','changed'));
- $response=array(
- 'items'=>$citations
- );
-
- $this->set_response($response, REST_Controller::HTTP_OK);
- }
- catch(Exception $e){
- $error_output=array(
- 'status'=>'error',
- 'message'=>$e->getMessage()
- );
- $this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
- }
- }
-
-
- /**
- *
- * Get a single citation
- *
- *
- *
- */
- public function citation_get($project_id=null,$citation_id=null)
- {
- try{
- $project=$this->get_user_project_or_die($project_id);
- $citation=$this->DD_citation_model->get_project_single_citation($project_id,$citation_id);
- $this->set_response($citation, REST_Controller::HTTP_OK);
- }
- catch(Exception $e){
- $error_output=array(
- 'status'=>'error',
- 'message'=>$e->getMessage()
- );
- $this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
- }
- }
-
-
- /**
- *
- *
- *
- * create new citation for the project
- *
- *
- *
- * */
- public function citations_post($project_id=null)
- {
- try{
- $project=$this->get_user_project_or_die($project_id);
- $options['citation']=$this->raw_json_input();
- $options['pid']=$project_id;
- $options['created_by']=$this->get_api_user_id();
- $options['changed_by']=$this->get_api_user_id();
-
- //store JSON as is - no encoding/decoding
- $citation_id=$this->DD_citation_model->insert($options);
- $citation=$this->DD_citation_model->get_project_single_citation($project_id,$citation_id);
-
- $output=array(
- 'status'=>'success',
- 'citation'=>$citation
- );
-
- $this->set_response($output, REST_Controller::HTTP_OK);
- }
- catch(Exception $e){
- $error_output=array(
- 'status'=>'error',
- 'message'=>$e->getMessage()
- );
- $this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
- }
- }
-
- /**
- *
- * Update a single citation
- *
- */
- public function citations_put($pid=null,$cid=null)
- {
- try{
- $project=$this->get_user_project_or_die($pid);
-
- if(!$cid){
- throw new Exception("CITATION_ID_NOT_SET");
- }
-
- $citation=$this->DD_citation_model->get_project_single_citation($pid,$cid);
-
- if(!$citation){
- throw new Exception("CITATION_NOT_FOUND");
- }
-
- $options['citation']=$this->raw_json_input();
- $options['citation']=$json;
- $options['pid']=$pid;
- $options['changed_by']=$this->get_api_user_id();
-
- //update
- $this->DD_citation_model->update($cid,$options);
- $citation=$this->DD_citation_model->get_project_single_citation($pid,$cid);
-
- $output=array(
- 'status'=>'success',
- 'citation'=>$citation
- );
-
- $this->set_response($output, REST_Controller::HTTP_OK);
- }
- catch(Exception $e){
- $error_output=array(
- 'status'=>'error',
- 'message'=>$e->getMessage()
- );
- $this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
- }
- }
-
-
- /**
- *
- *
- * Delete a citation
- *
- */
- public function citations_delete($pid=null,$cid=null)
- {
- try{
- $project=$this->get_user_project_or_die($pid);
-
- if(!$cid){
- throw new Exception("CITATION_ID_NOT_SET");
- }
-
- //check citations exists for the project
- $citation=$this->DD_citation_model->get_project_single_citation($pid,$cid);
-
- if(!$citation){
- throw new Exception('CITATION_NOT_FOUND');
- }
-
- $this->DD_citation_model->delete($cid);
-
- $response=array(
- 'status'=>'success',
- 'message'=>'Citation removed'
- );
- $this->set_response($response, REST_Controller::HTTP_OK);
- }
- catch(Exception $e){
- $error_output=array(
- 'status'=>'error',
- 'message'=>$e->getMessage()
- );
- $this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
- }
- }
-
-
- ///////////////////////////////////////////////////////////////////////
- /// RESOURCES
- ///////////////////////////////////////////////////////////////////////
- /**
- *
- * [GET] Resources - list of resources
- * [POST] Resources - upload one or more files
- * [PUT] Resources/id - update resource metadata - no file uploads
- * [GET] Resources/id - Get a single resource
- * [DELETE] Resources/id - delete a single resource + attachment
- *
- *
- */
-
-
- /**
- *
- *
- * Get all resources by the project
- *
- * @pid - (required) project ID
- * @resource_id - (optional) resource ID
- *
- **/
- public function resources_get($pid=null, $resource_id=null)
- {
- //get single resource if resource id is provided
- if(is_numeric($pid) && is_numeric($resource_id)){
- return $this->resource_get($pid,$resource_id);
- }
-
- try{
- $project=$this->get_user_project_or_die($pid);
- $resources=$this->DD_resource_model->get_project_resources($pid);
-
- array_walk($resources, 'unix_date_to_gmt',array('created','changed'));
-
- $response=array(
- 'items'=>$resources
- );
-
- $this->set_response($response, REST_Controller::HTTP_OK);
- }
- catch(Exception $e){
- $error_output=array(
- 'status'=>'error',
- 'message'=>$e->getMessage()
- );
- $this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
- }
- }
-
-
- /**
- *
- * Get a single resource
- *
- *
- *
- */
- public function resource_get($project_id=null,$resource_id=null)
- {
- try{
- $project=$this->get_user_project_or_die($project_id);
-
- $resource=$this->DD_resource_model->get_project_single_resource($project_id,$resource_id);
- $this->set_response($resource, REST_Controller::HTTP_OK);
- }
- catch(Exception $e){
- $error_output=array(
- 'status'=>'error',
- 'message'=>$e->getMessage()
- );
- $this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
- }
- }
-
-
- /**
- *
- *
- * Add new resource by uploading a document
- *
- *
- */
- function resources_post($pid=null)
- {
- try{
- if(!$pid){
- throw new Exception("PROJECT_ID_NOT_SET");
- }
- $project=$this->get_user_project_or_die($pid);
-
- $options=$this->input->post();
- $user_id=$this->get_api_user_id();
- $options['created_by']=$user_id;
- $options['changed_by']=$user_id;
- $options['pid']=$pid;
-
- //process file upload
- $result=$this->DD_resource_model->upload_file($pid,$file_field_name='file');
-
- $uploaded_file_name=$result['file_name'];
- $uploaded_path=$result['full_path'];
-
- $options['filename']=$uploaded_file_name;
-
- //title is required
- if(!isset($options['title'])){
- $options['title']=$uploaded_file_name;
- }
-
- //type is required
- if(!isset($options['resource_type'])){
- $options['resource_type']='other';
- }
-
- //validate
- if ($this->DD_resource_model->validate_resource($options)){
- $resource_id=$this->DD_resource_model->insert($options);
- $resource=$this->DD_resource_model->select_single($resource_id);
-
- $response=array(
- 'status'=>'success',
- 'resource'=>$resource,
- 'uploaded_file_name'=>$uploaded_file_name,
- );
-
- $this->set_response($response, REST_Controller::HTTP_OK);
- }
- }
- catch(ValidationException $e){
- $error_output=array(
- 'status'=>'error',
- 'message'=>$e->getMessage(),
- 'errors'=>$e->GetValidationErrors(),
- 'supported_file_types'=>str_replace(",","|",$this->config->item("allowed_resource_types"))
- );
- $this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
- }
- catch(Exception $e){
- $error_output=array(
- 'status'=>'error',
- 'message'=>$e->getMessage(),
- 'supported_file_types'=>$this->config->item("allowed_resource_types")
- );
- $this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
- }
- }
-
-
-
- /**
- *
- *
- * Update a single project resource
- *
- */
- public function resources_put($pid=null, $resource_id=null){
- try{
- if(!$pid){
- throw new Exception("PROJECT_ID_NOT_SET");
- }
- $project=$this->get_user_project_or_die($pid);
-
- if(!$resource_id){
- throw new Exception("RESOURCE_ID_NOT_SET");
- }
-
- //check resource exists for the project
- $resource=$this->DD_resource_model->get_project_single_resource($pid,$resource_id);
-
- if(!$resource){
- throw new Exception('RESOURCE_NOT_FOUND');
- }
-
- $options=$this->raw_json_input();
- $user_id=$this->get_api_user_id();
- $options['created_by']=$user_id;
- $options['changed_by']=$user_id;
- $options['pid']=$pid;
-
-
- //validate
- if ($this->DD_resource_model->validate_resource($options,$is_new=false)){
- $this->DD_resource_model->update($resource_id,$options);
- $resource=$this->DD_resource_model->select_single($resource_id);
-
- $response=array(
- 'status'=>'success',
- 'resource'=>$resource
- );
-
- $this->set_response($response, REST_Controller::HTTP_OK);
- }
- }
- catch(ValidationException $e){
- $error_output=array(
- 'status'=>'error',
- 'message'=>$e->getMessage(),
- 'errors'=>$e->GetValidationErrors()
- );
- $this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
- }
- catch(Exception $e){
- $this->set_response($e->getMessage(), REST_Controller::HTTP_BAD_REQUEST);
- }
- }
-
-
- /**
- *
- * Delete a single resource
- *
- */
- public function resources_delete($pid=null,$resource_id=null){
-
- try{
- if(!$pid){
- throw new Exception("PROJECT_ID_NOT_SET");
- }
- $project=$this->get_user_project_or_die($pid);
-
- if(!$resource_id){
- throw new Exception("RESOURCE_ID_NOT_SET");
- }
-
- //check resource exists for the project
- $resource=$this->DD_resource_model->get_project_single_resource($pid,$resource_id);
-
- if(!$resource){
- throw new Exception('RESOURCE_NOT_FOUND');
- }
-
- $this->DD_resource_model->delete($resource_id);
-
- $response=array(
- 'status'=>'success',
- 'message'=>'Resource removed'
- );
- $this->set_response($response, REST_Controller::HTTP_OK);
- }
- catch(Exception $e){
- $error_output=array(
- 'status'=>'error',
- 'message'=>$e->getMessage()
- );
- $this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
- }
- }
-
-
- /////////////// REVIEW ///////////////////////////
- public function review_get($pid)
- {
-
- }
-
-
-
- /////////////// CONTROLLED VOCABULARIES ///////////////////
-
- //return a list of all access policies
- public function list_access_policies_get()
- {
-
- }
-
- //list of available catalogs for publishing the project
- public function list_target_catalogs_get()
- {
-
- }
-
- //list project types
- public function list_project_types_get()
- {
-
- }
-
}
diff --git a/application/controllers/api/Datasets.php b/application/controllers/api/Datasets.php
index 0b6a1fd03..3b73df476 100644
--- a/application/controllers/api/Datasets.php
+++ b/application/controllers/api/Datasets.php
@@ -257,6 +257,15 @@ function doi_post($idno=null)
+ /**
+ *
+ * Alias for index_put method when PUT is not enabled
+ *
+ */
+ function options_post($idno=null)
+ {
+ return $this->index_put($idno);
+ }
/**
*
@@ -829,25 +838,20 @@ function variable_get($idno=null,$var_id=null)
*
* Create variables for Datasets
* @idno - dataset IDNo
- * @file_id - user defined file id e.g. F1
- *
+ * @merge_metadata - true|false
+ * - true = partial update metadata
+ * - false = replace all metadata with new
*/
- function variables_post($idno=null,$file_id=null,$type='survey')
+ function variables_post($idno=null,$merge_metadata=false)
{
try{
$this->has_dataset_access('edit');
$options=(array)$this->raw_json_input();
$user_id=$this->get_api_user_id();
+ $merge_metadata=$merge_metadata==='true';
$sid=$this->get_sid_from_idno($idno);
- //get file id
- $fid=$this->Data_file_model->get_fid_by_fileid($sid,$file_id);
-
- if(!$fid){
- throw new exception("FILE_NOT_FOUND: ".$file_id);
- }
-
//check if a single variable input is provided or a list of variables
$key=key($options);
@@ -858,23 +862,46 @@ function variables_post($idno=null,$file_id=null,$type='survey')
$options=null;
$options=$tmp_options;
}
+
+ $valid_data_files=$this->Data_file_model->list_fileid($sid);
//validate all variables
foreach($options as $key=>$variable){
- $variable['fid']=$file_id;
- $this->Variable_model->validate_variable($variable);
- }
- $result=array();
- foreach($options as $variable)
- {
- $variable['fid']=$file_id;
- //all fields are stored as metadata
- $variable['metadata']=$variable;
- $variable_id=$this->Variable_model->insert($sid,$variable);
- //$variable=$this->Variable_model->select_single($variable_id);
- //$result[$variable['vid']]=$variable;
- $result[$variable['vid']]=$variable_id;
+ if (!isset($variable['file_id'])){
+ throw new Exception("`file_id` is required");
+ }
+
+ if (!in_array($variable['file_id'],$valid_data_files)){
+ throw new Exception("Invalid `file_id`: valid values are: ". implode(", ", $valid_data_files ));
+ }
+
+ if (isset($variable['vid']) && !empty($variable['vid'])){
+ //check if variable already exists
+ $uid=$this->Variable_model->get_uid_by_vid($sid,$variable['vid']);
+ $variable['fid']=$variable['file_id'];
+
+ if($uid){
+ $var_mt=$this->Variable_model->get_var_by_vid($sid,$variable['vid']);
+ $var_mt=isset($var_mt['metadata']) ? $var_mt['metadata']: array();
+
+ //replace metadata with new options
+ if($merge_metadata==true){
+ $variable=array_replace_recursive($var_mt,$variable);
+ }
+
+ $this->Variable_model->validate_variable($variable);
+ $variable['metadata']=$variable;
+ $this->Variable_model->update($sid,$uid,$variable);
+ }
+ else{
+ $this->Variable_model->validate_variable($variable);
+ $variable['metadata']=$variable;
+ $this->Variable_model->insert($sid,$variable);
+ }
+
+ $result[]=$variable['vid'];
+ }
}
//update survey varcount
@@ -1720,106 +1747,6 @@ function strip_ddi_put($idno=NULL,$strip='')
}
- /**
- *
- * Reload facets/filters
- *
- * @sid - study id
- *
- */
- public function refresh_filters_put($idno=null)
- {
- try{
- $sid=$this->get_sid_from_idno($idno);
- $this->has_dataset_access('edit',$sid);
- $this->dataset_manager->refresh_filters($sid);
-
- $output=array(
- 'status'=>'success'
- );
- $this->set_response($output, REST_Controller::HTTP_OK);
- }
- catch(Exception $e){
- $this->set_response($e->getMessage(), REST_Controller::HTTP_BAD_REQUEST);
- }
- }
-
- public function refresh_filters_get($idno=null)
- {
- return $this->refresh_filters_put($idno);
- }
-
- /**
- *
- * Reload year facets
- *
- * @sid - study id
- *
- */
- public function refresh_year_facets_get($start_row=NULL, $limit=1000)
- {
- try{
- $this->has_dataset_access('edit');
- $output=$this->Dataset_model->refresh_year_facets($start_row, $limit);
- $output=array(
- 'status'=>'success',
- 'result'=>$output
- );
- $this->set_response($output, REST_Controller::HTTP_OK);
- }
- catch(Exception $e){
- $error_output=array(
- 'status'=>'failed',
- 'message'=>$e->getMessage()
- );
- $this->set_response($error_output, REST_Controller::HTTP_BAD_REQUEST);
- }
- }
-
- /**
- *
- * Batch Reload facets/filters by dataset type
- *
- * @dataset_type - dataset type - microdata, timeseries, etc
- * @limit - number of items to process per request
- * @start - starting dataset id
- *
- */
- public function batch_refresh_filters_get($dataset_type=null, $limit=100, $start=0)
- {
- try{
- $user_id=$this->get_api_user_id();
- $this->has_dataset_access('edit');
- if ($dataset_type==null){
- throw new Exception("DATASET_TYPE_IS_REQUIRED");
- }
-
- if(!is_numeric($start)){
- throw new Exception("PARAM:START-INVALID");
- }
-
- $datasets=(array)$this->dataset_manager->get_list_by_type($dataset_type, $limit, $start);
-
- $last_processed=null;
- $output=array();
- foreach($datasets as $dataset){
- $this->dataset_manager->refresh_filters($dataset['id']);
- $output[]=$dataset['id'];
- $last_processed=$dataset['id'];
- }
-
- $output=array(
- 'status'=>'success',
- 'datasets_updated'=>$output,
- 'last_processed'=>$last_processed
- );
- $this->set_response($output, REST_Controller::HTTP_OK);
- }
- catch(Exception $e){
- $this->set_response($e->getMessage(), REST_Controller::HTTP_BAD_REQUEST);
- }
- }
-
/**
*
@@ -1829,14 +1756,15 @@ public function batch_refresh_filters_get($dataset_type=null, $limit=100, $start
* @start - starting dataset id
*
*/
- public function batch_repopulate_index_put($dataset_type=null, $limit=100, $start=0)
+ public function batch_repopulate_index_get($dataset_type=null, $limit=100, $start=0)
{
try{
$user_id=$this->get_api_user_id();
$this->has_dataset_access('edit');
- if ($dataset_type==null){
+
+ /*if ($dataset_type==null){
throw new Exception("DATASET_TYPE_IS_REQUIRED");
- }
+ }*/
if(!is_numeric($start)){
throw new Exception("PARAM:START-INVALID");
@@ -1845,7 +1773,8 @@ public function batch_repopulate_index_put($dataset_type=null, $limit=100, $star
$datasets=$this->dataset_manager->get_list_by_type($dataset_type, $limit, $start);
$output=array();
- foreach($datasets as $dataset){
+ $last_processed=0;
+ foreach($datasets as $dataset){
$this->dataset_manager->repopulate_index($dataset['id']);
$output[]=$dataset['id'];
$last_processed=$dataset['id'];
@@ -2087,43 +2016,25 @@ function generate_pdf_post($idno=null)
$log_threshold= $this->config->item("log_threshold");
$this->config->set_item("log_threshold",0); //disable logging temporarily
- $report_link='';
$params=array('codepage'=>$pdf_options['report_lang']);
$this->load->library('pdf_report',$params);// e.g. 'codepage' = 'zh-CN';
$this->load->library('DDI_Browser','','DDI_Browser');
- //get ddi file path from db
- $ddi_file=$this->Catalog_model->get_survey_ddi_path($sid);
$survey_folder=$this->Catalog_model->get_survey_path_full($sid);
- if ($ddi_file===FALSE || !file_exists($ddi_file)){
- throw new Exception('FILE_NOT_FOUND: '. $ddi_file);
- }
-
//output report file name
$report_file=unix_path($survey_folder.'/ddi-documentation-'.$this->config->item("language").'-'.$sid.'.pdf');
- if ($report_link=='')
- {
- //change error logging to 0
- $log_threshold= $this->config->item("log_threshold");
- $this->config->set_item("log_threshold",0);
-
- $start_time=date("H:i:s",date("U"));
-
- //write PDF report to a file
- $this->pdf_report->generate($report_file,$ddi_file,$pdf_options);
- $end_time=date("H:i:s",date("U"));
-
- //log
- $this->db_logger->write_log('survey','report generated '.$start_time.' - '. $end_time,'ddi-report',$sid);
+ //change error logging to 0
+ $log_threshold= $this->config->item("log_threshold");
+ $this->config->set_item("log_threshold",0);
- //reset threshold level
- $this->config->set_item("log_threshold",$log_threshold);
-
- $report_link=$report_file;
- }
+ //write PDF report to a file
+ $this->pdf_report->generate($sid,$report_file,$pdf_options);
+
+ //reset threshold level
+ $this->config->set_item("log_threshold",$log_threshold);
$response=array(
'status'=> 'success',
diff --git a/application/controllers/api/Resources.php b/application/controllers/api/Resources.php
index aa3d2e994..323d2da93 100644
--- a/application/controllers/api/Resources.php
+++ b/application/controllers/api/Resources.php
@@ -149,6 +149,10 @@ function index_post($idno=null)
$options['filename']=$uploaded_file_name;
}
+ if(!isset($options['filename'])){
+ $options['filename']=null;
+ }
+
//check if resource already exists
$resource_exists=$this->Survey_resource_model->check_duplicate($sid,$options['filename'], $options['title'],$options['dctype']);
$overwrite=isset($options["overwrite"]) ? $options["overwrite"] : false;
@@ -244,9 +248,6 @@ function index_put($idno=null,$resource_id=null)
}
}
-
-
-
//delete a single resource by resource id
function index_delete($idno=null,$resource_id=null)
{
@@ -280,6 +281,11 @@ function index_delete($idno=null,$resource_id=null)
}
}
+ //delete using post
+ function delete_post($idno=null,$resource_id=null)
+ {
+ return $this->index_delete($idno,$resource_id);
+ }
//delete all resources by study
@@ -301,6 +307,10 @@ public function delete_all_delete($idno=null)
}
}
+ public function delete_all_post($idno=null){
+ return $this->delete_all_delete($idno);
+ }
+
//import rdf file
public function import_rdf_post($idno=NULL)
@@ -311,14 +321,8 @@ public function import_rdf_post($idno=NULL)
$sid=$this->get_sid_from_idno($idno);
$this->has_dataset_access('edit',$sid);
- $result=$this->Survey_resource_model->upload_rdf($tmp_path=null,'file');
- $uploaded_file_name=$result['file_name'];
- $uploaded_path=$result['full_path'];
-
- //import entries
+ $uploaded_path=$this->Survey_resource_model->upload_rdf($tmp_path=null,'file');
$imported_count=$this->Survey_resource_model->import_rdf($sid,$uploaded_path);
-
- //delete rdf
@unlink($uploaded_path);
$output=array(
diff --git a/application/helpers/metadata_view_helper.php b/application/helpers/metadata_view_helper.php
index dc1db5eac..c67579c4c 100644
--- a/application/helpers/metadata_view_helper.php
+++ b/application/helpers/metadata_view_helper.php
@@ -118,6 +118,30 @@ function render_group($name, $fields, $metadata,$options=array())
}
}
+
+if ( ! function_exists('render_group_array'))
+{
+ function render_group_array($name, $fields, $metadata,$options=array())
+ {
+ $ci =& get_instance();
+
+ $output=[];
+ foreach($fields as $field_name=>$field_type){
+ $value=get_field_value($field_name,$metadata);
+ //$field_options=isset($field_type['options'])
+ if (is_array($field_type)){
+ $output[$field_name]= render_field($field_type[0],$field_name,$value,$options=$field_type['options']);
+ }
+ else{
+ $output[$field_name]= render_field($field_type,$field_name,$value,$options);
+ }
+ }
+
+ return $output;
+ }
+}
+
+
if ( ! function_exists('render_group_text'))
{
function render_group_text($section_name, $html)
@@ -134,7 +158,7 @@ function render_group_text($section_name, $html)
-if ( ! function_exists('render_columns'))
+if ( ! function_exists('render_columns'))
{
function render_columns($name, $fields, $metadata,$options=array())
{
@@ -227,5 +251,23 @@ function get_string_value($data,$type='text')
throw new Exception("TYPE_NOT_SUPPORTED: ".$type);
}
-/* End of file search_helper.php */
-/* Location: ./application/helpers/search_helper.php */
\ No newline at end of file
+
+if ( ! function_exists('authors_to_string'))
+{
+ function authors_to_string($authors=array())
+ {
+ $output=array();
+ foreach($authors as $author){
+ $author_name=array(
+ isset($author['first_name']) ? $author['first_name'] : '',
+ isset($author['last_name']) ? $author['last_name']: ''
+ );
+ $output[]=implode(" ", array_filter($author_name));
+ }
+
+ return implode(", ", $output);
+ }
+}
+
+/* End of file metadata_view_helper.php */
+/* Location: ./application/helpers/metadata_view_helper.php */
\ No newline at end of file
diff --git a/application/language/arabic/breadcrumbs_lang.php b/application/language/arabic/breadcrumbs_lang.php
index b15c72de1..7ab4f1408 100644
--- a/application/language/arabic/breadcrumbs_lang.php
+++ b/application/language/arabic/breadcrumbs_lang.php
@@ -1,7 +1,17 @@
الربط b> أو إلغاء الارتباط b> لربط الدراسات أو إلغاء ربطها.";
+$lang['copy_studies_to']="نسخ الدراسات إلى";
+$lang['change_repo']="تحويل";
+$lang['repositoryid']="مجموعة";
+$lang['copy_studies']="نسخ الدراسات";
+$lang['transfer_study_ownership']="نقل مالك الدراسة";
+$lang['transfer_ownership']="نقل المالك";
+$lang['msg_studies_to_transfer']="الدراسات التي سيتم نقلها";
+$lang['study_owned']="الدراسة المملوكة";
+$lang['study_linked']="الدراسة المربوطة";
+$lang['is_harvested_study']="الدراسة المحصودة";
+$lang['select_publish_unpublish']="حدد للنشر / إلغاء النشر";
+$lang['publish']="نشر";
+$lang['series']="سلسلة";
+$lang['data_access']="النفاذ للبيانات";
+$lang['overwrite_if_exists']="إستبدل إن وجدت؟";
+$lang['sort_by']="ترتيب النتائج حسب:";
+$lang['surveyid']="رقم المسح";
+$lang['no_related_citations_click_here_to_add']="لا توجد اقتباسات مرفقة بهذا المسح، لإضافة الاقتباسات ذات الصلة ، انقر هنا.";
+$lang['max_upload_limit']="أقصى حجم لملف التحميل:";
+$lang['upload_ddi']="أضف دراسة";
+$lang['clear_filter']="مسح التصفية/الفلتر";
+$lang['countries']="البلدان";
+$lang['titl']="العنوان";
+$lang['study_status']="حالة الدراسة";
+$lang['all']="الكل";
+$lang['published']="منشورة";
+$lang['unpublished']="غير منشورة";
+$lang['tags']="العلامات Tags";
+$lang['click_to_publish_unpublish']="انقر للنشر أو إلغاء النشر";
+$lang['pdf_not_generated']="لم يتم إنشاء ملف PDF";
+$lang['pdf_uptodate']="ملف PDF محدث";
+$lang['pdf_outdated']="ملف PDF قديم";
+$lang['metadata_in_pdf']="البيانات الوصفية في PDF";
+$lang['replace_ddi']="استبدل DDI";
+$lang['delete_study']="حذف الدراسة";
+$lang['generate_pdf']="إنشاء/توليد ملف PDF";
+$lang['upload_rdf']="تحميل RDF";
+$lang['link_resources']="ربط الموارد";
+$lang['export_ddi']="تصدير DDI";
+$lang['export_rdf']="تصدير RDF";
+$lang['admin_notes']="ملاحظات المسؤول";
+$lang['reviewer_notes']="ملاحظات المراجع";
+$lang['study_collections']="عرض في مجموعات أخرى";
+$lang['study_aliases']="الأسماء المستعارة للدراسة";
+$lang['study_warnings']="تحذيرات!";
+$lang['warning_study_has_no_external_resources']="الدراسة ليس لها موارد خارجية مرفقة";
+$lang['warning_study_has_no_microdata']="الدراسة ليس لها بيانات جزئية مرفقة";
+$lang['warning_study_has_no_questionnaire']="الدراسة ليس لديها إستمارات مرفقة";
+$lang['warning_study_has_pending_licensed_requests']="الدراسة لديها طلبات مرخصة في حالة الانتظار";
+$lang['warning_study_not_published']="الدراسة لم تنشر";
+$lang['warning_study_years_not_set']="الدراسة لم يتم تعيين سنوات جمع البيانات لها ";
+$lang['warning_study_has_no_pdf_documentation']="الدراسة لم يتم انشاء توثيق البيانات الوصفية لها في ملف PDF";
+$lang['study_no_questionnaire']="دراسات بدون إستمارات";
+$lang['study_no_datafile']="دراسات بدون بيانات";
+$lang['filter']="فلترة/تصفية";
+$lang['ID']="الرقم/المعرّف";
+$lang['collection']="مجموعة";
+$lang['modified_on']="تعديل بتاريخ";
+$lang['Published']="منشورة";
+$lang['Survey options']="خيارات المسح";
+$lang['Tags']="علامات Tags";
+$lang['Generate PDF']="إنشاء/توليد PDF";
+$lang['Status']="حالة";
+$lang['batch_upload_files']="تحميل ملفات";
+$lang['clear_import_folder']="إمسح ملفات الاستيراد";
+$lang['central_catalog_short_text']="فقرة تصف الكتالوج المركزي";
+$lang['study_exists_in_other_collection']="الدراسة موجودة بالفعل في المجموعة [s%]. لتحديث الدراسة ، يجب عليك التبديل إلى المجموعة وتحميل DDI.";
+$lang['type_admin']="ملاحظات المسؤول";
+$lang['type_reviewer']="ملاحظات المراجع";
+$lang['type_public']="ملاحظات عامة";
+$lang['select_note_type']="حدد نوع الملاحظة";
+$lang['admin_note']="ملاحظة المسؤول";
+$lang['reviewer_note']="ملاحظة المراجع";
+$lang['public_note']="ملاحظة عامة";
+$lang['add_note']="أضف ملاحظة";
+$lang['click_on_icon_to_remove_citation']="انقر فوق الرمز s% لإزالة الاقتباس";
+$lang['attach_citation']="إرفاق الاقتباس";
+$lang['js_refreshing_page']="جاري تحميل الصفحة ، برجاء الانتظار ...";
+$lang['remove_from_collection']="إزالة";
+$lang['remove_from_collection_description']="إزالة هذه الدراسة من هذه المجموعة.";
+$lang['studies_linked_count']="دراسات مرتبطة من مجموعات أخرى";
+$lang['notes']="ملاحظات";
+$lang['link_study']="ربط";
+$lang['unlink_study']="إزالة الربط";
+$lang['transfer']="نقل";
+$lang['select_the_repository_from_the_list_below']="حدد المجموعة من القائمة أدناه لنقل الملكية إلى مجموعة أخرى.";
+$lang['study_metadata_updated']="تم تحديث البيانات الوصفية للدراسة!";
+$lang['refresh_ddi']="تحديث DDI";
+$lang['batch_refresh_ddi']="تحديث حزمة DDI";
+$lang['ddi_batch_refresh_title']="تحديث حزمة DDI";
+$lang['btn_refresh']="تحديث DDI";
+$lang['refresh_ddi_description']="تحديث DDI تحدث قاعدة البيانات بالبيانات الوصفية من DDI.";
+$lang['total_studies_found']="مجموع الدراسات التي وجدت";
+$lang['mark_as_featured']="العرض كدراسة مميزة؟";
+$lang['msg_study_ownership_has_changed']="تغيرت ملكية الدراسة!";
+$lang['replace_ddi_failed_duplicate_study_found']="يحتوي الكتالوج على دراسة أخرى بنفس المعرف";
+$lang['show_selected_only']="إظهار المحدد فقط";
+$lang['Data available from external repository']="البيانات متاحة من مستودع خارجي";
+$lang['Data not available']="البيانات غير متوفرة";
+$lang['error_no_collection_selected']="لم تقم بتحديد المجموعة!";
+$lang['confirm_publish_records']="تأكيد لنشر الدراسة؟";
+$lang['confirm_publish']="ينشر؟";
+$lang['attach_citations']="إرفاق الإقتباسات";
+$lang['return_to_edit_page']="العودة لتحرير الصفحة";
+$lang['attach_related_data']="إرفاق ذات الصلة";
+$lang['no_related_studies_click_here_to_add']="لا توجد دراسات ذات صلة مرفقة";
+$lang['relationship_type']="نوع العلاقة";
+$lang['draft']="مسودة";
+$lang['confirm_unpublish_records']="هل أنت متأكد أنك تريد إلغاء نشر السجلات؟";
+$lang['confirm_unpublish']="تأكيد إلغاء النشر";
+$lang['idno']="رقم/معرّف الدراسة";
+$lang['search_results_for']="نتائج البحث عن:";
+$lang['tab_overview']="نبذة";
+$lang['tab_manage_files']="ملفات";
+$lang['tab_resources']="موارد";
+$lang['tab_citations']="اقتباسات";
+$lang['tab_data_files']="ملفات البيانات";
+$lang['tab_notes']="ملاحظات";
+$lang['tab_related_data']="دراسات ذات صلة";
+$lang['license']="رخصة";
+$lang['select_license']="إختر الرخصة";
+$lang['select_study_thumbnail']="إختر ملف الصورة (PNG ، JPG ، JPEG ، GIF)";
+$lang['Thumbnal']="الصورة المصغرة";
+$lang['Upload thumbnal']="تحميل الصورة المصغرة";
+
+
+/* End of file catalog_admin */
+/* Location: ./application/language/arabic/catalog_admin */
\ No newline at end of file
diff --git a/application/language/arabic/catalog_search_lang.php b/application/language/arabic/catalog_search_lang.php
index 053567a5f..635dd9ae7 100644
--- a/application/language/arabic/catalog_search_lang.php
+++ b/application/language/arabic/catalog_search_lang.php
@@ -1,114 +1,250 @@
%d من %d-%d عرض ";
-$lang['found_study']="%dمسح من %dوجود";
-$lang['found_studies']="%dمسوح من %dوجود ";
-$lang['showing_variables']="متغيرات%d من%d-%dعرض ";
-$lang['showing_pages']="%dمن %s صفحة ";
-$lang['variables_keywords_found']=" d% تم العثور على كلمات البحث في d% متغير من أصل";
-$lang['link_browse_metadata']="تصفح البيانات الوصفية";
-$lang['link_browse_metadata_hover']="تصفح البيانات الوصفية";
-$lang['link_access_policy']="سياسة النفاذ";
+$lang['showing_studies']="إظهار %d-%d من%d";
+$lang['found_study']="تم العثور على %d دراسة من أصل %d";
+$lang['found_studies']="تم العثور على % d دراسات من إجمالي % d ";
+$lang['found_variable']="تم العثور على % d متغير من أصل % d ";
+$lang['found_variables']="تم العثور على % d متغيرات من أصل % d ";
+$lang['showing_variables']="إظهار %d-%d من % s المتغيرات";
+$lang['showing_pages']=" الصفحة d% من s%
+";
+$lang['variables_keywords_found']="تم العثور على كلمة (كلمات) رئيسية في d% متغير (متغيرات) من d% ";
+$lang['link_browse_metadata']="إستعراض البيانات الوصفية";
+$lang['link_browse_metadata_hover']="إستعراض البيانات الوصفية";
+$lang['link_access_policy']="سياسة النفاذ/الوصول";
$lang['link_access_policy_hover']="سياسة النفاذ الى البيانات االجزئية";
$lang['link_data']="بيانات";
-$lang['link_data_direct_hover']="استمارة طلب البيانات الجزئية (نفاذ مباشر)";
-$lang['link_data_public_hover']="استمارة طلب البيانات الجزئية (نفاذ للعموم) ";
-$lang['link_data_licensed_hover']="استمارة طلب البيانات الجزئية (نفاذ مرخص) ";
-$lang['link_data_enclave_hover']="استمارة طلب البيانات الجزئية (في المركز)";
-$lang['link_citations']="وصلة الاقتباس";
+$lang['link_data_direct_hover']="نموذح طلب البيانات الجزئية (نفاذ مباشر)";
+$lang['link_data_public_hover']="نموذج طلب البيانات الجزئية (نفاذ للعموم) ";
+$lang['link_data_licensed_hover']="نموذج طلب البيانات الجزئية (نفاذ مرخص) ";
+$lang['link_data_enclave_hover']="نموذج طلب البيانات الجزئية (في المركز)";
+$lang['link_citations']="الإقتباس";
$lang['link_citations_hover']="الدراسات ذات الصلة بالاقتباسات";
-$lang['link_reports']="التقارير و المخرجات التحليلية";
-$lang['link_reports_hover']="التقارير و المخرجات التحليلية";
-$lang['link_indicators']="المؤشرات و الجداول (قاعدة البيانات)";
-$lang['link_indicators_hover']="المؤشرات و الجداول (قاعدة البيانات)";
+$lang['link_reports']="التقارير والمخرجات التحليلية";
+$lang['link_reports_hover']="التقارير والمخرجات التحليلية";
+$lang['link_indicators']="أدوات تفاعلية";
+$lang['link_indicators_hover']="أدوات تفاعلية";
$lang['link_questionnaires']="الاستمارات";
$lang['link_questionnaires_hover']="الاستمارات";
$lang['link_technical']="الوثائق التقنية";
$lang['link_technical_hover']="الوثائق التقنية";
-$lang['link_study_website']="موقع الدراسة";
-$lang['link_study_website_hover']="موقع الدراسة(مع كل الوثائق المتاحة) ";
-$lang['link_ddi']=" (DDI)البيانات الوصفية للمسح";
-$lang['link_ddi_hover']=" DDIالبيانات الوصفية للمسح بصيغة ";
-$lang['switch_to_study_view']="تبديل الى عرض المسوح";
+$lang['link_study_website']="الموقع الإلكترني للدراسة";
+$lang['link_study_website_hover']="الموقع الإلكترني للدراسة (مع كل الوثائق المتاحة) ";
+$lang['link_ddi']=" البيانات الوصفية للدراسة (DDI)";
+$lang['link_ddi_hover']=" البيانات الوصفية للمسح بصيغة DDI ";
+$lang['switch_to_study_view']="تبديل الى عرض الدراسة";
$lang['compare_hover']="مقارنة المتغيرات";
$lang['compare_selected_variables']="مقارنة المتغيرات المختارة";
$lang['mark_for_variable_comparison']="تعيين المتغير للمقارنة";
-$lang['variable_info']="معلومات على المتغيرات";
-$lang['field_survey_title']="اسم المسح";
-$lang['js_searching']="...جاري البحث الرجاء الانتظار";
-$lang['js_loading']="...جاري التحميل الرجاء الانتظار";
+$lang['variable_info']="معلومات المتغير";
+$lang['field_survey_title']="عنوان المسح";
+$lang['js_searching']="جاري البحث الرجاء الانتظار ...";
+$lang['js_loading']="جاري التحميل الرجاء الانتظار ...";
$lang['js_invalid_year_range_selected']="مجموعة السنوات المختارة غير صالحة.";
-$lang['js_topic_selected']="المواضيع المختارة";
+$lang['js_topic_selected']="الموضوع المختار";
$lang['js_topics_selected']="المواضيع المختارة";
-$lang['js_country_selected']="البلدان المختارة";
+$lang['js_country_selected']="البلد المختارة";
$lang['js_countries_selected']="البلدان المختارة";
-$lang['title_compare_variables']="مقارنة المتغيرات المختارة";
+$lang['title_compare_variables']="مقارنة المتغيرات ";
$lang['click_drag_move']="انقر واسحب للنقل";
-$lang['open_in_new_window']="افتح صفحة جديدة";
-$lang['download_pdf']=" PDFتنزيل";
-$lang['click_to_browse_metadata']="انقر هنا لتصفح البيانات الوصفية";
-$lang['producers']="المنتجين";
-$lang['sponsors']="الممولين";
-$lang['citations_of_publications']="الاستشهادات والمنشورات التي استعملت الدراسة";
-$lang['study_resources']="وثائق الدراسة";
+$lang['open_in_new_window']="افتح في صفحة جديدة";
+$lang['download_pdf']=" تنزيل PDF";
+$lang['download_csv']="تنزيل ملف CSV";
+$lang['download_json']="تنزيل ملف JSON";
+$lang['click_to_browse_metadata']="انقر هنا لإستعراض البيانات الوصفية";
+$lang['producers']="المنتجون";
+$lang['sponsors']="الممولون";
+$lang['citations_of_publications']="المنشورات ذات الصلة";
$lang['click_to_view_information']="انقر لعرض المعلومات";
-$lang['view_more_information']="عرض معلومات اكثر";
+$lang['view_more_information']="عرض المزيد من المعلومات";
$lang['technical_documents']="وثائق تقنية";
$lang['reports']="تقارير";
-$lang['questionnaires']="استبيانات";
-$lang['other_materials']="مواد اخرى";
+$lang['questionnaires']="إستمارات";
+$lang['other_materials']="مواد أخرى";
$lang['description']="وصف";
-$lang['abstract']="خلاصة";
+$lang['abstract']="ملخص";
$lang['table_of_contents']="جدول المحتويات";
$lang['classification']="تصنيف";
$lang['compare_hover_text']="مقارنة المتغيرات المختارة";
-$lang['select_number_of_records_per_page']="اختر عدد من السجلات في كل صفحة";
-$lang['source_catalog']=" s%البيانات الوصفية يوفرها";
-$lang['source']="مورد";
-$lang['download_ddi']="DDIتحميل ";
+$lang['select_number_of_records_per_page']="حدد عدد السجلات لإظهارها لكل صفحة";
+$lang['source_catalog']="البيانات الوصفية الموفرة من قبل s%";
+$lang['source']="المصدر";
+$lang['download_ddi']="تنزيل DDI";
$lang['link_data_remote_hover']="البيانات الجزئية المتاحة من مستودع خارجي
";
-$lang['collections']="مجموعة";
-$lang['legend_direct_access']="النفاذ المباشر";
-$lang['legend_data_public']="الملفات للاستخدم العام";
-$lang['legend_data_licensed']="ملف بموجب ترخيص";
+$lang['collections']="مجموعات";
+$lang['legend_data_direct']="الوصول المباشر إلى البيانات";
+$lang['legend_data_public']="ملفات البيانات المؤهلة للإستخدام العام";
+$lang['legend_data_licensed']="ملفات بيانات بموجب ترخيص";
$lang['legend_data_enclave']="البيانات الجزئية في المركز";
+$lang['legend_data_open']="الوصول المفتوح للبيانات";
$lang['legend_data_remote']="البيانات المتاحة من خلال مستودع خارجي";
+$lang['legend_data_data_na']="البيانات غير المتوفرة";
+$lang['legend_data_cc40']="رخصة المشاع الإبداعي 4.0";
+$lang['legend_data_research']="بحث البيانات الجزئية";
+$lang['legend_data_research_public']="البيانات الجزئية للبحث العام";
+$lang['legend_data_research_license']="بحث البيانات الجزئية بترخيص";
+$lang['legend_data_research_public_lic']="البيانات الجزئية للأبحاث العامة مع الترخيص";
+$lang['data_class_public']="عام";
+$lang['data_class_official']="رسمي";
+$lang['data_class_confidential']="خصوصي وسري";
+$lang['license']="مرخص";
+$lang['data_class_note_public']="تم تصنيف مجموعة البيانات هذه على أنها عامة بموجب سياسة تصنيف الوصول إلى المعلومات. يمكن للموظفين والمستخدمين الخارجيين الوصول إلى مجموعة البيانات هذه.";
+$lang['data_class_note_official']="تم تصنيف مجموعة البيانات هذه على أنها رسمية بموجب سياسة تصنيف الوصول إلى المعلومات. الوصول إلى البيانات يقتصر على الموظفين فقط.";
+$lang['data_class_note_confidential']="تم تصنيف مجموعة البيانات هذه على أنها سرية بموجب سياسة تصنيف الوصول إلى المعلومات. الوصول إلى البيانات يقتصر على الموظفين فقط.";
$lang['no_variables_to_compare']="لم تقم بتحديد أية متغيرات للمقارنة. الرجاء العودة وتحديد بعض المتغيرات ثم قم بتشغيل المقارنة مرة أخرى";
-$lang['accesspolicy']="سياسة النفاذ";
-$lang['study_meta_description']="يتم سرد %s التي تنتجها %s في كتالوج %s. البيانات والبيانات الوصفية متاحة من الرابط أعلاه.";
-$lang['meta_description_catalog']="كتالوج البيانات يمكنك من تصفح وبحث وتحميل و دراسة البيانات و البيانات الوصفية .
+$lang['refno']="الرقم المرجعي";
+$lang['accesspolicy']="سياسة النفاذ/الوصول";
+$lang['study_meta_description']="يتم سرد s% التي تنتجها s% في كتالوج s%. البيانات والبيانات الوصفية متاحة من الرابط أعلاه.";
+$lang['meta_description_catalog']="كتالوج البيانات يمكنك من تصفح، بحث وتنزيل البيانات والبيانات الوصفية للدراسة .
";
-$lang['new_window']="فتح نافذة جديدة
+$lang['new_window']="فتح في نافذة جديدة
";
-
-
-/* End of file catalog_search_lang.php */
-/* Location: ./application/language/arabic/catalog_search_lang.php */
\ No newline at end of file
+$lang['harvested_study_access_complete_metadata']="تم حصاد المعلومات المقدمة في هذه الصفحة من مستودع مساهم: %s
+يمكنك تصفح وتنزيل البيانات الوصفية من هذه الصفحة. لتنزيل المواد ذات الصلة والوصول إلى البيانات، <;a href="%s"> قم بزيارة صفحة المسح في المستودع الأصلي .";
+$lang['data']="بيانات";
+$lang['by']="بواسطة";
+$lang['data_direct_description']="يتم توفير مجموعات البيانات والوثائق ذات الصلة للمستخدمين مجانًا. ليست هناك حاجة لتسجيل الدخول إلى التطبيق.";
+$lang['data_public_description']="الوثائق ذات الصلة متاحة مجانا للمستخدمين. ومع ذلك ، يجب على المستخدمين تسجيل الدخول إلى التطبيق للوصول إلى مجموعات البيانات هذه.";
+$lang['data_licensed_description']="الوثائق ذات الصلة متاحة مجانا للمستخدمين. يتطلب الوصول إلى مجموعات البيانات أن يتقدم المستخدم بطلب للحصول على الموافقة للوصول إلى مجموعات البيانات هذه. يجب على المستخدمين تسجيل الدخول إلى التطبيق وملء نموذج الطلب عند التقدم للحصول على حق الوصول.";
+$lang['data_enclave_description']="الوثائق ذات الصلة متاحة مجانا للمستخدمين. يتطلب الوصول إلى مجموعات البيانات أن يتقدم المستخدم بطلب للحصول على الموافقة للوصول إلى مجموعات البيانات هذه في مكان وبيئة آمنة في المركز.";
+$lang['data_remote_description']="الوثائق ذات الصلة متاحة مجانا للمستخدمين. يتم الاحتفاظ بمجموعات البيانات في كتالوجات في الخارج أو في مؤسسات أخرى.";
+$lang['data_na_description']="الوثائق ذات الصلة متاحة مجانا للمستخدمين. ومع ذلك ، فإن مجموعات البيانات لهذه الدراسات غير متوفرة.";
+$lang['data_open_description']="مجموعات البيانات والوثائق ذات الصلة للمستخدمين يتم توفيرها مجانًا.";
+$lang['filter_by_data']="الوصول للبيانات";
+$lang['legend_na_access']="البيانات غير متوفرة";
+$lang['central_data_catalog']="كتالوج/فهرس البيانات المركزي";
+$lang['data_catalogs']="كتالوج/فهرس البيانات";
+$lang['visit_catalog']="قم بزيارة الكتالوج";
+$lang['catalog_owned_by']="مجموعة";
+$lang['legend_citations']="اقتباسات من المنشورات التي استخدمت الدراسة";
+$lang['catalog_history']="تاريخ/سجل الكتالوج";
+$lang['search_no_results']="لم يتطابق بحثك مع أي دراسات أجريت في الفهرس.
+الاقتراحات: p> +
-
المركز الوطني للبيانات يوجد في[ضع اسم الموقع هنا]
-كما يمكن للباحثين النفاذ إلى البيانات على مركز البيانات الوطني، حيث يتم تزويدهم بالبيانات ، - بمعدات الحاسوب والبرمجيات و تحت إشراف الموظفين.
"; -$lang['data_enclave_application_form_link']="انقر هنا لتحميل النموذج للنفاذ إلى مركز البيانات الوطني +$lang['data_enclave_description']="أنشئ المركز الوطني للبيانات من قبل الأرشيف الوطني وذلك للسماح للباحثيين الذين يستوفون شروطا معينة النفاذ الى البيانات الفردية وفق شروطا معينة وتحت رقابة صارمة. يسمح المركز النفاذ الى البيانات الجزئية في بيئة امنة ، وذلك دون المساس بسرية البيانات.
+
المركز الوطني للبيانات يوجد في [ضع اسم الموقع هنا]
+كما يمكن للباحثين النفاذ إلى البيانات على مركز البيانات الوطني، حيث يتم تزويدهم بالبيانات ، بمعدات الحاسوب والبرمجيات و تحت إشراف الموظفين.
"; +$lang['data_enclave_application_form_link']="انقر هنا لتحميل النموذج للنفاذ إلى مركز البيانات الوطني "; - - -/* End of file data_enclave_lang.php */ -/* Location: ./application/language/arabic/data_enclave_lang.php */ \ No newline at end of file + + +/* End of file data_enclave */ +/* Location: ./application/language/arabic/data_enclave */ \ No newline at end of file diff --git a/application/language/arabic/dd_help_lang.php b/application/language/arabic/dd_help_lang.php new file mode 100644 index 000000000..eb749727c --- /dev/null +++ b/application/language/arabic/dd_help_lang.php @@ -0,0 +1,267 @@ + أدخل العنوان الرسمي للمسح. يمكن أن يكون العنوان باللغة الإنجليزية أو بلغة المسح. قم بتضمين السنة (السنوات) المرجعية ، لكن لا تقم بتضمين اختصار المسح أو اسم الدولة كجزء من العنوان. اجعل الحرف الأول من كل كلمة كبيرًا (باستثناء حروف الجر أو حروف العطف الأخرى). للعناوين بالفرنسية والإنجليزية والبرتغالية وما إلى ذلك ، يجب توفير أحرف مشددة. مثال: “Enquête Démographique et de Santé 2008-2009”. "; +$lang['altTitl']="أدخل اختصار المسح (بما في ذلك الحرف الأول من اسم البلد إذا كان ذلك مناسبًا). يمكن تضمين السنة (السنوات) المرجعية للمسح. مثال: DHS 2008-09.
"; +$lang['serName']="نوع الدراسة أو نوع المسح هو الفئة العامة التي تحدد المسح. حدد خيارًا واحدًا من القائمة المنسدلة. حدد "أخرى" إذا لم يتطابق أي من الخيارات مع المسح الخاص بك. p>"; +$lang['serInfo']="
قد يتكرر المسح على فترات منتظمة (مثل مسح القوى العاملة السنوي) ، أو يكون جزءًا من برنامج مسح دولي (مثل MICS ، CWIQ ، DHS ، LSMS وغيرها). معلومات السلسلة هي وصف لهذه "المجموعة" من المسوح. سيتم هنا تقديم وصف موجز لخصائص المسح ، بما في ذلك وقت بدئه ، وعدد الجولات التي تم تنفيذها بالفعل ، ومن المسؤول. إذا كان المسح لا ينتمي إلى سلسلة ، فاترك هذا الحقل فارغًا. p>"; +$lang['parTitl']="
سيتم ترك هذا الحقل فارغًا في معظم الحالات. في البلدان التي بها أكثر من لغة رسمية واحدة ، قد يتم توفير ترجمة للعنوان. p>"; +$lang['IDNo']="
+رقم معرّف مجموعة البيانات هو رقم فريد يُستخدم لتحديد مسح معين. حدد واستخدم مخططًا متسقًا لاستخدامه. يمكن إنشاء مثل هذا المعرف على النحو التالي: الدولة-المنتج-المسح-العام-الإصدار حيث +- البلد هو اختصار البلد المكون من 3 أحرف ISO +- المنتج هو اختصار الوكالة المنتجة +- المسح هو اختصار المسح +- السنة هي السنة المرجعية (أو السنة التي بدأ فيها المسح) +- الإصدار هو رقم إصدار مجموعة البيانات الرقمية (انظر وصف الإصدار أدناه) +"; +$lang['version']="
+يجب أن يحتوي وصف الإصدار على رقم إصدار متبوعًا بوصف الإصدار. أمثلة: p> +
+
هذا هو التاريخ بتنسيق ISO (yyyy-mm-dd) للإنتاج الفعلي والنهائي للبيانات. قم بتزويد الشهر والسنة على الأقل.
"; +$lang['version_notes']="يجب أن تقدم ملاحظات الإصدار تقريرًا موجزًا عن التغييرات التي تم إجراؤها من خلال عملية الإصدار. يجب أن تشير الملاحظة إلى كيفية اختلاف هذا الإصدار عن الإصدارات الأخرى لمجموعة البيانات نفسها. p>"; +$lang['overview_abstract']="
يجب أن يقدم الملخص ملخصًا واضحًا لأغراض وأهداف ومحتوى المسح.
"; +$lang['instructions_project_submit']="بمجرد اقتناعك بأن المعلومات التي أدخلتها لدراستك صحيحة ، فأنت جاهز لإرسال مشروعك. الرجاء تحديد سياسة وصول مناسبة لتوزيع البيانات ، أو كتالوج يجب نشر البيانات فيه ، أو أي ملاحظات قد تكون لديك بشأن عمليات الحظر ، أو المعلومات الحساسة التي يجب إزالتها قبل التوزيع أو أي ملاحظات أو تعليمات خاصة أخرى تريدها لتقديمها إلى مكتبة البيانات الجزئية. p>"; +$lang['instructions_project_contributor_review']="
بمجرد اقتناعك بأن المعلومات التي أدخلتها لدراستك صحيحة ، فأنت جاهز لإرسال مشروعك. الرجاء تحديد سياسة وصول مناسبة لتوزيع البيانات ، أو كتالوج يجب نشر البيانات فيه ، أو أي ملاحظات قد تكون لديك بشأن عمليات الحظر ، أو المعلومات الحساسة التي يجب إزالتها قبل التوزيع أو أي ملاحظات أو تعليمات خاصة أخرى تريدها لتقديمها إلى مكتبة البيانات الجزئية. p>"; +$lang['instructions_datafiles_usage']="
حمّل جميع الملفات التي ترغب في مشاركتها. يتضمن ذلك ملفات البيانات (بأي تنسيق) والاستبيانات وأدوات المسح الأخرى ووصف المنهجية وملفات البرامج وأي تقارير. بمجرد تحميل الملفات ، يرجى استخدام رابط تحرير (الخط الأزرق) أدناه لتحديد نوع الملف أو المستند المناسب لهذا المورد. يجب توفير ملفات البيانات والاستبيان كحد أدنى. p>"; +$lang['instructions_citations']="
إذا نشرت عملاً يستخدم مجموعة البيانات المودعة ، يمكنك إدخال معلومات الاقتباس الخاصة بها في هذا القسم. ستتم إضافة هذه المراجع إلى صفحة العرض الخاصة بدراستك بمجرد نشرها في كتالوجات مكتبة البيانات الجزئية. p>"; +$lang['anlyUnit']="
الوحدة (الوحدات) الأساسية للتحليل أو الملاحظة التي تصفها الدراسة: الأفراد ، والأسر / الأسر ، والمجموعات ، والمرافق ، والمؤسسات / المنظمات ، والوحدات الإدارية ، والمواقع المادية ، وما إلى ذلك. p> +
أمثلة: p> +
+
هذا الحقل هو تصنيف واسع للبيانات ويرتبط بمربع منسدل يوفر مفردات مضبوطة.
"; +$lang['keyword']="تلخص الكلمات المفتاحية المحتوى أو موضوع المسح. كتصنيفات للموضوعات ، يتم استخدامها لتسهيل الإحالة والبحث في كتالوجات المسح.
"; +$lang['scope_notes']="النطاق عبارة عن وصف للموضوعات التي يغطيها المسح. يمكن اعتباره ملخصًا للوحدات التي تم تضمينها في الاستبيان. النطاق لا يتعامل مع التغطية الجغرافية.
+مثال: p> +
يشمل نطاق المسح العنقودي متعدد المؤشرات: p> +
يسهل تصنيف الموضوع الرجوع إلى عمليات البحث في كتالوجات المسح الإلكتروني.
نظرًا لأن مكتبة البيانات الجزئية لم تصوغ قائمة موضوعات قياسية ، إلا أنه قد يتم ترك هذا الحقل فارغًا < p/>"; +$lang['nation']="
أدخل اسم البلد ، حتى في الحالات التي لا يغطي فيها المسح البلد بالكامل. في حقل "الاختصار" ، نوصي بإدخال رمز ISO المكون من 3 أحرف للبلد. إذا كانت مجموعة البيانات التي توثقها تغطي أكثر من بلد ، فأدخل الكل في صفوف منفصلة.
"; +$lang['geogCover']="يهدف هذا الحقل إلى وصف التغطية الجغرافية للعينة. ستكون الإدخالات النموذجية "تغطية وطنية" ، "حضرية (أو ريفية) فقط" ، "ولاية ..." ، "عاصمة" ، إلخ.
"; +$lang['country_universe']="نحن مهتمون هنا بعالم المسح(وليس عالم أقسام معينة من الاستبيانات أو المتغيرات) ، أي تحديد السكان المعنيين بالمسح. نادرًا ما يكون الكون هو كل سكان البلاد. على سبيل المثال ، لا تغطي عينات المسوحات المنزلية ، عادة المشردين والبدو والدبلوماسيين وأسر المجتمع. قد تغطي بعض المسوح السكان من فئة عمرية معينة فقط ، أو الذكور فقط (أو الإناث) ، وما إلى ذلك.
"; +$lang['AuthEnty']="الباحث الرئيسي هو المؤسسة (أو في بعض الحالات الفرد (الأفراد)) الذي كان مسؤولاً عن تصميم وتنفيذ المسح (وليس التمويل أو المساعدة الفنية).
+الترتيب الذي يتم سردها به تقديري. يمكن أن تكون أبجدية أو حسب أهمية المساهمة.
"; +$lang['AuthEnty_iaffiliation']="التبعية +"; +$lang['producers']="الاختصار والتبعية والدور. إذا كان أي من الحقول غير قابل للتطبيق ، فيمكن تركها فارغة. يجب أن تكون الاختصارات هي الاختصار الرسمي للمنظمة.
+يجب أن يكون الدور عبارة أو وصفًا قصيرًا وموجزًا للمساعدة المحددة التي تقدمها المنظمة لإنتاج البيانات.
+أمثلة على الأدوار: p> +
لا تضم الرعاة الماليين هنا. p>"; +$lang['fundAg']="
ضع قائمة بالمنظمات (الوطنية أو الدولية) التي ساهمت ، نقدًا أو عينيًا ، في تمويل المسح.
"; +$lang['othId_p']="يمكن استخدام هذا الحقل الاختياري لتقدير أي أشخاص ومؤسسات أخرى ساهمت بشكل ما في المسح.
"; +$lang['sampProc']="ينطبق هذا الحقل فقط على المسوح بالعينة. المعلومات عن إجراءات أخذ العينات أمر بالغ الأهمية (على الرغم من أنها لا تنطبق على التعدادات ومجموعات البيانات الإدارية). يجب أن يتضمن هذا القسم معلومات موجزة تتضمن على الرغم من أنها لا تقتصر على: p> +
من المفيد أيضًا الإشارة هنا إلى المتغيرات الموجودة في ملفات البيانات التي تحدد المستويات المختلفة للطبقات ووحدة العينة الأولية. هذه ضرورية لمستخدمي البيانات الذين يرغبون في حساب تصميم العينة بشكل صحيح في تحليلاتهم وحساباتهم لأخطاء أخذ العينات.
+يقبل هذا القسم تنسيق النص فقط ؛ لا يمكن إدخال الصيغ. في معظم الحالات ، ستتوفر المستندات الفنية التي تصف استراتيجية أخذ العينات بالتفصيل. في مثل هذه الحالات ، قم بتضمين مرجع (العنوان / المؤلف / التاريخ) لهذا المستند ، وتأكد من تحميل المستند في ملفات البيانات وقسم الموارد الأخرى.
"; +$lang['deviat']="ينطبق هذا الحقل فقط على المسوح بالعينة. p> +
أحيانًا يتطلب واقع المجال انحرافًا عن تصميم العينة (على سبيل المثال بسبب صعوبة الوصول إلى المناطق بسبب مشاكل الطقس وعدم الاستقرار السياسي وما إلى ذلك). إذا انحرف تصميم العينة لأي سبب من الأسباب ، فيجب الإبلاغ عن ذلك هنا.
"; +$lang['respRate']="يوفر معدل الاستجابة تلك النسبة المئوية للأسر (أو وحدة عينة أخرى) التي شاركت في المسح بناءً على حجم العينة الأصلي. قد يحدث الإغفال بسبب رفض المشاركة ، أو استحالة تحديد مكان المدعى عليه ، أو غير ذلك. في بعض الأحيان ، قد يتم استبدال منزل بآخر بالتصميم. تحقق من أن المعلومات المقدمة هنا متوافقة مع حجم العينة المشار إليه في حقل "إجراء أخذ العينات" وعدد السجلات الموجودة في مجموعة البيانات (على سبيل المثال ، إذا ذكر تصميم العينة عينة من 5000 أسرة وكانت البيانات الموجودة بها تحتوي على بيانات عن 4500 أسرة ، يجب ألا يكون معدل الاستجابة 100 بالمائة). p> +
قدِّم ، إن أمكن ، معدلات الاستجابة حسب الطبقة. إذا كانت المعلومات متوفرة حول أسباب عدم الاستجابة (الرفض / لم يتم العثور على / غير ذلك) ، فقم بتوفير هذه المعلومات أيضًا. p> +
يمكن أيضًا استخدام هذا الحقل في بعض الحالات لوصف عدم الاستجابات في تعدادات السكان. p>"; +$lang['weight']="ينطبق هذا الحقل فقط على عينات المسوحات أو عينات التعداد. +
قدم هنا قائمة المتغيرات المستخدمة كمعامل ترجيح. إذا كان هناك أكثر من متغير واحد هو متغير ترجيح/وزن ، فقم بوصف كيف تختلف هذه المتغيرات عن بعضها البعض والغرض من كل منها.
+مثال: p> +
تم حساب أوزان العينات لكل ملف من ملفات البيانات. p> +
تم حساب أوزان العينات لبيانات الأسرة على أنها معكوس احتمال اختيار الأسرة ، محسوبة على مستوى مجال أخذ العينات (حضري / ريفي داخل كل منطقة). تم تعديل أوزان الأسرة لعدم الاستجابة على مستوى المجال ، ثم تم تطبيعها بعامل ثابت بحيث يساوي العدد الإجمالي المرجح للأسر إجمالي عدد الأسر غير المرجح. يُطلق على متغير وزن الأسرة اسم HHWEIGHT ويتم استخدامه مع بيانات HH وبيانات HL. +استخدمت أوزان العينات لبيانات النساء الأوزان المنزلية غير المعيارية ، وتعديلها لعدم الاستجابة لاستبيان النساء ، ثم تمت معايرتها بعامل ثابت بحيث يساوي العدد الإجمالي المرجح لحالات النساء إجمالي عدد غير مرجح من حالات نسائية. p> +
اتبعت أوزان العينات لبيانات الأطفال نفس نهج النساء واستخدمت أوزان الأسرة غير المعيارية ، مع تعديلها لعدم الاستجابة لاستبيان الأطفال ، ثم تم تطبيعها بعامل ثابت بحيث يكون إجمالي العدد المرجح حالات الأطفال تساوي إجمالي عدد غير مرجح لحالات الأطفال. p>"; +$lang['collDate']="
أدخل التواريخ (الشهر والسنة على الأقل) لبداية جمع البيانات ونهايته.
+في بعض الحالات ، يمكن إجراء جمع البيانات لنفس المسح على شكل موجات. في مثل هذه الحالة ، يجب عليك إدخال تاريخ البداية والنهاية لكل موجة على حدة ، وتحديد كل موجة في حقل "الدورة".
"; +$lang['timePrd']="عادةً ما يُترك هذا الحقل فارغًا. تختلف الفترة الزمنية عن تواريخ الجمع لأنها تمثل الفترة التي تكون فيها البيانات التي تم جمعها قابلة للتطبيق أو ذات صلة.
"; +$lang['collMode']="أسلوب جمع البيانات هو الطريقة التي أجريت بها المقابلة أو تم جمع المعلومات بها. هذا المجال هو حقل مفردات مضبوطة.
+استخدم زر القائمة المنسدلة لتحديد خيار واحد. في معظم الحالات ، سيكون الرد "مقابلة وجهاً لوجه". ولكن بالنسبة لبعض أنواع مجموعات البيانات المحددة ، مثل البيانات المتعلقة بسقوط المطر على سبيل المثال ، ستكون الاستجابة مختلفة. p>"; +$lang['collSitu']="
تم توفير هذا العنصر لتوثيق أي ملاحظات أو وقائع أو أحداث محددة أثناء جمع البيانات. ضع في اعتبارك ذكر عناصر مثل: p> +
مثال:
+
تم إجراء الاختبار التمهيدي للمسح في الفترة من 15 آب (أغسطس) 2006 إلى 25 آب (أغسطس) 2006 وشمل 14 من المحاورين الذين أصبحوا فيما بعد مشرفين على المسح الرئيسي. p> +
يتألف كل فريق من المقابلات من 3-4 من المقابلات (لم يتم استخدام محاورين ذكور بسبب حساسية الموضوع) ، جنبًا إلى جنب مع محرر ميداني ومشرف وسائق. تم استخدام ما مجموعه 52 من المحاورين و 14 مشرفًا و 14 محررًا ميدانيًا. تم جمع البيانات على مدى 6 أسابيع تقريبًا من 2 سبتمبر 2006 حتى 17 أكتوبر 2006. جرت المقابلة يوميًا طوال فترة العمل الميداني ، على الرغم من السماح لفرق المقابلات بأخذ يوم عطلة واحد في الأسبوع.
+بلغ متوسط المقابلات 35 دقيقة لاستبيان الأسرة (باستثناء اختبار الملح) ، و 23 دقيقة لاستبيان النساء ، و 27 دقيقة لاستبيان الأطفال دون سن الخامسة (باستثناء قياس الأنثروبومترية). أجريت المقابلات بشكل أساسي باللغتين الإنجليزية و Mumbo-jumbo ، ولكنها استخدمت أحيانًا الترجمة المحلية إلى الهولندية المزدوجة ، عندما لا يتحدث المستفتى الإنجليزية أو Mumbo-jumbo.
+قدم ستة موظفين من GenCenStat تنسيق العمل الميداني الشامل والإشراف. كان المنسق الميداني العام السيدة دو. p>"; +$lang['resInstru']="
يتم توفير هذا العنصر لوصف الاستبيان (الاستبيانات) المستخدمة في جمع البيانات. يجب ذكر ما يلي: p> +
مثال: p> +
كانت الاستبيانات الخاصة بالمجموعات العنقودية متعددة المؤشرات (MICS) العامة عبارة عن استبيانات منظمة بناءً على نموذج استبيان MICS3 مع بعض التعديلات والإضافات. تم إجراء استبيان منزلي في كل أسرة ، والذي جمع معلومات عن أفراد الأسرة بما في ذلك الجنس والعمر والعلاقة وحالة اليتم. يتضمن الاستبيان المنزلي خصائص الأسرة ، ودعم الأطفال الأيتام والضعفاء ، والتعليم ، وعمالة الأطفال ، والمياه والصرف الصحي ، والاستخدام المنزلي للناموسيات المعالجة بمبيدات الحشرات ، ومعالجة الملح باليود ، مع وحدات اختيارية لتأديب الأطفال ، وإعاقة الأطفال ، ووفيات الأمهات ، وأمن الأطفال. حيازة ومتانة السكن. p> +
بالإضافة إلى استبيان الأسرة ، تم إجراء الاستبيانات في كل أسرة معيشية للنساء اللائي تتراوح أعمارهن بين 15 و 49 عامًا والأطفال دون سن الخامسة. بالنسبة للأطفال ، تم إرسال الاستبيان إلى الأم أو القائمين على رعاية الطفل.
+يتضمن استبيان النساء خصائص المرأة ، ووفيات الأطفال ، وذوفان الكزاز ، وصحة الأم والوليد ، والزواج ، وتعدد الزوجات ، وبتر الأعضاء التناسلية للإناث ، ومنع الحمل ، ومعرفة فيروس نقص المناعة البشرية / الإيدز ، مع وحدات اختيارية للاحتياجات غير الملباة ، والعنف المنزلي ، والسلوك الجنسي .
+يتضمن استبيان الأطفال خصائص الأطفال ، وتسجيل المواليد والتعلم المبكر ، وفيتامين أ ، والرضاعة الطبيعية ، والعناية بالمرض ، والملاريا ، والتحصين ، والقياس البشري ، مع وحدة اختيارية لنمو الطفل. p> +
تم تطوير الاستبيانات باللغة الإنجليزية من استبيانات نموذج MICS3 ، وتم ترجمتها إلى Mumbo-jumbo. بعد المراجعة الأولية ، تمت ترجمة الاستبيانات مرة أخرى إلى اللغة الإنجليزية بواسطة مترجم مستقل بدون معرفة مسبقة بالمسح. تمت مراجعة الترجمة الخلفية من إصدار Mumbo-jumbo بشكل مستقل ومقارنتها بالأصل الإنجليزي. تمت مراجعة الاختلافات في الترجمة وحلها بالتعاون مع المترجمين الأصليين. p> +
تم تجريب كل من استبيانات اللغة الإنجليزية و Mumbo-jumbo كجزء من الاختبار القبلي للمسح. p> +
يتم توفير جميع الاستبيانات والوحدات كمصادر خارجية. p>"; +$lang['dataCollector']="
يتم توفير هذا العنصر لتسجيل المعلومات المتعلقة بالأشخاص و / أو الوكالات التي تولت مسؤولية جمع البيانات. يتضمن هذا العنصر 3 حقول: الاسم والاختصار والتبعية. في معظم الحالات ، نسجل هنا اسم الوكالة وليس اسم المحاورين. فقط في حالة الدراسات الاستقصائية الصغيرة جدًا ، مع وجود عدد محدود جدًا من المحاورين ، سيتم تضمين اسم الشخص أيضًا. يعد حقل الانتساب اختياريًا وليس مناسبًا في جميع الحالات. p>"; +$lang['cleanOps']="
يجب أن يحتوي تحرير البيانات على معلومات حول كيفية معالجة البيانات أو التحكم فيها من حيث الاتساق والترابط. لا يتعلق هذا البند بمرحلة إدخال البيانات ولكن فقط بتحرير البيانات سواء أكان يدويًا أم آليًا.
+في حالة توفر المواد (مواصفات تحرير البيانات ، تقرير حول تحرير البيانات ، البرامج المستخدمة لتحرير البيانات) ، يجب إدراجها هنا وتحميلها في ملفات البيانات وقسم الموارد الأخرى.
+مثال: p> +
تم تعديل البيانات في عدد من المراحل خلال المعالجة ، بما في ذلك: p> +
يمكن العثور على الوثائق التفصيلية لتحرير البيانات في مستند "إرشادات معالجة البيانات" المقدم كمورد خارجي. p>"; +$lang['method_notes']="
استخدم هذا الحقل لتقديم أكبر قدر ممكن من المعلومات حول تصميم إدخال البيانات. يتضمن ذلك تفاصيل مثل: p> +
يمكن أيضًا توفير معلومات حول الجدولة والتحليل هنا.
+يجب إدراج جميع المواد المتاحة (برامج إدخال / جدولة / تحليل ، وتقارير عن إدخال البيانات) هنا وتقديمها كموارد خارجية. p> +
مثال: p> +
تمت معالجة البيانات في مجموعات ، حيث تتم معالجة كل مجموعة كوحدة كاملة خلال كل مرحلة من مراحل معالجة البيانات. تمر كل مجموعة بالخطوات التالية: p> +
بعد معالجة جميع المجموعات ، يتم تجميع جميع البيانات معًا ثم يتم إكمال الخطوات التالية لجميع ملفات البيانات: p> +
يمكن العثور على تفاصيل كل خطوة من هذه الخطوات في وثائق معالجة البيانات وإرشادات تحرير البيانات وبرامج معالجة البيانات في CSPro و SPSS وإرشادات الجدولة. p> +
تم إدخال البيانات من قبل 12 عامل إدخال بيانات في نوبتين ، تحت إشراف 2 من مشرفين إدخال البيانات ، باستخدام ما مجموعه 7 أجهزة كمبيوتر (6 أجهزة كمبيوتر لإدخال البيانات بالإضافة إلى كمبيوتر واحد للمشرفين). تم إجراء جميع عمليات إدخال البيانات في المكتب الرئيسي لشركة GenCenStat باستخدام الإدخال اليدوي للبيانات. لإدخال البيانات ، تم استخدام الإصدار 2.6.007 من CSPro مع برنامج إدخال بيانات منظم للغاية ، باستخدام نهج يتحكم فيه النظام يتحكم في إدخال كل متغير. تم التحكم في جميع عمليات فحص النطاق والتخطي بواسطة البرنامج ولم يتمكن المشغلون من تجاوزها. كما تم تضمين مجموعة محدودة من فحوصات الاتساق في برنامج إدخال البيانات. بالإضافة إلى ذلك ، تم أيضًا تضمين حساب درجات Z للقياسات البشرية في برامج إدخال البيانات لاستخدامها أثناء التحليل. لم يتم إدخال الردود المفتوحة (إجابات "أخرى") أو ترميزها ، إلا في حالات نادرة حيث تطابق الرد رمزًا موجودًا في الاستبيان.
+يضمن التحقق من الهيكل والاكتمال إدخال جميع الاستبيانات الخاصة بالمجموعة ، وأنها سليمة من الناحية الهيكلية ، وأن استبيانات النساء والأطفال موجودة لكل امرأة وطفل مؤهل.
+تم إجراء التحقق بنسبة 100٪ من جميع المتغيرات باستخدام التحقق المستقل ، أي الإدخال المزدوج للبيانات ، مع مقارنة منفصلة للبيانات متبوعة بتعديل إحدى مجموعتي البيانات أو كليهما لتصحيح أخطاء المفاتيح بواسطة المشغلين الأصليين الذين قاموا أولاً بإدخال الملفات.
+بعد الانتهاء من جميع عمليات المعالجة في CSPro ، تم نسخ جميع ملفات المجموعات الفردية احتياطيًا قبل ربط البيانات معًا باستخدام الأداة المساعدة لسلسلة الملفات CSPro.
+للجدولة والتحليل تم استخدام الإصدار 10.0 و 14.0 من SPSS. تم استخدام الإصدار 10.0 في الأصل لجميع برامج الجدولة ، باستثناء وفيات الأطفال. إصدار لاحق بعد نقل جميع الملفات إلى SPSS ، تم إعادة ترميز بعض المتغيرات لاستخدامها كخصائص أساسية في جدولة البيانات ، بما في ذلك تصنيف العمر والتعليم والمناطق الجغرافية حسب الحاجة للتحليل. في عملية إعادة ترميز الأعمار والتواريخ ، تم إجراء بعض التضمين العشوائي للتواريخ (ضمن قيود محسوبة) للتعامل مع الأعمار أو التواريخ المفقودة أو "لا أعرف". بالإضافة إلى ذلك ، تم حساب مؤشر الثروة (الأصول) لأفراد الأسرة باستخدام تحليل المكونات الرئيسية ، استنادًا إلى أصول الأسرة ، وتم تضمين كل من النتيجة والخُمس في مجموعات البيانات لاستخدامها في عمليات الجدولة. p>"; +$lang['EstSmpErr']="
بالنسبة للمسوح بالعينات ، من الممارسات الجيدة حساب ونشر أخطاء العينات. يستخدم هذا الحقل لتقديم معلومات حول هذه الحسابات. وهذا يشمل: p> +
مثال: p> +
تتأثر التقديرات المأخوذة من استطلاع عينة بنوعين من الأخطاء: 1) أخطاء غير متعلقة بأخذ العينات و 2) أخطاء أخذ العينات. الأخطاء غير المتعلقة بأخذ العينات هي نتائج الأخطاء التي ارتكبت في تنفيذ جمع البيانات ومعالجتها. بُذلت جهود عديدة أثناء تنفيذ المسح العنقودي متعدد المؤشرات للفترة 2005-2006 لتقليل هذا النوع من الخطأ ، ومع ذلك ، من المستحيل تجنب الأخطاء غير المتعلقة بأخذ العينات ويصعب تقييمها إحصائيًا. p> +
إذا كانت عينة المستجيبين عينة عشوائية بسيطة ، لكان من الممكن استخدام الصيغ المباشرة لحساب أخطاء أخذ العينات. ومع ذلك ، فإن عينة 2005-2006 MICS هي نتيجة لتصميم طبقي متعدد المراحل ، وبالتالي تحتاج إلى استخدام صيغ أكثر تعقيدًا. تم استخدام وحدة العينات المعقدة SPSS لحساب أخطاء أخذ العينات للمسح العنقودي متعدد المؤشرات 2005-2006. تستخدم هذه الوحدة طريقة تايلور الخطية لتقدير التباين لتقديرات المسح التي تكون من الوسائل أو النسب. تم توثيق هذه الطريقة في ملف SPSS CSDescriptives.pdf الموجود ضمن خيارات التعليمات والخوارزميات في SPSS.
+ تم حساب أخطاء أخذ العينات لمجموعة مختارة من الإحصائيات (وكلها نسب بسبب قيود طريقة تايلور الخطية) للعينة الوطنية ، والمناطق الحضرية والريفية ، ولكل من المناطق الخمس. لكل إحصائية ، التقدير ، وخطأه المعياري ، ومعامل الاختلاف (أو الخطأ النسبي - النسبة بين الخطأ القياسي والتقدير) ، وتأثير التصميم ، وتأثير تصميم الجذر التربيعي (DEFT - النسبة بين خطأ معياري باستخدام تصميم العينة المحدد والخطأ القياسي الذي سينتج إذا تم استخدام عينة عشوائية بسيطة) ، بالإضافة إلى فواصل الثقة 95 بالمائة (+/- 2 خطأ قياسي). p> +يتم تقديم تفاصيل أخطاء أخذ العينات في ملحق أخطاء العينات بالتقرير وفي جدول أخطاء أخذ العينات المقدم في الموارد الخارجية. p>"; +$lang['dataAppr']="
يمكن استخدام هذا القسم للإبلاغ عن أي إجراء آخر تم اتخاذه لتقييم موثوقية البيانات ، أو أي ملاحظات تتعلق بجودة البيانات. يمكن أن يشمل هذا العنصر: p> +
مثال: p> +
تتوفر سلسلة من جداول جودة البيانات والرسوم البيانية لمراجعة جودة البيانات وتشمل ما يلي: p> +
يتم عرض نتائج كل جدول من جداول جودة البيانات هذه في ملحق التقرير النهائي ويتم تقديمها أيضًا في قسم الموارد الخارجية.
+
تتمثل القاعدة العامة لعرض البيانات المفقودة في جداول التقرير النهائية في تقديم عمود للبيانات المفقودة إذا كانت النسبة المئوية للحالات التي تحتوي على بيانات مفقودة 1٪ أو أكثر. يتم تضمين الحالات التي تحتوي على بيانات مفقودة حول خصائص الخلفية (مثل التعليم) في الجداول ، ولكن يتم حذف صفوف البيانات المفقودة وتسجيلها في أسفل الجداول في التقرير (ولكن ليس في ناتج SPSS). p>"; +$lang['useStmt_contact']="
يتكون هذا القسم من أقسام مختلفة: الاسم - التبعية- البريد الإلكتروني - URI. توفر هذه المعلومات جهة الاتصال أو الكيان للحصول على السلطة للوصول إلى البيانات. يُنصح باستخدام جهة اتصال بريد إلكتروني عامة مثل microdata@worldbank.org كلما أمكن ذلك لتجنب تقييد الوصول إلى فرد معين قد تتغير وظائفه بمرور الوقت.
"; +$lang['confDec']="إذا لم تكن مجموعة البيانات مجهولة المصدر ، فقد نشير هنا إلى ما يجب توقيع إفادة السرية قبل التمكن من الوصول إلى البيانات. خيار آخر هو تضمين هذه المعلومات في العنصر التالي (شروط الوصول). إذا لم تكن هناك مشكلة تتعلق بالسرية ، فيمكن ترك هذا الحقل فارغًا. p>"; +$lang['conditions']="
يجب أن تحتوي كل مجموعة بيانات على "سياسة وصول" مرفقة بها. توصي مكتبة البيانات الجزئية بأحد المستويات التالية لإمكانية الوصول إلى البيانات: p> +
صاغ البنك الدولي سياسات معيارية عامة ونماذج وصول لكل نوع من أنواع الوصول هذه.
يمكن الاطلاع على شروط استخدام البنك الدولي للبيانات في الكتالوج العام الخارجي هنا ويمكن الاطلاع على شروط استخدام كتالوج الموظفين الداخلي هنا.
"; +$lang['citReq']="متطلبات الاقتباس هي الطريقة التي يجب الإشارة إليها بمجموعة البيانات عند الاقتباس في أي منشور. يجب أن يكون لكل مجموعة بيانات متطلب اقتباس. سيضمن ذلك حصول منتج البيانات على الائتمان المناسب ، ويمكن ربط النتائج التحليلية بالإصدار المناسب من مجموعة البيانات. يجب أن تذكر سياسة الوصول صراحة الالتزام بالامتثال لمتطلبات الاقتباس. يجب أن يتضمن الاقتباس الباحث الأساسي على الأقل ، واسم مجموعة البيانات واختصارها ، والسنة المرجعية ، ورقم الإصدار. قم أيضًا بتضمين موقع ويب حيث يتم توفير البيانات أو المعلومات الموجودة على البيانات من قبل مودع البيانات الرسمي. p> +
سارة بيرد ، جامعة جورج واشنطن ، كريج ماكنتوش ، جامعة كاليفورنيا سان دييغو ، بيرك أوزلر ، البنك الدولي. صندوق العمل الاجتماعي الثاني في تنزانيا (TASAF II) - تقييم تأثير المجموعات الضعيفة - الجولة الأولى ، مسح الأسرة لعام 2008 ، المرجع. TZA_2008_TASAF-II_v01_M_v01_A_PUF. تم تنزيل مجموعة البيانات من [URL] في [التاريخ]
."; +$lang['disclaimer']="مثال: يقر مستخدم البيانات أن جامع البيانات الأصلي والموزع المعتمد للبيانات ووكالة التمويل ذات الصلة لا يتحملون أي مسؤولية عن استخدام البيانات أو التفسيرات أو الاستنتاجات القائمة على هذه الاستخدامات.
"; +$lang['copyright']="ضمِّن هنا بيان حقوق الطبع والنشر في مجموعة البيانات ، مثل: p> +
(C) 2007 ، البنك الدولي p>"; +$lang['impact_wb_name_help']="
اسم رمز تقييم الأثر المقابل للبنك الدولي أو ، إذا لم يكن لتقييم الأثر رمز البنك الدولي المنفصل ، فعندئذٍ يُعرف العنوان / الاسم الذي بموجبه يُعرف تقييم التأثير هذا p>"; +$lang['impact_wb_id_help']="
رمز تقييم تأثير البنك الدولي المقابل (على سبيل المثال ، P012345). اكتب "N / A" إذا لم يكن لتقييم الأثر هذا رمز WB منفصل) p>"; +$lang['impact_wb_lead_help']="
WB TTL و / أو المستشار (المستشارون) / الباحث (الباحثون) الرئيسيون p>"; +$lang['impact_wb_members_help']="
موظفو البنك الدولي أو باحثون / مستشارون آخرون عملوا على تقييم الأثر هذا p>"; +$lang['impact_wb_description_help']="
اسم رمز تقييم الأثر المقابل للبنك الدولي أو ، إذا لم يكن لتقييم الأثر رمز البنك الدولي المنفصل ، فعندئذٍ يُعرف العنوان / الاسم الذي يُعرف به تقييم التأثير هذا. p>"; +$lang['operational_wb_name_help']="
اسم عملية البنك الدولي التي يرتبط بها تقييم الأثر هذا < p/>"; +$lang['operational_wb_id_help']="
رمز المشروع (على سبيل المثال ، P012345) للعملية ذات الصلة p>"; +$lang['operational_wb_summary_help']="
قدم ملخصًا / نظرة عامة عن العملية وأهداف تطوير المشروع p>"; +$lang['distStmt_contact']="
قد يحتاج مستخدمو البيانات إلى مزيد من التوضيح والمعلومات. قد يتضمن هذا القسم الاسم - التبعية - البريد الإلكتروني - URI لشخص واحد أو أكثر من جهات الاتصال. تجنب وضع أسماء الأفراد. يجب أن تكون المعلومات المقدمة هنا صالحة على المدى الطويل. لذلك من الأفضل تحديد الأشخاص الذين يمكن الاتصال بهم من خلال اللقب. الأمر نفسه ينطبق على مجال البريد الإلكتروني. من الناحية المثالية ، يجب توفير عنوان بريد إلكتروني "عام". من السهل تهيئة خادم بريد بحيث تتم إعادة توجيه جميع الرسائل المرسلة إلى عنوان البريد الإلكتروني العام تلقائيًا إلى بعض أعضاء فريق العمل. p>"; +$lang['catalog_to_publish_help']="
اختر خارجيًا إذا كنت تنوي مشاركة بياناتك مع الجمهور. اختر داخلي إذا كنت تنوي المشاركة مع موظفي البنك فقط. يتم أيضًا تضمين الدراسات حول الكتالوج الخارجي تلقائيًا في الكتالوج الداخلي p>"; +$lang['is_embargoed_help']="
إذا لم يتم إصدار هذه الدراسة لموظفي البنك أو للجمهور لفترة من الوقت ، أي وجود حظر على الاصدار والإطلاق، فحدد هذا المربع. يرجى الإشارة في المربع أدناه إلى الفترة الزمنية وشروط الحظر p>"; +$lang['disclosure_risk_help']="
من المهم حماية هوية وخصوصية المستجيبين الذين قدموا البيانات. إذا كانت ملفات البيانات التي تودعها تحتوي على أي متغيرات تعريفية (على سبيل المثال ، الأسماء وأرقام الهوية الرسمية وإحداثيات نظم المعلومات الجغرافية الدقيقة وما إلى ذلك) أو أي متغيرات تعتبر حساسة بخلاف ذلك في إعداد الدراسة (على سبيل المثال ، العرق ، القبيلة ، الدين ، إلخ) يرجى إدراجها أدناه حتى يمكن منع الوصول إليها. p>"; +$lang['notes_to_library_help']="أدخل أي ملاحظات أو تعليمات إضافية هنا."; +$lang['notes_to_embargoed_help']="
تشير إلى شروط الحظر ، على سبيل المثال الفترة الزمنية وأية تعليمات خاصة أخرى. p>"; +$lang['cc_help']="
أدخل عناوين البريد الإلكتروني للأشخاص الإضافيين الذين ترغب في تلقيهم نسخة موجزة من رسالتك. p>"; +$lang['suggested_access_policy_help']="
حدد سياسة الوصول المناسبة لبياناتك. لمزيد من التفاصيل انظر: شروط الاستخدام التالية للفهرس الداخلي http://microdatalib.worldbank.org/index.php/ الشروط وللحصول على الكتالوج الخارجي راجع شروط الاستخدام التالية http: //microdata.worldbank. org / index.php / شروط الاستخدام
"; +$lang['study_help']="الرجاء إكمال الحقول في كل قسم من الأقسام أدناه. سيؤدي توفير المعلومات التفصيلية هنا إلى تسريع عملية نشر الدراسة. كما أنه يسهل على مستخدمي البيانات العثور على المعلومات التي يحتاجون إليها وبالتالي يقلل من حاجة المستخدمين إلى الاتصال بمنتج البيانات للتوضيح. ثلاثة حقول فقط إلزامية لعملية التقديم. إذا كان الوقت أو المعلومات المتاحة لا تسمح بإكمال جميع الحقول ، فإننا نطلب على الأقل إكمال الحقول الإلزامية والموصى بها."; +$lang['create_title']="أدخل العنوان الكامل لمشروعك."; +$lang['create_short']="أدخل اختصارًا قصيرًا لمشروعك. (على سبيل المثال ، UZB HBS 1998)"; +$lang['create_collab']="قم بتوفير عنوان البريد الإلكتروني لموظفي البنك الآخرين الذين قد يتم تفويضهم بتعديل هذا المشروع."; +$lang['create_desc']="قدم وصفا مفصلا لمشروعك."; +$lang['help_subtitle']="قدم عنوان فرعي قصيرة للمسح الخاص بك."; +$lang['section_identification']=" رقم تعريفي/محدد"; +$lang['section_version']="إصدار"; +$lang['no_files_uploaded']="لم يتم تحميل أي ملفات"; +$lang['no_citations_attached']="لا اقتباسات"; + + +/* End of file dd_help */ +/* Location: ./application/language/arabic/dd_help */ \ No newline at end of file diff --git a/application/language/arabic/dd_projects_lang.php b/application/language/arabic/dd_projects_lang.php new file mode 100644 index 000000000..d8bc3f6d4 --- /dev/null +++ b/application/language/arabic/dd_projects_lang.php @@ -0,0 +1,171 @@ + ملفات البيانات p> وموارد أخرى"; +$lang['other_materials']="مواد اخرى"; +$lang['subtitle']="عنوان فرعي"; +$lang['citation_option']="الاقتباسات (اختياري)"; +$lang['metadata_review']="مراجعة وإرسال"; +$lang['metadata_review2']="مراجعة وعزيزي % s ،
+شكرًا لك على إيداع دراستك بعنوان %s في مكتبة البيانات الجزئية.
+يراجع فريق مكتبة البيانات الجزئية المعلومات التي قدمتها. إذا احتجنا إلى أي معلومات أخرى منك ، فسنتصل بك. +بمجرد اكتمال عملية المراجعة ، سيتم إرسال بريد إلكتروني نهائي إليك لتأكيد قبول الدراسة.
+يتم توفير ملخص لما أرسلته أدناه. يتوفر هذا الملخص أيضًا من رابط الـ URL التالي:%s
"; +$lang['project_request_reopen']="طلب إعادة فتح المشروع"; +$lang['intro_projects_exist']="أدخل رسالة تفيد بوجود مشاريع"; +$lang['intro_no_projects']="أدخل رسالة تفيد بعدم وجود مشاريع"; +$lang['project_submitted']="تم تقديم مشروعك. تم إرسال بريد إلكتروني يؤكد هذا إليك. إذا كنت ترغب في عرض ملخص تقديمك ، يمكنك النقر فوق عنوان المشروع للقيام بذلك."; +$lang['confirm_metadata_import']="سيؤدي هذا إلى استيراد البيانات الوصفية من المشروع المحدد إلى وصف الدراسة الحالية. قد لا يتم التراجع عن هذا الإجراء."; +$lang['email_to_friend']="بريد الالكتروني"; +$lang['review']="مراجعة"; +$lang['communicate']="تواصل"; +$lang['print_preview']="معاينة قبل الطباعة"; +$lang['provide_email']="يرجى تقديم عنوان بريد إلكتروني صالح لإرسال المشروع الحالي"; +$lang['email_sent_successful']="تم إرسال البريد الإلكتروني بنجاح!"; +$lang['citation_type']="نوع الاقتباس"; +$lang['admin_sent_comments']="من:% sأرسل المستخدم ٪ s مشروعًا بعنوان ٪ s .
+يتم توفير ملخص للإرسال أدناه. لإدارة المشروع قم بزيارة :٪ s
"; +$lang['notice_project_submitted']="[إعلام] - تم استلام مشروع جديد - تم إرسال[s%] بواسطة [s%]"; +$lang['notice_reopen_request']="[إعلام] - طلب إعادة فتح المشروع -s%"; +$lang['msg_reopen_request']="طلب المستخدم %s إعادة فتح المشروع %s . لإدارة المشروع قم بزيارة: s%
+سبب إعادة فتح المشروع: %s
"; + + +/* End of file dd_projects */ +/* Location: ./application/language/arabic/dd_projects */ \ No newline at end of file diff --git a/application/language/arabic/ddi_fields_lang.php b/application/language/arabic/ddi_fields_lang.php new file mode 100644 index 000000000..bcf305255 --- /dev/null +++ b/application/language/arabic/ddi_fields_lang.php @@ -0,0 +1,311 @@ +%s المتغيرات ، إذا لم يتمكن النظام من إنشاء ملف PDF ، فحاول استبعاد خيار "وصف قاموس البيانات"."; +$lang['include_variable_toc']="قائمة المتغير"; +$lang['include_variable_desc']="وصف المتغير"; +$lang['include_external_resources']="موارد خارجية"; +$lang['Report options']="خيارات التقرير:"; +$lang['processing_pdf_report']="إنشاء تقرير PDF ، قد يستغرق بضع دقائق أو أكثر ..."; +$lang['citations']="اقتباسات"; +$lang['review_study']="مراجعة الدراسة"; +$lang['add_note']="أضف ملاحظة"; +$lang['no_reviewer_notes_found']="الدراسة ليس لديها ملاحظات مرفقة من المراجعين . لإضافة ملاحظة جديدة ، استخدم الرابط "إضافة ملاحظة"."; +$lang['no_resources_attached']="الدراسة ليس لديها موارد خارجية."; +$lang['no_microdata_attached']="الدراسة ليس لديها بيانات جزئية متاحة."; +$lang['created_on']="تم إنشاؤها في"; +$lang['last_modified']="آخر تعديل"; +$lang['page_views']="مشاهدات الصفحة"; +$lang['downloads']="تنزيلات"; +$lang['documentation_in_pdf']="التوثيق بصيغة PDF"; +$lang['download_rdf']="تنزيل RDF"; +$lang['reviewer_notes']="ملاحظات المراجعين"; +$lang['js_refreshing_page']="جاري إعادة تحميل الصفحة ، برجاء الانتظار ..."; +$lang['visit_data_catalog_at']="قم بزيارة كتالوج البيانات الخاص بنا على"; +$lang['report_generated_on']="تم إنشاء التقرير في"; +$lang['cover']="غلاف"; +$lang['file_description']="وصف الملف"; +$lang['variable_list']="قائمة المتغيرات"; +$lang['variable_description']="وصف المتغير"; +$lang['external_resources']="موارد خارجية"; +$lang['report_lang']="لغة التقرير"; +$lang['generate_pdf']="إنشاء ملف PDF"; +$lang['Mean']="الوسط الحسابي"; +$lang['Standard deviation']="الانحراف المعياري"; +$lang['search_data_dictionary']="البحث في قاموس البيانات"; +$lang['Total variables(s)']="مجموع المتغيرات"; +$lang['download_study_rdf']="قم بتنزيل أوصاف موارد الدراسة (مثل التقارير والإستمارات والوثائق الفنية) بتنسيق Dublin Core RDF"; +$lang['download_study_ddi']="قم بتنزيل البيانات الوصفية للدراسة بتنسيق DDI (XML)"; +$lang['study_documentation_text']="قم بتنزيل الإستمارات والوثائق الفنية والتقارير التي تصف عملية المسح والنتائج الرئيسية لهذه الدراسة."; +$lang['study_description_text']="يقدم القسم وصفًا تفصيليًا للدراسة (أي البيانات الوصفية). تتعلق الموضوعات التي يتم تناولها بمنهجية المسح وطرق أخذ العينات وجمع البيانات والتمويل وتواريخ الجمع والتغطية الجغرافية وسياسة الوصول إلى البيانات من هذه الدراسة. قم بتنزيل البيانات الوصفية بعدد من التنسيقات من رابط تصدير البيانات الوصفية."; +$lang['data_description_text']="يقدم هذا القسم معلومات مفصلة عن بيانات سجل الوحدة الناتجة عن هذه الدراسة. يتضمن هذا وصفًا تفصيليًا لمحتويات كل ملف بيانات وجميع المتغيرات داخل كل ملف. قد تحتوي المتغيرات على النتائج المسجلة لسؤال مباشر مطروح ، أو مشتقة بطريقة ما. يتم تلخيص عدد المتغيرات وعدد نقاط البيانات (الحالات) لكل متغير."; +$lang['related_publications_text']="يتم استخدام البيانات من هذه الدراسة في المنشورات/المطبوعات التالية:"; +$lang['related_studies']="دراسات ذات صلة"; +$lang['variable_group']="مجموعة المتغيرات"; +$lang['universe']="عالم الدراسة"; +$lang['notes']="ملاحظات"; +$lang['text']="ملاحظات"; +$lang['definition']="تعريف"; + + +/* End of file ddibrowser */ +/* Location: ./application/language/arabic/ddibrowser */ \ No newline at end of file diff --git a/application/language/arabic/direct_access_terms_lang.php b/application/language/arabic/direct_access_terms_lang.php index 1c2d6da51..17bab0a70 100644 --- a/application/language/arabic/direct_access_terms_lang.php +++ b/application/language/arabic/direct_access_terms_lang.php @@ -1,31 +1,31 @@ --على مستخدم البيانات الامتثال للاتفاق وللشروط المذكورة اعلاه . مع تأكيده على ان يكون استخدام بيانات ارشيف البيانات الوطني لغرض احصائي و ذلك وفقا للمعايير القانونية الدولية التي تهدف الى حماية سرية الاجابات. -
+$lang['title_terms_and_conditions']="الأحكام والشروط"; +$lang['terms_text']="+على مستخدم البيانات الامتثال للاتفاق وللشروط المذكورة اعلاه . مع تأكيده على ان يكون استخدام بيانات ارشيف البيانات الوطني لغرض احصائي و ذلك وفقا للمعايير القانونية الدولية التي تهدف الى حماية سرية الاجابات. +
"; $lang['form_removed_and_not_available']="تم حذف النموذج ولم يعد متوفر"; -$lang['survey_data_files']="ملفات البيانات"; - - -/* End of file direct_access_terms_lang.php */ -/* Location: ./application/language/arabic/direct_access_terms_lang.php */ \ No newline at end of file +$lang['survey_data_files']="ملفات بيانات المسح"; + + +/* End of file direct_access_terms */ +/* Location: ./application/language/arabic/direct_access_terms */ \ No newline at end of file diff --git a/application/language/arabic/ecatalog_admin_lang.php b/application/language/arabic/ecatalog_admin_lang.php index 84452f92f..6c9e6c671 100644 --- a/application/language/arabic/ecatalog_admin_lang.php +++ b/application/language/arabic/ecatalog_admin_lang.php @@ -1,44 +1,44 @@ -%s لم يمكن التمديد.افتح الملف php.ini لتمكين التمديد"; -$lang['folder_permissions']="سماح بالقراءة / الكتابة / حذف الملف +$lang['extension_not_enabled']="%s امتداد غير ممكّن. قم بتحرير ملف php.ini لتمكين التمديد."; +$lang['folder_permissions']="أذونات قراءة / كتابة / حذف المجلد"; +$lang['folder']="مجلد "; -$lang['folder']="ملف +$lang['read_write']="القراءة / الكتابة "; -$lang['read_write']="القراءة / الكتابة +$lang['delete']="حذف "; -$lang['delete']="احذف -"; -$lang['server_information']="معلومات عن الموزع"; +$lang['server_information']="معلومات الخادم"; $lang['php_version']="نسخة PHP"; $lang['db_version']="نسخة DB"; -$lang['connection_success']="اتصال ناجح! -"; -$lang['web_server']="موزع الويب"; -$lang['database_error_cant_continue']="فشل الاتصال بقاعدة البيانات. لايمكن أن يستمر التثبيت مالم يتم تصحيح معلمات قاعدة البيانات. +$lang['connection_success']="اتصال ناجح! "; -$lang['other_php_settings']="معلمات أخرى php.ini +$lang['web_server']="موزع/خادم الويب"; +$lang['database_error_cant_continue']="فشل اتصال قاعدة البيانات ، لا يمكن للمثبت المتابعة حتى يتم إصلاح إعدادات قاعدة البيانات."; +$lang['other_php_settings']="إعدادات أخرى php.ini "; -$lang['setting']="المعلمة +$lang['setting']="ضبط/إعداد "; $lang['value']="القيمة"; -$lang['recommended']="موصى به -"; -$lang['disabled']="معطل +$lang['recommended']="موصى به "; -$lang['install_database']="تثبيت قاعدة البيانات +$lang['disabled']="معطل "; -$lang['create_user']="إنشاء حساب +$lang['install_database']="تثبيت قاعدة البيانات "; -$lang['installer_title']="مثبت -NADA"; -$lang['time_zone_is_required']="انضر كيف يمكن تعديل واختيار التوقيت الصحيح "; -$lang['not_set']="لم ينشأ +$lang['create_user']="إنشاء حساب "; - - -/* End of file install_lang.php */ -/* Location: ./application/language/arabic/install_lang.php */ \ No newline at end of file +$lang['installer_title']="مثبت NADA"; +$lang['time_zone_is_required']="انظر كيف يمكن تعديل واختيار التوقيت الصحيح "; +$lang['not_set']="غير مضبوط"; + + +/* End of file install */ +/* Location: ./application/language/arabic/install */ \ No newline at end of file diff --git a/application/language/arabic/iso19139_fields_lang.php b/application/language/arabic/iso19139_fields_lang.php new file mode 100644 index 000000000..20e187d89 --- /dev/null +++ b/application/language/arabic/iso19139_fields_lang.php @@ -0,0 +1,78 @@ +يجب ملء هذا النموذج و تقديمه من طرف الباحث الرئيسي. الباحث الرئيسي هو الشخص الذي بمثابة نقطة الاتصال الرئيسية لجميع الاتصالات التي ينطوي عليها هذا الاتفاق. الحصول على الترخيص - لن يتم الا في حالة ان الباحث الرسمي هو موظف في وكالة(جامعة، شركة، مركز البحوث ، منظمة وطنية أو دولية، إلخ) لها قانونيا حق الحصول على البيانات. الباحث الرئيسي يتحمل كامل المسؤولية عن الامتثال لجميع شروط هذا الاتفاق من قبل موظفي المنظمة المتلقية. - - -سيتم النظر في هذا الطلب من قبل لجنة النفاذ الي البيانات، الذين يرجع لهم قرار الموافقة على الطلب ، لرفض الوصول إلى البيانات ، أو لطلب معلومات إضافية من الباحثين. ويمكن أيضا طلب نسخة موقعة من مطلب النفاذ. - إذا تمت الموافقة عليه، سيتم تقديم البيانات والوثائق المتعلقة بها في CD-ROM/DVD أو من خلال خادم بروتوكول نقل الملفات.
- -ويقدم هذا الطلب نيابة عن:
-"; -$lang['receiving_org']="اسم المؤسسة المستفيدة : -"; -$lang['rec_org_refers']=" المؤسسة المستفيدة هي الجامعة ،المنظمة ،او الشركة التي يعمل بها الباحث الرئيسي. -"; -$lang['org_type']="نوع المؤسسة -"; -$lang['other']="اذا كان غير ذلك ، يرجى تحديد : -"; -$lang['post_add']="العنوان البريدي -"; -$lang['telephone']="رقم الهاتف (رمز البلد) -"; -$lang['fax']="الفاكس (مع رمز البلد) -"; -$lang['intended_use']="الهدف من وراء استخدام البيانات : -"; -$lang['provide_short_desc']="يرجى تقديم وصفا موجزا لمشروع البحث (الموضوع ،الأهداف ،المنهجية ،النتائج المتوقعة ، والشركاء). -"; -$lang['expected_output']="قائمة المنتجات (المطبوعات ، والكتب ، الخ) وسياست نشرهم -"; -$lang['expected_completion']="الموعد المتوقع لاكتمال مشروع البحث : -"; -$lang['data_matching']="دمج ملفات -"; -$lang['merge_dataset']="هل تريد دمج هذه الملفات مع ملفات بيانات أخرى؟ -"; -$lang['other_data_merge']="إذا كان الجواب بنعم ، يرجى تحديد كافة الملفات الأخرى (حدد ماّتاهم ومضمونهم) -"; -$lang['research_team']="أعضاء فريق البحث (بخلاف الباحث الرئيسي) -"; -$lang['provide_names']="حدد اسم وعنوان وانتماء جميع أعضاء فريق البحث الآخرين الذين لهم حق النفاذ إلى لبيانات"; -$lang['ident_needed']=" تحديد الملفات والمتغيرات المطلوبة"; -$lang['da_website']=" هذا الموقع يقدم وصفا مفصلا لملفات البيانات والمتغيرات. الباحثون الذين ليس لديهم الحاجة الماسة لكافة الملفات / كافة المتغيرات يمكنهم تحديد مجموعة فرعية من المتغيرات. ونظرا لانخفاض نسبة إعادة تحديد المجيبين ، احتمال تلبية الطلب تكون اعلى"; -$lang['this_request']="هذا الطلب يتعلق بالنفاذ : -"; -$lang['whole_dataset']="على جميع بيانات الدراسة (جميع السجلات وجميع المتغيرات) -"; -$lang['subset_data']="مجموعة فرعية من المتغيرات و / أو السجلات الموصوفة ادناه (لاحظ ان المتغيرات مل متغير التوزين و متغير التعريف تكون دائما ضمن هاته المجموعة ) "; -$lang['data_access_agreement']="عقد النفاذ إلى البيانات"; -$lang['i_read_and_agree']="لقد اطلعت على الشروط و قبلتها"; -$lang['agreement_text']="ممثل المنظمة المتلقية يوافق على الامتثال للشروط التالية :
-
يجب ملء هذا النموذج وإرساله بواسطة الباحث الرئيسي. يشير الباحث الرئيسي إلى الشخص الذي يعمل كنقطة اتصال رئيسية لجميع الاتصالات التي تتضمن هذه الاتفاقية. لن يتم منح الوصول إلى مجموعات البيانات المرخصة إلا عندما يكون الباحث الرئيسي موظفًا في وكالة استقبال مسجلة قانونًا (جامعة ، شركة ، مركز أبحاث ، منظمة وطنية أو دولية ، إلخ) والتي يُطلب الوصول إلى البيانات نيابة عنها. يتحمل الباحث الرئيسي المسؤولية الكاملة عن الامتثال للكل +شروط اتفاقية الوصول إلى البيانات هذه من قبل موظفي المؤسسة المستقبلة. p> + +
ستتم مراجعة هذا الطلب من قبل لجنة إصدار البيانات ، والتي قد تقرر الموافقة على الطلب ، أو رفض الوصول إلى البيانات ، أو طلب معلومات إضافية من الباحث الرئيسي. قد يتم أيضًا طلب نسخة موقعة من نموذج الطلب هذا.
+ +يتم تقديم هذا الطلب نيابة عن: p>"; +$lang['receiving_org']="اسم المؤسسة المستفيدة : +"; +$lang['rec_org_refers']="تشير المنظمة المستفيدة أو المستقبلة للبيانات إلى المنظمة / الجامعة / المؤسسة التي توظف الباحث الرئيسي."; +$lang['org_type']="نوع المؤسسة +"; +$lang['other']="اذا كان غير ذلك ، يرجى تحديد : +"; +$lang['post_add']="العنوان البريدي +"; +$lang['telephone']="رقم الهاتف (رمز البلد) +"; +$lang['fax']="الفاكس (مع رمز البلد) +"; +$lang['intended_use']="الهدف من وراء استخدام البيانات : +"; +$lang['provide_short_desc']="يرجى تقديم وصف موجز لمشروعك البحثي (سؤال المشروع ، الأهداف ، الأساليب ، المخرجات المتوقعة ، الشركاء)"; +$lang['expected_output']="قائمة بالمخرجات المتوقعة وسياسة النشر"; +$lang['expected_completion']="تاريخ الانتهاء المتوقع (DD-MM-YYYY) من مشروع البحث:"; +$lang['data_matching']="مطابقة/دمج البيانات"; +$lang['merge_dataset']="هل ستحتاج إلى دمج مجموعة البيانات مع بيانات أخرى؟"; +$lang['other_data_merge']="إذا كانت الإجابة بنعم ، حدد جميع مجموعات البيانات الأخرى التي ستحتاج إلى دمجها"; +$lang['research_team']="أعضاء فريق البحث (بخلاف الباحث الرئيسي)"; +$lang['provide_names']="قدم أسماء وعناوين وانتماءات/تبعيات أي أعضاء آخرين في فريق البحث ممن يمكنهم الوصول إلى البيانات المقيدة."; +$lang['ident_needed']="تحديد ملفات البيانات والمتغيرات المطلوبة"; +$lang['da_website']="يوفر أرشيف البيانات بيانات وصفية مفصلة على موقعه على الويب ، بما في ذلك وصف ملفات البيانات والمتغيرات لكل مجموعة بيانات. قد يشير الباحثون الذين لا يحتاجون إلى الوصول إلى مجموعة البيانات الكاملة إلى أي مجموعة فرعية من المتغيرات أو الحالات التي يهتمون بها. ونظرًا لأن هذا يقلل من مخاطر الكشف ، فإن تزويدنا بهذه المعلومات قد يزيد من احتمالية توفير البيانات."; +$lang['this_request']="هذا الطلب إذا تم تقديمه للوصول/للنفاذ:"; +$lang['whole_dataset']="مجموعة البيانات الكاملة (كل الملفات ، كل الحالات)"; +$lang['subset_data']="مجموعة فرعية من المتغيرات و / أو الحالات كما هو موضح أدناه (لاحظ أن المتغيرات مثل معاملات ترجيح/توزين العينة ومعرفات السجلات سيتم تضمينها دائمًا في مجموعات فرعية):"; +$lang['data_access_agreement']="اتفاقية الوصول إلى البيانات"; +$lang['i_read_and_agree']="لقد قرأت ووافقت على الشروط"; +$lang['agreement_text']="
يوافق ممثل المؤسسة المستلمة على الامتثال للشروط التالية: p> +
هذا مجرد ملخص لشروط استخدام مجموعات البيانات المدرجة في كتالوج بيانات البنك الدولي. يرجى قراءة الاتفاقية الفعلية التي تتحكم في استخدامك لمجموعات البيانات ، +المتاح هنا: شروط استخدام مجموعات البيانات . انظر أيضا + أحكام وشروط البنك الدولي .
"; + + +/* End of file open_data */ +/* Location: ./application/language/arabic/open_data */ \ No newline at end of file diff --git a/application/language/arabic/permissions_lang.php b/application/language/arabic/permissions_lang.php new file mode 100644 index 000000000..d195df25c --- /dev/null +++ b/application/language/arabic/permissions_lang.php @@ -0,0 +1,23 @@ + -من خلال استمراركم بعد هذه النقطة في عملية النفاذ الى البيانات، تتعهدون بالامتثال للشروط المذكورة أعلاه و تتعهدون باستخدام البيانات الإحصائية التي تم الحصول عليها وفقا للمعايير القانونية التي تهدف إلى حماية سرية الأفراد.
- -"; -$lang['public_use_files']=" ملفات للإستخدام عام -"; - - -/* End of file public_access_terms_lang.php */ -/* Location: ./application/language/arabic/public_access_terms_lang.php */ \ No newline at end of file +$lang['email']="البريد الإلكتروني +"; +$lang['dataset_requested']="مجموعة البيانات المطلوبة"; +$lang['intended_use_of_data']=" الهدف من استخدام البيانات +"; +$lang['describe_your_project']="يرجى تقديم وصف موجز لمشروعك البحثي (سؤال المشروع ، الأهداف ، الأساليب ، المخرجات المتوقعة ، الشركاء)"; +$lang['i_agree']="أوافق +"; +$lang['terms_and_conditions']="الأحكام والشروط"; +$lang['terms_text_public']="من خلال الاستمرار في تجاوز هذه النقطة إلى عملية استرداد البيانات ، فإنك تشير إلى موافقتك على الامتثال للشروط والأحكام المذكورة أعلاه وتؤكد لك أن استخدام البيانات الإحصائية التي تم الحصول عليها من أرشيف البيانات الوطني سوف يتوافق مع الشروط المقبولة على نطاق واسع معايير الممارسة والقيود القانونية التي تهدف إلى حماية سرية المستجيبين. p>"; +$lang['public_use_files']=" ملفات للإستخدام العام PUF +"; +$lang['surveys_in_collection']="المجموعة [s%] تحتوي على المسوح التالية:"; +$lang['collection_data_files']="ملفات الاستخدام العام حسب المجموعة"; +$lang['collection_requested']="طلبات الوصول إلى المجموعة"; +$lang['public_use_data_access_by_collection_message']="لقد تم منحك حق الوصول إلى جميع دراسات الاستخدام العام في المجموعة. يرجى زيارة كل صفحة دراسة لتنزيل ملفات البيانات والوثائق الأخرى."; +$lang['public_use_data_access_by_collection']="تنزيل ملفات البيانات"; +$lang['terms_text_research']="
من خلال الاستمرار في تجاوز هذه النقطة إلى عملية استرداد البيانات ، فإنك تشير إلى موافقتك على الامتثال للشروط والأحكام المذكورة أعلاه وتؤكد لك أن استخدام البيانات الإحصائية التي تم الحصول عليها من أرشيف البيانات الوطني سوف يتوافق مع الشروط المقبولة على نطاق واسع معايير الممارسة والقيود القانونية التي تهدف إلى حماية سرية المستجيبين. p>"; + + +/* End of file public_access_terms */ +/* Location: ./application/language/arabic/public_access_terms */ \ No newline at end of file diff --git a/application/language/arabic/public_request_lang.php b/application/language/arabic/public_request_lang.php index 35a0ecfe0..3675b5763 100644 --- a/application/language/arabic/public_request_lang.php +++ b/application/language/arabic/public_request_lang.php @@ -1,26 +1,25 @@ +
+
+ أمثلة: strong>
'; var_dump($search_options); var_dump($where_clause); echo ''; */ - + return $where_clause; } - //returns the search result count - function search_count() - { - //build search using the parameters passed to the GET/POST variables + //returns the search result count + function search_count() { + //build search using the parameters passed to the GET/POST variables $where=$this->_build_search_query(); if ($where!='') { $this->db->where($where,NULL,FALSE); } + if ($this->active_repo!=NULL && $this->active_repo!='central') { $this->db->join('survey_repos sr', 'sr.sid= surveys.id','left'); - } + } + $result=$this->db->count_all_results('surveys'); + //echo $this->db->last_query(); return $result; } - - + + private function get_param($key) { if (isset($this->params[$key])) { return $this->params[$key]; } - + return FALSE; } -}//end-class \ No newline at end of file +} //end-class diff --git a/application/models/Catalog_tags_model.php b/application/models/Catalog_tags_model.php index 650bc3161..2807498f1 100644 --- a/application/models/Catalog_tags_model.php +++ b/application/models/Catalog_tags_model.php @@ -61,6 +61,13 @@ function survey_tags($sid) return $this->db->get('survey_tags')->result_array(); } + function survey_tags_with_key($sid) + { + $this->db->select("tag"); + $this->db->where('sid',$sid); + return $this->db->get('survey_tags')->result_array(); + } + function survey_tags_list($sid) { diff --git a/application/models/Data_access_whitelist_model.php b/application/models/Data_access_whitelist_model.php new file mode 100644 index 000000000..f00423f8f --- /dev/null +++ b/application/models/Data_access_whitelist_model.php @@ -0,0 +1,127 @@ +output->enable_profiler(TRUE); + $this->load->model("Repository_model"); + } + + + function select_all() + { + $this->db->select("data_access_whitelist.id,repositories.id as collection_id,repositories.repositoryid as collection_name, users.id as user_id,users.email, users.username"); + $this->db->join('repositories', 'repositories.id= data_access_whitelist.repository_id'); + $this->db->join('users', 'users.id= data_access_whitelist.user_id'); + $result=$this->db->get('data_access_whitelist')->result_array(); + + return $result; + } + + function has_access($userid,$sid) + { + //get repository id from study + $this->db->select("repositoryid"); + $this->db->where("id",$sid); + $study=$this->db->get("surveys")->row_array(); + + if(!$study){ + return false; + } + + $repoid=$study['repositoryid']; + $repository_uid=$this->Repository_model->get_repositoryid_uid($repoid); + + //check + $this->db->select("*"); + $this->db->where("user_id",$userid); + $this->db->where("repository_id",$repository_uid); + $result=$this->db->get("data_access_whitelist")->row_array(); + + if(!$result){ + return false; + } + + return true; + } + + + function get_data_files($sid) + { + $this->load->model('Survey_resource_model'); + $result['resources_microdata']=$this->Survey_resource_model->get_microdata_resources($sid); + $result['sid']=$sid; + $result['storage_path']=$this->Dataset_model->get_storage_fullpath($sid); + return $this->load->view('catalog_search/survey_summary_microdata', $result,TRUE); + } + + + function insert($repository_id, $user_id) + { + if ($this->row_exists($repository_id,$user_id)){ + throw new Exception("User is already whitelisted"); + } + + $data=array( + 'user_id'=>$user_id, + 'repository_id'=>$repository_id + ); + + $result=$this->db->insert('data_access_whitelist', $data); + + if ($result===false){ + throw new MY_Exception($this->db->_error_message()); + } + + return $this->db->insert_id(); + } + + function row_exists($repository_id,$user_id) + { + $this->db->select("*"); + $this->db->where('repository_id', $repository_id); + $this->db->where('user_id', $user_id); + $result=$this->db->get("data_access_whitelist")->result_array(); + + if ($result) + { + return true; + } + + return false; + } + + + function delete($repository_id,$user_id) + { + $this->db->where('repository_id', $repository_id); + $this->db->where('user_id', $user_id); + return $this->db->delete('data_access_whitelist'); + } + + function delete_by_id($id) + { + $this->db->where('id', $id); + return $this->db->delete('data_access_whitelist'); + } + + + function get_repo_id($collection_name){ + return $this->Repository_model->get_repositoryid_uid($collection_name); + } + + function get_user_id($email) + { + $this->db->select("id"); + $this->db->where("email",$email); + $result=$this->db->get("users")->row_array(); + + if ($result){ + return $result['id']; + } + + return false; + } + +} diff --git a/application/models/Data_file_model.php b/application/models/Data_file_model.php index 5657feea6..57ead330f 100644 --- a/application/models/Data_file_model.php +++ b/application/models/Data_file_model.php @@ -13,7 +13,8 @@ class Data_file_model extends CI_Model { 'data_checks', 'missing_data', 'version', - 'notes' + 'notes', + 'metadata' ); public function __construct() @@ -166,12 +167,10 @@ function insert($sid,$options) } } - $data['sid']=$sid; - + $data['sid']=$sid; $result=$this->db->insert('data_files', $data); - if ($result===false) - { + if ($result===false){ throw new MY_Exception($this->db->_error_message()); } diff --git a/application/models/Data_table_mongo_model.php b/application/models/Data_table_mongo_model.php index 88c2b17a6..12c053c73 100644 --- a/application/models/Data_table_mongo_model.php +++ b/application/models/Data_table_mongo_model.php @@ -693,6 +693,13 @@ function parse_filter_value($value) ); continue; } + if (substr($val,0,4)=='<' && is_numeric(substr($val,4))){ + $output[]=array( + 'type'=>'lte', + 'value'=>substr($val,4) + ); + continue; + } $range=explode("-",$val); diff --git a/application/models/Dataset_document_model.php b/application/models/Dataset_document_model.php index e2178793d..f401cea6d 100644 --- a/application/models/Dataset_document_model.php +++ b/application/models/Dataset_document_model.php @@ -78,7 +78,7 @@ function create_dataset($type,$options, $sid=null) $options['changed']=date("U"); //fields to be stored as metadata - $study_metadata_sections=array('metadata_information','document_description','files','resources','tags','additional'); + $study_metadata_sections=array('metadata_information','document_description','files','resources','provenance','embeddings','lda_topics','tags','additional'); //external resources $external_resources=$this->get_array_nested_value($options,'resources'); @@ -105,25 +105,12 @@ function create_dataset($type,$options, $sid=null) $dataset_id=$this->insert($type,$options); } - //update years - $this->update_years($dataset_id,$core_fields['year_start'],$core_fields['year_end']); - - //update tags - $this->update_survey_tags($dataset_id, $this->get_tags($options['metadata'])); + $this->update_filters($dataset_id,$options['metadata']); //import external resources $this->update_resources($dataset_id,$external_resources); - //update related countries - $this->Survey_country_model->update_countries($dataset_id,$core_fields['nations']); - - //set aliases - - //set geographic locations (bounding box) - - //complete transaction $this->db->trans_complete(); - return $dataset_id; } @@ -140,6 +127,7 @@ function get_core_fields($options) { $output=array(); $output['title']=$this->get_array_nested_value($options,'document_description/title_statement/title'); + $output['subtitle']=$this->get_array_nested_value($options,'document_description/title_statement/sub_title'); $output['idno']=$this->get_array_nested_value($options,'document_description/title_statement/idno'); $nations=(array)$this->get_array_nested_value($options,'document_description/ref_country'); @@ -156,18 +144,23 @@ function get_core_fields($options) if(is_array($authors)){ $authors_str=array(); foreach($authors as $author){ - $tmp=array(); - $tmp[]=$this->get_array_nested_value($author,'first_name'); - $tmp[]=$this->get_array_nested_value($author,'last_name'); - $authors_str[]=implode(" ", $tmp); + $fullname=$this->get_array_nested_value($author,'full_name'); + + if (!empty($fullname)){ + $authors_str[]=$fullname; + } + else{ + $tmp=array(); + $tmp[]=$this->get_array_nested_value($author,'first_name'); + $tmp[]=$this->get_array_nested_value($author,'last_name'); + $authors_str[]=implode(" ", $tmp); + } } $output['authoring_entity']=implode(", ",$authors_str); } - - $years=$this->get_years($options); $output['year_start']=$years['start']; $output['year_end']=$years['end']; @@ -205,17 +198,18 @@ function get_years($options) * * */ - function update_filters($sid, $metadata) + function update_filters($sid, $metadata=null) { + if (!is_array($metadata)){ + return false; + } + $core_fields=$this->get_core_fields($metadata); - //update years $this->update_years($sid,$core_fields['year_start'],$core_fields['year_end']); - - //set topics - - //update related countries $this->Survey_country_model->update_countries($sid,$core_fields['nations']); + $this->add_tags($sid,$this->get_array_nested_value($metadata,'tags')); + return true; } diff --git a/application/models/Dataset_geospatial_model.php b/application/models/Dataset_geospatial_model.php index 641586583..0337d743f 100644 --- a/application/models/Dataset_geospatial_model.php +++ b/application/models/Dataset_geospatial_model.php @@ -54,7 +54,7 @@ function create_dataset($type,$options,$sid=null) $options['changed']=date("U"); //fields to be stored as metadata - $study_metadata_sections=array('description','tags','provenance','additional'); + $study_metadata_sections=array('description','provenance','embeddings','lda_topics','tags','additional'); foreach($study_metadata_sections as $section){ if(array_key_exists($section,$options)){ @@ -71,9 +71,14 @@ function create_dataset($type,$options,$sid=null) unset($options['metadata']['description']['distributionInfo']['transferOptions']['onLine']); } - //start transaction $this->db->trans_start(); + + $feature_catalog=isset($options['metadata']['description']['feature_catalogue']) ? $options['metadata']['description']['feature_catalogue'] : null; + + if (isset($options['metadata']['description']['feature_catalogue'])){ + //unset($options['metadata']['description']['feature_catalogue']); + } if($dataset_id>0){ $this->update($dataset_id,$type,$options); @@ -82,21 +87,17 @@ function create_dataset($type,$options,$sid=null) $dataset_id=$this->insert($type,$options); } - //update years - $this->update_years($dataset_id,$core_fields['year_start'],$core_fields['year_end']); - + $this->update_filters($dataset_id,$options['metadata']); + //import external resources $this->update_resources($dataset_id,$external_resources); - //set topics - - //update related countries - $this->Survey_country_model->update_countries($dataset_id,$core_fields['nations']); - - //set aliases - - //set geographic locations (bounding box) + //feature catalog + $this->upsert_feature_catalog($dataset_id,$feature_catalog); + //update surveys.keywords + $this->update_feature_keywords($dataset_id,$feature_catalog); + //complete transaction $this->db->trans_complete(); @@ -177,7 +178,7 @@ function get_core_fields($options) $output['year_start']=$years['start']; $output['year_end']=$years['end']; - + return $output; } @@ -238,21 +239,184 @@ function get_metadata($sid) } - /** + + /** * * Update all related tables used for facets/filters * * */ - function update_filters($sid, $metadata) + function update_filters($sid, $metadata=null) { + if (!is_array($metadata)){ + return false; + } + $core_fields=$this->get_core_fields($metadata); - //update years $this->update_years($sid,$core_fields['year_start'],$core_fields['year_end']); - - //update related countries $this->Survey_country_model->update_countries($sid,$core_fields['nations']); + $this->add_tags($sid,$this->get_array_nested_value($metadata,'tags')); + + $bbox=$this->get_bbox_array($metadata); + $this->update_locations($sid, $bbox); + + return true; } + + function get_bbox_array($metadata) + { + $bbox_arr=(array)array_data_get($metadata, 'description.identificationInfo.*.extent.geographicElement.*.geographicBoundingBox'); + + $bbox=array(); + foreach($bbox_arr as $row){ + if (!isset($row['northBoundLatitude'])){ + continue; + } + $bbox[]=array( + 'north'=>$row['northBoundLatitude'], + 'south'=>$row['southBoundLatitude'], + 'east'=>$row['eastBoundLongitude'], + 'west'=>$row['westBoundLongitude'] + ); + } + + return $bbox; + } + + + function upsert_feature_catalog($sid,$feature_catalog) + { + $this->Data_file_model->remove_all_files($sid); + + if (!isset($feature_catalog['featureType'])){ + return false; + } + + //featureType [data file] + $file_counter=1; + foreach($feature_catalog['featureType'] as $feature_type) + { + $file_metadata=$feature_type; + if (isset($file_metadata['carrierOfCharacteristics'])){ + unset($file_metadata['carrierOfCharacteristics']); + } + + $file_id='F'.$file_counter++; + $data_file=array( + 'sid'=>$sid, + 'file_id'=>$file_id, + 'file_name'=>$feature_type['typeName'], + 'description'=>$feature_type['definition'], + 'metadata'=> json_encode($file_metadata) + ); + + $file=$this->Data_file_model->get_file_by_id($sid,$file_id); + + if($file){ + $this->Data_file_model->update($file['id'],$data_file); + }else{ + $this->Data_file_model->insert($sid,$data_file); + } + + $car_chars=isset($feature_type['carrierOfCharacteristics']) ? $feature_type['carrierOfCharacteristics'] : null; + $this->upsert_carrierOfCharacteristics($sid,$file_id,$car_chars,true); + } + } + + private function upsert_carrierOfCharacteristics($sid,$fid,$car_chars, $remove_existing=false) + { + if ($remove_existing==true){ + $this->delete_variables($sid,$fid); + } + + if(!is_array($car_chars)){ + return false; + } + + $var_counter=1; + foreach($car_chars as $variable){ + $vid='V'.$var_counter++; + $listed_values=isset($variable['listedValue']) ? $variable['listedValue'] : ''; + $labl=isset($variable['definition']) ? $variable['definition'] : ''; + + if (strlen($labl)>255){ + $labl=substr(0,250).'...'; + } + + $variable_metadata=array( + 'fid'=>$fid, + 'vid'=>$fid.'-'.$vid, + 'name'=>isset($variable['memberName']) ? $variable['memberName'] : '', + 'labl'=>$labl, + 'qstn'=>isset($variable['definition']) ? $variable['definition'] : '', + 'catgry'=>$this->listed_values_to_str($listed_values), + 'metadata'=>$variable + ); + + $variable_id=$this->Variable_model->insert($sid,$variable_metadata, $upsert=!$remove_existing); + } + + //update survey varcount + $this->update_varcount($sid); + $this->Variable_model->update_survey_timestamp($sid); + } + + function delete_variables($sid,$fid) + { + $this->db->where('sid',$sid); + $this->db->where('fid',$fid); + $this->db->delete('variables'); + } + + + function update_feature_keywords($sid,$feature_catalog) + { + if (!isset($feature_catalog['featureType'])){ + return ''; + } + + $output=array(); + foreach($feature_catalog['featureType'] as $feature_type) + { + $output[]=$feature_type['typeName']; + $output[]=$feature_type['definition']; + + $car_chars=isset($feature_type['carrierOfCharacteristics']) ? $feature_type['carrierOfCharacteristics'] : null; + foreach($car_chars as $variable) + { + $output[]=isset($variable['memberName']) ? $variable['memberName'] : ''; + $output[]=isset($variable['definition']) ? $variable['definition'] : ''; + + if (isset($variable['listedValue'])){ + $output[]=$this->listed_values_to_str($variable['listedValue']); + } + } + } + + $output= implode(" ", $output); + + $options=array( + 'var_keywords'=>$output + ); + + $this->db->where('id',$sid); + $this->db->update("surveys",$options); + } + + //convert listed values array to string + function listed_values_to_str($listed_values) + { + if (!is_array($listed_values)){ + return ''; + } + $output=array(); + foreach($listed_values as $lv){ + $output[]=isset($lv['label']) ? $lv['label'] : ''; + $output[]=isset($lv['definition']) ? $lv['definition'] : ''; + } + + return implode(" ",$output); + } } \ No newline at end of file diff --git a/application/models/Dataset_image_model.php b/application/models/Dataset_image_model.php index c28156655..6e549402a 100644 --- a/application/models/Dataset_image_model.php +++ b/application/models/Dataset_image_model.php @@ -40,7 +40,7 @@ function create_dataset($type,$options) } //fields to be stored as metadata - $study_metadata_sections=array('metadata_information','image_description','files','additional'); + $study_metadata_sections=array('metadata_information','image_description','files','provenance','embeddings','lda_topics','tags','additional'); foreach($study_metadata_sections as $section){ if(array_key_exists($section,$options)){ @@ -59,22 +59,9 @@ function create_dataset($type,$options) $dataset_id=$this->insert($type,$options); } - //update years - $this->update_years($dataset_id,$core_fields['year_start'],$core_fields['year_end']); - - //countries - $this->Survey_country_model->update_countries($dataset_id,$core_fields['nations']); - - //set topics - - //update tags - $this->update_survey_tags($dataset_id, $this->get_tags($options['metadata'])); + $this->update_filters($dataset_id,$options['metadata']); - //set aliases - - //set geographic locations (bounding box) - - //complete transaction + //complete transaction $this->db->trans_complete(); return $dataset_id; @@ -114,7 +101,7 @@ function update_dataset($sid,$type,$options, $merge_metadata=false) $options['changed']=date("U"); //fields to be stored as metadata - $study_metadata_sections=array('metadata_information','image_description','files','additional'); + $study_metadata_sections=array('metadata_information','image_description','files','provenance','embeddings','lda_topics','tags','additional'); foreach($study_metadata_sections as $section){ if(array_key_exists($section,$options)){ @@ -230,6 +217,25 @@ function get_tags($options) return $output; } - + + /** + * + * Update all related tables used for facets/filters + * + * + */ + function update_filters($sid, $metadata=null) + { + if (!is_array($metadata)){ + return false; + } + + $core_fields=$this->get_core_fields($metadata); + + $this->update_years($sid,$core_fields['year_start'],$core_fields['year_end']); + $this->Survey_country_model->update_countries($sid,$core_fields['nations']); + $this->add_tags($sid,$this->get_array_nested_value($metadata,'tags')); + return true; + } } \ No newline at end of file diff --git a/application/models/Dataset_microdata_model.php b/application/models/Dataset_microdata_model.php index 837b9f353..bb6f76c42 100644 --- a/application/models/Dataset_microdata_model.php +++ b/application/models/Dataset_microdata_model.php @@ -34,6 +34,25 @@ public function __construct() */ function create_dataset($type,$options, $sid=null,$is_update=false) { + $data_files=null; + $variables=null; + $variable_groups=null; + + if(isset($options['data_files'])){ + $data_files=$options['data_files']; + unset($options['data_files']); + } + + if(isset($options['variables'])){ + $variables=$options['variables']; + unset($options['variables']); + } + + if(isset($options['variable_groups'])){ + $variable_groups=$options['variable_groups']; + unset($options['variable_groups']); + } + //validate schema $this->validate_schema($type,$options); @@ -42,7 +61,7 @@ function create_dataset($type,$options, $sid=null,$is_update=false) } //get core fields for listing datasets in the catalog - $core_fields=$this->get_core_fields($type,$options); + $core_fields=$this->get_core_fields($options); $options=array_merge($options,$core_fields); if(!isset($core_fields['idno']) || empty($core_fields['idno'])){ @@ -70,12 +89,7 @@ function create_dataset($type,$options, $sid=null,$is_update=false) $options['changed']=date("U"); - //split parts of the metadata - $data_files=null; - $variables=null; - $variable_groups=null; - - $study_metadata_sections=array('doc_desc','study_desc','additional','tags'); + $study_metadata_sections=array('doc_desc','study_desc','provenance','embeddings','lda_topics','tags','additional'); foreach($study_metadata_sections as $section){ if(array_key_exists($section,$options)){ @@ -84,22 +98,6 @@ function create_dataset($type,$options, $sid=null,$is_update=false) } } - if(isset($options['data_files'])){ - $data_files=$options['data_files']; - unset($options['data_files']); - } - - if(isset($options['variables'])){ - $variables=$options['variables']; - unset($options['variables']); - } - - if(isset($options['variable_groups'])){ - $variable_groups=$options['variable_groups']; - unset($options['variable_groups']); - } - - //start transaction $this->db->trans_start(); @@ -115,22 +113,8 @@ function create_dataset($type,$options, $sid=null,$is_update=false) //set owner repo $this->Dataset_model->set_dataset_owner_repo($dataset_id,$options['repositoryid']); - //update years - $this->update_years($dataset_id,$core_fields['year_start'],$core_fields['year_end']); - - //set topics - //$this->delete_topics($dataset_id); - //$this->update_topics($dataset_id,$this->get_array_nested_value($options,'study_desc/study_info/topics')); - - //update countries - $this->Survey_country_model->update_countries($dataset_id,$core_fields['nations']); - - //set aliases - - //tags - $this->add_tags($dataset_id,$this->get_array_nested_value($options,'metadata/tags')); - - //set geographic locations (bounding box) + //facets/filters + $this->update_filters($dataset_id,$options['metadata']); //for creating new studies, always remove the existing data $remove_existing=true; @@ -320,36 +304,37 @@ private function create_update_variables($dataset_id,$variables, $remove_existin $this->Variable_model->remove_all_variables($dataset_id); } - if(is_array($variables)){ - foreach($variables as $idx=>$variable){ - //validate file_id exists - $fid=$this->Data_file_model->get_fid_by_fileid($dataset_id,$variable['file_id']); - - if(!$fid){ - throw new exception("variable creation failed. Variable 'file_id' not found: ".$variable['file_id']); - } + if(!is_array($variables)){ + return false; + } - $variable['fid']=$variable['file_id']; - $this->Variable_model->validate_variable($variable); - } + $valid_data_files=(array)$this->Data_file_model->list_fileid($dataset_id); + foreach($variables as $idx=>$variable){ + if(!in_array($variable['file_id'],$valid_data_files)){ + throw new exception("variable creation failed. Variable 'file_id' not found: ".$variable['file_id']); + } + + $variable['fid']=$variable['file_id']; + $this->Variable_model->validate_variable($variable); + } - $result=array(); - foreach($variables as $variable){ - $variable['fid']=$variable['file_id']; - $variable['qstn']=$this->variable_question_to_str($variable); + $result=array(); + foreach($variables as $variable){ + $variable['fid']=$variable['file_id']; + $variable['qstn']=$this->variable_question_to_str($variable); - $variable_categories=isset($variable['var_catgry']) ? $variable['var_catgry'] : null; - $variable['catgry']=$this->variable_categories_to_str($variable_categories); - //$variable['keywords']=$this->variable_keywords_to_str($variable); + $variable_categories=isset($variable['var_catgry']) ? $variable['var_catgry'] : null; + $variable['catgry']=$this->variable_categories_to_str($variable_categories); + //$variable['keywords']=$this->variable_keywords_to_str($variable); - //all fields are stored as metadata - $variable['metadata']=$variable; - $variable_id=$this->Variable_model->insert($dataset_id,$variable); - } + //all fields are stored as metadata + $variable['metadata']=$variable; + $variable_id=$this->Variable_model->insert($dataset_id,$variable, $upsert=!$remove_existing); + } - //update survey varcount - $this->update_varcount($dataset_id); - } + //update survey varcount + $this->update_varcount($dataset_id); + $this->Variable_model->update_survey_timestamp($dataset_id); } /*private function variable_keywords_to_str($variable) @@ -420,6 +405,10 @@ private function create_update_variable_groups($dataset_id,$variable_groups, $re } if(is_array($variable_groups)){ + foreach($variable_groups as $vgroup){ + $this->validate_schema($type='variable-group',$vgroup); + } + foreach($variable_groups as $vgroup){ $this->Variable_group_model->insert($dataset_id,$vgroup); } @@ -465,15 +454,12 @@ private function create_update_data_files($dataset_id,$data_files, $remove_exist * * */ - function get_core_fields($type,$options) + function get_core_fields($options) { $output=array(); - $title=array(); - $title[]=$this->get_array_nested_value($options,'study_desc/title_statement/title'); - $title[]=$this->get_array_nested_value($options,'study_desc/title_statement/sub_title'); - $title=array_filter($title); - $output['title']=implode(", ",$title); + $output['title']=$this->get_array_nested_value($options,'study_desc/title_statement/title'); + $output['subtitle']=$this->get_array_nested_value($options,'study_desc/title_statement/sub_title'); $output['idno']=$this->get_array_nested_value($options,'study_desc/title_statement/idno'); $nations=(array)$this->get_array_nested_value($options,'study_desc/study_info/nation'); @@ -614,35 +600,17 @@ function get_data_collection_years($options) * * */ - function update_filters($sid, $metadata) + function update_filters($sid, $metadata=null) { if (!is_array($metadata)){ return false; } - $core_fields=$this->get_core_fields($type='survey',$metadata); - - //update years - $this->update_years($sid,$core_fields['year_start'],$core_fields['year_end']); - - //tags + $core_fields=$this->get_core_fields($metadata); + $this->update_years($sid,$core_fields['year_start'],$core_fields['year_end']); $this->add_tags($sid,$this->get_array_nested_value($metadata,'tags')); - - //update related countries $this->Survey_country_model->update_countries($sid,$core_fields['nations']); - return true; } - - - function add_tags($sid, $tags) - { - if(empty($tags)){ - return false; - } - - $tags=array_column($tags,'tag'); - return parent::add_survey_tags($sid,$tags); - } } \ No newline at end of file diff --git a/application/models/Dataset_model.php b/application/models/Dataset_model.php index 3cdad5e77..413096cfd 100644 --- a/application/models/Dataset_model.php +++ b/application/models/Dataset_model.php @@ -20,6 +20,7 @@ class Dataset_model extends CI_Model { 'repositoryid', 'idno', 'title', + 'subtitle', 'abbreviation', 'authoring_entity', 'nation', @@ -83,6 +84,7 @@ public function __construct() $this->load->model("Vocabulary_model"); $this->load->model("Term_model"); $this->load->model("Survey_resource_model"); + $this->load->model("Catalog_tags_model"); } @@ -108,7 +110,14 @@ function get_all($limit=0,$offset=0, $fields=array()) $this->db->limit($limit, $offset); } - $result= $this->db->get("surveys")->result_array(); + $result= $this->db->get("surveys"); + + if ($result){ + $result=$result->result_array(); + }else{ + $error=$this->db->error(); + throw new Exception(implode(", ", $error)); + } if($result){ return $this->decode_encoded_fields_rows($result); @@ -130,10 +139,13 @@ function get_total_count() * * */ - function get_list_by_type($dataset_type, $limit=100, $start=0) + function get_list_by_type($dataset_type=null, $limit=100, $start=0) { $this->db->select('id,idno'); - $this->db->where('type',$dataset_type); + + if($dataset_type){ + $this->db->where('type',$dataset_type); + } if(is_numeric($start)){ $this->db->where('id>',$start); @@ -289,12 +301,22 @@ function decode_encoded_fields_rows($data) //returns survey metadata array function get_metadata($sid) { - $this->db->select("metadata"); + $this->db->select("type,metadata"); $this->db->where("id",$sid); $survey=$this->db->get("surveys")->row_array(); if ($survey){ - return $this->decode_metadata($survey['metadata']); + $metadata= $this->decode_metadata($survey['metadata']); + $metadata['schematype']=$survey['type']; + + //tags + $tags=$this->Catalog_tags_model->survey_tags_with_key($sid); + + if($tags){ + $metadata['tags']=$tags; + } + + return $metadata; } } @@ -378,7 +400,7 @@ function get_array_nested_value($data, $path, $glue = '/') $reference = $data; foreach ($paths as $key) { if (!array_key_exists($key, $reference)) { - return false; + return null; } $reference = $reference[$key]; } @@ -1142,6 +1164,16 @@ function add_survey_tags($sid, $tags=array()) } } + function add_tags($sid, $tags) + { + if(empty($tags)){ + return false; + } + + $tags=array_column($tags,'tag'); + return $this->add_survey_tags($sid,$tags); + } + function add_survey_aliases($sid, $aliases=array()) @@ -1854,6 +1886,34 @@ function get_country_names_string($nations) } return $nation_str; - } + } + + + function update_locations($sid, $bounds=array()) + { + return false;//disabled + //delete any existing locations + $this->db->delete('survey_locations',array('sid' => $sid)); + + if(!is_array($bounds)){ + return false; + } + + foreach($bounds as $bbox) + { + $north=$bbox['north']; + $south=$bbox['south']; + $east=$bbox['east']; + $west=$bbox['west']; + + $this->load->helper("gis_helper"); + $bbox_wkt=$this->db->escape(bbox_to_wkt($north, $south, $east, $west)); + + $this->db->set('sid',$sid); + $this->db->set('location',$bbox_wkt); + $this->db->insert('survey_locations'); + } + } + }//end-class diff --git a/application/models/Dataset_script_model.php b/application/models/Dataset_script_model.php index 45b344f0c..9ade934fd 100644 --- a/application/models/Dataset_script_model.php +++ b/application/models/Dataset_script_model.php @@ -40,7 +40,7 @@ function create_dataset($type,$options) } //fields to be stored as metadata - $study_metadata_sections=array('doc_desc','project_desc','additional'); + $study_metadata_sections=array('doc_desc','project_desc','provenance','embeddings','lda_topics','tags','additional'); $options['metadata']=array(); @@ -61,18 +61,8 @@ function create_dataset($type,$options) $dataset_id=$this->insert($type,$options); } - //update years - $this->update_years($dataset_id,$core_fields['year_start'],$core_fields['year_end']); - - //set topics - - //update related countries - $this->Survey_country_model->update_countries($dataset_id,$core_fields['nations']); - - //set aliases - - //set geographic locations (bounding box) - + $this->update_filters($dataset_id,$options['metadata']); + //complete transaction $this->db->trans_complete(); @@ -92,6 +82,7 @@ function get_core_fields($options) { $output=array(); $output['title']=$this->get_array_nested_value($options,'project_desc/title_statement/title'); + $output['subtitle']=$this->get_array_nested_value($options,'project_desc/title_statement/sub_title'); $output['idno']=$this->get_array_nested_value($options,'project_desc/title_statement/idno'); $nations=(array)array_data_get($options, 'project_desc.geographic_units.*.name'); @@ -160,16 +151,17 @@ function get_years($options) * * */ - function update_filters($sid, $metadata) + function update_filters($sid, $metadata=null) { - $core_fields=$this->get_core_fields($type='script',$metadata); - - //update years - $this->update_years($sid,$core_fields['year_start'],$core_fields['year_end']); + if (!is_array($metadata)){ + return false; + } - //set topics + $core_fields=$this->get_core_fields($metadata); - //update related countries + $this->update_years($sid,$core_fields['year_start'],$core_fields['year_end']); $this->Survey_country_model->update_countries($sid,$core_fields['nations']); + $this->add_tags($sid,$this->get_array_nested_value($metadata,'tags')); + return true; } } \ No newline at end of file diff --git a/application/models/Dataset_table_model.php b/application/models/Dataset_table_model.php index 008a4bd63..b0acfec2b 100644 --- a/application/models/Dataset_table_model.php +++ b/application/models/Dataset_table_model.php @@ -80,7 +80,7 @@ function create_dataset($type,$options,$sid=null) //fields to be stored as metadata - $study_metadata_sections=array('metadata_information','table_description','files','resources','tags','additional'); + $study_metadata_sections=array('metadata_information','table_description','files','resources','provenance','embeddings','lda_topics','tags','additional'); //external resources $external_resources=$this->get_array_nested_value($options,'resources'); @@ -107,24 +107,11 @@ function create_dataset($type,$options,$sid=null) $dataset_id=$this->insert($type,$options); } - //update years - $this->update_years($dataset_id,$core_fields['year_start'],$core_fields['year_end']); - - //update tags - $this->update_survey_tags($dataset_id, $this->get_tags($options['metadata'])); + $this->update_filters($dataset_id,$options['metadata']); //import external resources $this->update_resources($dataset_id,$external_resources); - //set topics - - //update related countries - $this->Survey_country_model->update_countries($dataset_id,$core_fields['nations']); - - //set aliases - - //set geographic locations (bounding box) - //complete transaction $this->db->trans_complete(); @@ -144,6 +131,7 @@ function get_core_fields($options) { $output=array(); $output['title']=$this->get_array_nested_value($options,'table_description/title_statement/title'); + $output['subtitle']=$this->get_array_nested_value($options,'table_description/title_statement/sub_title'); $output['idno']=$this->get_array_nested_value($options,'table_description/title_statement/idno'); $nations=(array)$this->get_array_nested_value($options,'table_description/ref_country'); @@ -229,4 +217,23 @@ function get_metadata($sid) return $metadata; } + /** + * + * Update all related tables used for facets/filters + * + * + */ + function update_filters($sid, $metadata=null) + { + if (!is_array($metadata)){ + return false; + } + + $core_fields=$this->get_core_fields($metadata); + + $this->update_years($sid,$core_fields['year_start'],$core_fields['year_end']); + $this->Survey_country_model->update_countries($sid,$core_fields['nations']); + $this->add_tags($sid,$this->get_array_nested_value($metadata,'tags')); + return true; + } } \ No newline at end of file diff --git a/application/models/Dataset_timeseries_model.php b/application/models/Dataset_timeseries_model.php index 3fe424024..9c1714963 100644 --- a/application/models/Dataset_timeseries_model.php +++ b/application/models/Dataset_timeseries_model.php @@ -78,15 +78,14 @@ function create_dataset($type,$options, $sid=null) $options['changed']=date("U"); - $study_metadata_sections=array('metadata_creation','series_description','additional','tags'); + $study_metadata_sections=array('metadata_creation','series_description','provenance','embeddings','lda_topics','tags','additional'); foreach($study_metadata_sections as $section){ if(array_key_exists($section,$options)){ $options['metadata'][$section]=$options[$section]; unset($options[$section]); } - } - + } //start transaction $this->db->trans_start(); @@ -100,17 +99,7 @@ function create_dataset($type,$options, $sid=null) $dataset_id=$this->insert($type,$options); } - //update years - $this->update_years($dataset_id,$core_fields['year_start'],$core_fields['year_end']); - - //set topics - - //update related countries - $this->Survey_country_model->update_countries($dataset_id,$core_fields['nations']); - - //set aliases - - //set geographic locations (bounding box) + $this->update_filters($dataset_id,$options['metadata']); //complete transaction $this->db->trans_complete(); @@ -125,25 +114,18 @@ function create_dataset($type,$options, $sid=null) * * */ - function update_filters($sid, $metadata) + function update_filters($sid, $metadata=null) { + if (!is_array($metadata)){ + return false; + } + $core_fields=$this->get_core_fields($metadata); - //update years $this->update_years($sid,$core_fields['year_start'],$core_fields['year_end']); - - //set topics - - //update countries field for dataset - $dataset_options=array( - 'nation'=>$core_fields['nation'] - ); - - $this->update_options($sid,$dataset_options); - - //update related countries - $countries=$core_fields['nations']; - $this->Survey_country_model->update_countries($sid,$countries); + $this->Survey_country_model->update_countries($sid,$core_fields['nations']); + $this->add_tags($sid,$this->get_array_nested_value($metadata,'tags')); + return true; } diff --git a/application/models/Dataset_video_model.php b/application/models/Dataset_video_model.php index 56a7722c7..1527f1c91 100644 --- a/application/models/Dataset_video_model.php +++ b/application/models/Dataset_video_model.php @@ -105,23 +105,12 @@ function create_dataset($type,$options, $sid=null) $dataset_id=$this->insert($type,$options); } - //update years - $this->update_years($dataset_id,$core_fields['year_start'],$core_fields['year_end']); - - //update tags - $this->update_survey_tags($dataset_id, $this->get_tags($options['metadata'])); + $this->update_filters($dataset_id,$options['metadata']); //import external resources $this->update_resources($dataset_id,$external_resources); - //update related countries - $this->Survey_country_model->update_countries($dataset_id,$core_fields['nations']); - - //set aliases - - //set geographic locations (bounding box) - - //complete transaction + //complete transaction $this->db->trans_complete(); return $dataset_id; @@ -190,17 +179,19 @@ function get_years($options) * * */ - function update_filters($sid, $metadata) + function update_filters($sid, $metadata=null) { + if (!is_array($metadata)){ + return false; + } + $core_fields=$this->get_core_fields($metadata); - //update years $this->update_years($sid,$core_fields['year_start'],$core_fields['year_end']); - - //set topics - - //update related countries $this->Survey_country_model->update_countries($sid,$core_fields['nations']); + $this->add_tags($sid,$this->get_array_nested_value($metadata,'tags')); + + return true; } diff --git a/application/models/Dataset_visualization_model.php b/application/models/Dataset_visualization_model.php index 47fa04250..b6bfba034 100644 --- a/application/models/Dataset_visualization_model.php +++ b/application/models/Dataset_visualization_model.php @@ -59,16 +59,7 @@ function create_dataset($type,$options) $dataset_id=$this->insert($type,$options); } - //update years - $this->update_years($dataset_id,$core_fields['year_start'],$core_fields['year_end']); - - //set topics - - //update related countries - - //set aliases - - //set geographic locations (bounding box) + $this->update_filters($dataset_id,$options['metadata']); //complete transaction $this->db->trans_complete(); @@ -89,6 +80,7 @@ function get_core_fields($options) { $output=array(); $output['title']=$this->get_array_nested_value($options,'visualization_description/title_statement/title'); + $output['subtitle']=$this->get_array_nested_value($options,'visualization_description/title_statement/sub_title'); $output['idno']=$this->get_array_nested_value($options,'visualization_description/title_statement/idno'); //todo @@ -128,4 +120,26 @@ function get_years($options) ); } + + /** + * + * Update all related tables used for facets/filters + * + * + */ + function update_filters($sid, $metadata=null) + { + if (!is_array($metadata)){ + return false; + } + + $core_fields=$this->get_core_fields($metadata); + + $this->update_years($sid,$core_fields['year_start'],$core_fields['year_end']); + $this->Survey_country_model->update_countries($sid,$core_fields['nations']); + $this->add_tags($sid,$this->get_array_nested_value($metadata,'tags')); + + return true; + } + } \ No newline at end of file diff --git a/application/models/Facet_model.php b/application/models/Facet_model.php index dad62915e..0b1ec16be 100644 --- a/application/models/Facet_model.php +++ b/application/models/Facet_model.php @@ -23,7 +23,7 @@ function get_facet_options() function get_core_facets_list() { - return ['tag','topic','country','year','collection','data_class','dtype','type']; + return ['tag','topic','country','year','collection','data_class','dtype','type','region']; } diff --git a/application/models/Licensed_model.php b/application/models/Licensed_model.php index ddf866cd2..d4b44b3e3 100644 --- a/application/models/Licensed_model.php +++ b/application/models/Licensed_model.php @@ -690,7 +690,7 @@ function search_requests($limit = NULL, $offset = NULL,$search_options=NULL,$sor //set Limit clause $this->db->select('lic_requests.request_title,lic_requests.id, lic_requests.userid, lic_requests.created, lic_requests.status,users.username'); $this->db->join($this->tables['users'], $this->tables['users'].'.id = lic_requests.userid'); - $this->db->join('survey_lic_requests', 'survey_lic_requests.id = lic_requests.id'); + $this->db->join('survey_lic_requests', 'survey_lic_requests.request_id = lic_requests.id'); //$this->db->join('survey_repos', 'survey_lic_requests.sid = survey_repos.sid'); $this->db->group_by('lic_requests.request_title,lic_requests.id, lic_requests.userid, lic_requests.created, lic_requests.status,users.username'); diff --git a/application/models/Search_helper_model.php b/application/models/Search_helper_model.php index d874d0bdb..fb39cbc01 100644 --- a/application/models/Search_helper_model.php +++ b/application/models/Search_helper_model.php @@ -748,12 +748,22 @@ function get_repositories_list($published=1) */ function get_countries_list($countries) { - $this->db->select('countryid,name'); - + $countries_list=array(); + if(is_array($countries) && count($countries)>0){ - $this->db->where_in('countryid',$countries); + + foreach($countries as $country_id){ + if(is_numeric($country_id)){ + $countries_list[]=$country_id; + } + } + if(count($countries_list)==0){ + return false; + } } + $this->db->select('countryid,name'); + $this->db->where_in('countryid',$countries); $result=$this->db->get('countries')->result_array(); $output=array(); @@ -764,6 +774,31 @@ function get_countries_list($countries) return $output; } + /** + * + * Returns a list of regions + * + * @countries - array of region integer codes + * + */ + function get_regions_list($regions=null) + { + $this->db->select('id,title'); + + if(is_array($regions) && count($regions)>0){ + $this->db->where_in('id',$regions); + } + + $result=$this->db->get('regions')->result_array(); + + $output=array(); + foreach($result as $row){ + $output[$row['id']]=$row['title']; + } + + return $output; + } + /** * @@ -796,5 +831,56 @@ function related_collections($sid_arr) return $output; } + + public function get_active_regions($repositoryid=NULL, $study_type=NULL,$filter_values=array()) + { + //parent regions + $this->db->select('parent_regions.title as group_name,regions.id,regions.title,regions.weight,count(distinct surveys.id) as found'); + $this->db->join('regions', 'parent_regions.id= regions.pid','INNER'); + + $this->db->join('region_countries', 'region_countries.region_id=regions.id','INNER'); + $this->db->join('countries', 'countries.countryid=region_countries.country_id','INNER'); + $this->db->join('survey_countries', 'survey_countries.cid=countries.countryid','INNER'); + $this->db->join('surveys', 'surveys.id=survey_countries.sid','INNER'); + + $this->db->order_by('parent_regions.id,regions.weight'); + $this->db->group_by('parent_regions.title, regions.id, regions.title, regions.weight'); + $this->db->where('surveys.published',1); + + //filter by repository + if (trim($repositoryid)!=='' && $repositoryid!='central') + { + $subquery= sprintf('(surveys.repositoryid= %s OR sr.repositoryid = %s)', + $this->db->escape($repositoryid), + $this->db->escape($repositoryid)); + + $this->db->join('survey_repos sr', 'sr.sid=surveys.id','inner'); + $this->db->where($subquery,null,false); + } + + if($study_type!=NULL){ + $this->db->where('surveys.type',$study_type); + if($filter_values!=NULL){ + $this->db->or_where_in('regions.id',$filter_values); + } + } + + $query=$this->db->get('regions as parent_regions'); + + if (!$query){ + return FALSE; + } + + $rows=$query->result_array(); + + $regions=array(); + foreach($rows as $row) + { + $regions[$row['id']]=$row; + } + + return $regions; + } + }//end class diff --git a/application/models/Stats_model.php b/application/models/Stats_model.php index c2219068f..b6638bd5f 100644 --- a/application/models/Stats_model.php +++ b/application/models/Stats_model.php @@ -40,7 +40,7 @@ function get_popular_surveys($limit=10) function get_latest_surveys($limit=10,$repositoryid=null) { - $this->db->select("surveys.id,surveys.type,surveys.title,surveys.nation,surveys.authoring_entity,forms.model as form_model,surveys.created, surveys.changed"); + $this->db->select("surveys.id,surveys.type,surveys.title,surveys.subtitle,surveys.nation,surveys.authoring_entity,forms.model as form_model,surveys.created, surveys.changed"); $this->db->join("forms", "surveys.formid=forms.formid","left"); $this->db->where("surveys.published", 1); $this->db->order_by("surveys.changed", "desc"); diff --git a/application/models/Survey_resource_model.php b/application/models/Survey_resource_model.php index 162e7a0fa..7f01e1c50 100644 --- a/application/models/Survey_resource_model.php +++ b/application/models/Survey_resource_model.php @@ -42,7 +42,6 @@ function update($resource_id,$options) { //allowed fields $valid_fields=array( - 'resource_id', 'survey_id', 'dctype', 'title', @@ -653,7 +652,9 @@ function is_microdata_resource($dctype) function get_microdata_resources($surveyid) { $this->db->select('*'); - $this->db->where("survey_id=$surveyid AND (dctype like '%dat/micro]%' OR dctype like '%dat]%' OR dctype like '%[dat/%')",NULL,FALSE); + $this->db->where("survey_id=$surveyid AND (dctype like '%dat/micro]%' OR dctype like '%dat]%' OR dctype like '%[dat/%')",NULL,FALSE); + $this->db->order_by("dcdate","desc"); + $this->db->order_by("title","asc"); return $this->db->get('resources')->result_array(); } @@ -804,14 +805,7 @@ function get_user_download_access_info($user_id,$survey_id,$resource_obj) } } - return array( - 'access'=>false, - 'is_microdata'=>true, - 'license'=>$data_access_type, - 'access_request'=>$req, - 'error'=>'expired' - ); - + return false; break; case 'public': @@ -842,6 +836,31 @@ function get_user_download_access_info($user_id,$survey_id,$resource_obj) } + function whitelist_download($user_id,$survey_id,$resource) + { + $this->load->model("Data_access_whitelist_model"); + $user_whitelisted=$this->Data_access_whitelist_model->has_access($user_id,$survey_id); + + if(!$user_whitelisted){ + return false; + } + + $resource_path=$this->get_resource_download_path($resource['resource_id']); + + if (!file_exists($resource_path)){ + throw new Exception ('RESOURCE_FILE_NOT_FOUND'); + } + + $is_microdata=$this->is_microdata_resource($resource); + + $this->load->helper('download'); + log_message('info','Downloading file '.$resource_path.''); + $this->db_logger->write_log('download',basename($resource_path),($is_microdata ? 'microdata': 'resource'),$survey_id); + $this->db_logger->increment_study_download_count($survey_id); + force_download2($resource_path); + } + + function download($user,$survey_id,$resource_id) { //get resource @@ -852,7 +871,9 @@ function download($user,$survey_id,$resource_id) } $user_id=isset($user->id) ? $user->id : false; - + + $this->whitelist_download($user_id,$survey_id,$resource); + $download_req=$this->get_user_download_access_info($user_id,$survey_id,$resource); if (!$download_req){ @@ -1199,6 +1220,7 @@ function upload_rdf($tmp_path,$file_field='file') $config['encrypt_name']=TRUE; $config['allowed_types'] = 'rdf|xml'; + $this->load->library('upload', $config); $this->upload->initialize($config); //process uploaded rdf file diff --git a/application/models/Variable_model.php b/application/models/Variable_model.php index 50a19c46f..1145f6241 100644 --- a/application/models/Variable_model.php +++ b/application/models/Variable_model.php @@ -31,8 +31,9 @@ function select_single($vid) $this->db->where("uid",$vid); $variable=$this->db->get("variables")->row_array(); - if(isset($variable['metadata'])){ + if(isset($variable['metadata'])){ $variable['metadata']=$this->Dataset_model->decode_metadata($variable['metadata']); + $variable=$this->map_variable_fields($variable); } return $variable; @@ -50,8 +51,9 @@ function select_all($sid) $this->db->where("sid",$sid); $variables=$this->db->get("variables")->result_array(); - foreach($variables as $key=>$variable){ + foreach($variables as $key=>$variable){ $variables[$key]['metadata']=$this->Dataset_model->decode_metadata($variable['metadata']); + $variable=$this->map_variable_fields($variable); } return $variables; @@ -99,8 +101,9 @@ function chunk_read($sid,$start_uid=0, $limit=100) $variables=$this->db->get("variables")->result_array(); - foreach($variables as $key=>$variable){ + foreach($variables as $key=>$variable){ $variables[$key]['metadata']=$this->Dataset_model->decode_metadata($variable['metadata']); + $variables[$key]=$this->map_variable_fields($variables[$key]); } return $variables; @@ -120,8 +123,9 @@ function get_var_by_vid($sid,$vid) $variable=$this->db->get("variables")->row_array(); - if(isset($variable['metadata'])){ + if(isset($variable['metadata'])){ $variable['metadata']=$this->Dataset_model->decode_metadata($variable['metadata']); + $variable=$this->map_variable_fields($variable); } return $variable; @@ -141,8 +145,9 @@ function get_var_by_uid($sid,$uid) $variable=$this->db->get("variables")->row_array(); - if(isset($variable['metadata'])){ + if(isset($variable['metadata'])){ $variable['metadata']=$this->Dataset_model->decode_metadata($variable['metadata']); + $variable=$this->map_variable_fields($variable); } return $variable; @@ -162,8 +167,9 @@ function get_by_var_id($sid, $file_id=null, $var_id) $variable=$this->db->get("variables")->row_array(); - if(isset($variable['metadata'])){ + if(isset($variable['metadata'])){ $variable['metadata']=$this->Dataset_model->decode_metadata($variable['metadata']); + $variable=$this->map_variable_fields($variable); } return $variable; @@ -189,6 +195,7 @@ function get_batch_variable_metadata($sid, $file_id=null, $vid_arr=array()) foreach($variables as $idx=>$variable){ if(isset($variable['metadata'])){ $variables[$idx]['metadata']=$this->Dataset_model->decode_metadata($variable['metadata']); + $variables[$idx]=$this->map_variable_fields($variables[$idx]); } } @@ -336,6 +343,14 @@ function get_variables_count($sid) return $this->db->count_all_results(); } + + /** + * + * + * insert new variable + * + * + */ public function insert($sid,$options) { $valid_fields=array( @@ -350,17 +365,8 @@ public function insert($sid,$options) 'metadata' ); - //check if variable already exists - $uid=$this->get_uid_by_vid($sid,$options['vid']); - - if($uid){ - return $this->update($sid,$uid,$options); - } - - foreach($options as $key=>$value) - { - if(!in_array($key,$valid_fields)) - { + foreach($options as $key=>$value){ + if(!in_array($key,$valid_fields)){ unset($options[$key]); } } @@ -369,11 +375,14 @@ public function insert($sid,$options) //metadata if(isset($options['metadata'])){ + $options=$this->map_variable_fields($options); $options['metadata']=$this->Dataset_model->encode_metadata($options['metadata']); } $this->db->insert("variables",$options); - return $this->db->insert_id(); + $insert_id=$this->db->insert_id(); + //$this->update_survey_timestamp($sid); + return $insert_id; } public function update($sid,$uid,$options) @@ -396,19 +405,35 @@ public function update($sid,$uid,$options) } } - $options['sid']=$sid; + $options['sid']=$sid; //metadata if(isset($options['metadata'])){ + $options=$this->map_variable_fields($options); $options['metadata']=$this->Dataset_model->encode_metadata($options['metadata']); } $this->db->where('sid',$sid); $this->db->where('uid',$uid); $this->db->update("variables",$options); + //$this->update_survey_timestamp($sid); return $uid; } + function update_survey_timestamp($sid,$changed=null) + { + if(!$changed){ + $changed=date("U"); + } + + $options=array( + 'changed'=>$changed + ); + + $this->db->where("id",$sid); + $this->db->update('surveys',$options); + } + public function batch_insert($sid,$variables) { @@ -430,11 +455,13 @@ public function batch_insert($sid,$variables) $variables[$key]=array_intersect_key($variable,array_flip($valid_fields)); $variables[$key]['sid']=$sid; if(isset($variable['metadata'])){ + $variable=$this->map_variable_fields($variable); $variables[$key]['metadata']=$this->Dataset_model->encode_metadata($variable['metadata']); } } $this->db->insert_batch('variables', $variables); + $this->update_survey_timestamp($sid); } @@ -565,6 +592,32 @@ function variable_basic_info($sid,$vid) $variable=$this->db->get("variables")->row_array(); return $variable; } + + /** + * + * Fix for inconsistent variable schema fields + */ + function map_variable_fields($variable) + { + $mappings=array( + 'var_start_pos'=>'loc_start_pos', + 'var_end_pos'=>'loc_end_pos', + 'var_width'=>'loc_width', + 'var_rec_seg_no'=>'loc_rec_seg_no', + ); + + if (isset($variable['metadata'])){ + foreach($variable['metadata'] as $key=>$value){ + //complex types e.g. repeatable array types + if(array_key_exists($key,$mappings)){ + $variable['metadata'][$mappings[$key]]=$value; + unset($variable['metadata'][$key]); + } + } + } + + return $variable; + } } diff --git a/application/schemas/datafile-schema.json b/application/schemas/datafile-schema.json index 6e1b7e1e4..a74e542ac 100644 --- a/application/schemas/datafile-schema.json +++ b/application/schemas/datafile-schema.json @@ -12,6 +12,11 @@ "type": "string", "title" : "File name" }, + "file_type": { + "type": "string", + "title" : "File type", + "description": "Types of data files include raw data (ASCII, EBCDIC, etc.) and software-dependent files such as SAS datasets, SPSS export files, etc." + }, "description": { "type": "string", "title": "File description" diff --git a/application/schemas/ddi-schema.json b/application/schemas/ddi-schema.json index d485bff95..5c5cd7b78 100644 --- a/application/schemas/ddi-schema.json +++ b/application/schemas/ddi-schema.json @@ -1,770 +1,781 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://ihsn.org/schemas/ddi2-codebook", - "version":"0.0", - "title":"Survey Microdata Schema Draft", - "description":"Schema for Survey data type based on DDI 2.5", - "definitions":{ - "doc_desc":{ - "type":"object", - "title":"Document Description", - "description":"Document Description", - "_ddi_xpath":"docDscr", - "properties":{ - "title":{ - "title":"Document title", - "description":"Document title", - "type":"string", - "_ddi_xpath":"docDscr/citation/titlStmt/titl" + "version": "0.0", + "title": "Survey Microdata Schema Draft", + "description": "Schema for Survey data type based on DDI 2.5", + "definitions": { + "doc_desc": { + "type": "object", + "title": "Document Description", + "description": "Document Description", + "_ddi_xpath": "docDscr", + "properties": { + "title": { + "title": "Document title", + "description": "Document title", + "type": "string", + "_ddi_xpath": "docDscr/citation/titlStmt/titl" }, - "idno":{ - "title":"Unique ID number for the document", - "type":"string", - "_ddi_xpath":"docDscr/citation/titlStmt/IDNo" + "idno": { + "title": "Unique ID number for the document", + "type": "string", + "_ddi_xpath": "docDscr/citation/titlStmt/IDNo" }, - "producers":{ - "type":"array", - "title":"Producers", - "description":"List of producers", - "_ddi_xpath":"docDscr/citation/prodStmt/producer", - "items":{ - "type":"object", - "properties":{ - "name":{ - "title":"Name", - "description":"Name (required)", - "type":"string" + "producers": { + "type": "array", + "title": "Producers", + "description": "List of producers", + "_ddi_xpath": "docDscr/citation/prodStmt/producer", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "Name (required)", + "type": "string" }, - "abbr":{ - "title":"Abbreviation", - "type":"string" + "abbr": { + "title": "Abbreviation", + "type": "string" }, - "affiliation":{ - "type":"string", - "title":"Affiliation" + "affiliation": { + "type": "string", + "title": "Affiliation" }, - "role":{ - "title":"Role", - "type":"string" + "role": { + "title": "Role", + "type": "string" } } }, - "required":[ + "required": [ "name" ] }, - "prod_date":{ - "title":"Date of Production", - "description":"Document production date using format(YYYY-MM-DD)", - "type":"string", - "_ddi_xpath":"docDscr/citation/prodStmt/prodDate" + "prod_date": { + "title": "Date of Production", + "description": "Document production date using format(YYYY-MM-DD)", + "type": "string", + "_ddi_xpath": "docDscr/citation/prodStmt/prodDate" }, - "version_statement":{ - "type":"object", - "title":"Version Statement", - "description":"Version Statement", - "_ddi_xpath":"docDscr/citation/verStmt", - "properties":{ - "version":{ - "title":"Version", - "type":"string", - "_ddi_xpath":"docDscr/citation/verStmt/version" + "version_statement": { + "type": "object", + "title": "Version Statement", + "description": "Version Statement", + "_ddi_xpath": "docDscr/citation/verStmt", + "properties": { + "version": { + "title": "Version", + "type": "string", + "_ddi_xpath": "docDscr/citation/verStmt/version" }, - "version_date":{ - "title":"Version Date", - "type":"string", - "_ddi_xpath":"docDscr/citation/verStmt/version/@date" + "version_date": { + "title": "Version Date", + "type": "string", + "_ddi_xpath": "docDscr/citation/verStmt/version/@date" }, - "version_resp":{ - "title":"Version Responsibility Statement", - "description":"The organization or person responsible for the version of the work", - "type":"string", - "_ddi_xpath":"docDscr/citation/verStmt/verResp" + "version_resp": { + "title": "Version Responsibility Statement", + "description": "The organization or person responsible for the version of the work", + "type": "string", + "_ddi_xpath": "docDscr/citation/verStmt/verResp" }, - "version_notes":{ - "title":"Version Notes", - "type":"string", - "_ddi_xpath":"docDscr/citation/verStmt/notes" + "version_notes": { + "title": "Version Notes", + "type": "string", + "_ddi_xpath": "docDscr/citation/verStmt/notes" } } } }, - "additionalProperties":false + "additionalProperties": false }, - "study_desc":{ - "type":"object", - "description":"Study Description", - "_ddi_xpath":"stdyDscr", - "properties":{ - "title_statement":{ - "type":"object", - "description":"Study title", - "_ddi_xpath":"stdyDscr/citation/titlStmt", - "properties":{ - "idno":{ - "type":"string", - "title":"Unique user defined ID", - "description":"The ID number of a dataset is a unique number that is used to identify a particular survey. Define and use a consistent scheme to use. Such an ID could be constructed as follows: country-producer-survey-year-version where \n - country is the 3-letter ISO country abbreviation \n - producer is the abbreviation of the producing agency \n - survey is the survey abbreviation \n - year is the reference year (or the year the survey started) \n - version is the number dataset version number (see Version Description below)", - "_ddi_xpath":"stdyDscr/citation/titlStmt/IDNo" + "study_desc": { + "type": "object", + "description": "Study Description", + "_ddi_xpath": "stdyDscr", + "properties": { + "title_statement": { + "type": "object", + "description": "Study title", + "_ddi_xpath": "stdyDscr/citation/titlStmt", + "properties": { + "idno": { + "type": "string", + "title": "Unique user defined ID", + "description": "The ID number of a dataset is a unique number that is used to identify a particular survey. Define and use a consistent scheme to use. Such an ID could be constructed as follows: country-producer-survey-year-version where \n - country is the 3-letter ISO country abbreviation \n - producer is the abbreviation of the producing agency \n - survey is the survey abbreviation \n - year is the reference year (or the year the survey started) \n - version is the number dataset version number (see Version Description below)", + "_ddi_xpath": "stdyDscr/citation/titlStmt/IDNo" }, - "identifiers":{ - "type":"array", - "title":"Other identifiers", - "description":"Other identifiers", - "items":{ - "type":"object", - "properties":{ - "type":{ - "title":"Identifier type", - "description":"Type of identifier e.g. `doi`, `handle`, `other`", - "type":"string" + "identifiers": { + "type": "array", + "title": "Other identifiers", + "description": "Other identifiers", + "items": { + "type": "object", + "properties": { + "type": { + "title": "Identifier type", + "description": "Type of identifier e.g. `doi`, `handle`, `other`", + "type": "string" }, - "identifier":{ - "title":"Identifier", - "type":"string" + "identifier": { + "title": "Identifier", + "type": "string" } }, - "required":[ + "required": [ "identifier" ] } }, - - "title":{ - "type":"string", - "title":"Survey title", - "description":"The title is the official name of the survey as it is stated on the questionnaire or as it appears in the design documents. The following items should be noted:\n - Include the reference year(s) of the survey in the title. \n - Do not include the abbreviation of the survey name in the title. \n - As the survey title is a proper noun, the first letter of each word should be capitalized (except for prepositions or other conjunctions).\n - Including the country name in the title is optional.", - "_ddi_xpath":"stdyDscr/citation/titlStmt/titl" + "title": { + "type": "string", + "title": "Survey title", + "description": "The title is the official name of the survey as it is stated on the questionnaire or as it appears in the design documents. The following items should be noted:\n - Include the reference year(s) of the survey in the title. \n - Do not include the abbreviation of the survey name in the title. \n - As the survey title is a proper noun, the first letter of each word should be capitalized (except for prepositions or other conjunctions).\n - Including the country name in the title is optional.", + "_ddi_xpath": "stdyDscr/citation/titlStmt/titl" }, - "sub_title":{ - "type":"string", - "title":"Survey subtitle", - "description":"A short subtitle for the survey", - "_ddi_xpath":"stdyDscr/citation/titlStmt/subTitl" + "sub_title": { + "type": "string", + "title": "Survey subtitle", + "description": "A short subtitle for the survey", + "_ddi_xpath": "stdyDscr/citation/titlStmt/subTitl" }, - "alternate_title":{ - "type":"string", - "title":"Abbreviation or Acronym", - "description":"The abbreviation of a survey is usually the first letter of each word of the titled survey. The survey reference year(s) may be included.", - "_ddi_xpath":"stdyDscr/citation/titlStmt/altTitl" + "alternate_title": { + "type": "string", + "title": "Abbreviation or Acronym", + "description": "The abbreviation of a survey is usually the first letter of each word of the titled survey. The survey reference year(s) may be included.", + "_ddi_xpath": "stdyDscr/citation/titlStmt/altTitl" }, - "translated_title":{ - "title":"Translated Title", - "description":"In countries with more than one official language, a translation of the title may be provided.", - "type":"string", - "_ddi_xpath":"stdyDscr/citation/titlStmt/parTitl" + "translated_title": { + "title": "Translated Title", + "description": "In countries with more than one official language, a translation of the title may be provided.", + "type": "string", + "_ddi_xpath": "stdyDscr/citation/titlStmt/parTitl" } }, - "required":[ + "required": [ "idno", "title" ] }, - "authoring_entity":{ - "type":"array", - "title":"Authoring entity/Primary investigators", - "description":"The person, corporate body, or agency responsible for the work's substantive and intellectual content. Repeat the element for each author, and use 'affiliation' attribute if available. Invert first and last name and use commas.", - "_ddi_xpath":"stdyDscr/citation/rspStmt/AuthEnty", - "items":{ - "type":"object", - "properties":{ - "name":{ - "title":"Agency Name", - "type":"string" + "authoring_entity": { + "type": "array", + "title": "Authoring entity/Primary investigators", + "description": "The person, corporate body, or agency responsible for the work's substantive and intellectual content. Repeat the element for each author, and use 'affiliation' attribute if available. Invert first and last name and use commas.", + "_ddi_xpath": "stdyDscr/citation/rspStmt/AuthEnty", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Agency Name", + "type": "string" }, - "affiliation":{ - "title":"Affiliation", - "type":"string" + "affiliation": { + "title": "Affiliation", + "type": "string" } }, - "required":[ + "required": [ "name" ] } }, - "oth_id":{ - "type":"array", - "title":"Other Identifications/Acknowledgments", - "description":"Acknowledge any other people and institutions that have in some form contributed to the survey", - "_ddi_xpath":"stdyDscr/citation/rspStmt/othId", - "items":{ - "type":"object", - "properties":{ - "name":{ - "title":"Name", - "description":"Person or Agency name", - "type":"string" + "oth_id": { + "type": "array", + "title": "Other Identifications/Acknowledgments", + "description": "Acknowledge any other people and institutions that have in some form contributed to the survey", + "_ddi_xpath": "stdyDscr/citation/rspStmt/othId", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "Person or Agency name", + "type": "string" }, - "role":{ - "title":"Role", - "type":"string" + "role": { + "title": "Role", + "type": "string" }, - "affiliation":{ - "title":"Affiliation", - "type":"string" + "affiliation": { + "title": "Affiliation", + "type": "string" } }, - "required":[ + "required": [ "name" ] } }, - "production_statement":{ - "type":"object", - "title":"Production Statement", - "description":"Production Statement", - "_ddi_xpath":"stdyDscr/citation/prodStmt", - "properties":{ - "producers":{ - "type":"array", - "title":"Producers", - "description":"List of producers", - "_ddi_xpath":"stdyDscr/citation/prodStmt/producer", - "items":{ - "type":"object", - "properties":{ - "name":{ - "title":"Name", - "description":"Name (required)", - "type":"string" + "production_statement": { + "type": "object", + "title": "Production Statement", + "description": "Production Statement", + "_ddi_xpath": "stdyDscr/citation/prodStmt", + "properties": { + "producers": { + "type": "array", + "title": "Producers", + "description": "List of producers", + "_ddi_xpath": "stdyDscr/citation/prodStmt/producer", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "Name (required)", + "type": "string" }, - "abbr":{ - "title":"Abbreviation", - "type":"string" + "abbr": { + "title": "Abbreviation", + "type": "string" }, - "affiliation":{ - "type":"string", - "title":"Affiliation" + "affiliation": { + "type": "string", + "title": "Affiliation" }, - "role":{ - "title":"Role", - "type":"string" + "role": { + "title": "Role", + "type": "string" } } }, - "required":[ + "required": [ "name" ] }, - "copyright":{ - "title":"Copyright", - "type":"string", - "_ddi_xpath":"stdyDscr/citation/prodStmt/copyright" + "copyright": { + "title": "Copyright", + "type": "string", + "_ddi_xpath": "stdyDscr/citation/prodStmt/copyright" }, - "prod_date":{ - "title":"Production Date", - "description":"Date when the marked-up document/marked-up document source/data collection/other material(s) were produced (not distributed or archived). The ISO standard for dates (YYYY-MM-DD) is recommended for use with the date attribute. Production date for data collection (2.1.3.3) maps to Dublin Core Date element.", - "type":"string", - "_ddi_xpath":"stdyDscr/citation/prodStmt/prodDate" + "prod_date": { + "title": "Production Date", + "description": "Date when the marked-up document/marked-up document source/data collection/other material(s) were produced (not distributed or archived). The ISO standard for dates (YYYY-MM-DD) is recommended for use with the date attribute. Production date for data collection (2.1.3.3) maps to Dublin Core Date element.", + "type": "string", + "_ddi_xpath": "stdyDscr/citation/prodStmt/prodDate" }, - "prod_place":{ - "title":"Production Place", - "description":"Address of the archive or organization that produced the work", - "type":"string", - "_ddi_xpath":"stdyDscr/citation/prodStmt/prodPlac" + "prod_place": { + "title": "Production Place", + "description": "Address of the archive or organization that produced the work", + "type": "string", + "_ddi_xpath": "stdyDscr/citation/prodStmt/prodPlac" }, - "funding_agencies":{ - "type":"array", - "title":"Funding Agency/Sponsor", - "description":"The source(s) of funds for production of the work. If different funding agencies sponsored different stages of the production process, use the 'role' attribute to distinguish them.", - "_ddi_xpath":"stdyDscr/citation/prodStmt/fundAg", - "items":{ - "type":"object", - "properties":{ - "name":{ - "title":"Funding Agency/Sponsor", - "type":"string" + "funding_agencies": { + "type": "array", + "title": "Funding Agency/Sponsor", + "description": "The source(s) of funds for production of the work. If different funding agencies sponsored different stages of the production process, use the 'role' attribute to distinguish them.", + "_ddi_xpath": "stdyDscr/citation/prodStmt/fundAg", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Funding Agency/Sponsor", + "type": "string" }, - "abbr":{ - "title":"Abbreviation", - "type":"string" + "abbr": { + "title": "Abbreviation", + "type": "string" }, - "grant":{ - "title":"Grant Number", - "type":"string", - "_ddi_xpath":"stdyDscr/citation/prodStmt/grantNo" + "grant": { + "title": "Grant Number", + "type": "string", + "_ddi_xpath": "stdyDscr/citation/prodStmt/grantNo" }, - "role":{ - "title":"Role", - "type":"string" + "role": { + "title": "Role", + "type": "string" } }, - "required":[ + "required": [ "name" ] } - } + } } }, - "distribution_statement":{ - "type":"object", - "title":"Distribution Statement", - "description":"Distribution Statement", - "_ddi_xpath":"stdyDscr/citation/distStmt", - "properties":{ - "distributors":{ - "type":"array", - "title":"Distributor", - "description":"The organization designated by the author or producer to generate copies of the particular work including any necessary editions or revisions. Names and addresses may be specified and other archives may be co-distributors. A URI attribute is included to provide an URN or URL to the ordering service or download facility on a Web site.", - "_ddi_xpath":"stdyDscr/citation/distStmt/distrbtr", - "items":{ - "type":"object", - "properties":{ - "name":{ - "title":"Organization name", - "description":"Organization name", - "type":"string" + "distribution_statement": { + "type": "object", + "title": "Distribution Statement", + "description": "Distribution Statement", + "_ddi_xpath": "stdyDscr/citation/distStmt", + "properties": { + "distributors": { + "type": "array", + "title": "Distributor", + "description": "The organization designated by the author or producer to generate copies of the particular work including any necessary editions or revisions. Names and addresses may be specified and other archives may be co-distributors. A URI attribute is included to provide an URN or URL to the ordering service or download facility on a Web site.", + "_ddi_xpath": "stdyDscr/citation/distStmt/distrbtr", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Organization name", + "description": "Organization name", + "type": "string" }, - "abbr":{ - "title":"Abbreviation", - "type":"string" + "abbr": { + "title": "Abbreviation", + "type": "string" + }, + "affiliation": { + "title": "Affiliation", + "type": "string" }, - "affiliation":{ - "title":"Affiliation", - "type":"string" + "uri": { + "title": "URI", + "type": "string" } }, - "required":[ + "required": [ "name" ] } }, - "contact":{ - "type":"array", - "title":"Contact", - "description":"Contact", - "_ddi_xpath":"stdyDscr/citation/distStmt/contact", - "items":{ - "type":"object", - "properties":{ - "name":{ - "title":"Name", - "type":"string" + "contact": { + "type": "array", + "title": "Contact", + "description": "Contact", + "_ddi_xpath": "stdyDscr/citation/distStmt/contact", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string" }, - "affiliation":{ - "title":"Affiliation", - "type":"string" + "affiliation": { + "title": "Affiliation", + "type": "string" + }, + "email": { + "title": "Email", + "type": "string" }, - "email":{ - "title":"Email", - "type":"string" + "uri": { + "title": "URI", + "type": "string" } } }, - "required":[ + "required": [ "name" ] }, - "depositor":{ - "type":"array", - "title":"Depositor", - "description":"Depositor", - "_ddi_xpath":"stdyDscr/citation/distStmt/depositr", - "items":{ - "type":"object", - "properties":{ - "name":{ - "title":"Name", - "type":"string" + "depositor": { + "type": "array", + "title": "Depositor", + "description": "Depositor", + "_ddi_xpath": "stdyDscr/citation/distStmt/depositr", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string" }, - "abbr":{ - "title":"Abbreviation", - "type":"string" + "abbr": { + "title": "Abbreviation", + "type": "string" }, - "affiliation":{ - "title":"Affiliation", - "type":"string" + "affiliation": { + "title": "Affiliation", + "type": "string" + }, + "uri": { + "title": "URI", + "type": "string" } } }, - "required":[ + "required": [ "name" ] }, - "deposit_date":{ - "title":"Date of Deposit", - "type":"string", - "_ddi_xpath":"stdyDscr/citation/distStmt/depDate" + "deposit_date": { + "title": "Date of Deposit", + "type": "string", + "_ddi_xpath": "stdyDscr/citation/distStmt/depDate" }, - "distribution_date":{ - "title":"Date of Distribution", - "type":"string", - "_ddi_xpath":"stdyDscr/citation/distStmt/distDate" + "distribution_date": { + "title": "Date of Distribution", + "type": "string", + "_ddi_xpath": "stdyDscr/citation/distStmt/distDate" } } }, - "series_statement":{ - "type":"object", - "title":"Series Statement", - "description":"Series Statement", - "_ddi_xpath":"stdyDscr/citation/serStmt", - "properties":{ - "series_name":{ - "title":"Series Name", - "description":"The name of the series to which the work belongs.", - "type":"string", - "_ddi_xpath":"stdyDscr/citation/serStmt/serName" + "series_statement": { + "type": "object", + "title": "Series Statement", + "description": "Series Statement", + "_ddi_xpath": "stdyDscr/citation/serStmt", + "properties": { + "series_name": { + "title": "Series Name", + "description": "The name of the series to which the work belongs.", + "type": "string", + "_ddi_xpath": "stdyDscr/citation/serStmt/serName" }, - "series_info":{ - "title":"Series Information", - "description":"A survey may be repeated at regular intervals (such as an annual labour force survey), or be part of an international survey program (such as the MICS, CWIQ, DHS, LSMS and others). The Series information is a description of this `collection` of surveys. A brief description of the characteristics of the survey, including when it started, how many rounds were already implemented, and who is in charge would be provided here.", - "type":"string", - "_ddi_xpath":"stdyDscr/citation/serStmt/serInfo" + "series_info": { + "title": "Series Information", + "description": "A survey may be repeated at regular intervals (such as an annual labour force survey), or be part of an international survey program (such as the MICS, CWIQ, DHS, LSMS and others). The Series information is a description of this `collection` of surveys. A brief description of the characteristics of the survey, including when it started, how many rounds were already implemented, and who is in charge would be provided here.", + "type": "string", + "_ddi_xpath": "stdyDscr/citation/serStmt/serInfo" } } }, - "version_statement":{ - "type":"object", - "title":"Version Statement", - "description":"Version Statement", - "_ddi_xpath":"stdyDscr/citation/verStmt", - "properties":{ - "version":{ - "title":"Version", - "type":"string", - "_ddi_xpath":"stdyDscr/citation/verStmt/version" + "version_statement": { + "type": "object", + "title": "Version Statement", + "description": "Version Statement", + "_ddi_xpath": "stdyDscr/citation/verStmt", + "properties": { + "version": { + "title": "Version", + "type": "string", + "_ddi_xpath": "stdyDscr/citation/verStmt/version" }, - "version_date":{ - "title":"Version Date", - "type":"string", - "_ddi_xpath":"stdyDscr/citation/verStmt/version/@date" + "version_date": { + "title": "Version Date", + "type": "string", + "_ddi_xpath": "stdyDscr/citation/verStmt/version/@date" }, - "version_resp":{ - "title":"Version Responsibility Statement", - "description":"The organization or person responsible for the version of the work", - "type":"string", - "_ddi_xpath":"stdyDscr/citation/verStmt/verResp" + "version_resp": { + "title": "Version Responsibility Statement", + "description": "The organization or person responsible for the version of the work", + "type": "string", + "_ddi_xpath": "stdyDscr/citation/verStmt/verResp" }, - "version_notes":{ - "title":"Version Notes", - "type":"string", - "_ddi_xpath":"stdyDscr/citation/verStmt/notes" + "version_notes": { + "title": "Version Notes", + "type": "string", + "_ddi_xpath": "stdyDscr/citation/verStmt/notes" } } }, - "bib_citation":{ - "type":"string", - "title":"Bibliographic Citation", - "description":"Complete bibliographic reference containing all of the standard elements of a citation that can be used to cite the work. The `'bib_citation_format'` field is provided to enable specification of the particular citation style used, e.g., APA, MLA, Chicago, etc.", - "_ddi_xpath":"stdyDscr/citation/biblCit" + "bib_citation": { + "type": "string", + "title": "Bibliographic Citation", + "description": "Complete bibliographic reference containing all of the standard elements of a citation that can be used to cite the work. The `'bib_citation_format'` field is provided to enable specification of the particular citation style used, e.g., APA, MLA, Chicago, etc.", + "_ddi_xpath": "stdyDscr/citation/biblCit" }, - "bib_citation_format":{ - "type":"string", - "title":"Bibliographic Citation Format", - "description":"Specification of the particular citation style used, e.g., `APA`, `MLA`, `Chicago`, etc.", - "_ddi_xpath":"stdyDscr/citation/biblCit/@format" + "bib_citation_format": { + "type": "string", + "title": "Bibliographic Citation Format", + "description": "Specification of the particular citation style used, e.g., `APA`, `MLA`, `Chicago`, etc.", + "_ddi_xpath": "stdyDscr/citation/biblCit/@format" }, - "holdings":{ - "type":"array", - "title":"Holdings Information", - "description":"Information concerning either the physical or electronic holdings of the cited work. Attributes include: location--The physical location where a copy is held; callno--The call number for a work at the location specified; and URI--A URN or URL for accessing the electronic copy of the cited work.", - "_ddi_xpath":"stdyDscr/citation/holdings", - "items":{ - "type":"object", - "properties":{ - "name":{ - "title":"Name", - "type":"string" + "holdings": { + "type": "array", + "title": "Holdings Information", + "description": "Information concerning either the physical or electronic holdings of the cited work. Attributes include: location--The physical location where a copy is held; callno--The call number for a work at the location specified; and URI--A URN or URL for accessing the electronic copy of the cited work.", + "_ddi_xpath": "stdyDscr/citation/holdings", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string" }, - "location":{ - "title":"Location", - "type":"string" + "location": { + "title": "Location", + "type": "string" }, - "callno":{ - "title":"Callno", - "type":"string" + "callno": { + "title": "Callno", + "type": "string" }, - "uri":{ - "title":"URI", - "type":"string" + "uri": { + "title": "URI", + "type": "string" } } }, - "required":[ + "required": [ "name" ] }, - "study_notes":{ - "title":"Study notes", - "type":"string", - "_ddi_xpath":"stdyDscr/citation/notes" + "study_notes": { + "title": "Study notes", + "type": "string", + "_ddi_xpath": "stdyDscr/citation/notes" }, - "study_authorization":{ - "type":"object", - "title":"Study Authorization", - "_ddi_xpath":"stdyDscr/studyAuthorization", - "description":"Provides structured information on the agency that authorized the study, the date of authorization, and an authorization statement", - "properties":{ - "date":{ - "title":"Authorization Date", - "type":"string", - "_ddi_xpath":"stdyDscr/studyAuthorization/@date" + "study_authorization": { + "type": "object", + "title": "Study Authorization", + "_ddi_xpath": "stdyDscr/studyAuthorization", + "description": "Provides structured information on the agency that authorized the study, the date of authorization, and an authorization statement", + "properties": { + "date": { + "title": "Authorization Date", + "type": "string", + "_ddi_xpath": "stdyDscr/studyAuthorization/@date" }, - "agency":{ - "type":"array", - "title":"Authorizing Agency", - "description":"The source(s) of funds for production of the work. If different funding agencies sponsored different stages of the production process, use the 'role' attribute to distinguish them.", - "_ddi_xpath":"stdyDscr/studyAuthorization/authorizingAgency", - "items":{ - "type":"object", - "properties":{ - "name":{ - "title":"Funding Agency/Sponsor", - "type":"string" + "agency": { + "type": "array", + "title": "Authorizing Agency", + "description": "The source(s) of funds for production of the work. If different funding agencies sponsored different stages of the production process, use the 'role' attribute to distinguish them.", + "_ddi_xpath": "stdyDscr/studyAuthorization/authorizingAgency", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Funding Agency/Sponsor", + "type": "string" }, - "affiliation":{ - "title":"Affiliation", - "type":"string" + "affiliation": { + "title": "Affiliation", + "type": "string" }, - "abbr":{ - "title":"Abbreviation", - "type":"string" + "abbr": { + "title": "Abbreviation", + "type": "string" } }, - "required":[ + "required": [ "name" ] } }, - "authorization_statement":{ - "title":"Authorization Statement", - "description":"Authorization Statement", - "_ddi_xpath":"stdyDscr/studyAuthorization/authorizationStatement", - "type":"string" + "authorization_statement": { + "title": "Authorization Statement", + "description": "Authorization Statement", + "_ddi_xpath": "stdyDscr/studyAuthorization/authorizationStatement", + "type": "string" } } }, - "study_info":{ - "type":"object", - "title":"Study Scope", - "description":"This section contains information about the data collection's scope across several dimensions, including substantive content, geography, and time.", - "_ddi_xpath":"stdyDscr/stdyInfo", - "properties":{ - "study_budget":{ - "title":"Study Budget", - "description":"Provide a clear summary of the pDescribe the budget of the project in as much detail as needed. Use XHTML structure elements to identify discrete pieces of information in a way that facilitates direct transfer of information on the study budget between DDI 2 and DDI 3 structures.urposes, objectives and content of the survey", - "type":"string", - "_ddi_xpath":"stdyDscr/stdyInfo/studyBudget" + "study_info": { + "type": "object", + "title": "Study Scope", + "description": "This section contains information about the data collection's scope across several dimensions, including substantive content, geography, and time.", + "_ddi_xpath": "stdyDscr/stdyInfo", + "properties": { + "study_budget": { + "title": "Study Budget", + "description": "Provide a clear summary of the pDescribe the budget of the project in as much detail as needed. Use XHTML structure elements to identify discrete pieces of information in a way that facilitates direct transfer of information on the study budget between DDI 2 and DDI 3 structures.urposes, objectives and content of the survey", + "type": "string", + "_ddi_xpath": "stdyDscr/stdyInfo/studyBudget" }, - "keywords":{ - "type":"array", - "description":"Keywords", - "_ddi_xpath":"stdyDscr/stdyInfo/subject/keywords", - "items":{ - "type":"object", - "properties":{ - "keyword":{ - "title":"Keyword", - "type":"string" + "keywords": { + "type": "array", + "description": "Keywords", + "_ddi_xpath": "stdyDscr/stdyInfo/subject/keywords", + "items": { + "type": "object", + "properties": { + "keyword": { + "title": "Keyword", + "type": "string" }, - "vocab":{ - "title":"Vocabulary", - "type":"string" + "vocab": { + "title": "Vocabulary", + "type": "string" }, - "uri":{ - "title":"uri", - "type":"string" - } + "uri": { + "title": "uri", + "type": "string" + } } } }, - "topics":{ - "type":"array", - "title":"Topic Classification", - "description":"Topic Classification", - "_ddi_xpath":"stdyDscr/stdyInfo/subject/topcClas", - "items":{ - "type":"object", - "properties":{ - "topic":{ - "title":"Topic", - "type":"string" + "topics": { + "type": "array", + "title": "Topic Classification", + "description": "Topic Classification", + "_ddi_xpath": "stdyDscr/stdyInfo/subject/topcClas", + "items": { + "type": "object", + "properties": { + "topic": { + "title": "Topic", + "type": "string" }, - "vocab":{ - "title":"Vocab", - "type":"string" + "vocab": { + "title": "Vocab", + "type": "string" }, - "uri":{ - "title":"URI", - "type":"string" + "uri": { + "title": "URI", + "type": "string" } }, - "required":[ + "required": [ "topic" ] } }, - "abstract":{ - "title":"Abstract", - "description":"Provide a clear summary of the purposes, objectives and content of the survey", - "type":"string", - "_ddi_xpath":"stdyDscr/stdyInfo/abstract" + "abstract": { + "title": "Abstract", + "description": "Provide a clear summary of the purposes, objectives and content of the survey", + "type": "string", + "_ddi_xpath": "stdyDscr/stdyInfo/abstract" }, - "time_periods":{ - "type":"array", - "title":"Time periods (YYYY/MM/DD)", - "description":"This field will usually be left empty. Time period differs from the dates of collection as they represent the period for which the data collected are applicable or relevant.", - "_ddi_xpath":"stdyDscr/stdyInfo/sumDscr/timePrd", - "items":{ - "type":"object", - "properties":{ - "start":{ - "title":"Start date", - "description":"Start date", - "type":"string" + "time_periods": { + "type": "array", + "title": "Time periods (YYYY/MM/DD)", + "description": "This field will usually be left empty. Time period differs from the dates of collection as they represent the period for which the data collected are applicable or relevant.", + "_ddi_xpath": "stdyDscr/stdyInfo/sumDscr/timePrd", + "items": { + "type": "object", + "properties": { + "start": { + "title": "Start date", + "description": "Start date", + "type": "string" }, - "end":{ - "title":"End date", - "description":"End date", - "type":"string" + "end": { + "title": "End date", + "description": "End date", + "type": "string" }, - "cycle":{ - "title":"Cycle", - "description":"Cycle", - "type":"string" + "cycle": { + "title": "Cycle", + "description": "Cycle", + "type": "string" } }, - "required":[ + "required": [ "start" ] } }, - "coll_dates":{ - "type":"array", - "title":"Dates of Data Collection (YYYY/MM/DD)", - "description":"Enter the dates (at least month and year) of the start and end of the data collection. In some cases, data collection for a same survey can be conducted in waves. In such case, you should enter the start and end date of each wave separately, and identify each wave in the 'cycle' field.", - "_ddi_xpath":"stdyDscr/stdyInfo/sumDscr/collDate", - "items":{ - "type":"object", - "properties":{ - "start":{ - "title":"Start date", - "description":"Start date", - "type":"string" + "coll_dates": { + "type": "array", + "title": "Dates of Data Collection (YYYY/MM/DD)", + "description": "Enter the dates (at least month and year) of the start and end of the data collection. In some cases, data collection for a same survey can be conducted in waves. In such case, you should enter the start and end date of each wave separately, and identify each wave in the 'cycle' field.", + "_ddi_xpath": "stdyDscr/stdyInfo/sumDscr/collDate", + "items": { + "type": "object", + "properties": { + "start": { + "title": "Start date", + "description": "Start date", + "type": "string" }, - "end":{ - "title":"End date", - "description":"End date", - "type":"string" + "end": { + "title": "End date", + "description": "End date", + "type": "string" }, - "cycle":{ - "title":"Cycle", - "description":"Cycle", - "type":"string" + "cycle": { + "title": "Cycle", + "description": "Cycle", + "type": "string" } }, - "required":[ + "required": [ "start" ] } }, - "nation":{ - "title":"Country", - "description":"Indicates the country or countries covered in the file. Field `abbreviation` may be used to list common abbreviations; use of ISO country codes is recommended. Maps to Dublin Core Coverage element. Inclusion of this element is recommended.", - "_ddi_xpath":"stdyDscr/stdyInfo/sumDscr/nation", - "type":"array", - "items":{ - "type":"object", - "properties":{ - "name":{ - "title":"Name", - "description":"Country name", - "type":"string" + "nation": { + "title": "Country", + "description": "Indicates the country or countries covered in the file. Field `abbreviation` may be used to list common abbreviations; use of ISO country codes is recommended. Maps to Dublin Core Coverage element. Inclusion of this element is recommended.", + "_ddi_xpath": "stdyDscr/stdyInfo/sumDscr/nation", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "Country name", + "type": "string" }, - "abbreviation":{ - "title":"Country code", - "description":"Country ISO code", - "type":"string" + "abbreviation": { + "title": "Country code", + "description": "Country ISO code", + "type": "string" } }, - "required":[ + "required": [ "name" ] } }, - "bbox":{ - "title":"Geographic bounding box", - "type":"array", - "_ddi_xpath":"stdyDscr/sumDscr/geoBndBox", - "items":{ - "type":"object", - "properties":{ - "west":{ - "title":"West", - "type":"string" + "bbox": { + "title": "Geographic bounding box", + "type": "array", + "_ddi_xpath": "stdyDscr/sumDscr/geoBndBox", + "items": { + "type": "object", + "properties": { + "west": { + "title": "West", + "type": "string" }, - "east":{ - "title":"East", - "type":"string" + "east": { + "title": "East", + "type": "string" }, - "south":{ - "title":"South", - "type":"string" + "south": { + "title": "South", + "type": "string" }, - "north":{ - "title":"North", - "type":"string" + "north": { + "title": "North", + "type": "string" } } } }, - "bound_poly":{ - "title":"Geographic Bounding Polygon", - "description":"This field allows the creation of multiple polygons to describe in a more detailed manner the geographic area covered by the dataset. It should only be used to define the outer boundaries of a covered area. For example, in the United States, such polygons can be created to define boundaries for Hawaii, Alaska, and the continental United States, but not interior boundaries for the contiguous states. This field is used to refine a coordinate-based search, not to actually map an area. \nIf the boundPoly element is used, then geoBndBox MUST be present, and all points enclosed by the boundPoly MUST be contained within the geoBndBox. Elements westBL, eastBL, southBL, and northBL of the geoBndBox should each be represented in at least one point of the boundPoly description.", - "type":"array", - "_ddi_xpath":"stdyDscr/sumDscr/boundPoly", - "items":{ - "type":"object", - "properties":{ - "lat":{ - "title":"Latitude", - "description":"Latitude (y coordinate) of a point. Valid range expressed in decimal degrees is as follows: -90,0 to 90,0 degrees (latitude)", - "type":"string" + "bound_poly": { + "title": "Geographic Bounding Polygon", + "description": "This field allows the creation of multiple polygons to describe in a more detailed manner the geographic area covered by the dataset. It should only be used to define the outer boundaries of a covered area. For example, in the United States, such polygons can be created to define boundaries for Hawaii, Alaska, and the continental United States, but not interior boundaries for the contiguous states. This field is used to refine a coordinate-based search, not to actually map an area. \nIf the boundPoly element is used, then geoBndBox MUST be present, and all points enclosed by the boundPoly MUST be contained within the geoBndBox. Elements westBL, eastBL, southBL, and northBL of the geoBndBox should each be represented in at least one point of the boundPoly description.", + "type": "array", + "_ddi_xpath": "stdyDscr/sumDscr/boundPoly", + "items": { + "type": "object", + "properties": { + "lat": { + "title": "Latitude", + "description": "Latitude (y coordinate) of a point. Valid range expressed in decimal degrees is as follows: -90,0 to 90,0 degrees (latitude)", + "type": "string" }, - "lon":{ - "title":"longitude", - "description":"Longitude (x coordinate) of a point. Valid range expressed in decimal degrees is as follows: -180,0 to 180,0 degrees (longitude)", - "type":"string" + "lon": { + "title": "longitude", + "description": "Longitude (x coordinate) of a point. Valid range expressed in decimal degrees is as follows: -180,0 to 180,0 degrees (longitude)", + "type": "string" } } } }, - "geog_coverage":{ - "description":" Information on the geographic coverage of the data. Includes the total geographic scope of the data, and any additional levels of geographic coding provided in the variables. Maps to Dublin Core Coverage element. Inclusion of this element in the codebook is recommended.", - "title":"Geographic Coverage", - "type":"string", - "_ddi_xpath":"stdyDscr/stdyInfo/sumDscr/geogCover" + "geog_coverage": { + "description": " Information on the geographic coverage of the data. Includes the total geographic scope of the data, and any additional levels of geographic coding provided in the variables. Maps to Dublin Core Coverage element. Inclusion of this element in the codebook is recommended.", + "title": "Geographic Coverage", + "type": "string", + "_ddi_xpath": "stdyDscr/stdyInfo/sumDscr/geogCover" }, - "geog_coverage_notes":{ - "description":"Geographic coverage notes", - "title":"Geographic Coverage notes", - "type":"string", - "_ddi_xpath":"stdyDscr/sumDscr/geogCover/txt" + "geog_coverage_notes": { + "description": "Geographic coverage notes", + "title": "Geographic Coverage notes", + "type": "string", + "_ddi_xpath": "stdyDscr/sumDscr/geogCover/txt" }, - "geog_unit":{ - "title":"Geographic Unit", - "description":"Lowest level of geographic aggregation covered by the data", - "type":"string", - "_ddi_xpath":"stdyDscr/stdyInfo/sumDscr/geogUnit" + "geog_unit": { + "title": "Geographic Unit", + "description": "Lowest level of geographic aggregation covered by the data", + "type": "string", + "_ddi_xpath": "stdyDscr/stdyInfo/sumDscr/geogUnit" }, - "analysis_unit":{ - "title":"Unit of Analysis", - "description":"Basic unit(s) of analysis or observation that the study describes: individuals, families/households, groups, facilities, institutions/organizations, administrative units, physical locations, etc.", - "type":"string", - "_ddi_xpath":"stdyDscr/stdyInfo/sumDscr/anlyUnit" + "analysis_unit": { + "title": "Unit of Analysis", + "description": "Basic unit(s) of analysis or observation that the study describes: individuals, families/households, groups, facilities, institutions/organizations, administrative units, physical locations, etc.", + "type": "string", + "_ddi_xpath": "stdyDscr/stdyInfo/sumDscr/anlyUnit" }, - "universe":{ - "title":"Universe", - "description":"We are interested here in the survey universe (not the universe of particular sections of the questionnaires or variables), i.e. in the identification of the population of interest in the survey. The universe will rarely be the entire population of the country. Sample household surveys, for example, usually do not cover homeless, nomads, diplomats, community households. Some surveys may cover only the population of a particular age group, or only male (or female), etc.", - "type":"string", - "_ddi_xpath":"stdyDscr/stdyInfo/sumDscr/universe" + "universe": { + "title": "Universe", + "description": "We are interested here in the survey universe (not the universe of particular sections of the questionnaires or variables), i.e. in the identification of the population of interest in the survey. The universe will rarely be the entire population of the country. Sample household surveys, for example, usually do not cover homeless, nomads, diplomats, community households. Some surveys may cover only the population of a particular age group, or only male (or female), etc.", + "type": "string", + "_ddi_xpath": "stdyDscr/stdyInfo/sumDscr/universe" }, - "data_kind":{ - "title":"Kind of Data", - "description":"Broad classification of the data", - "type":"string", - "_ddi_xpath":"stdyDscr/stdyInfo/sumDscr/dataKind", - "enum_":[ + "data_kind": { + "title": "Kind of Data", + "description": "Broad classification of the data", + "type": "string", + "_ddi_xpath": "stdyDscr/stdyInfo/sumDscr/dataKind", + "enum_": [ "Sample survey data[ssd]", "Census/enumeration data[cen]", "Administrative records data[adm]", @@ -773,383 +784,408 @@ "Observation data/ratings[obs]" ] }, - "notes":{ - "title":"Study notes", - "description":"Study notes", - "type":"string", - "_ddi_xpath":"stdyDscr/stdyInfo/notes" + "notes": { + "title": "Study notes", + "description": "Study notes", + "type": "string", + "_ddi_xpath": "stdyDscr/stdyInfo/notes" }, - "quality_statement":{ - "title":"Quality Statement", - "description":"This structure consists of two parts, standardsCompliance and otherQualityStatements. In standardsCompliance list all specific standards complied with during the execution of this study. Note the standard name and producer and how the study complied with the standard. Enter any additional quality statements in otherQualityStatements.", - "type":"object", - "_ddi_xpath":"stdyDscr/stdyInfo/qualityStatement", - "_comments":"TODO: not clear if this should be repeatable.", - "properties":{ - "standard_name":{ - "title":"Standard name", - "type":"string", - "_ddi_xpath":"stdyDscr/stdyInfo/qualityStatement/standardsCompliance/standard/standardName" - }, - "standard_producer":{ - "title":"Standard producer", - "type":"string", - "_ddi_xpath":"stdyDscr/stdyInfo/qualityStatement/standardsCompliance/standard/producer" + "quality_statement": { + "title": "Quality Statement", + "description": "The quality statement provides elements to describe compliance with quality standards in the form of a statement and an itemized list of standards complied with, and an element to provide other quality statement.", + "type": "object", + "_ddi_xpath": "stdyDscr/stdyInfo/qualityStatement", + "_comments": "TODO: not clear if this should be repeatable.", + "properties": { + "compliance_description": { + "title": "Standard compliance description", + "type": "string", + "_ddi_xpath": "stdyDscr/stdyInfo/qualityStatement/standardsCompliance/complianceDescription" }, - "standard_compliance_desc":{ - "title":"Standard compliance description", - "type":"string", - "_ddi_xpath":"stdyDscr/stdyInfo/qualityStatement/standardsCompliance/complianceDescription" + "standards": { + "type": "array", + "title": "Standards", + "description": "Standards", + "_ddi_xpath": "stdyDscr/stdyInfo/qualityStatement/standardsCompliance/standard", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string" + }, + "producer": { + "title": "Producer", + "type": "string" + } + } + }, + "required": [ + "name" + ] }, - "other_quality_statement":{ - "title":"Other quality statement", - "type":"string", - "_ddi_xpath":"stdyDscr/stdyInfo/qualityStatement/otherQualityStatement" + "other_quality_statement": { + "title": "Other quality statement", + "type": "string", + "_ddi_xpath": "stdyDscr/stdyInfo/qualityStatement/otherQualityStatement" } } - }, - "ex_post_evaluation":{ - "title":"Ex-Post Evaluation", - "description":"This structure consists of two parts, standardsCompliance and otherQualityStatements. In standardsCompliance list all specific standards complied with during the execution of this study. Note the standard name and producer and how the study complied with the standard. Enter any additional quality statements in otherQualityStatements.", - "type":"object", - "_ddi_xpath":"stdyDscr/stdyInfo/exPostEvaluation", - "_comments":"TODO: not clear if this should be repeatable.", - "properties":{ - "completion_date":{ - "title":"Evaluation completion date", - "type":"string", - "_ddi_xpath":"stdyDscr/stdyInfo/exPostEvaluation/@completionDate" + }, + "ex_post_evaluation": { + "title": "Ex-Post Evaluation", + "description": "This structure consists of two parts, standardsCompliance and otherQualityStatements. In standardsCompliance list all specific standards complied with during the execution of this study. Note the standard name and producer and how the study complied with the standard. Enter any additional quality statements in otherQualityStatements.", + "type": "object", + "_ddi_xpath": "stdyDscr/stdyInfo/exPostEvaluation", + "_comments": "TODO: not clear if this should be repeatable.", + "properties": { + "completion_date": { + "title": "Evaluation completion date", + "type": "string", + "_ddi_xpath": "stdyDscr/stdyInfo/exPostEvaluation/@completionDate" }, - "type":{ - "title":"Evaluation type", - "type":"string", - "_ddi_xpath":"stdyDscr/stdyInfo/@type" + "type": { + "title": "Evaluation type", + "type": "string", + "_ddi_xpath": "stdyDscr/stdyInfo/@type" }, - "evaluator":{ - "type":"array", - "title":"Evaluators", - "description":"Evaluators", - "_ddi_xpath":"stdyDscr/stdyInfo/exPostEvaluation/evaluator", - "items":{ - "type":"object", - "properties":{ - "name":{ - "title":"Funding Agency/Sponsor", - "type":"string" + "evaluator": { + "type": "array", + "title": "Evaluators", + "description": "Evaluators", + "_ddi_xpath": "stdyDscr/stdyInfo/exPostEvaluation/evaluator", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Funding Agency/Sponsor", + "type": "string" }, - "affiliation":{ - "title":"Affiliation", - "type":"string" + "affiliation": { + "title": "Affiliation", + "type": "string" }, - "abbr":{ - "title":"Abbreviation", - "type":"string" - }, - "role":{ - "title":"Role", - "type":"string" + "abbr": { + "title": "Abbreviation", + "type": "string" + }, + "role": { + "title": "Role", + "type": "string" } }, - "required":[ + "required": [ "name" ] } }, - "evaluation_process":{ - "title":"Evaluation process", - "type":"string", - "_ddi_xpath":"stdyDscr/stdyInfo/exPostEvaluation/evaluationProcess" + "evaluation_process": { + "title": "Evaluation process", + "type": "string", + "_ddi_xpath": "stdyDscr/stdyInfo/exPostEvaluation/evaluationProcess" }, - "outcomes":{ - "title":"Outcomes", - "type":"string", - "_ddi_xpath":"stdyDscr/stdyInfo/exPostEvaluation/outcomes" + "outcomes": { + "title": "Outcomes", + "type": "string", + "_ddi_xpath": "stdyDscr/stdyInfo/exPostEvaluation/outcomes" } } } }, - "required":[ + "required": [ "nation" ] }, - "study_development":{ - "title":"Study Development", - "description":"Describe the process of study development as a series of development activities. These activities can be typed using a controlled vocabulary. Describe the activity, listing participants with their role and affiliation, resources used (sources of information), and the outcome of the development activity.", - "type":"object", - "_ddi_xpath":"stdyDscr/studyDevelopment", - "properties":{ - "activity_type":{ - "title":"Development activity type", - "type":"string", - "_ddi_xpath":"stdyDscr/studyDevelopment/developmentActivity/@type" - }, - "activity_description":{ - "title":"Development activity description", - "type":"string", - "_ddi_xpath":"stdyDscr/studyDevelopment/developmentActivity/description" - }, - "participants":{ - "type":"array", - "title":"Participants", - "description":"Participants", - "_ddi_xpath":"stdyDscr/studyDevelopment/developmentActivity/participant", - "items":{ - "type":"object", - "properties":{ - "name":{ - "title":"Participant name", - "type":"string" + "study_development": { + "title": "Study Development", + "description": "Describe the process of study development as a series of development activities. These activities can be typed using a controlled vocabulary. Describe the activity, listing participants with their role and affiliation, resources used (sources of information), and the outcome of the development activity.", + "type": "object", + "_ddi_xpath": "stdyDscr/studyDevelopment", + "properties": { + "development_activity": { + "type": "array", + "title": "Development activity", + "_ddi_xpath": "stdyDscr/studyDevelopment/developmentActivity", + "items": { + "type": "object", + "properties": { + "activity_type": { + "title": "Development activity type", + "type": "string", + "_ddi_xpath": "stdyDscr/studyDevelopment/developmentActivity/@type" }, - "affiliation":{ - "title":"Affiliation", - "type":"string" + "activity_description": { + "title": "Development activity description", + "type": "string", + "_ddi_xpath": "stdyDscr/studyDevelopment/developmentActivity/description" }, - "role":{ - "title":"Role", - "type":"string" - } - }, - "required":[ - "name" - ] - } - }, - "resource":{ - "type":"object", - "title":"Development activity resource", - "description":"Development activity resource", - "_ddi_xpath":"stdyDscr/studyDevelopment/developmentActivity/resource", - "properties":{ - "data_source":{ - "title":"Data source", - "_ddi_xpath":"stdyDscr/studyDevelopment/developmentActivity/resource/dataSrc", - "type":"array", - "items":{ - "type":"object", - "properties":{ - "source":{ - "title":"Source", - "type":"string" - } + "participants": { + "type": "array", + "title": "Participants", + "description": "Participants", + "_ddi_xpath": "stdyDscr/studyDevelopment/developmentActivity/participant", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Participant name", + "type": "string" + }, + "affiliation": { + "title": "Affiliation", + "type": "string" + }, + "role": { + "title": "Role", + "type": "string" + } + }, + "required": [ + "name" + ] } + }, + "resources": { + "type": "array", + "title": "Development activity resources", + "description": "Development activity resources", + "_ddi_xpath": "stdyDscr/studyDevelopment/developmentActivity/resource", + "items":{ + "type":"object", + "properties":{ + "name": { + "type": "string", + "title": "Resource name", + "description": "Name of the resource" + }, + "origin": { + "type": "string", + "title": "Origin of resource", + "description": "For historical materials, information about the origin(s) of the sources and the rules followed in establishing the sources should be specified. May not be relevant to survey data. ", + "_ddi_xpath": "stdyDscr/studyDevelopment/developmentActivity/resource/srcOrig" + }, + "characteristics": { + "type": "string", + "title": "Characteristics of resource", + "description": "Assessment of characteristics and quality of source material. May not be relevant to survey data.", + "_ddi_xpath": "stdyDscr/studyDevelopment/developmentActivity/resource/srcChar" + } + } + } + }, + "outcome": { + "title": "Development Activity Outcome", + "description": "Development Activity Outcome", + "type": "string", + "_ddi_xpath": "stdyDscr/studyDevelopment/developmentActivity/outcome" } - }, - "source_origin":{ - "type":"string", - "title":"Origin of Source", - "description":"For historical materials, information about the origin(s) of the sources and the rules followed in establishing the sources should be specified. May not be relevant to survey data. ", - "_ddi_xpath":"stdyDscr/studyDevelopment/developmentActivity/resource/srcOrig" - }, - "source_char":{ - "type":"string", - "title":"Characteristics of Source Noted", - "description":"Assessment of characteristics and quality of source material. May not be relevant to survey data.", - "_ddi_xpath":"stdyDscr/studyDevelopment/developmentActivity/resource/srcChar" } } - }, - "outcome":{ - "title":"Development Activity Outcome", - "description":"Development Activity Outcome", - "type":"string", - "_ddi_xpath":"stdyDscr/studyDevelopment/developmentActivity/outcome" } } }, - "method":{ - "type":"object", - "title":"Methodology and Processing", - "description":"Methodology and processing", - "_ddi_xpath":"stdyDscr/method", - "properties":{ - "data_collection":{ - "type":"object", - "title":"Data Collection", - "_ddi_xpath":"stdyDscr/method/dataColl", - "description":"Information about the methodology employed in a data collection", - "properties":{ - "time_method":{ - "title":"Time Method", - "description":"The time method or time dimension of the data collection. Examples: `panel survey`, `h>cross-section`, `trend study`, `time-series`", - "type":"string", - "_ddi_xpath":"stdyDscr/method/dataColl/timeMeth" + "method": { + "type": "object", + "title": "Methodology and Processing", + "description": "Methodology and processing", + "_ddi_xpath": "stdyDscr/method", + "properties": { + "data_collection": { + "type": "object", + "title": "Data Collection", + "_ddi_xpath": "stdyDscr/method/dataColl", + "description": "Information about the methodology employed in a data collection", + "properties": { + "time_method": { + "title": "Time Method", + "description": "The time method or time dimension of the data collection. Examples: `panel survey`, `h>cross-section`, `trend study`, `time-series`", + "type": "string", + "_ddi_xpath": "stdyDscr/method/dataColl/timeMeth" }, - "data_collectors":{ - "title":"Data Collectors", - "description":"The persons and/or agencies that took charge of the data collection. This element includes 3 fields: Name, Abbreviation and the Affiliation. In most cases, we will record here the name of the agency, not the name of interviewers. Only in the case of very small-scale surveys, with a very limited number of interviewers, the name of person will be included as well. The field Affiliation is optional and not relevant in all cases.", - "_ddi_xpath":"stdyDscr/method/dataColl/dataCollector", - "type":"array", - "items":{ - "type":"object", - "properties":{ - "name":{ - "title":"Name", - "type":"string" + "data_collectors": { + "title": "Data Collectors", + "description": "The persons and/or agencies that took charge of the data collection. This element includes 3 fields: Name, Abbreviation and the Affiliation. In most cases, we will record here the name of the agency, not the name of interviewers. Only in the case of very small-scale surveys, with a very limited number of interviewers, the name of person will be included as well. The field Affiliation is optional and not relevant in all cases.", + "_ddi_xpath": "stdyDscr/method/dataColl/dataCollector", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string" + }, + "affiliation": { + "title": "Affiliation", + "type": "string" }, - "affiliation":{ - "title":"Affiliation", - "type":"string" + "abbr": { + "title": "Abbreviation", + "type": "string" }, - "abbr":{ - "title":"Abbreviation", - "type":"string" - }, - "role":{ - "title":"Role", - "type":"string" + "role": { + "title": "Role", + "type": "string" } } } }, - "collector_training":{ - "title":"Collector training", - "description":"Describes the training provided to data collectors including interviewer training, process testing, compliance with standards etc. This is repeatable for language and to capture different aspects of the training process. The type attribute allows specification of the type of training being described.", - "type":"object", - "properties":{ - "type":{ - "title":"Training type", - "description":"The percentage of sample members who provided information", - "type":"string", - "_ddi_xpath":"stdyDscr/method/dataColl/collectorTraining/@type" - }, - "training":{ - "title":"Training", - "description":"Training provided to data collectors", - "type":"string", - "_ddi_xpath":"stdyDscr/method/dataColl/collectorTraining" + "collector_training": { + "title": "Collector training", + "description": "Describes the training provided to data collectors including interviewer training, process testing, compliance with standards etc. This is repeatable for language and to capture different aspects of the training process. The type attribute allows specification of the type of training being described.", + "type": "array", + "items":{ + "type":"object", + "properties": { + "type": { + "title": "Training type", + "description": "The percentage of sample members who provided information", + "type": "string", + "_ddi_xpath": "stdyDscr/method/dataColl/collectorTraining/@type" + }, + "training": { + "title": "Training", + "description": "Training provided to data collectors", + "type": "string", + "_ddi_xpath": "stdyDscr/method/dataColl/collectorTraining" + } } } }, - "frequency":{ - "title":"Frequency of Data Collection", - "description":"For data collected at more than one point in time, the frequency with which the data were collected. Examples `monthly`, `quarterly`, `yearly`", - "type":"string", - "_ddi_xpath":"stdyDscr/method/dataColl/frequenc" + "frequency": { + "title": "Frequency of Data Collection", + "description": "For data collected at more than one point in time, the frequency with which the data were collected. Examples `monthly`, `quarterly`, `yearly`", + "type": "string", + "_ddi_xpath": "stdyDscr/method/dataColl/frequenc" }, - "sampling_procedure":{ - "title":"Sampling Procedure", - "description":"The type of sample and sample design used to select the survey respondents to represent the population. \nThis field only applies to sample surveys. Information on sampling procedure is crucial (although not applicable for censuses and administrative datasets). Examples `National multistage area probability sample`, `Simple random sample`, `Quota sample`", - "type":"string", - "_ddi_xpath":"stdyDscr/method/dataColl/sampProc" + "sampling_procedure": { + "title": "Sampling Procedure", + "description": "The type of sample and sample design used to select the survey respondents to represent the population. \nThis field only applies to sample surveys. Information on sampling procedure is crucial (although not applicable for censuses and administrative datasets). Examples `National multistage area probability sample`, `Simple random sample`, `Quota sample`", + "type": "string", + "_ddi_xpath": "stdyDscr/method/dataColl/sampProc" }, - "sample_frame":{ - "title":"Sample Frame", - "description":"Sample frame describes the sampling frame used for identifying the population from which the sample was taken. For example, a telephone book may be a sample frame for a phone survey. In addition to the name, label and text describing the sample frame, this structure lists who maintains the sample frame, the period for which it is valid, a use statement, the universe covered, the type of unit contained in the frame as well as the number of units available, the reference period of the frame and procedures used to update the frame.", - "type":"object", - "_ddi_xpath":"stdyDscr/method/dataColl/sampleFrame", - "properties":{ - "name":{ - "title":"Sample frame name", - "description":"Sample frame name", - "type":"string", - "_ddi_xpath":"stdyDscr/method/dataColl/sampleFrame/sampleFrameName" + "sample_frame": { + "title": "Sample Frame", + "description": "Sample frame describes the sampling frame used for identifying the population from which the sample was taken. For example, a telephone book may be a sample frame for a phone survey. In addition to the name, label and text describing the sample frame, this structure lists who maintains the sample frame, the period for which it is valid, a use statement, the universe covered, the type of unit contained in the frame as well as the number of units available, the reference period of the frame and procedures used to update the frame.", + "type": "object", + "_ddi_xpath": "stdyDscr/method/dataColl/sampleFrame", + "properties": { + "name": { + "title": "Sample frame name", + "description": "Sample frame name", + "type": "string", + "_ddi_xpath": "stdyDscr/method/dataColl/sampleFrame/sampleFrameName" }, - "valid_period":{ - "type":"array", - "title":"Valid periods (YYYY/MM/DD)", - "description":"Defines a time period for the validity of the sampling frame. Enter dates in YYYY-MM-DD format.", - "_ddi_xpath":"stdyDscr/method/dataColl/sampleFrame/validPeriod", - "items":{ - "type":"object", - "properties":{ - "event":{ - "title":"Event", - "description":"Event e.g. start, end", - "type":"string" + "valid_period": { + "type": "array", + "title": "Valid periods (YYYY/MM/DD)", + "description": "Defines a time period for the validity of the sampling frame. Enter dates in YYYY-MM-DD format.", + "_ddi_xpath": "stdyDscr/method/dataColl/sampleFrame/validPeriod", + "items": { + "type": "object", + "properties": { + "event": { + "title": "Event", + "description": "Event e.g. start, end", + "type": "string" }, - "date":{ - "title":"Date", - "description":"Date", - "type":"string" + "date": { + "title": "Date", + "description": "Date", + "type": "string" } }, - "required":[ + "required": [ "date" ] } }, - "custodian":{ - "title":"Custodian", - "description":"Custodian identifies the agency or individual who is responsible for creating or maintaining the sample frame.", - "type":"string", - "_ddi_xpath":"stdyDscr/method/dataColl/sampleFrame/custodian" + "custodian": { + "title": "Custodian", + "description": "Custodian identifies the agency or individual who is responsible for creating or maintaining the sample frame.", + "type": "string", + "_ddi_xpath": "stdyDscr/method/dataColl/sampleFrame/custodian" }, - "universe":{ - "title":"Universe", - "description":"The group of persons or other elements that are the object of research and to which any analytic results refer.", - "type":"string", - "_ddi_xpath":"stdyDscr/method/dataColl/sampleFrame/universe" + "universe": { + "title": "Universe", + "description": "The group of persons or other elements that are the object of research and to which any analytic results refer.", + "type": "string", + "_ddi_xpath": "stdyDscr/method/dataColl/sampleFrame/universe" }, - "frame_unit":{ - "type":"object", - "title":"Frame unit", - "_ddi_xpath":"stdyDscr/method/dataColl/sampleFrame/frameUnit", - "description":"Provides information about the sampling frame unit. The attribute `isPrimary` is boolean, indicating whether the unit is primary or not.", - "properties":{ - "is_primary":{ - "title":"Is Primary", - "description":"Is a primary unit?", - "type":["boolean","string"], - "_ddi_xpath":"stdyDscr/method/dataColl/sampleFrame/frameUnit/@isPrimary" + "frame_unit": { + "type": "object", + "title": "Frame unit", + "_ddi_xpath": "stdyDscr/method/dataColl/sampleFrame/frameUnit", + "description": "Provides information about the sampling frame unit. The attribute `isPrimary` is boolean, indicating whether the unit is primary or not.", + "properties": { + "is_primary": { + "title": "Is Primary", + "description": "Is a primary unit?", + "type": [ + "boolean", + "string" + ], + "_ddi_xpath": "stdyDscr/method/dataColl/sampleFrame/frameUnit/@isPrimary" }, - "unit_type":{ - "title":"Unit Type", - "description":"Describes the type of sampling frame unit. The field `num_of_units` provides the number of units in the sampling frame.", - "type":"string", - "_ddi_xpath":"stdyDscr/method/dataColl/sampleFrame/frameUnit/unitType" + "unit_type": { + "title": "Unit Type", + "description": "Describes the type of sampling frame unit. The field `num_of_units` provides the number of units in the sampling frame.", + "type": "string", + "_ddi_xpath": "stdyDscr/method/dataColl/sampleFrame/frameUnit/unitType" }, - "num_of_units":{ - "title":"Number of units", - "description":"Number of units in the sampling frame", - "type":"string", - "_ddi_xpath":"stdyDscr/method/dataColl/sampleFrame/frameUnit/@numberOfUnits" + "num_of_units": { + "title": "Number of units", + "description": "Number of units in the sampling frame", + "type": "string", + "_ddi_xpath": "stdyDscr/method/dataColl/sampleFrame/frameUnit/@numberOfUnits" } } }, - "reference_period":{ - "type":"array", - "title":"Reference periods (YYYY/MM/DD)", - "description":"Indicates the period of time in which the sampling frame was actually used for the study in question. Use ISO 8601 date/time formats to enter the relevant date(s).", - "_ddi_xpath":"stdyDscr/method/dataColl/sampleFrame/referencePeriod", - "items":{ - "type":"object", - "properties":{ - "event":{ - "title":"Event", - "description":"Event e.g. start, end", - "type":"string" + "reference_period": { + "type": "array", + "title": "Reference periods (YYYY/MM/DD)", + "description": "Indicates the period of time in which the sampling frame was actually used for the study in question. Use ISO 8601 date/time formats to enter the relevant date(s).", + "_ddi_xpath": "stdyDscr/method/dataColl/sampleFrame/referencePeriod", + "items": { + "type": "object", + "properties": { + "event": { + "title": "Event", + "description": "Event e.g. start, end", + "type": "string" }, - "date":{ - "title":"Date", - "description":"Date", - "type":"string" + "date": { + "title": "Date", + "description": "Date", + "type": "string" } }, - "required":[ + "required": [ "date" ] } }, - "update_procedure":{ - "title":"Update procedure", - "description":"Description of how and with what frequency the sample frame is updated.", - "type":"string", - "_ddi_xpath":"stdyDscr/method/dataColl/sampleFrame/updateProcedure" + "update_procedure": { + "title": "Update procedure", + "description": "Description of how and with what frequency the sample frame is updated.", + "type": "string", + "_ddi_xpath": "stdyDscr/method/dataColl/sampleFrame/updateProcedure" } } }, - "sampling_deviation":{ - "title":"Deviations from the Sample Design", - "description":"This field only applies to sample surveys.\nSometimes the reality of the field requires a deviation from the sampling design (for example due to difficulty to access to zones due to weather problems, political instability, etc). If for any reason, the sample design has deviated, this should be reported here. ", - "type":"string", - "_ddi_xpath":"stdyDscr/method/dataColl/deviat" + "sampling_deviation": { + "title": "Deviations from the Sample Design", + "description": "This field only applies to sample surveys.\nSometimes the reality of the field requires a deviation from the sampling design (for example due to difficulty to access to zones due to weather problems, political instability, etc). If for any reason, the sample design has deviated, this should be reported here. ", + "type": "string", + "_ddi_xpath": "stdyDscr/method/dataColl/deviat" }, - "coll_mode":{ - "title":"Mode of data collection", - "type":["string","array"], - "description":"The mode of data collection is the manner in which the interview was conducted or information was gathered. In most cases, the response will be 'face to face interview'. But for some specific kinds of datasets, such as for example data on rain fall, the response will be different.", - "_ddi_xpath":"stdyDscr/method/dataColl/collMode", - "enum_":[ + "coll_mode": { + "title": "Mode of data collection", + "type": [ + "string", + "array" + ], + "description": "The mode of data collection is the manner in which the interview was conducted or information was gathered. In most cases, the response will be 'face to face interview'. But for some specific kinds of datasets, such as for example data on rain fall, the response will be different.", + "_ddi_xpath": "stdyDscr/method/dataColl/collMode", + "enum_": [ "Computer Assisted Personal Interview[capi]", "Computer Assisted Telephone Interview[cati]", "Face-to-Face[f2f]", @@ -1161,492 +1197,427 @@ "type": "string" } }, - "research_instrument":{ - "title":"Type of Research Instrument", - "description":"The type of data collection instrument used. \n`Structured` indicates an instrument in which all respondents are asked the same questions/tests, possibly with precoded answers. If a small portion of such a questionnaire includes open-ended questions, provide appropriate comments. \n`Semi-structured` indicates that the research instrument contains mainly open-ended questions. \n`Unstructured` indicates that in-depth interviews were conducted.", - "type":"string", - "_ddi_xpath":"stdyDscr/method/dataColl/resInstru" + "research_instrument": { + "title": "Type of Research Instrument", + "description": "The type of data collection instrument used. \n`Structured` indicates an instrument in which all respondents are asked the same questions/tests, possibly with precoded answers. If a small portion of such a questionnaire includes open-ended questions, provide appropriate comments. \n`Semi-structured` indicates that the research instrument contains mainly open-ended questions. \n`Unstructured` indicates that in-depth interviews were conducted.", + "type": "string", + "_ddi_xpath": "stdyDscr/method/dataColl/resInstru" }, - "instru_development":{ - "title":"Instrument development", - "description":"Describe any development work on the data collection instrument. Type attribute allows for the optional use of a defined development type with or without use of a controlled vocabulary.", - "type":"string", - "_ddi_xpath":"stdyDscr/method/dataColl/instrumentDevelopment" + "instru_development": { + "title": "Instrument development", + "description": "Describe any development work on the data collection instrument. Type attribute allows for the optional use of a defined development type with or without use of a controlled vocabulary.", + "type": "string", + "_ddi_xpath": "stdyDscr/method/dataColl/instrumentDevelopment" }, - "instru_development_type":{ - "title":"Instrument development type", - "description":"Instrument development type", - "type":"string", - "_ddi_xpath":"stdyDscr/method/dataColl/instrumentDevelopment/@type" + "instru_development_type": { + "title": "Instrument development type", + "description": "Instrument development type", + "type": "string", + "_ddi_xpath": "stdyDscr/method/dataColl/instrumentDevelopment/@type" }, - "sources":{ - "type":"object", - "title":"Sources", - "description":"Description of sources used for the data collection. The element is nestable so that the sources statement might encompass a series of discrete source statements, each of which could contain the facts about an individual source. This element maps to Dublin Core Source element.", - "_ddi_xpath":"stdyDscr/method/dataColl/sources", - "properties":{ - "data_source":{ - "title":"Data source", - "_ddi_xpath":"stdyDscr/studyDevelopment/developmentActivity/resource/dataSrc", - "type":"array", - "items":{ - "type":"object", - "properties":{ - "source":{ - "title":"Source", - "type":"string" - } - } - } - }, - "source_origin":{ - "type":"string", - "title":"Origin of Source", - "description":"For historical materials, information about the origin(s) of the sources and the rules followed in establishing the sources should be specified. May not be relevant to survey data. ", - "_ddi_xpath":"stdyDscr/method/dataColl/sources/srcOrig" + "sources": { + "type": "array", + "title": "Sources", + "description": "Description of sources used for the data collection. The element is nestable so that the sources statement might encompass a series of discrete source statements, each of which could contain the facts about an individual source. This element maps to Dublin Core Source element.", + "_ddi_xpath": "stdyDscr/method/dataColl/sources", + "items":{ + "type":"object", + "properties": { + "name": { + "type": "string", + "title": "Source name", + "description": "Name of the source" }, - "source_char":{ - "type":"string", - "title":"Characteristics of Source Noted", - "description":"Assessment of characteristics and quality of source material. May not be relevant to survey data.", - "_ddi_xpath":"stdyDscr/method/dataColl/sources/srcChar" + "origin": { + "type": "string", + "title": "Origin of Source", + "description": "For historical materials, information about the origin(s) of the sources and the rules followed in establishing the sources should be specified. May not be relevant to survey data. ", + "_ddi_xpath": "stdyDscr/method/dataColl/sources/srcOrig" }, - "source_doc":{ - "type":"string", - "title":"Source documentation", - "description":"Documentation and Access to Sources", - "_ddi_xpath":"stdyDscr/method/dataColl/sources/srcDocu" - } + "characteristics": { + "type": "string", + "title": "Characteristics of Source Noted", + "description": "Assessment of characteristics and quality of source material. May not be relevant to survey data.", + "_ddi_xpath": "stdyDscr/method/dataColl/sources/srcChar" + } } + } }, - "coll_situation":{ - "title":"Characteristics of Data Collection Situation - Notes on data collection", - "__comment":"used for notes on data collection", - "description":"Description of noteworthy aspects of the data collection situation. Includes information on factors such as cooperativeness of respondents, duration of interviews, number of call-backs, etc.", - "type":"string", - "_ddi_xpath":"stdyDscr/method/dataColl/collSitu" + "coll_situation": { + "title": "Characteristics of Data Collection Situation - Notes on data collection", + "__comment": "used for notes on data collection", + "description": "Description of noteworthy aspects of the data collection situation. Includes information on factors such as cooperativeness of respondents, duration of interviews, number of call-backs, etc.", + "type": "string", + "_ddi_xpath": "stdyDscr/method/dataColl/collSitu" }, - "act_min":{ - "title":"Supervision", - "description":"Summary of actions taken to minimize data loss. Includes information on actions such as follow-up visits, supervisory checks, historical matching, estimation, etc.", - "type":"string", - "_ddi_xpath":"stdyDscr/method/dataColl/actMin" + "act_min": { + "title": "Supervision", + "description": "Summary of actions taken to minimize data loss. Includes information on actions such as follow-up visits, supervisory checks, historical matching, estimation, etc.", + "type": "string", + "_ddi_xpath": "stdyDscr/method/dataColl/actMin" }, - "control_operations":{ - "title":"Control Operations", - "description":" Methods to facilitate data control performed by the primary investigator or by the data archive. Specify any special programs used for such operations.", - "type":"string", - "_ddi_xpath":"stdyDscr/method/dataColl/ConOps" + "control_operations": { + "title": "Control Operations", + "description": " Methods to facilitate data control performed by the primary investigator or by the data archive. Specify any special programs used for such operations.", + "type": "string", + "_ddi_xpath": "stdyDscr/method/dataColl/ConOps" }, - "weight":{ - "title":"Weighting", - "description":"The use of sampling procedures may make it necessary to apply weights to produce accurate statistical results. Describe here the criteria for using weights in analysis of a collection. If a weighting formula or coefficient was developed, provide this formula, define its elements, and indicate how the formula is applied to data.", - "type":"string", - "_ddi_xpath":"stdyDscr/method/dataColl/weight" + "weight": { + "title": "Weighting", + "description": "The use of sampling procedures may make it necessary to apply weights to produce accurate statistical results. Describe here the criteria for using weights in analysis of a collection. If a weighting formula or coefficient was developed, provide this formula, define its elements, and indicate how the formula is applied to data.", + "type": "string", + "_ddi_xpath": "stdyDscr/method/dataColl/weight" }, - "cleaning_operations":{ - "title":"Cleaning Operations", - "description":"Methods used to `clean` the data collection, e.g., consistency checking, wildcode checking, etc.", - "type":"string", - "_ddi_xpath":"stdyDscr/method/dataColl/cleanOps" + "cleaning_operations": { + "title": "Cleaning Operations", + "description": "Methods used to `clean` the data collection, e.g., consistency checking, wildcode checking, etc.", + "type": "string", + "_ddi_xpath": "stdyDscr/method/dataColl/cleanOps" } } }, - "method_notes":{ - "title":"Methodology notes", - "description":"Methodology notes", - "type":"string", - "_ddi_xpath":"stdyDscr/method/notes" + "method_notes": { + "title": "Methodology notes", + "description": "Methodology notes", + "type": "string", + "_ddi_xpath": "stdyDscr/method/notes" }, - "analysis_info":{ - "type":"object", - "title":"Data Appraisal", - "_ddi_xpath":"stdyDscr/method/anlyInfo", - "description":"Information about Data Appraisal", - "properties":{ - "response_rate":{ - "title":"Response Rate", - "description":"The percentage of sample members who provided information", - "type":"string", - "_ddi_xpath":"stdyDscr/method/anlyInfo/respRate" + "analysis_info": { + "type": "object", + "title": "Data Appraisal", + "_ddi_xpath": "stdyDscr/method/anlyInfo", + "description": "Information about Data Appraisal", + "properties": { + "response_rate": { + "title": "Response Rate", + "description": "The percentage of sample members who provided information", + "type": "string", + "_ddi_xpath": "stdyDscr/method/anlyInfo/respRate" }, - "sampling_error_estimates":{ - "title":"Estimates of Sampling Error", - "description":"Measure of how precisely one can estimate a population value from a given sample", - "type":"string", - "_ddi_xpath":"stdyDscr/method/anlyInfo/EstSmpErr" + "sampling_error_estimates": { + "title": "Estimates of Sampling Error", + "description": "Measure of how precisely one can estimate a population value from a given sample", + "type": "string", + "_ddi_xpath": "stdyDscr/method/anlyInfo/EstSmpErr" }, - "data_appraisal":{ - "title":"Data Appraisal", - "description":"Other issues pertaining to data appraisal. Describe here issues such as response variance, nonresponse rate and testing for bias, interviewer and response bias, confidence levels, question bias, etc.", - "type":"string", - "_ddi_xpath":"stdyDscr/method/anlyInfo/dataAppr" + "data_appraisal": { + "title": "Data Appraisal", + "description": "Other issues pertaining to data appraisal. Describe here issues such as response variance, nonresponse rate and testing for bias, interviewer and response bias, confidence levels, question bias, etc.", + "type": "string", + "_ddi_xpath": "stdyDscr/method/anlyInfo/dataAppr" } } }, - "study_class":{ - "title":"Class of the Study", - "description":"Generally used to give the data archive's class or study status number, which indicates the processing status of the study. May also be used as a text field to describe processing status. Example: `DDA Class C`, `Study is available from http://example.com` ", - "type":"string", - "_ddi_xpath":"stdyDscr/method/stdyClas" + "study_class": { + "title": "Class of the Study", + "description": "Generally used to give the data archive's class or study status number, which indicates the processing status of the study. May also be used as a text field to describe processing status. Example: `DDA Class C`, `Study is available from http://example.com` ", + "type": [ + "string", + "array" + ], + "_ddi_xpath": "stdyDscr/method/stdyClas" }, - "data_processing":{ - "type":"string", - "title":"Data Processing", - "description":"Describes various data processing procedures not captured elsewhere in the documentation, such as topcoding, recoding, suppression, tabulation, etc. The `type` attribute supports better classification of this activity, including the optional use of a controlled vocabulary", - "_ddi_xpath":"stdyDscr/method/dataProcessing" - }, - "data_processing_type":{ - "type":"string", - "title":"Data Processing type", - "description":"Data procssing type", - "_ddi_xpath":"stdyDscr/method/dataProcessing/@type" - }, - "coding_instructions":{ - "type":"object", - "title":"Coding Instructions", - "_ddi_xpath":"stdyDscr/method/codingInstructions", - "description":"Describe specific coding instructions used in data processing, cleaning, assession, or tabulation.", - "properties":{ - "related_processes":{ - "title":"Related processes", - "type":"string", - "_ddi_xpath":"stdyDscr/method/codingInstructions/@relatedProcesses" - }, - "type":{ - "title":"Coding instructions type", - "type":"string", - "_ddi_xpath":"stdyDscr/method/codingInstructions/@type" - }, - "txt":{ - "title":"Coding instructions text", - "type":"string", - "_ddi_xpath":"stdyDscr/method/codingInstructions/txt" - }, - "command":{ - "title":"Command", - "description":"Provide command code for the coding instruction. The formalLanguage attribute identifies the language of the command code.", - "type":"string", - "_ddi_xpath":"stdyDscr/method/codingInstructions/command" + "data_processing": { + "type": "array", + "title": "Data Processing", + "description": "Describes various data processing procedures not captured elsewhere in the documentation, such as topcoding, recoding, suppression, tabulation, etc. The `type` attribute supports better classification of this activity, including the optional use of a controlled vocabulary", + "_ddi_xpath": "stdyDscr/method/dataProcessing", + "items": { + "type": "object", + "properties": { + "type": { + "title": "Data processing type", + "type": "string" + }, + "description": { + "title": "Data processing description", + "type": "string" + } }, - "command_language":{ - "title":"Language of the command code", - "description":"Identifies the language of the command code. e.g. `SPSS`, `R`, `STATA` ", - "type":"string", - "_ddi_xpath":"stdyDscr/method/codingInstructions/command/@formalLanguage" + "required": [ + "description" + ] + } + }, + "coding_instructions": { + "type": "array", + "title": "Coding Instructions", + "_ddi_xpath": "stdyDscr/method/codingInstructions", + "description": "Describe specific coding instructions used in data processing, cleaning, assession, or tabulation.", + "items": { + "type": "object", + "properties": { + "related_processes": { + "title": "Related processes", + "type": "string", + "_ddi_xpath": "stdyDscr/method/codingInstructions/@relatedProcesses" + }, + "type": { + "title": "Coding instructions type", + "type": "string", + "_ddi_xpath": "stdyDscr/method/codingInstructions/@type" + }, + "txt": { + "title": "Coding instructions text", + "type": "string", + "_ddi_xpath": "stdyDscr/method/codingInstructions/txt" + }, + "command": { + "title": "Command", + "description": "Provide command code for the coding instruction. The formalLanguage attribute identifies the language of the command code.", + "type": "string", + "_ddi_xpath": "stdyDscr/method/codingInstructions/command" + }, + "formal_language": { + "title": "Identify the language of the command code", + "description": "Identifies the language of the command code. e.g. `SPSS`, `R`, `STATA` ", + "type": "string", + "_ddi_xpath": "stdyDscr/method/codingInstructions/command/@formalLanguage" + } } } } } }, - "data_access":{ - "type":"object", - "description":"Data Access", - "_ddi_xpath":"stdyDscr/dataAccs/setAvail/dataAccs", - "properties":{ - "dataset_availability":{ - "type":"object", - "title":"Data Set Availability", - "description":"Information on availability and storage of the collection", - "properties":{ - "access_place":{ - "title":"Location of Data Collection", - "description":"Location where the data collection is currently stored. Use the URL field `access_place_url` to provide a URN or URL for the storage site or the actual address from which the data may be downloaded", - "type":"string", - "_ddi_xpath":"stdyDscr/dataAccs/setAvail/accsPlac" + "data_access": { + "type": "object", + "description": "Data Access", + "_ddi_xpath": "stdyDscr/dataAccs/setAvail/dataAccs", + "properties": { + "dataset_availability": { + "type": "object", + "title": "Data Set Availability", + "description": "Information on availability and storage of the collection", + "properties": { + "access_place": { + "title": "Location of Data Collection", + "description": "Location where the data collection is currently stored. Use the URL field `access_place_url` to provide a URN or URL for the storage site or the actual address from which the data may be downloaded", + "type": "string", + "_ddi_xpath": "stdyDscr/dataAccs/setAvail/accsPlac" }, - "access_place_url":{ - "title":"URL for Location of Data Collection", - "description":"Location where the data collection is currently stored. Provide a URN or URL for the storage site or the actual address from which the data may be downloaded", - "type":"string", - "_ddi_xpath":"stdyDscr/dataAccs/setAvail/accsPlac/@URI" + "access_place_url": { + "title": "URL for Location of Data Collection", + "description": "Location where the data collection is currently stored. Provide a URN or URL for the storage site or the actual address from which the data may be downloaded", + "type": "string", + "_ddi_xpath": "stdyDscr/dataAccs/setAvail/accsPlac/@URI" }, - "original_archive":{ - "title":"Archive where study is originally stored", - "description":"Archive from which the data collection was obtained; the originating archive", - "type":"string", - "_ddi_xpath":"stdyDscr/dataAccs/setAvail/origArch" + "original_archive": { + "title": "Archive where study is originally stored", + "description": "Archive from which the data collection was obtained; the originating archive", + "type": "string", + "_ddi_xpath": "stdyDscr/dataAccs/setAvail/origArch" }, - "status":{ - "title":"Availability Status", - "description":"Statement of collection availability. An archive may need to indicate that a collection is unavailable because it is embargoed for a period of time, because it has been superseded, because a new edition is imminent, etc.", - "type":"string", - "_ddi_xpath":"stdyDscr/dataAccs/setAvail/avlStatus" + "status": { + "title": "Availability Status", + "description": "Statement of collection availability. An archive may need to indicate that a collection is unavailable because it is embargoed for a period of time, because it has been superseded, because a new edition is imminent, etc.", + "type": "string", + "_ddi_xpath": "stdyDscr/dataAccs/setAvail/avlStatus" }, - "coll_size":{ - "title":"Extent of Collection", - "description":"Summarizes the number of physical files that exist in a collection, recording the number of files that contain data and noting whether the collection contains machine-readable documentation and/or other supplementary files and information such as data dictionaries, data definition statements, or data collection instruments.", - "type":"string", - "_ddi_xpath":"stdyDscr/dataAccs/setAvail/collSize" + "coll_size": { + "title": "Extent of Collection", + "description": "Summarizes the number of physical files that exist in a collection, recording the number of files that contain data and noting whether the collection contains machine-readable documentation and/or other supplementary files and information such as data dictionaries, data definition statements, or data collection instruments.", + "type": "string", + "_ddi_xpath": "stdyDscr/dataAccs/setAvail/collSize" }, - "complete":{ - "title":"Completeness of Study Stored", - "description":"This item indicates the relationship of the data collected to the amount of data coded and stored in the data collection. Information as to why certain items of collected information were not included in the data file stored by the archive should be provided", - "type":"string", - "_ddi_xpath":"stdyDscr/dataAccs/setAvail/complete" + "complete": { + "title": "Completeness of Study Stored", + "description": "This item indicates the relationship of the data collected to the amount of data coded and stored in the data collection. Information as to why certain items of collected information were not included in the data file stored by the archive should be provided", + "type": "string", + "_ddi_xpath": "stdyDscr/dataAccs/setAvail/complete" }, - "file_quantity":{ - "title":"Number of Files", - "description":"Total number of physical files associated with a collection", - "type":"string", - "_ddi_xpath":"stdyDscr/dataAccs/setAvail/fileQnty" + "file_quantity": { + "title": "Number of Files", + "description": "Total number of physical files associated with a collection", + "type": "string", + "_ddi_xpath": "stdyDscr/dataAccs/setAvail/fileQnty" }, - "notes":{ - "title":"Notes", - "description":"Notes and comments", - "type":"string", - "_ddi_xpath":"stdyDscr/dataAccs/setAvail/notes" + "notes": { + "title": "Notes", + "description": "Notes and comments", + "type": "string", + "_ddi_xpath": "stdyDscr/dataAccs/setAvail/notes" } } }, - "dataset_use":{ - "type":"object", - "title":"Data Set Availability", - "description":" Information on terms of use for the data collection", - "_ddi_xpath":"stdyDscr/dataAccs/useStmt", - "properties":{ - "conf_dec":{ - "type":"array", - "title":"Confidentiality Declaration", - "description":" This element is used to determine if signing of a confidentiality declaration is needed to access a resource.", - "items":{ + "dataset_use": { + "type": "object", + "title": "Data Set Availability", + "description": " Information on terms of use for the data collection", + "_ddi_xpath": "stdyDscr/dataAccs/useStmt", + "properties": { + "conf_dec": { + "type": "array", + "title": "Confidentiality Declaration", + "description": " This element is used to determine if signing of a confidentiality declaration is needed to access a resource.", + "items": { "type": "object", - "properties":{ - "txt":{ - "type":"string", - "title":"Confidentiality declaration text", - "description":"Confidentiality declaration text", - "_ddi_xpath":"stdyDscr/dataAccs/useStmt/confDec" + "properties": { + "txt": { + "type": "string", + "title": "Confidentiality declaration text", + "description": "Confidentiality declaration text", + "_ddi_xpath": "stdyDscr/dataAccs/useStmt/confDec" }, - "required":{ - "type":"string", - "title":"Is signing of a confidentiality declaration required?", - "description":"Is signing of a confidentiality declaration required", - "_ddi_xpath":"stdyDscr/dataAccs/useStmt/confDec/@required" + "required": { + "type": "string", + "title": "Is signing of a confidentiality declaration required?", + "description": "Is signing of a confidentiality declaration required", + "_ddi_xpath": "stdyDscr/dataAccs/useStmt/confDec/@required" }, - "form_url":{ - "type":"string", - "title":"Confidentiality declaration form URL", - "description":"Provide a URN or URL for online access to a confidentiality declaration form.", - "_ddi_xpath":"stdyDscr/dataAccs/useStmt/confDec/@URI" + "form_url": { + "type": "string", + "title": "Confidentiality declaration form URL", + "description": "Provide a URN or URL for online access to a confidentiality declaration form.", + "_ddi_xpath": "stdyDscr/dataAccs/useStmt/confDec/@URI" }, - "form_id":{ - "type":"string", - "title":"Form ID", - "description":"Indicates the number or ID of the form that the user must fill out", - "_ddi_xpath":"stdyDscr/dataAccs/useStmt/confDec/@formNo" + "form_id": { + "type": "string", + "title": "Form ID", + "description": "Indicates the number or ID of the form that the user must fill out", + "_ddi_xpath": "stdyDscr/dataAccs/useStmt/confDec/@formNo" } } } }, - "spec_perm":{ - "type":"array", - "title":"Special Permissions", - "description":"Determine if any special permissions are required to access a resource", - "_ddi_xpath":"stdyDscr/dataAccs/useStmt/specPerm", - "items":{ + "spec_perm": { + "type": "array", + "title": "Special Permissions", + "description": "Determine if any special permissions are required to access a resource", + "_ddi_xpath": "stdyDscr/dataAccs/useStmt/specPerm", + "items": { "type": "object", - "properties":{ - "txt":{ - "type":"string", - "title":"Special permissions description", - "description":"Confidentiality declaration text" + "properties": { + "txt": { + "type": "string", + "title": "Special permissions description", + "description": "Confidentiality declaration text" }, - "required":{ - "type":"string", - "title":"Indicate if special permissions are required to access a resource", - "description":"Indicate if special permissions are required to access a resource" + "required": { + "type": "string", + "title": "Indicate if special permissions are required to access a resource", + "description": "Indicate if special permissions are required to access a resource" }, - "form_url":{ - "type":"string", - "title":"Form URL", - "description":"Link to the form URL" + "form_url": { + "type": "string", + "title": "Form URL", + "description": "Link to the form URL" }, - "form_id":{ - "type":"string", - "title":"Form ID", - "description":"Indicates the number or ID of the form that the user must fill out" + "form_id": { + "type": "string", + "title": "Form ID", + "description": "Indicates the number or ID of the form that the user must fill out" } } } }, - "restrictions":{ - "title":"Restrictions", - "description":"Any restrictions on access to or use of the collection such as privacy certification or distribution restrictions should be indicated here. These can be restrictions applied by the author, producer, or disseminator of the data collection. If the data are restricted to only a certain class of user, specify which type.", - "type":"string", - "_ddi_xpath":"stdyDscr/dataAccs/useStmt/restrctn" + "restrictions": { + "title": "Restrictions", + "description": "Any restrictions on access to or use of the collection such as privacy certification or distribution restrictions should be indicated here. These can be restrictions applied by the author, producer, or disseminator of the data collection. If the data are restricted to only a certain class of user, specify which type.", + "type": "string", + "_ddi_xpath": "stdyDscr/dataAccs/useStmt/restrctn" }, - "contact":{ - "type":"array", - "title":"Contact", - "description":"Contact", - "_ddi_xpath":"stdyDscr/dataAccs/useStmt/contact", - "items":{ - "type":"object", - "properties":{ - "name":{ - "title":"Name", - "type":"string" + "contact": { + "type": "array", + "title": "Contact", + "description": "Contact", + "_ddi_xpath": "stdyDscr/dataAccs/useStmt/contact", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string" }, - "affiliation":{ - "title":"Affiliation", - "type":"string" + "affiliation": { + "title": "Affiliation", + "type": "string" }, - "uri":{ - "title":"URI", - "type":"string" + "uri": { + "title": "URI", + "type": "string" }, - "email":{ - "title":"Email", - "type":"string" + "email": { + "title": "Email", + "type": "string" } } }, - "required":[ + "required": [ "name" ] }, - "cit_req":{ - "title":"Citation requirement", - "description":"Text of requirement that a data collection should be cited properly in articles or other publications that are based on analysis of the data.", - "type":"string", - "_ddi_xpath":"stdyDscr/dataAccs/useStmt/citReq" + "cit_req": { + "title": "Citation requirement", + "description": "Text of requirement that a data collection should be cited properly in articles or other publications that are based on analysis of the data.", + "type": "string", + "_ddi_xpath": "stdyDscr/dataAccs/useStmt/citReq" }, - "deposit_req":{ - "title":"Deposit requirement", - "description":"Information regarding user responsibility for informing archives of their use of data through providing citations to the published work or providing copies of the manuscripts.", - "type":"string", - "_ddi_xpath":"stdyDscr/dataAccs/useStmt/deposReq" + "deposit_req": { + "title": "Deposit requirement", + "description": "Information regarding user responsibility for informing archives of their use of data through providing citations to the published work or providing copies of the manuscripts.", + "type": "string", + "_ddi_xpath": "stdyDscr/dataAccs/useStmt/deposReq" }, - "conditions":{ - "title":"Conditions", - "description":"Indicates any additional information that will assist the user in understanding the access and use conditions of the data collection.", - "type":"string", - "_ddi_xpath":"stdyDscr/dataAccs/useStmt/conditions" + "conditions": { + "title": "Conditions", + "description": "Indicates any additional information that will assist the user in understanding the access and use conditions of the data collection.", + "type": "string", + "_ddi_xpath": "stdyDscr/dataAccs/useStmt/conditions" }, - "disclaimer":{ - "title":"Disclaimer", - "description":"Information regarding responsibility for uses of the data collection", - "type":"string", - "_ddi_xpath":"stdyDscr/dataAccs/useStmt/disclaimer" + "disclaimer": { + "title": "Disclaimer", + "description": "Information regarding responsibility for uses of the data collection", + "type": "string", + "_ddi_xpath": "stdyDscr/dataAccs/useStmt/disclaimer" } } }, - "notes":{ - "title":"Notes", - "description":"Notes and comments", - "type":"string", - "_ddi_xpath":"stdyDscr/dataAccs/setAvail/notes" + "notes": { + "title": "Notes", + "description": "Notes and comments", + "type": "string", + "_ddi_xpath": "stdyDscr/dataAccs/setAvail/notes" } } } }, - "required":[ + "required": [ "title_statement", "study_info" ], - "additionalProperties":false + "additionalProperties": false } }, - "type":"object", - "properties":{ - "doc_desc":{ - "$ref":"#/definitions/doc_desc" + "type": "object", + "properties": { + "doc_desc": { + "$ref": "#/definitions/doc_desc" }, - "study_desc":{ - "$ref":"#/definitions/study_desc" + "study_desc": { + "$ref": "#/definitions/study_desc" }, - "data_files":{ - "type":"array", - "description":"Data files", - "items":{ - "$ref":"datafile-schema.json" + "data_files": { + "type": "array", + "description": "Data files", + "items": { + "$ref": "datafile-schema.json" } }, - "variables":{ - "type":"array", - "description":"Variables", - "items":{ - "$ref":"variable-schema.json" + "variables": { + "type": "array", + "description": "Variables", + "items": { + "$ref": "variable-schema.json" } }, - "variable_groups":{ - "type":"array", - "description":"Variable group", - "title":"Variable groups", - "items":{ - "type":"object", - "properties":{ - "vgid":{ - "title":"Variable Group ID", - "description":"Unique ID for the variable group e.g. VG1", - "type":"string", - "maxLength": 45 - }, - "variables":{ - "title":"Variables", - "description":"List of variables for the group seperated by space e.g. V1 V2 V3", - "type":"string", - "maxLength": 5000 - }, - "variable_groups":{ - "title":"Variable groups", - "description":"List of sub-groups e.g. VG2 VG3 VG4", - "type":"string", - "maxLength": 1000 - }, - "group_type":{ - "title":"Type", - "type":"string", - "enum":[ - "subject", - "section", - "multiResp", - "grid", - "display", - "repetition", - "version", - "iteration", - "analysis", - "pragmatic", - "record", - "file", - "randomized", - "other" - ], - "maxLength": 45 - }, - "label":{ - "title":"Label", - "type":"string", - "maxLength": 255 - }, - "universe":{ - "title":"Universe", - "type":"string", - "maxLength": 255 - }, - "notes":{ - "title":"Notes", - "type":"string", - "maxLength": 500 - }, - "txt":{ - "title":"Text", - "type":"string", - "maxLength": 500 - }, - "definition":{ - "title":"Definition", - "type":"string", - "maxLength": 500 - } - }, - "required":[ - "vgid" - ] + "variable_groups": { + "type": "array", + "description": "Variable group", + "title": "Variable groups", + "items": { + "$ref": "variable-group-schema.json" }, - "additionalProperties":false - } + "additionalProperties": false + } } } \ No newline at end of file diff --git a/application/schemas/document-schema.json b/application/schemas/document-schema.json index 7688f13f0..8f37dc225 100644 --- a/application/schemas/document-schema.json +++ b/application/schemas/document-schema.json @@ -118,26 +118,22 @@ "idno": { "type": "string", "title": "Unique user defined ID", - "description": "The ID number of a dataset is a unique number that is used to identify a particular survey. Define and use a consistent scheme to use. Such an ID could be constructed as follows: country-producer-survey-year-version where \n - country is the 3-letter ISO country abbreviation \n - producer is the abbreviation of the producing agency \n - survey is the survey abbreviation \n - year is the reference year (or the year the survey started) \n - version is the number dataset version number (see Version Description below)" + "description": "The ID number of a dataset is a unique number that is used to identify a document." }, "title": { "type": "string", - "title": "Survey title", - "description": "The title is the official name of the survey as it is stated on the questionnaire or as it appears in the design documents. The following items should be noted:\n - Include the reference year(s) of the survey in the title. \n - Do not include the abbreviation of the survey name in the title. \n - As the survey title is a proper noun, the first letter of each word should be capitalized (except for prepositions or other conjunctions).\n - Including the country name in the title is optional." + "title": "Title" }, "sub_title": { "type": "string", - "title": "Survey subtitle", - "description": "A short subtitle for the survey" + "title": "Subtitle" }, "alternate_title": { "type": "string", - "title": "Abbreviation or Acronym", - "description": "Any form of the title used as a substitute or alternative to the formal title of the resource." + "title": "Abbreviation or Acronym" }, - "abbreviated_title": { - "title": "Abbreviated Title", - "description": "Title as abbreviated for indexing or identification.", + "translated_title": { + "title": "Translated Title", "type": "string" } }, @@ -187,6 +183,11 @@ } } } + }, + "full_name": { + "title": "Full name", + "type": "string", + "description": "Full name of the author. This element to be used only when first or last name cannot be distinguished." } } }, @@ -246,27 +247,28 @@ "description": "Date on which document was published." }, - "id_numbers": { + "identifiers": { "type": "array", - "title": "Identifier numbers", - "description": "Numbers e.g. ISSN, ISBN, DOI, etc.", + "title": "Other identifiers", + "description": "Other identifiers", "items": { "type": "object", "properties": { "type": { - "title": "Type", - "description":"ID number type such as ISSN, ISBN, DOI" + "title": "Identifier type", + "description": "Type of identifier e.g. `doi`, `handle`, `other`", + "type": "string" }, - "value": { - "title": "ID number", - "type": "string" + "identifier": { + "title": "Identifier", + "type": "string" } }, "required": [ - "type","value" + "identifier" ] } - }, + }, "type": { "type": "string", @@ -518,12 +520,13 @@ "volume": { "type": "string", "title": "Volume number", - "description":"Volume number" - }, - "issue": { + "description":"Volume number" + }, + + "number": { "type": "string", - "title": "Issue number", - "description":"Issue number" + "title": "Number", + "description":"The number of a journal, magazine, technical report, or of a work in a series. An issue of a journal or magazine is usually identified by its volume and number; the organization that issues a technical report usually gives it a number; and sometimes books are given numbers in a named series." }, "pages": { @@ -536,6 +539,60 @@ "title": "Series name", "description":"The name given to a series or set of books. When citing an entire book, the title field gives its title and the optional series field gives the name of a series in which the book was published." }, + + "publisher": { + "type": "string", + "title": "Publisher", + "description":"Entity responsible for making the resource available" + }, + + "publisher_address": { + "type": "string", + "title":"Publisher's address", + "description": "For major publishing houses, just the city is given. For small publishers, you can help the reader by giving the complete address." + }, + + "annote": { + "type": "string", + "title": "Annotation", + "description":"For annotation, element will not be used by standard bibliography styles like the MLA, APA or Chicago, but may be used by others that produce an annotated bibliography." + }, + + "booktitle": { + "type": "string", + "title": "Book title", + "description":"Title of a book, part of which is being cited" + }, + + "crossref": { + "type": "string", + "title": "Book title", + "description":"The database key of the entry being cross referenced" + }, + + "howpublished": { + "type": "string", + "title": "Store the notice for unusual publications", + "description":"The element is used to store the notice for unusual publications. The first word should be capitalized. For example, `WebPage`, or `Distributed at the local tourist office`" + }, + + "key": { + "type": "string", + "title": "Key", + "description":"A key is a field used for alphabetizing, cross referencing, and creating a label when the `author' information is missing" + }, + + "organization": { + "type": "string", + "title": "Organization", + "description":"The organization that sponsors a conference or that publishes a manual" + }, + + "url": { + "type": ["string", "array"], + "title": "URL", + "description":"URL of the document, preferably a permanent URL" + }, "translators": { "type": "array", @@ -642,18 +699,6 @@ ] }, - "publisher": { - "type": "string", - "title": "Publisher", - "description":"Entity responsible for making the resource available" - }, - - "publisher_address": { - "type": "string", - "title":"Publisher's address", - "description": "For major publishing houses, just the city is given. For small publishers, you can help the reader by giving the complete address." - }, - "rights": { "type": "string", "title": "Rights", @@ -691,30 +736,29 @@ }, "sources": { - "type": "object", + "type":"array", "title": "Sources", - "description": "Description of sources used. The element is nestable so that the sources statement might encompass a series of discrete source statements, each of which could contain the facts about an individual source. ", - "_ddi_xpath":"stdyDscr/method/dataColl/sources", + "description": "Description of sources used. The element is nestable so that the sources statement might encompass a series of discrete source statements, each of which could contain the facts about an individual source. ", + "items":{ + "type": "object", "properties": { "source_origin":{ "type":"string", "title":"Origin of Source", - "description":"For historical materials, information about the origin(s) of the sources and the rules followed in establishing the sources should be specified. May not be relevant to survey data. ", - "_ddi_xpath":"stdyDscr/method/dataColl/sources/srcOrig" + "description":"For historical materials, information about the origin(s) of the sources and the rules followed in establishing the sources should be specified. May not be relevant to survey data. " }, "source_char":{ "type":"string", "title":"Characteristics of Source Noted", - "description":"Assessment of characteristics and quality of source material. May not be relevant to survey data.", - "_ddi_xpath":"stdyDscr/method/dataColl/sources/srcChar" + "description":"Assessment of characteristics and quality of source material. May not be relevant to survey data." }, "source_doc":{ "type":"string", "title":"Source documentation", - "description":"Documentation and Access to Sources", - "_ddi_xpath":"stdyDscr/method/dataColl/sources/srcDocu" + "description":"Documentation and Access to Sources" } } + } }, "data_sources":{ @@ -940,138 +984,7 @@ } } } - }, - - "lda_topics": { - "type": "array", - "title": "LDA topics", - "description": "LDA topics", - "items": { - "type": "object", - "properties": { - "model_info": { - "type": "array", - "title": "Model information", - "items": { - "type": "object", - "properties": { - "source": { - "title": "Source", - "type": "string" - }, - "author": { - "title": "Author", - "type": "string" - }, - "version": { - "title": "Version", - "type": "string" - }, - "model_id": { - "title": "Model Identifier", - "type": "string" - }, - "nb_topics": { - "title": "Number of topics", - "type": "number" - }, - "description": { - "title": "Description", - "type": "string" - }, - "corpus": { - "title": "Corpus name", - "type": "string" - }, - "uri": { - "title": "URI", - "type": "string" - } - } - }, - "required": [ - "model_id" - ] - }, - "topic_description": { - "type": "array", - "title": "Topic information", - "items": { - "type": "object", - "properties": { - "topic_id": { - "title": "Topic identifier", - "type": ["integer", "string"] - }, - "topic_score": { - "title": "Topic score", - "type": ["number", "string"] - }, - "topic_label": { - "title": "Topic label", - "type": "string" - }, - "topic_words": { - "type": "array", - "title": "Topic words", - "description": "Words", - "items": { - "type": "object", - "properties": { - "word": { - "title": "Word", - "type": "string" - }, - "word_weight": { - "title": "Word weight", - "type": "number" - } - } - }, - "required": [ - "word" - ] - } - } - }, - "required": [ - "topic_id" - ] - } - - }, - "additionalProperties": false - } - }, - "embeddings":{ - "type": "array", - "title": "Word embeddings", - "description": "Word embeddings", - "items": { - "type": "object", - "properties": { - "id": { - "title": "Vector Model ID", - "type": "string" - }, - "description": { - "title": "Vector Model Description", - "type": "string" - }, - "date": { - "title": "Date (YYYY-MM-DD)", - "type": "string" - }, - "vector": { - "title": "Vector", - "type": "object" - } - }, - "required": [ - "id","vector" - ] - } - } + } }, "required":["title_statement"], "additionalProperties": false @@ -1104,6 +1017,136 @@ "tag" ] }, + "lda_topics": { + "type": "array", + "title": "LDA topics", + "description": "LDA topics", + "items": { + "type": "object", + "properties": { + "model_info": { + "type": "array", + "title": "Model information", + "items": { + "type": "object", + "properties": { + "source": { + "title": "Source", + "type": "string" + }, + "author": { + "title": "Author", + "type": "string" + }, + "version": { + "title": "Version", + "type": "string" + }, + "model_id": { + "title": "Model Identifier", + "type": "string" + }, + "nb_topics": { + "title": "Number of topics", + "type": "number" + }, + "description": { + "title": "Description", + "type": "string" + }, + "corpus": { + "title": "Corpus name", + "type": "string" + }, + "uri": { + "title": "URI", + "type": "string" + } + } + }, + "required": [ + "model_id" + ] + }, + "topic_description": { + "type": "array", + "title": "Topic information", + "items": { + "type": "object", + "properties": { + "topic_id": { + "title": "Topic identifier", + "type": ["integer", "string"] + }, + "topic_score": { + "title": "Topic score", + "type": ["number", "string"] + }, + "topic_label": { + "title": "Topic label", + "type": "string" + }, + "topic_words": { + "type": "array", + "title": "Topic words", + "description": "Words", + "items": { + "type": "object", + "properties": { + "word": { + "title": "Word", + "type": "string" + }, + "word_weight": { + "title": "Word weight", + "type": "number" + } + } + }, + "required": [ + "word" + ] + } + } + }, + "required": [ + "topic_id" + ] + } + + }, + "additionalProperties": false + } + }, + "embeddings":{ + "type": "array", + "title": "Word embeddings", + "description": "Word embeddings", + "items": { + "type": "object", + "properties": { + "id": { + "title": "Vector Model ID", + "type": "string" + }, + "description": { + "title": "Vector Model Description", + "type": "string" + }, + "date": { + "title": "Date (YYYY-MM-DD)", + "type": "string" + }, + "vector": { + "title": "Vector", + "type": ["object","array"] + } + }, + "required": [ + "id","vector" + ] + } + }, "additional": { "type": "object", "description": "Additional metadata", diff --git a/application/schemas/geospatial-schema.json b/application/schemas/geospatial-schema.json index 0a045dbe6..55edd3388 100644 --- a/application/schemas/geospatial-schema.json +++ b/application/schemas/geospatial-schema.json @@ -1263,14 +1263,18 @@ "spatialResolution": { "title": "Spatial Resolution", "description": "Spatial resolution of the resource", - "type": "number", + "type": "object", "_xpath": "gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialResolution/gmd:MD_Resolution/gco:Distance", "properties": { "uom": { "title": "Unit Of Measure", "description": "Unit considered for the resolution measure", - "type": "string", - "propertyType": "attribute" + "type": "string" + }, + "value": { + "title": "Value", + "description": "Value", + "type": "number" } } }, @@ -2027,10 +2031,141 @@ "required": [ "tag" ] - }, + }, + "lda_topics": { + "type": "array", + "title": "LDA topics", + "description": "LDA topics", + "items": { + "type": "object", + "properties": { + "model_info": { + "type": "array", + "title": "Model information", + "items": { + "type": "object", + "properties": { + "source": { + "title": "Source", + "type": "string" + }, + "author": { + "title": "Author", + "type": "string" + }, + "version": { + "title": "Version", + "type": "string" + }, + "model_id": { + "title": "Model Identifier", + "type": "string" + }, + "nb_topics": { + "title": "Number of topics", + "type": "number" + }, + "description": { + "title": "Description", + "type": "string" + }, + "corpus": { + "title": "Corpus name", + "type": "string" + }, + "uri": { + "title": "URI", + "type": "string" + } + } + }, + "required": [ + "model_id" + ] + }, + "topic_description": { + "type": "array", + "title": "Topic information", + "items": { + "type": "object", + "properties": { + "topic_id": { + "title": "Topic identifier", + "type": ["integer", "string"] + }, + "topic_score": { + "title": "Topic score", + "type": ["number", "string"] + }, + "topic_label": { + "title": "Topic label", + "type": "string" + }, + "topic_words": { + "type": "array", + "title": "Topic words", + "description": "Words", + "items": { + "type": "object", + "properties": { + "word": { + "title": "Word", + "type": "string" + }, + "word_weight": { + "title": "Word weight", + "type": "number" + } + } + }, + "required": [ + "word" + ] + } + } + }, + "required": [ + "topic_id" + ] + } + + }, + "additionalProperties": false + } + }, + "embeddings":{ + "type": "array", + "title": "Word embeddings", + "description": "Word embeddings", + "items": { + "type": "object", + "properties": { + "id": { + "title": "Vector Model ID", + "type": "string" + }, + "description": { + "title": "Vector Model Description", + "type": "string" + }, + "date": { + "title": "Date (YYYY-MM-DD)", + "type": "string" + }, + "vector": { + "title": "Vector", + "type": "object" + } + }, + "required": [ + "id","vector" + ] + } + }, "additional": { "title": "Additional metadata", - "description": "Any additional metadata" + "description": "Any additional metadata", + "type":"object" } }, "required": [ diff --git a/application/schemas/image-schema.json b/application/schemas/image-schema.json index 2433a3d91..01be446d4 100644 --- a/application/schemas/image-schema.json +++ b/application/schemas/image-schema.json @@ -165,41 +165,171 @@ } } } - }, - "tags": { - "type": "array", - "title": "Tags", - "description": "Tags", - "items": { - "type": "object", - "properties": { - "tag": { - "title": "Tag", - "type": "string" + } + } + }, + "provenance":{ + "type":"array", + "description":"Provenance", + "items":{ + "$ref":"provenance-schema.json" + } + }, + "tags": { + "type": "array", + "title": "Tags", + "description": "Tags", + "items": { + "type": "object", + "properties": { + "tag": { + "title": "Tag", + "type": "string" + }, + "tag_group": { + "title": "Tag group", + "type": "string" + } + } + }, + "required": [ + "tag" + ] + }, + "lda_topics": { + "type": "array", + "title": "LDA topics", + "description": "LDA topics", + "items": { + "type": "object", + "properties": { + "model_info": { + "type": "array", + "title": "Model information", + "items": { + "type": "object", + "properties": { + "source": { + "title": "Source", + "type": "string" + }, + "author": { + "title": "Author", + "type": "string" + }, + "version": { + "title": "Version", + "type": "string" + }, + "model_id": { + "title": "Model Identifier", + "type": "string" + }, + "nb_topics": { + "title": "Number of topics", + "type": "number" + }, + "description": { + "title": "Description", + "type": "string" + }, + "corpus": { + "title": "Corpus name", + "type": "string" + }, + "uri": { + "title": "URI", + "type": "string" + } + } + }, + "required": [ + "model_id" + ] + }, + "topic_description": { + "type": "array", + "title": "Topic information", + "items": { + "type": "object", + "properties": { + "topic_id": { + "title": "Topic identifier", + "type": ["integer", "string"] + }, + "topic_score": { + "title": "Topic score", + "type": ["number", "string"] + }, + "topic_label": { + "title": "Topic label", + "type": "string" + }, + "topic_words": { + "type": "array", + "title": "Topic words", + "description": "Words", + "items": { + "type": "object", + "properties": { + "word": { + "title": "Word", + "type": "string" }, - "tag_group": { - "title": "Tag group", - "type": "string" + "word_weight": { + "title": "Word weight", + "type": "number" } - } - }, - "required": [ - "tag" - ] + } + }, + "required": [ + "word" + ] + } + } + }, + "required": [ + "topic_id" + ] } + + }, + "additionalProperties": false } + }, + "embeddings":{ + "type": "array", + "title": "Word embeddings", + "description": "Word embeddings", + "items": { + "type": "object", + "properties": { + "id": { + "title": "Vector Model ID", + "type": "string" + }, + "description": { + "title": "Vector Model Description", + "type": "string" + }, + "date": { + "title": "Date (YYYY-MM-DD)", + "type": "string" + }, + "vector": { + "title": "Vector", + "type": "object" + } + }, + "required": [ + "id","vector" + ] + } + }, + "additional": { + "type": "object", + "description": "Additional metadata", + "properties": {} } - }, - "provenance":{ - "type":"array", - "description":"Provenance", - "items":{ - "$ref":"provenance-schema.json" - } - }, - "additional": { - "type": "object", - "description": "Additional metadata", - "properties": {} - } + } } \ No newline at end of file diff --git a/application/schemas/iptc-phovidmdshared-schema.json b/application/schemas/iptc-phovidmdshared-schema.json index 065fd2733..52014c8a1 100644 --- a/application/schemas/iptc-phovidmdshared-schema.json +++ b/application/schemas/iptc-phovidmdshared-schema.json @@ -49,25 +49,28 @@ "ArtworkOrObject": { "type": "object", "properties": { - "circaDateCreated": { - "title": "Circa Date Created {Artwork or Object detail}", - "description": "Approximate date or range of dates associated with the creation and production of an artwork or object or its components.", - "type": "string" + "title": { + "$ref": "#/definitions/AltLang", + "description": "A reference for the artwork or object in the image.", + "title": "Title {Artwork or Object detail}" }, "contentDescription": { "$ref": "#/definitions/AltLang", "description": "A textual description of the content depicted in the artwork or object.", "title": "Content Description {Artwork or Object detail}" }, - "contributionDescription": { + "physicalDescription": { "$ref": "#/definitions/AltLang", - "description": "A textual description about a contribution made to an artwork or an object.", - "title": "Contribution Description {Artwork or Object detail}" + "description": "A textual description of the physical characteristics of the artwork or object, without reference to the content depicted.", + "title": "Physical Description {Artwork or Object detail}" }, - "copyrightNotice": { - "$ref": "#/definitions/AltLang", - "description": "Contains any necessary copyright notice for claiming the intellectual property for artwork or an object in the image and should identify the current owner of the copyright of this work with associated intellectual property rights.", - "title": "Copyright Notice {Artwork or Object detail}" + "creatorNames": { + "title": "Creator {Artwork or Object detail}", + "description": "Contains the name of the artist who has created artwork or an object in the image. In cases where the artist could or should not be identified the name of a company or organisation may be appropriate.", + "type": "array", + "items": { + "type": "string" + } }, "creatorIdentifiers": { "title": "Creator ID {Artwork or Object detail}", @@ -77,46 +80,29 @@ "type": "string" } }, - "creatorNames": { - "title": "Creator {Artwork or Object detail}", - "description": "Contains the name of the artist who has created artwork or an object in the image. In cases where the artist could or should not be identified the name of a company or organisation may be appropriate.", + "contributionDescription": { + "$ref": "#/definitions/AltLang", + "description": "A textual description about a contribution made to an artwork or an object.", + "title": "Contribution Description {Artwork or Object detail}" + }, + "stylePeriod": { + "title": "Style Period {Artwork or Object detail}", + "description": "The style, historical or artistic period, movement, group, or school whose characteristics are represented in the artwork or object.", "type": "array", "items": { "type": "string" } }, - "currentCopyrightOwnerIdentifier": { - "title": "Current Copyright Owner ID {Artwork or Object detail}", - "description": "Globally unique identifier for the current owner of the copyright of the artwork or object.", - "type": "string", - "format": "uri" - }, - "currentCopyrightOwnerName": { - "title": "Current Copyright Owner Name {Artwork or Object detail}", - "description": "Name of the current owner of the copyright of the artwork or object.", - "type": "string" - }, - "currentLicensorIdentifier": { - "title": "Current Licensor ID {Artwork or Object detail}", - "description": "Globally unique identifier for the current licensor of the artwork or object.", - "type": "string", - "format": "uri" - }, - "currentLicensorName": { - "title": "Current Licensor Name {Artwork or Object detail}", - "description": "Name of the current licensor of the artwork or object.", - "type": "string" - }, "dateCreated": { "title": "Date Created {Artwork or Object detail}", "description": "Designates the date and optionally the time the artwork or object in the image was created. This relates to artwork or objects with associated intellectual property rights.", "type": "string", "format": "date-time" }, - "physicalDescription": { - "$ref": "#/definitions/AltLang", - "description": "A textual description of the physical characteristics of the artwork or object, without reference to the content depicted.", - "title": "Physical Description {Artwork or Object detail}" + "circaDateCreated": { + "title": "Circa Date Created {Artwork or Object detail}", + "description": "Approximate date or range of dates associated with the creation and production of an artwork or object or its components.", + "type": "string" }, "source": { "title": "Source {Artwork or Object detail}", @@ -134,19 +120,38 @@ "type": "string", "format": "uri" }, - "stylePeriod": { - "title": "Style Period {Artwork or Object detail}", - "description": "The style, historical or artistic period, movement, group, or school whose characteristics are represented in the artwork or object.", - "type": "array", - "items": { - "type": "string" - } + "currentCopyrightOwnerName": { + "title": "Current Copyright Owner Name {Artwork or Object detail}", + "description": "Name of the current owner of the copyright of the artwork or object.", + "type": "string" + }, + "currentCopyrightOwnerIdentifier": { + "title": "Current Copyright Owner ID {Artwork or Object detail}", + "description": "Globally unique identifier for the current owner of the copyright of the artwork or object.", + "type": "string", + "format": "uri" }, - "title": { + + "copyrightNotice": { "$ref": "#/definitions/AltLang", - "description": "A reference for the artwork or object in the image.", - "title": "Title {Artwork or Object detail}" + "description": "Contains any necessary copyright notice for claiming the intellectual property for artwork or an object in the image and should identify the current owner of the copyright of this work with associated intellectual property rights.", + "title": "Copyright Notice {Artwork or Object detail}" + }, + + + "currentLicensorName": { + "title": "Current Licensor Name {Artwork or Object detail}", + "description": "Name of the current licensor of the artwork or object.", + "type": "string" + }, + + "currentLicensorIdentifier": { + "title": "Current Licensor ID {Artwork or Object detail}", + "description": "Globally unique identifier for the current licensor of the artwork or object.", + "type": "string", + "format": "uri" } + }, "additionalProperties": false }, diff --git a/application/schemas/iptc-pmd-schema.json b/application/schemas/iptc-pmd-schema.json index 698869241..279badf4c 100644 --- a/application/schemas/iptc-pmd-schema.json +++ b/application/schemas/iptc-pmd-schema.json @@ -74,6 +74,33 @@ "type": "string" } }, + + "sceneCodesLabelled": { + "title": "Scene Codes", + "description": "Describes the scene of a photo content. Specifies one ore more terms from the IPTC \"Scene-NewsCodes\". Each Scene is represented as a string of 6 digits in an unordered list.", + "type": "array", + "items": { + "type": "object", + "properties":{ + "code": { + "title": "Scene Code", + "description": "Scene code as a string of 6 digits", + "type": "string" + }, + "label": { + "title": "Scene Label", + "description": "Label", + "type": "string" + }, + "description": { + "title": "Scene Description", + "description": "Description of the scene", + "type": "string" + } + } + } + }, + "subjectCodes": { "title": "Subject Code", "description": "Specifies one or more Subjects from the IPTC Subject-NewsCodes taxonomy to categorise the image. Each Subject is represented as a string of 8 digits in an unordered list.", @@ -82,6 +109,34 @@ "type": "string" } }, + + + "subjectCodesLabelled": { + "title": "Subject Codes", + "description": "Specifies one or more Subjects from the IPTC Subject-NewsCodes taxonomy to categorise the image. Each Subject is represented as a string of 8 digits in an unordered list.", + "type": "array", + "items": { + "type": "object", + "properties":{ + "code": { + "title": "Subject Code", + "description": "Subject code as a string of 8 digits", + "type": "string" + }, + "label": { + "title": "Subject Label", + "description": "Label", + "type": "string" + }, + "description": { + "title": "Subject Description", + "description": "Description of the scene", + "type": "string" + } + } + } + }, + "creatorNames": { "title": "Creator", "description": "Contains the name of the photographer, but in cases where the photographer should not be identified the name of a company or organisation may be appropriate.", diff --git a/application/schemas/script-schema.json b/application/schemas/script-schema.json index 0a87296ee..d2dbfc4c1 100644 --- a/application/schemas/script-schema.json +++ b/application/schemas/script-schema.json @@ -96,6 +96,28 @@ "title": "Unique user defined ID", "description": "The ID number of a research project is a unique number that is used to identify a particular project. Define and use a consistent scheme to use." }, + "identifiers": { + "type": "array", + "title": "Other identifiers", + "description": "Other identifiers", + "items": { + "type": "object", + "properties": { + "type": { + "title": "Identifier type", + "description": "Type of identifier e.g. `doi`, `handle`, `other`", + "type": "string" + }, + "identifier": { + "title": "Identifier", + "type": "string" + } + }, + "required": [ + "identifier" + ] + } + }, "title": { "type": "string", "title": "Project title", @@ -275,19 +297,22 @@ } }, "errata": { - "type": "object", + "type": "array", "title": "Errata", "description": "List of corrected errors in data, scripts or output", - "properties": { - "erratum_date": { - "title": "Date of erratum", - "description": "Date when the erratum was reported or published", - "type": "string" - }, - "erratum_description": { - "title": "Description of the erratum", - "description": "A description of the erratum, with information on which data, scripts, or output were impacted", - "type": "string" + "items": { + "type": "object", + "properties": { + "date": { + "title": "Date of erratum", + "description": "Date when the erratum was reported or published", + "type": "string" + }, + "description": { + "title": "Description of the erratum", + "description": "A description of the erratum, with information on which data, scripts, or output were impacted", + "type": "string" + } } } }, @@ -344,10 +369,12 @@ }, "abbreviation": { "title": "Abbreviation", - "description": "Abbreviation" + "description": "Abbreviation", + "type": "string" }, "email": { "title": "Email", + "type": "string", "description": "Email" }, "author_id": { @@ -359,10 +386,12 @@ "properties": { "type": { "title": "Type", + "type": "string", "description": "Source of identifier, e.g. ORCID" }, "id": { "title": "Identifier", + "type": "string", "description": "Author's unique identifier for the corresponding source" } } @@ -382,7 +411,7 @@ "type": "object", "properties": { "name": { - "title": "N`ame", + "title": "Name", "type": "string", "description": "Name of the person, corporate body, or agency responsible for the work's substantive and intellectual content. If a person, invert first and last name and use commas." }, @@ -397,14 +426,17 @@ }, "abbreviation": { "title": "Abbreviation", + "type": "string", "description": "Abbreviation" }, "email": { "title": "Email", + "type": "string", "description": "Email" }, "url": { "title": "URL", + "type": "string", "description": "URL" } }, @@ -465,14 +497,17 @@ }, "abbreviation": { "title": "Abbreviation", + "type": "string", "description": "Abbreviation" }, "email": { "title": "Email", + "type": "string", "description": "Email" }, "url": { "title": "URL", + "type": "string", "description": "URL" } }, @@ -482,29 +517,32 @@ } }, "reviews_comments": { - "type": "object", - "title": "Reviews and comments", - "description": "List and description of reviews and comments received on the project", - "properties": { - "comment_date": { - "title": "Date of the comment", - "description": "Date when the comment was provided", - "type": "string" - }, - "comment_by": { - "title": "Provider of the comment", - "description": "Name and title of the comment provider (individual or organization)", - "type": "string" - }, - "comment_description": { - "title": "Description of the comment", - "description": "A description of the comment", - "type": "string" - }, - "comment_response": { - "title": "Response on the comment", - "description": "Response by the primary investigator or research team on the comment", - "type": "string" + "type": "array", + "items": { + "type": "object", + "title": "Reviews and comments", + "description": "List and description of reviews and comments received on the project", + "properties": { + "comment_date": { + "title": "Date of the comment", + "description": "Date when the comment was provided", + "type": "string" + }, + "comment_by": { + "title": "Provider of the comment", + "description": "Name and title of the comment provider (individual or organization)", + "type": "string" + }, + "comment_description": { + "title": "Description of the comment", + "description": "A description of the comment", + "type": "string" + }, + "comment_response": { + "title": "Response on the comment", + "description": "Response by the primary investigator or research team on the comment", + "type": "string" + } } } }, @@ -538,6 +576,18 @@ "description": "Acknowledgement statement", "type": "string" }, + "disclaimer": { + "title": "Disclaimer", + "type": "string" + }, + "confidentiality": { + "title": "Confidentiality", + "type": "string" + }, + "citation_requirement": { + "type": "string", + "description": "Citation requirement (can include a specific recommended citation)" + }, "related_projects": { "type": "array", "title": "Related research projects", @@ -615,27 +665,37 @@ } }, "themes": { - "title": "Themes", "type": "array", - "description": "Themes covered by the project (ideally, a controlled vocabulary should be used)", + "description": "Themes", "items": { "type": "object", "properties": { + "id": { + "title": "Unique Identifier", + "type": "string" + }, "name": { "title": "Name", - "description": "Theme label, typically extracted from a pre-defined taxonomy", + "type": "string" + }, + "parent_id": { + "title": "Parent Identifier", "type": "string" }, "vocabulary": { - "title": "Vocabulary name", - "description": "Vocabulary name (for themes extracted from controlled vocabularies)", + "title": "Vocabulary", + "description": "Name of the controlled vocabulary", "type": "string" }, "uri": { "title": "Vocabulary URI", + "description": "Link to the controlled vocabulary web page, if the theme is from a taxonomy.", "type": "string" } - } + }, + "required": [ + "name" + ] } }, "topics": { @@ -678,22 +738,31 @@ "disciplines": { "type": "array", "title": "Disciplines", - "description": "Disciplines e.g. `Social sciences, economics`, `Natural sciences, biology` (ideally, a controlled vocabulary should be used)", + "description": "Disciplines e.g. `Social sciences, economics`, `Natural sciences, biology`", "items": { "type": "object", "properties": { + "id": { + "title": "Unique Identifier", + "type": "string" + }, "name": { "title": "Discipline title or name", "type": "string" }, + "parent_id": { + "title": "Parent discipline Identifier", + "description": "Parent discipline ID", + "type": "string" + }, "vocabulary": { - "title": "Vocabulary name", - "description": "Vocabulary name (for disciplines extracted from controlled vocabularies)", + "title": "Vocabulary", + "description": "Vocabulary", "type": "string" }, "uri": { - "title": "Vocabulary URI", - "description": "Vocabulary uri", + "title": "URI", + "description": "Website link", "type": "string" } }, @@ -747,6 +816,10 @@ } } }, + "copyright": { + "title": "Copyright", + "type": "string" + }, "technology_environment": { "title": "Technology environment", "description": "Notes about the technology environment used by the authors to implement the project", @@ -808,7 +881,7 @@ }, "additionalProperties": false }, - "required": [ + "required": [ "name" ] }, @@ -975,20 +1048,24 @@ "title": "Name", "type": "string" }, + "role": { + "title": "Role", + "type": "string" + }, "affiliation": { "title": "Affiliation", "type": "string" }, - "role": { - "title": "Role", + "email": { + "title": "Email", "type": "string" }, - "uri": { - "title": "URI", + "telephone": { + "title": "Telephone", "type": "string" }, - "phone": { - "title": "Phone number", + "uri": { + "title": "URI", "type": "string" } } @@ -996,52 +1073,171 @@ "required": [ "name" ] - }, - "provenance":{ - "type":"array", - "description":"Provenance", - "items":{ - "$ref":"provenance-schema.json" - } + } + } + }, + "provenance": { + "type": "array", + "description": "Provenance", + "items": { + "$ref": "provenance-schema.json" + } + }, + "tags": { + "type": "array", + "title": "Tags (user-defined)", + "description": "Tags", + "items": { + "type": "object", + "properties": { + "tag": { + "title": "Tag", + "type": "string" }, - "tags": { - "type": "array", - "title": "Tags (user-defined)", - "description": "Tags", - "items": { - "type": "object", - "properties": { - "tag": { - "title": "Tag", - "type": "string" - }, - "tag_group": { - "title": "Tag group", - "type": "string" + "tag_group": { + "title": "Tag group", + "type": "string" + } + } + }, + "required": [ + "tag" + ] + }, + "lda_topics": { + "type": "array", + "title": "LDA topics", + "description": "LDA topics", + "items": { + "type": "object", + "properties": { + "model_info": { + "type": "array", + "title": "Model information", + "items": { + "type": "object", + "properties": { + "source": { + "title": "Source", + "type": "string" + }, + "author": { + "title": "Author", + "type": "string" + }, + "version": { + "title": "Version", + "type": "string" + }, + "model_id": { + "title": "Model Identifier", + "type": "string" + }, + "nb_topics": { + "title": "Number of topics", + "type": "number" + }, + "description": { + "title": "Description", + "type": "string" + }, + "corpus": { + "title": "Corpus name", + "type": "string" + }, + "uri": { + "title": "URI", + "type": "string" + } } - } - }, - "required": [ - "tag" - ] - }, - "copyright": { - "title": "Copyright", - "type": "string" - }, - "disclaimer": { - "title": "Disclaimer", - "type": "string" + }, + "required": [ + "model_id" + ] + }, + "topic_description": { + "type": "array", + "title": "Topic information", + "items": { + "type": "object", + "properties": { + "topic_id": { + "title": "Topic identifier", + "type": ["integer", "string"] + }, + "topic_score": { + "title": "Topic score", + "type": ["number", "string"] + }, + "topic_label": { + "title": "Topic label", + "type": "string" + }, + "topic_words": { + "type": "array", + "title": "Topic words", + "description": "Words", + "items": { + "type": "object", + "properties": { + "word": { + "title": "Word", + "type": "string" + }, + "word_weight": { + "title": "Word weight", + "type": "number" + } + } + }, + "required": [ + "word" + ] + } + } + }, + "required": [ + "topic_id" + ] + } + }, - "confidentiality": { - "title": "Confidentiality", - "type": "string" + "additionalProperties": false + } + }, + "embeddings":{ + "type": "array", + "title": "Word embeddings", + "description": "Word embeddings", + "items": { + "type": "object", + "properties": { + "id": { + "title": "Vector Model ID", + "type": "string" + }, + "description": { + "title": "Vector Model Description", + "type": "string" + }, + "date": { + "title": "Date (YYYY-MM-DD)", + "type": "string" + }, + "vector": { + "title": "Vector", + "type": "object" + } }, - "citation_requirement": { - "type": "string", - "description": "Citation requirement (can include a specific recommended citation)" - } + "required": [ + "id","vector" + ] } + }, + "additional": { + "type": "object", + "description": "Additional metadata", + "properties": {} } } } \ No newline at end of file diff --git a/application/schemas/survey-schema.json b/application/schemas/survey-schema.json index 9cec126ee..1b484cddc 100644 --- a/application/schemas/survey-schema.json +++ b/application/schemas/survey-schema.json @@ -3,56 +3,61 @@ "$schema": "http://json-schema.org/draft-07/schema#", "title": "Survey Microdata Schema", "id": "survey-schema.json", - "version" :"0.0", - "description": "Schema for Survey data type based on DDI 2.5", - "allOf": [ + "version": "0.0", + "description": "Schema for Survey data type based on DDI 2.5", + "allOf": [ { - "type": "object", - "properties": { - "repositoryid": { - "type": "string", - "title": "Collection ID that owns the survey", - "description": "Abbreviation for the collection that owns this survey." - }, - "access_policy": { - "type": "string", - "title": "Data access policy", - "description": "Data access policy for attached microdata resources", - "enum": [ - "direct", - "open", - "public", - "licensed", - "remote", - "data_na" - ], - "default": "data_na" - }, - "published": { - "type": "integer", - "description": "Status of the survey - 0=draft, 1=published", - "default": 0 - }, - "overwrite": { - "type": "string", - "description": "Overwrite survey if already exists?", - "enum":["yes","no"], - "default": "no" - } + "type": "object", + "properties": { + "repositoryid": { + "type": "string", + "title": "Collection ID that owns the survey", + "description": "Abbreviation for the collection that owns this survey." + }, + "access_policy": { + "type": "string", + "title": "Data access policy", + "description": "Data access policy for attached microdata resources", + "enum": [ + "direct", + "open", + "public", + "licensed", + "remote", + "data_na" + ], + "default": "data_na" + }, + "published": { + "type": "integer", + "description": "Status of the survey - 0=draft, 1=published", + "default": 0 + }, + "overwrite": { + "type": "string", + "description": "Overwrite survey if already exists?", + "enum": [ + "yes", + "no" + ], + "default": "no" } + } + }, + { + "$ref": "ddi-schema.json" }, - { "$ref": "ddi-schema.json" }, { "type": "object", - "properties": { - "provenance":{ - "type":"array", - "description":"Provenance", - "items":{ - "$ref":"provenance-schema.json" + "properties": { + "provenance": { + "type": "array", + "description": "Provenance", + "items": { + "$ref": "provenance-schema.json" } }, - "tags": { + "tags": { "type": "array", "title": "Tags (user-defined)", "description": "Tags", @@ -73,12 +78,148 @@ "tag" ] }, + "lda_topics": { + "type": "array", + "title": "LDA topics", + "description": "LDA topics", + "items": { + "type": "object", + "properties": { + "model_info": { + "type": "array", + "title": "Model information", + "items": { + "type": "object", + "properties": { + "source": { + "title": "Source", + "type": "string" + }, + "author": { + "title": "Author", + "type": "string" + }, + "version": { + "title": "Version", + "type": "string" + }, + "model_id": { + "title": "Model Identifier", + "type": "string" + }, + "nb_topics": { + "title": "Number of topics", + "type": "number" + }, + "description": { + "title": "Description", + "type": "string" + }, + "corpus": { + "title": "Corpus name", + "type": "string" + }, + "uri": { + "title": "URI", + "type": "string" + } + } + }, + "required": [ + "model_id" + ] + }, + "topic_description": { + "type": "array", + "title": "Topic information", + "items": { + "type": "object", + "properties": { + "topic_id": { + "title": "Topic identifier", + "type": [ + "integer", + "string" + ] + }, + "topic_score": { + "title": "Topic score", + "type": [ + "number", + "string" + ] + }, + "topic_label": { + "title": "Topic label", + "type": "string" + }, + "topic_words": { + "type": "array", + "title": "Topic words", + "description": "Words", + "items": { + "type": "object", + "properties": { + "word": { + "title": "Word", + "type": "string" + }, + "word_weight": { + "title": "Word weight", + "type": "number" + } + } + }, + "required": [ + "word" + ] + } + } + }, + "required": [ + "topic_id" + ] + } + }, + "additionalProperties": false + } + }, + "embeddings": { + "type": "array", + "title": "Word embeddings", + "description": "Word embeddings", + "items": { + "type": "object", + "properties": { + "id": { + "title": "Vector Model ID", + "type": "string" + }, + "description": { + "title": "Vector Model Description", + "type": "string" + }, + "date": { + "title": "Date (YYYY-MM-DD)", + "type": "string" + }, + "vector": { + "title": "Vector", + "type": "object" + } + }, + "required": [ + "id", + "vector" + ] + } + }, "additional": { "type": "object", "description": "Additional metadata not covered by DDI elements", "properties": {} } + } } - } -] + ] } \ No newline at end of file diff --git a/application/schemas/table-schema.json b/application/schemas/table-schema.json index 983a7517a..f58f0a4fe 100644 --- a/application/schemas/table-schema.json +++ b/application/schemas/table-schema.json @@ -3,29 +3,29 @@ "$schema": "http://json-schema.org/draft-07/schema#", "description": "Draft Schema for Table data type", "type": "object", - "definitions":{ - "authoring_entity":{ - "type":"array", - "title":"Authoring entity/Primary investigators", - "description":"The person, corporate body, or agency responsible for the work's substantive and intellectual content. Repeat the element for each author, and use 'affiliation' attribute if available. Invert first and last name and use commas.", - "items":{ - "type":"object", - "properties":{ - "name":{ - "title":"Agency Name", - "type":"string" + "definitions": { + "authoring_entity": { + "type": "array", + "title": "Authoring entity/Primary investigators", + "description": "The person, corporate body, or agency responsible for the work's substantive and intellectual content. Repeat the element for each author, and use 'affiliation' attribute if available. Invert first and last name and use commas.", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Agency Name", + "type": "string" }, - "affiliation":{ - "title":"Affiliation", - "type":"string" + "affiliation": { + "title": "Affiliation", + "type": "string" }, - "abbreviation":{ - "title":"Abbreviation", - "type":"string" + "abbreviation": { + "title": "Abbreviation", + "type": "string" }, - "uri":{ - "title":"URI", - "type":"string" + "uri": { + "title": "URI", + "type": "string" }, "author_id": { "type": "array", @@ -46,94 +46,97 @@ } } }, - "required":[ + "required": [ "name" ] } }, - "contributor":{ - "type":"array", - "items":{ - "type":"object", - "properties":{ - "name":{ - "title":"Name", - "type":"string" + "contributor": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string" }, - "affiliation":{ - "title":"Affiliation", - "type":"string" + "affiliation": { + "title": "Affiliation", + "type": "string" }, - "abbreviation":{ - "title":"Abbreviation", - "type":"string" + "abbreviation": { + "title": "Abbreviation", + "type": "string" }, - "role":{ - "title":"Role", - "type":"string" + "role": { + "title": "Role", + "type": "string" }, - "uri":{ - "title":"URI", - "type":"string" + "uri": { + "title": "URI", + "type": "string" } }, - "required":[ + "required": [ "name" ] } }, - "keyword":{ - "type":"array", - "items":{ - "type":"object", - "properties":{ - "name":{ - "title":"Name", - "type":"string" + "keyword": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string" }, - "vocabulary":{ - "title":"Vocabulary name", - "type":"string" + "vocabulary": { + "title": "Vocabulary name", + "type": "string" }, - "uri":{ - "title":"Vocabulary URI", - "type":"string" + "uri": { + "title": "Vocabulary URI", + "type": "string" } } } } }, - "properties": { - + "properties": { "repositoryid": { "type": "string", "title": "Collection ID that owns the document", "description": "Abbreviation for the collection that owns the document" }, - "published": { "type": "integer", "title": "Status", "description": "Status - 0=draft, 1=published", "default": 0 }, - "overwrite": { "type": "string", - "description": "Overwrite document if already exists?", - "enum":["yes","no"], + "description": "Overwrite document if already exists?", + "enum": [ + "yes", + "no" + ], "default": "no" }, - - "metadata_information": { + "metadata_information": { "type": "object", "title": "Document metadata information", "description": "Document description", - "properties": { + "properties": { "idno": { "title": "Unique ID number for the document", "type": "string" }, + "title": { + "title": "Document title", + "type": "string" + }, "producers": { "type": "array", "title": "Producers", @@ -181,8 +184,7 @@ "type": "object", "title": "Table Description", "description": "Table Description", - "properties": { - + "properties": { "title_statement": { "type": "object", "description": "Title statement", @@ -212,10 +214,9 @@ "title": "Abbreviation or Acronym", "description": "Any form of the title used as a substitute or alternative to the formal title of the resource." }, - "abbreviated_title": { - "title": "Abbreviated Title", - "description": "Title as abbreviated for indexing or identification.", - "type": "string" + "translated_title": { + "title": "Translated title", + "type": "string" } }, "required": [ @@ -223,99 +224,98 @@ "title" ] }, - - "id_numbers": { - "type": "object", - "title": "Identifier numbers", - "description": "Numbers e.g. ISSN, ISBN, DOI, etc.", - "properties": { - "type": { - "title": "Type", - "description":"ID number type such as ISSN, ISBN, DOI", - "type": "string" + "identifiers": { + "type": "array", + "title": "Other identifiers", + "description": "Other identifiers", + "items": { + "type": "object", + "properties": { + "type": { + "title": "Identifier type", + "description": "Type of identifier e.g. `doi`, `handle`, `other`", + "type": "string" + }, + "identifier": { + "title": "Identifier", + "type": "string" + } }, - "value": { - "title": "ID number", - "type": "string" - } - }, - "required": [ - "type","value" - ] - }, - + "required": [ + "identifier" + ] + } + }, "authoring_entity": { "title": "Authoring entity", - "$ref":"#/definitions/authoring_entity", + "$ref": "#/definitions/authoring_entity", "description": "Authoring entity" }, "contributors": { "title": "Contributors", - "$ref":"#/definitions/contributor", + "$ref": "#/definitions/contributor", "description": "Contributors" }, - "publisher":{ - "type":"array", - "title":"Publisher", - "description":"Publisher", - "items":{ - "type":"object", - "properties":{ - "name":{ - "title":"Name", - "type":"string" - }, - "affiliation":{ - "title":"Affiliation", - "type":"string" - }, - "abbreviation":{ - "title":"Abbreviation", - "type":"string" - }, - "role":{ - "title":"Role", - "type":"string" - }, - "uri":{ - "title":"URI", - "type":"string" + "publisher": { + "type": "array", + "title": "Publisher", + "description": "Publisher", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string" + }, + "affiliation": { + "title": "Affiliation", + "type": "string" + }, + "abbreviation": { + "title": "Abbreviation", + "type": "string" + }, + "role": { + "title": "Role", + "type": "string" + }, + "uri": { + "title": "URI", + "type": "string" } }, - "required":[ + "required": [ "name" ] } }, "date_created": { "type": "string", - "title":"Date created", + "title": "Date created", "description": "Date created" }, "date_published": { "type": "string", - "title":"Date published" + "title": "Date published" }, "date_modified": { "type": "string", - "title":"Date last modified", - "description": "Date on which the resource was changed." + "title": "Date last modified", + "description": "Date on which the resource was changed." }, - "version": { "title": "Version", - "type": "string" + "type": "string" }, "description": { "title": "Description", "type": "string", - "description":"Description" + "description": "Description" }, - "table_columns": { "type": "array", "title": "Table column names", - "description": "List of table column names", + "description": "List of table column names", "items": { "type": "object", "properties": { @@ -327,7 +327,7 @@ "title": "Variable name", "description": "Variable name", "type": "string" - }, + }, "dataset": { "title": "Dataset", "type": "string", @@ -339,11 +339,10 @@ ] } }, - "table_rows": { "type": "array", "title": "Table row level data", - "description": "Table row level data", + "description": "Table row level data", "items": { "type": "object", "properties": { @@ -355,7 +354,7 @@ "title": "Variable name", "description": "Variable name", "type": "string" - }, + }, "dataset": { "title": "Dataset", "type": "string", @@ -367,7 +366,6 @@ ] } }, - "table_footnotes": { "type": "array", "title": "Chart footnotes", @@ -377,7 +375,7 @@ "properties": { "number": { "title": "Footnote number", - "description":"Footnote number", + "description": "Footnote number", "type": "string" }, "text": { @@ -388,13 +386,12 @@ "required": [ "text" ] - } + } }, - "table_series": { "type": "array", "title": "Table series", - "description": "Table series", + "description": "Table series", "items": { "type": "object", "properties": { @@ -421,10 +418,9 @@ ] } }, - "statistics": { "type": "array", - "title": "Statistics", + "title": "Statistics", "items": { "type": "object", "properties": { @@ -437,7 +433,7 @@ }, "unit_observation": { "type": "array", - "title": "Unit observation", + "title": "Unit observation", "items": { "type": "object", "properties": { @@ -450,19 +446,38 @@ }, "data_sources": { "type": "array", - "title": "Data sources", + "title": "Data sources", "items": { "type": "object", "properties": { - "source": { - "title": "Source", + "name": { + "title": "Name", + "type": "string", + "description": "The name (title) of the data source. For example, a table data may be extracted from the `Population Census 2020`." + }, + "abbreviation": { + "title": "Abbreviation", + "description": "The abbreviation (acronym) of the data source.", + "type": "string" + }, + "source_id": { + "title": "Source ID", + "description": "A unique identifier for the source, such as a Digital Object Identifier (DOI).", "type": "string" + }, + "note": { + "title": "Note", + "type": "string", + "description": "A note that describes how the source was used, possibly mentioning issues in the use of the source." + }, + "uri": { + "title": "URI", + "type": "string", + "description": "A link (URL) to the source dataset." } } } }, - - "time_periods": { "type": "array", "title": "Time periods", @@ -485,11 +500,10 @@ "from" ] } - }, - + }, "universe": { "type": "array", - "title": "Universe", + "title": "Universe", "items": { "type": "object", "properties": { @@ -500,10 +514,9 @@ } } }, - "ref_country": { "type": "array", - "title": "Reference country", + "title": "Reference country", "items": { "type": "object", "properties": { @@ -518,7 +531,6 @@ } } }, - "geographic_units": { "title": "Geographic locations", "description": "List of geographic units (regions, countries, states, provinces, etc.) for which data are available in the database.", @@ -540,19 +552,43 @@ "title": "Type", "description": "Type of geographic unit e.g. country, state, region, province etc", "type": "string" - } + } }, "required": [ "name" ] } - }, + }, "geographic_granularity": { "description": "Granularity of geographic coverage. examples `national`, `regional`, `provincial`", "type": "string", - "title":"Geographic granularity" + "title": "Geographic granularity" + }, + "bbox": { + "title": "Geographic bounding box", + "type": "array", + "items": { + "type": "object", + "properties": { + "west": { + "title": "West", + "type": "string" + }, + "east": { + "title": "East", + "type": "string" + }, + "south": { + "title": "South", + "type": "string" + }, + "north": { + "title": "North", + "type": "string" + } + } + } }, - "languages": { "type": "array", "description": "languages", @@ -575,10 +611,9 @@ "name" ] }, - "links": { "type": "array", - "title": "Links", + "title": "Links", "items": { "type": "object", "properties": { @@ -593,10 +628,26 @@ } } }, - + "api_documentation": { + "type":"array", + "description": "API Documentation", + "items":{ + "type": "object", + "properties": { + "description": { + "title": "Description", + "type": "string" + }, + "uri": { + "title": "URI", + "type": "string" + } + } + } + }, "publications": { "type": "array", - "title": "Publications", + "title": "Publications", "items": { "type": "object", "properties": { @@ -611,19 +662,48 @@ } } }, - "keywords":{ - "allOf": [ - {"$ref":"#/definitions/keyword"} + "keywords": { + "allOf": [ + { + "$ref": "#/definitions/keyword" + } ], - "title":"Keywords", - "description":"Keywords" + "title": "Keywords", + "description": "Keywords" }, - "themes":{ - "type":"array", - "description":"Themes", - "allOf": [ - {"$ref":"#/definitions/keyword"} - ] + "themes": { + "type": "array", + "description": "Themes", + "items": { + "type": "object", + "properties": { + "id": { + "title": "Unique Identifier", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "parent_id": { + "title": "Parent Identifier", + "type": "string" + }, + "vocabulary": { + "title": "Vocabulary", + "description": "Name of the controlled vocabulary", + "type": "string" + }, + "uri": { + "title": "Vocabulary URI", + "description": "Link to the controlled vocabulary web page, if the theme is from a taxonomy.", + "type": "string" + } + }, + "required": [ + "name" + ] + } }, "topics": { "type": "array", @@ -642,7 +722,7 @@ }, "parent_id": { "title": "Parent topic Identifier", - "description":"For subtopics, provide the ID of the parent topic", + "description": "For subtopics, provide the ID of the parent topic", "type": "string" }, "vocabulary": { @@ -657,11 +737,11 @@ } }, "required": [ - "id","name" + "id", + "name" ] } }, - "disciplines": { "type": "array", "title": "Disciplines", @@ -669,10 +749,19 @@ "items": { "type": "object", "properties": { + "id": { + "title": "Unique Identifier", + "type": "string" + }, "name": { "title": "Discipline title or name", "type": "string" }, + "parent_id": { + "title": "Parent discipline Identifier", + "description": "Parent discipline ID", + "type": "string" + }, "vocabulary": { "title": "Vocabulary", "description": "Vocabulary", @@ -689,7 +778,6 @@ ] } }, - "definitions": { "type": "array", "title": "Definitions", @@ -717,7 +805,6 @@ ] } }, - "classifications": { "type": "array", "title": "Classifications", @@ -750,16 +837,13 @@ ] } }, - - "rights": { "type": "string", "title": "Rights" }, - "license": { "type": "array", - "title": "License", + "title": "License", "items": { "type": "object", "properties": { @@ -774,18 +858,20 @@ } } }, - "citation": { "type": "string", - "title":"Citation", - "description": "A bibliographic reference for the resource." + "title": "Citation", + "description": "A bibliographic reference for the resource." }, - "confidentiality": { "type": "string", - "title":"Confidentiality" + "title": "Confidentiality" + }, + "sdc": { + "type": "string", + "title": "Statistical disclosure control", + "description": "Information on statistical disclosure control measures applied to the table. This can include cell suppression, or other techniques. Specialized packages have been developed for this purpose, like [*sdcTable: Methods for Statistical Disclosure Control in Tabular Data*](https://cran.r-project.org/web/packages/sdcTable/index.html) and https://cran.r-project.org/web/packages/sdcTable/sdcTable.pdf \nThe information provided here should be such that it does not provide intruders with useful information for reverse-engineering the protection measures applied to the table." }, - "contacts": { "type": "array", "title": "Contacts", @@ -823,10 +909,9 @@ "name" ] }, - "notes": { "type": "array", - "title": "Notes", + "title": "Notes", "items": { "type": "object", "properties": { @@ -837,7 +922,6 @@ } } }, - "relations": { "type": "array", "title": "Relations", @@ -852,7 +936,7 @@ "type": { "title": "Type", "type": "string", - "enum":[ + "enum": [ "isPartOf", "hasPart", "isVersionOf", @@ -871,19 +955,17 @@ "required": [ "name" ] - } - + } }, "additionalProperties": false }, - - "provenance":{ - "type":"array", - "description":"Provenance", - "items":{ - "$ref":"provenance-schema.json" + "provenance": { + "type": "array", + "description": "Provenance", + "items": { + "$ref": "provenance-schema.json" } - }, + }, "tags": { "type": "array", "title": "Tags", @@ -905,11 +987,140 @@ "tag" ] }, - + "lda_topics": { + "type": "array", + "title": "LDA topics", + "description": "LDA topics", + "items": { + "type": "object", + "properties": { + "model_info": { + "type": "array", + "title": "Model information", + "items": { + "type": "object", + "properties": { + "source": { + "title": "Source", + "type": "string" + }, + "author": { + "title": "Author", + "type": "string" + }, + "version": { + "title": "Version", + "type": "string" + }, + "model_id": { + "title": "Model Identifier", + "type": "string" + }, + "nb_topics": { + "title": "Number of topics", + "type": "number" + }, + "description": { + "title": "Description", + "type": "string" + }, + "corpus": { + "title": "Corpus name", + "type": "string" + }, + "uri": { + "title": "URI", + "type": "string" + } + } + }, + "required": [ + "model_id" + ] + }, + "topic_description": { + "type": "array", + "title": "Topic information", + "items": { + "type": "object", + "properties": { + "topic_id": { + "title": "Topic identifier", + "type": ["integer", "string"] + }, + "topic_score": { + "title": "Topic score", + "type": ["number", "string"] + }, + "topic_label": { + "title": "Topic label", + "type": "string" + }, + "topic_words": { + "type": "array", + "title": "Topic words", + "description": "Words", + "items": { + "type": "object", + "properties": { + "word": { + "title": "Word", + "type": "string" + }, + "word_weight": { + "title": "Word weight", + "type": "number" + } + } + }, + "required": [ + "word" + ] + } + } + }, + "required": [ + "topic_id" + ] + } + + }, + "additionalProperties": false + } + }, + "embeddings":{ + "type": "array", + "title": "Word embeddings", + "description": "Word embeddings", + "items": { + "type": "object", + "properties": { + "id": { + "title": "Vector Model ID", + "type": "string" + }, + "description": { + "title": "Vector Model Description", + "type": "string" + }, + "date": { + "title": "Date (YYYY-MM-DD)", + "type": "string" + }, + "vector": { + "title": "Vector", + "type": "object" + } + }, + "required": [ + "id","vector" + ] + } + }, "additional": { "type": "object", "description": "Additional metadata", "properties": {} } } -} +} \ No newline at end of file diff --git a/application/schemas/timeseries-db-schema.json b/application/schemas/timeseries-db-schema.json index e7ac76a92..13242fe97 100644 --- a/application/schemas/timeseries-db-schema.json +++ b/application/schemas/timeseries-db-schema.json @@ -5,21 +5,21 @@ "description": "Schema for timeseries database", "type": "object", "properties": { - "published": { "type": "integer", "title": "Status", "description": "0=draft, 1=published", "default": 0 }, - "overwrite": { "type": "string", "description": "Overwrite database if already exists?", - "enum": ["yes", "no"], + "enum": [ + "yes", + "no" + ], "default": "no" }, - "metadata_information": { "type": "object", "title": "Document metadata information", @@ -62,7 +62,7 @@ } } }, - "production_date": { + "prod_date": { "type": "string", "title": "Date of Production", "description": "Document production date using format(YYYY-MM-DD)" @@ -79,16 +79,36 @@ "title": "Database Description", "description": "Database Description", "properties": { - "title_statement": { "type": "object", "description": "Study title", - "properties": { "idno": { "type": "string", "title": "Unique user defined ID", - "description": "The ID number of a dataset is a unique number that is used to identify a particular survey. Define and use a consistent scheme to use. Such an ID could be constructed as follows: country-producer-survey-year-version where \n - country is the 3-letter ISO country abbreviation \n - producer is the abbreviation of the producing agency \n - survey is the survey abbreviation \n - year is the reference year (or the year the survey started) \n - version is the number dataset version number (see Version Description below)" + "description": "The ID number of a database is a unique number that is used to identify a particular database." + }, + "identifiers": { + "type": "array", + "title": "Other identifiers", + "description": "Other identifiers", + "items": { + "type": "object", + "properties": { + "type": { + "title": "Identifier type", + "description": "Type of identifier e.g. `doi`, `handle`, `other`", + "type": "string" + }, + "identifier": { + "title": "Identifier", + "type": "string" + } + }, + "required": [ + "identifier" + ] + } }, "title": { "type": "string", @@ -99,13 +119,11 @@ "type": "string", "title": "Survey subtitle", "description": "A short subtitle for the survey" - }, "alternate_title": { "type": "string", "title": "Abbreviation or Acronym", "description": "The abbreviation of a survey is usually the first letter of each word of the titled survey. The survey reference year(s) may be included." - }, "translated_title": { "title": "Translated Title", @@ -118,7 +136,6 @@ "title" ] }, - "authoring_entity": { "type": "array", "title": "Authoring entity", @@ -130,23 +147,24 @@ "title": "Agency Name", "type": "string", "description": "Name of the person, corporate body, or agency responsible for the work's substantive and intellectual content. If a person, invert first and last name and use commas." - }, - "role": { - "title": "Role", - "type": "string", - "description": "Title of the person (if any) responsible for the work's substantive and intellectual content." - }, + }, "affiliation": { "title": "Affiliation", "type": "string" }, "abbreviation": { "title": "Abbreviation", - "description": "Abbreviation" + "description": "Abbreviation", + "type": "string" }, "email": { "title": "Email", - "description": "Email" + "description": "Email", + "type": "string" + }, + "uri": { + "title": "URI", + "type": "string" } }, "required": [ @@ -210,7 +228,8 @@ } }, "required": [ - "version", "date" + "version", + "date" ] } }, @@ -272,33 +291,40 @@ } } }, - "themes": { - "type": "array", - "title": "Themes", - "description": "Themes", + "themes":{ + "type":"array", + "description":"Themes", "items": { - "type": "object", - "properties": { - "name": { - "title": "Topic", - "type": "string" - }, - "vocabulary": { - "title": "Vocabulary", - "description": "Name of the controlled vocabulary, if the topic is from a taxonomy.", - "type": "string" - }, - "uri": { - "title": "Vocabulary URI", - "description": "Link to the controlled vocabulary web page, if the topic is from a taxonomy.", - "type": "string" - } + "type": "object", + "properties": { + "id": { + "title": "Unique Identifier", + "type": "string" }, - "required": [ - "name" - ] + "name": { + "title": "Name", + "type": "string" + }, + "parent_id": { + "title": "Parent Identifier", + "type": "string" + }, + "vocabulary": { + "title": "Vocabulary", + "description": "Name of the controlled vocabulary", + "type": "string" + }, + "uri": { + "title": "Vocabulary URI", + "description": "Link to the controlled vocabulary web page, if the theme is from a taxonomy.", + "type": "string" + } + }, + "required": [ + "name" + ] } - }, + }, "topics": { "type": "array", "title": "Topics", @@ -331,7 +357,8 @@ } }, "required": [ - "id", "name" + "id", + "name" ] } }, @@ -359,6 +386,24 @@ ] } }, + "ref_country": { + "type": "array", + "title": "Reference country", + "description": "List of countries for which data are available", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Country name", + "type": "string" + }, + "code": { + "title": "Country code", + "type": "string" + } + } + } + }, "geographic_units": { "title": "Geographic locations", "description": "List of geographic units (regions, countries, states, provinces, etc.) for which data are available in the database.", @@ -418,18 +463,15 @@ } } }, - "geographic_granularity": { "title": "Geographic granularity", "description": "Granularity of geographic coverage e.g. `national`, `regional`, `provincial`", "type": "string" }, - "geographic_area_count": { "description": "Number of geographic areas", "type": "string" }, - "sponsors": { "type": "array", "title": "Sponsor/Funding Agency", @@ -467,7 +509,6 @@ "name" ] }, - "acknowledgments": { "type": "array", "title": "Other Acknowledgments", @@ -497,7 +538,10 @@ "name" ] }, - + "acknowledgment_statement": { + "title": "An overall statement of acknowledgment, which can be used as an alternative (or supplement) to the itemized list provided in `acknowledgments`.", + "type": "string" + }, "contacts": { "type": "array", "title": "Contacts", @@ -535,7 +579,6 @@ "name" ] }, - "links": { "type": "array", "title": "Related links", @@ -557,7 +600,6 @@ "uri" ] }, - "languages": { "type": "array", "description": "Supported languages", @@ -614,8 +656,8 @@ "items": { "type": "object", "properties": { - "type": { - "title": "Type", + "name": { + "title": "Name", "type": "string" }, "uri": { @@ -629,7 +671,7 @@ } }, "required": [ - "type" + "name" ] }, "citation": { @@ -650,7 +692,6 @@ } } }, - "disclaimer": { "title": "Disclaimer", "type": "string" @@ -665,7 +706,6 @@ ], "additionalProperties": false }, - "additional": { "type": "object", "title": "Additional custom metadata", diff --git a/application/schemas/timeseries-schema.json b/application/schemas/timeseries-schema.json index 3c0fc41e2..61c06772f 100644 --- a/application/schemas/timeseries-schema.json +++ b/application/schemas/timeseries-schema.json @@ -5,892 +5,1069 @@ "description": "Schema for timeseries data type", "type": "object", "properties": { - - "repositoryid": { - "type": "string", - "title": "Collection ID that owns the series", - "description": "Collection that owns the series" - }, - - "access_policy": { - "type": "string", - "title": "Data access policy", - "description": "Data access policy for attached microdata resources", - "enum": [ - "direct", - "open", - "public", - "licensed", - "remote", - "na" - ], - "default": "na" - }, - - "data_remote_url": { - "type": "string", - "title": "Data website URL", - "description": "Link to the website where the data is available, this is only needed if `access_policy` is set to `remote`." - }, - "published": { - "type": "integer", - "title": "Status", - "description": "Status of the study - 0=draft, 1=published", - "default": 0 - }, - "overwrite": { - "type": "string", - "description": "Overwrite database if already exists?", - "enum":["yes","no"], - "default": "no" - }, - - "metadata_creation": { - "type": "object", - "title": "Metadata creation", - "description": "Information on who generated the documentation", - "properties": { - - "producers": { - "type": "array", - "title": "Producers", - "description": "List of producers", - "items": { - "type": "object", - "properties": { - "name": { - "title": "Name", - "description": "Name (required)", - "type": "string" + "repositoryid": { + "type": "string", + "title": "Collection ID that owns the series", + "description": "Collection that owns the series" + }, + "access_policy": { + "type": "string", + "title": "Data access policy", + "description": "Data access policy for attached microdata resources", + "enum": [ + "direct", + "open", + "public", + "licensed", + "remote", + "na" + ], + "default": "na" + }, + "data_remote_url": { + "type": "string", + "title": "Data website URL", + "description": "Link to the website where the data is available, this is only needed if `access_policy` is set to `remote`." + }, + "published": { + "type": "integer", + "title": "Status", + "description": "Status of the study - 0=draft, 1=published", + "default": 0 + }, + "overwrite": { + "type": "string", + "description": "Overwrite database if already exists?", + "enum": [ + "yes", + "no" + ], + "default": "no" + }, + "metadata_information": { + "type": "object", + "title": "Metadata creation", + "description": "Information on who generated the documentation", + "properties": { + "title": { + "title": "Document title", + "description": "Document title", + "type": "string", + "_ddi_xpath": "docDscr/citation/titlStmt/titl" }, - "abbr": { - "title": "Abbreviation", - "type": "string" + "idno": { + "title": "Unique ID number for the document", + "type": "string", + "_ddi_xpath": "docDscr/citation/titlStmt/IDNo" }, - "affiliation": { - "type": "string", - "title": "Affiliation" + "producers": { + "type": "array", + "title": "Producers", + "description": "List of producers", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "Name (required)", + "type": "string" + }, + "abbr": { + "title": "Abbreviation", + "type": "string" + }, + "affiliation": { + "type": "string", + "title": "Affiliation" + }, + "role": { + "title": "Role", + "type": "string" + } + } + }, + "required": [ + "name" + ] }, - "role": { - "title": "Role", - "type": "string" + "prod_date": { + "title": "Date of Production", + "description": "Document production date using format(YYYY-MM-DD)", + "type": "string" + }, + "version": { + "title": "Document version", + "description": "Identify and describe the current version of the document", + "type": "string" } - } }, - "required": [ - "name" - ] - }, - "prod_date": { - "title": "Date of Production", - "description": "Document production date using format(YYYY-MM-DD)", - "type": "string" - }, - "version": { - "title": "Document version", - "description": "Identify and describe the current version of the document", - "type": "string" - } + "additionalProperties": false }, - "additionalProperties": false - }, - - "series_description":{ - "description" :"Series information", - "type": "object", - "properties": { - "idno": { - "type": "string", - "title": "Series unique ID", - "description": "Unique series ID" - }, - "name": { - "type": "string", - "title": "Series Name" - }, - "database_id": { - "type": "string", - "title": "Database ID", - "description": "Series database ID" - }, - "aliases": { - "type": "array", - "title": "Series other names", - "items": { - "type": "object", - "properties": { - "alias": { - "title": "Alias", - "type": "string" - } - } - } - }, - "alternate_identifiers": { - "type": "array", - "title": "Alternate identifiers", - "items": { - "type": "object", - "properties": { - "identifier": { - "title": "Identifier", - "type": "string" - }, - "name": { - "title": "Identifier name", - "type": "string" - }, - "database": { - "title": "Database", - "type": "string" - }, - "uri": { - "title": "URI", - "type": "string" - }, - "notes": { - "title": "Notes", - "type": "string" - } - }, - "required": [ - "identifier" - ] - } - }, - "measurement_unit": { - "type": "string", - "title": "Series unit of measure" - }, - "periodicity": { - "type": "string", - "title": "Periodicity of data" - }, - "base_period": { - "type": "string", - "title": "Base period" - }, - "definition_short": { - "type": "string", - "title": "Definition short" - }, - "definition_long": { - "type": "string", - "title": "Definition long" - }, - "definition_references": { - "type": "array", - "title": "Definition references", - "description": "URL to standard definition of the indicator (international or national standard)", - "items": { - "type": "object", - "properties": { - "source": { - "title": "Source", - "type": "string" - }, - "uri": { - "title": "URI", - "description": "URI", - "type": "string" - }, - "note": { - "title": "Note", - "description": "Note", - "type": "string" - } - }, - "required": [ - "uri" - ] - } - }, - - "statistical_concept": { - "type": "string", - "title": "Statistical concept" - }, - - "concepts": { - "type": "array", - "title": "Related concepts", - "description": "Related concepts", - "items": { - "type": "object", - "properties": { - "name": { - "title": "Name", - "type": "string" - }, - "definition": { - "title": "Definition", - "description": "Definition", - "type": "string" - }, - "uri": { - "title": "URI", - "description": "Website link", - "type": "string" - } - }, - "required": [ - "name" - ] - } - }, - "methodology": { - "type": "string", - "title": "Methodology" - }, - "imputation": { - "type": "string", - "title": "Imputations" - }, - "missing": { - "type": "string", - "title": "Treatment of missing values" - }, - "quality_checks": { - "type": "string", - "title": "Quality control methods" - }, - "quality_note": { - "type": "string", - "title": "Note on data quality" - }, - "sources_discrepancies": { - "type": "string", - "title": "Discrepency sources" - }, - "series_break": { - "type": "string", - "title": "Breaks in series" - }, - - "limitation": { - "type": "string", - "title": "Limitations and exceptions" - }, - - "themes":{ - "type":"array", - "title":"Themes", - "items":{ - "type":"object", - "properties":{ - "name":{ - "title":"Name", - "type":"string" - }, - "vocabulary":{ - "title":"Vocabulary name", - "type":"string" - }, - "uri":{ - "title":"Vocabulary URI", - "type":"string" - } - } - } - }, - "topics": { - "type": "array", - "title": "Topics", - "description": "Topics covered by the table (ideally, the list of topics will be a controlled vocabulary)", - "items": { - "type": "object", - "properties": { - "id": { - "title": "Unique Identifier", - "type": "string" + "series_description": { + "description": "Series information", + "type": "object", + "properties": { + "idno": { + "type": "string", + "title": "Series unique ID", + "description": "Unique series ID" + }, + "doi": { + "type": "string", + "title": "DOI handle" }, "name": { - "title": "Topic", - "type": "string" - }, - "parent_id": { - "title": "Parent topic Identifier", - "description":"For subtopics, provide the ID of the parent topic", - "type": "string" - }, - "vocabulary": { - "title": "Vocabulary", - "description": "Name of the controlled vocabulary, if the topic is from a taxonomy.", - "type": "string" - }, - "uri": { - "title": "Vocabulary URI", - "description": "Link to the controlled vocabulary web page, if the topic is from a taxonomy.", - "type": "string" - } - }, - "required": [ - "name" - ] - } - }, - - "disciplines": { - "type": "array", - "title": "Disciplines", - "description": "Disciplines e.g. `Social sciences, economics`, `Natural sciences, biology`", - "items": { - "type": "object", - "properties": { - "name": { - "title": "Discipline title or name", - "type": "string" - }, - "vocabulary": { - "title": "Vocabulary", - "description": "Vocabulary", - "type": "string" - }, - "uri": { - "title": "URI", - "description": "Website link", - "type": "string" - } - }, - "required": [ - "name" - ] - } - }, - - - "relevance": { - "type": "string", - "title": "Relavance" - }, - "time_periods": { - "type": "array", - "title": "Series dates", - "items": { - "type": "object", - "properties": { - "start": { - "type": "string", - "title": "Start" - }, - "end": { - "type": "string", - "title": "End" - } - } - } - }, - "geographic_units": { - "title": "Geographic locations", - "description": "List of geographic units (regions, countries, states, provinces, etc.) for which data are available in the database.", - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "title": "Location name", - "description": "Name of the geographic unit e.g. 'World', 'Africa', 'Afghanistan'", - "type": "string" - }, - "code": { - "title": "Location code", - "description": "Code of the geographic unit (for countries, preferred = ISO3 code)", - "type": "string" - }, - "type": { - "title": "Type", - "description": "Type of geographic unit e.g. country, state, region, province etc", - "type": "string" - } - }, - "required": [ - "name" - ] - } - }, - "aggregation_method": { - "type": "string", - "title": "Aggregation method" - }, - "disaggregation": { - "type": "string", - "title": "Dissaggregation" - }, - "license": { - "type": "object", - "title": "Access licence", - "properties": { - "name": { - "type": "string", - "title": "Name" - }, - "uri": { - "type": "string", - "title": "URI" - } - } - }, - "confidentiality": { - "type": "string", - "title": "Confidentiality statement", - "description": "Confidentiality statement" - }, - "confidentiality_status": { - "type": "string", - "title": "Confidentiality status" - }, - "confidentiality_note": { - "type": "string", - "title": "Confidentiality note" - }, - "links": { - "type": "array", - "title": "Series links", - "description": "Links to API calls, websites, etc.", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Link type", - "description": "Link types - API, website, etc." - }, - "description": { - "type": "string", - "title": "Description" - }, - "uri": { - "type": "string", - "title": "URI" - } - } - } - }, - "api_documentation": { - "type": "object", - "description": "API Documentation", - "properties": { - "description": { - "title": "Description", - "type": "string" - }, - "uri": { - "title": "URI", - "type": "string" - } - } - }, - "sources":{ - "type":"array", - "title":"Sources", - "description":"Sources", - "items": { + "type": "string", + "title": "Series Name" + }, + "database_id": { + "type": "string", + "title": "Database ID", + "description": "Series database ID" + }, + "aliases": { + "type": "array", + "title": "Series other names", + "items": { + "type": "object", + "properties": { + "alias": { + "title": "Alias", + "type": "string" + } + } + } + }, + "alternate_identifiers": { + "type": "array", + "title": "Alternate identifiers", + "items": { + "type": "object", + "properties": { + "identifier": { + "title": "Identifier", + "type": "string" + }, + "name": { + "title": "Identifier name", + "type": "string" + }, + "database": { + "title": "Database", + "type": "string" + }, + "uri": { + "title": "URI", + "type": "string" + }, + "notes": { + "title": "Notes", + "type": "string" + } + }, + "required": [ + "identifier" + ] + } + }, + "languages": { + "type": "array", + "description": "Supported languages", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "Language title", + "type": "string" + }, + "code": { + "title": "code", + "Descripton": "Language code", + "type": "string" + } + } + }, + "required": [ + "name" + ] + }, + "measurement_unit": { + "type": "string", + "title": "Series unit of measure" + }, + "dimensions": { + "type": "array", + "title": "Dimensions", + "items": { + "type": "object", + "properties": { + "label": { + "title": "Label", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + } + }, + "required": [ + "label" + ] + } + }, + "periodicity": { + "type": "string", + "title": "Periodicity of data" + }, + "base_period": { + "type": "string", + "title": "Base period" + }, + "definition_short": { + "type": "string", + "title": "Definition short" + }, + "definition_long": { + "type": "string", + "title": "Definition long" + }, + "definition_references": { + "type": "array", + "title": "Definition references", + "description": "URL to standard definition of the indicator (international or national standard)", + "items": { + "type": "object", + "properties": { + "source": { + "title": "Source", + "type": "string" + }, + "uri": { + "title": "URI", + "description": "URI", + "type": "string" + }, + "note": { + "title": "Note", + "description": "Note", + "type": "string" + } + }, + "required": [ + "uri" + ] + } + }, + "statistical_concept": { + "type": "string", + "title": "Statistical concept" + }, + "concepts": { + "type": "array", + "title": "Related concepts", + "description": "Related concepts", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string" + }, + "definition": { + "title": "Definition", + "description": "Definition", + "type": "string" + }, + "uri": { + "title": "URI", + "description": "Website link", + "type": "string" + } + }, + "required": [ + "name" + ] + } + }, + "methodology": { + "type": "string", + "title": "Methodology" + }, + "imputation": { + "type": "string", + "title": "Imputations" + }, + "missing": { + "type": "string", + "title": "Treatment of missing values" + }, + "quality_checks": { + "type": "string", + "title": "Quality control methods" + }, + "quality_note": { + "type": "string", + "title": "Note on data quality" + }, + "sources_discrepancies": { + "type": "string", + "title": "Discrepency sources" + }, + "series_break": { + "type": "string", + "title": "Breaks in series" + }, + "limitation": { + "type": "string", + "title": "Limitations and exceptions" + }, + "themes": { + "type": "array", + "description": "Themes", + "items": { + "type": "object", + "properties": { + "id": { + "title": "Unique Identifier", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "parent_id": { + "title": "Parent Identifier", + "type": "string" + }, + "vocabulary": { + "title": "Vocabulary", + "description": "Name of the controlled vocabulary", + "type": "string" + }, + "uri": { + "title": "Vocabulary URI", + "description": "Link to the controlled vocabulary web page, if the theme is from a taxonomy.", + "type": "string" + } + }, + "required": [ + "name" + ] + } + }, + "topics": { + "type": "array", + "title": "Topics", + "description": "Topics covered by the table (ideally, the list of topics will be a controlled vocabulary)", + "items": { + "type": "object", + "properties": { + "id": { + "title": "Unique Identifier", + "type": "string" + }, + "name": { + "title": "Topic", + "type": "string" + }, + "parent_id": { + "title": "Parent topic Identifier", + "description": "For subtopics, provide the ID of the parent topic", + "type": "string" + }, + "vocabulary": { + "title": "Vocabulary", + "description": "Name of the controlled vocabulary, if the topic is from a taxonomy.", + "type": "string" + }, + "uri": { + "title": "Vocabulary URI", + "description": "Link to the controlled vocabulary web page, if the topic is from a taxonomy.", + "type": "string" + } + }, + "required": [ + "name" + ] + } + }, + "disciplines": { + "type": "array", + "title": "Disciplines", + "description": "Disciplines e.g. `Social sciences, economics`, `Natural sciences, biology`", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Discipline title or name", + "type": "string" + }, + "vocabulary": { + "title": "Vocabulary", + "description": "Vocabulary", + "type": "string" + }, + "uri": { + "title": "URI", + "description": "Website link", + "type": "string" + } + }, + "required": [ + "name" + ] + } + }, + "relevance": { + "type": "string", + "title": "Relavance" + }, + "time_periods": { + "type": "array", + "title": "Series dates", + "items": { + "type": "object", + "properties": { + "start": { + "type": "string", + "title": "Start" + }, + "end": { + "type": "string", + "title": "End" + } + } + } + }, + "ref_country": { + "type": "array", + "title": "Reference country", + "description": "List of countries for which data are available", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Country name", + "type": "string" + }, + "code": { + "title": "Country code", + "type": "string" + } + } + } + }, + "geographic_units": { + "title": "Geographic locations", + "description": "List of geographic units (regions, countries, states, provinces, etc.) for which data are available in the database.", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Location name", + "description": "Name of the geographic unit e.g. 'World', 'Africa', 'Afghanistan'", + "type": "string" + }, + "code": { + "title": "Location code", + "description": "Code of the geographic unit (for countries, preferred = ISO3 code)", + "type": "string" + }, + "type": { + "title": "Type", + "description": "Type of geographic unit e.g. country, state, region, province etc", + "type": "string" + } + }, + "required": [ + "name" + ] + } + }, + "bbox": { + "title": "Geographic bounding box", + "type": "array", + "items": { + "type": "object", + "properties": { + "west": { + "title": "West", + "type": "string" + }, + "east": { + "title": "East", + "type": "string" + }, + "south": { + "title": "South", + "type": "string" + }, + "north": { + "title": "North", + "type": "string" + } + } + } + }, + "aggregation_method": { + "type": "string", + "title": "Aggregation method" + }, + "disaggregation": { + "type": "string", + "title": "Dissaggregation" + }, + "license": { + "type": "array", + "title": "License", + "description": "License information", + "items": { "type": "object", "properties": { - "id": { - "title": "Source ID", - "type": "string" - }, - "name": { - "title": "Name", - "description": "Source name", - "type": "string" - }, - "organization": { - "title": "Organization", - "type": "string" - }, - "type": { - "title": "Source type", - "type": "string" - }, - "note": { - "title": "Note", - "type": "string" - } + "name": { + "title": "Name", + "type": "string" + }, + "uri": { + "title": "URI", + "type": "string" + }, + "note": { + "title": "Note", + "type": "string" + } + } + }, + "required": [ + "name" + ] + }, + "confidentiality": { + "type": "string", + "title": "Confidentiality statement", + "description": "Confidentiality statement" + }, + "confidentiality_status": { + "type": "string", + "title": "Confidentiality status" + }, + "confidentiality_note": { + "type": "string", + "title": "Confidentiality note" + }, + "links": { + "type": "array", + "title": "Series links", + "description": "Links to API calls, websites, etc.", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Link type", + "description": "Link types - API, website, etc." + }, + "description": { + "type": "string", + "title": "Description" + }, + "uri": { + "type": "string", + "title": "URI" + } + } + } + }, + "api_documentation": { + "type": "array", + "description": "API Documentation", + "items": { + "type": "object", + "properties": { + "description": { + "title": "Description", + "type": "string" + }, + "uri": { + "title": "URI", + "type": "string" + } + } + } + }, + "authoring_entity": { + "type": "array", + "title": "Authoring entity", + "description": "The person, corporate body, or agency responsible for the work's substantive and intellectual content. Repeat the element for each author, and use 'affiliation' attribute if available. Invert first and last name and use commas.", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Agency Name", + "type": "string", + "description": "Name of the person, corporate body, or agency responsible for the work's substantive and intellectual content. If a person, invert first and last name and use commas." + }, + "affiliation": { + "title": "Affiliation", + "type": "string" + }, + "abbreviation": { + "title": "Abbreviation", + "description": "Abbreviation" + }, + "email": { + "title": "Email", + "description": "Email" + }, + "uri": { + "title": "URI", + "type": "string" + } }, "required": [ - "name" + "name" ] - } + } + }, + "sources": { + "type": "array", + "title": "Sources", + "description": "Sources", + "items": { + "type": "object", + "properties": { + "id": { + "title": "Source ID", + "type": "string" + }, + "name": { + "title": "Name", + "description": "Source name", + "type": "string" + }, + "organization": { + "title": "Organization", + "type": "string" + }, + "type": { + "title": "Source type", + "type": "string" + }, + "note": { + "title": "Note", + "type": "string" + } + }, + "required": [ + "name" + ] + } + }, + "sources_note": { + "type": "string", + "title": "Notes form original sources" + }, + "keywords": { + "type": "array", + "description": "Keywords", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Keyword", + "type": "string" + }, + "vocabulary": { + "title": "Vocabulary", + "type": "string" + }, + "uri": { + "title": "URI", + "type": "string" + } + }, + "required": [ + "name" + ] + } + }, + "acronyms": { + "type": "array", + "description": "Acronyms", + "items": { + "type": "object", + "properties": { + "acronym": { + "title": "Acronym or abbreviation", + "type": "string" + }, + "expansion": { + "title": "Expansion of the acronym or abbreviation", + "type": "string" + }, + "occurrence": { + "title": "Occurrence of the acronym in the document", + "type": "number" + } + }, + "required": [ + "acronym", + "expansion" + ] + } + }, + "notes": { + "title": "Notes", + "description": "Notes", + "type": "array", + "items": { + "type": "object", + "properties": { + "note": { + "title": "Note", + "type": "string" + } + } + } + }, + "related_indicators": { + "type": "array", + "description": "Related indicators", + "items": { + "type": "object", + "properties": { + "code": { + "title": "Indicator code", + "type": "string" + }, + "label": { + "title": "Indicator name", + "type": "string" + }, + "uri": { + "title": "URI", + "type": "string" + } + } }, - - "sources_note": { - "type": "string", - "title": "Notes form original sources" - }, - "keywords": { - "type": "array", - "description": "Keywords", - "items": { - "type": "object", - "properties": { - "name": { - "title": "Keyword", - "type": "string" - }, - "vocabulary": { - "title": "Vocabulary", - "type": "string" - }, - "uri": { - "title": "URI", - "type": "string" - } - }, - "required": [ - "name" - ] - } - }, - "acronyms": { - "type": "array", - "description": "Acronyms", - "items": { - "type": "object", - "properties": { - "acronym": { - "title": "Acronym or abbreviation", - "type": "string" - }, - "expansion": { - "title": "Expansion of the acronym or abbreviation", - "type": "string" - }, - "occurrence": { - "title": "Occurrence of the acronym in the document", - "type": "number" - } - }, - "required": [ - "acronym", "expansion" - ] - } - }, - "notes": { - "title": "Notes", - "description": "Notes", - "type": "array", - "items": { - "type": "object", - "properties": { - "note": { - "title": "Note", - "type": "string" - } - } - } - }, - "related_indicators": { - "type": "array", - "description": "Related indicators", - "items": { - "type": "object", - "properties": { - "code": { - "title": "Indicator code", - "type": "string" - }, - "label": { - "title": "Indicator name", - "type": "string" - }, - "uri": { - "title": "URI", - "type": "string" - } - } - }, - "required": [ - "code" - ] - }, - "compliance": { - "type": "array", - "title": "Compliance with international resolution", - "description": "Compliance with international resolution", - "items": { - "type": "object", - "properties": { - "standard": { - "type": "string", - "title": "Standard name" - }, - "organization": { - "type": "string", - "title": "Organization name" - }, - "uri": { - "type": "string", - "title": "URI" - } - }, - "required": [ - "standard" - ] - } - }, - "framework": { - "type": "array", - "title": "Framework", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "title": "Name" - }, - "description": { - "type": "string", - "title": "Description" - }, - "goal_id": { - "type": "string", - "title": "Goal ID" - }, - "goal_name": { - "type": "string", - "title": "Goal name" - }, - "goal_description": { - "type": "string", - "title": "Goal description" - }, - "target_id": { - "type": "string", - "title": "target ID" - }, - "target_name": { - "type": "string", - "title": "Target name" - }, - "target_description": { - "type": "string", - "title": "Target description" - }, - "indicator_id": { - "type": "string", - "title": "Indicator ID" - }, - "indicator_name": { - "type": "string", - "title": "Indicator name" - }, - "indicator_description": { - "type": "string", - "title": "Indicator description" - }, - "uri": { - "type": "string", - "title": "URI" - }, - "notes": { - "type": "string", - "title": "Description" - } - }, - "required": [ - "name" - ] - } - }, - "lda_topics": { - "type": "array", - "title": "LDA topics", - "description": "LDA topics", - "items": { + "required": [ + "code" + ] + }, + "compliance": { + "type": "array", + "title": "Compliance with international resolution", + "description": "Compliance with international resolution", + "items": { + "type": "object", + "properties": { + "standard": { + "type": "string", + "title": "Standard name" + }, + "abbreviation": { + "type": "string", + "title": "Abbreviation" + }, + "custodian": { + "type": "string", + "title": "Name of the custodian organization" + }, + "uri": { + "type": "string", + "title": "URI" + } + }, + "required": [ + "standard" + ] + } + }, + "framework": { + "type": "array", + "title": "Framework", + "items": { "type": "object", "properties": { - "model_info": { - "type": "array", - "title": "Model information", - "items": { - "type": "object", - "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "abbreviation": { + "type": "string", + "title": "Abbreviation" + }, + "custodian": { + "type": "string", + "title": "Custodian" + }, + "description": { + "type": "string", + "title": "Description" + }, + "goal_id": { + "type": "string", + "title": "Goal ID" + }, + "goal_name": { + "type": "string", + "title": "Goal name" + }, + "goal_description": { + "type": "string", + "title": "Goal description" + }, + "target_id": { + "type": "string", + "title": "target ID" + }, + "target_name": { + "type": "string", + "title": "Target name" + }, + "target_description": { + "type": "string", + "title": "Target description" + }, + "indicator_id": { + "type": "string", + "title": "Indicator ID" + }, + "indicator_name": { + "type": "string", + "title": "Indicator name" + }, + "indicator_description": { + "type": "string", + "title": "Indicator description" + }, + "uri": { + "type": "string", + "title": "URI" + }, + "notes": { + "type": "string", + "title": "Description" + } + }, + "required": [ + "name" + ] + } + }, + "series_groups": { + "type": "array", + "title": "Series groups", + "description": "Series included in groups", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description", + "description": "A brief description of the series group." + }, + "version": { + "type": "string", + "title": "Version" + }, + "uri": { + "type": "string", + "title": "URI" + } + } + }, + "required": [ + "name" + ] + } + }, + "required": [ + "idno", + "name" + ] + }, + "provenance": { + "type": "array", + "description": "Provenance", + "items": { + "$ref": "provenance-schema.json" + } + }, + "tags": { + "type": "array", + "title": "Tags (user-defined)", + "description": "Tags", + "items": { + "type": "object", + "properties": { + "tag": { + "title": "Tag", + "type": "string" + }, + "tag_group": { + "title": "Tag group", + "type": "string" + } + } + }, + "required": [ + "tag" + ] + }, + "lda_topics": { + "type": "array", + "title": "LDA topics", + "description": "LDA topics", + "items": { + "type": "object", + "properties": { + "model_info": { + "type": "array", + "title": "Model information", + "items": { + "type": "object", + "properties": { "source": { - "title": "Source", - "type": "string" + "title": "Source", + "type": "string" }, "author": { - "title": "Author", - "type": "string" + "title": "Author", + "type": "string" }, "version": { - "title": "Version", - "type": "string" + "title": "Version", + "type": "string" }, "model_id": { - "title": "Model Identifier", - "type": "string" + "title": "Model Identifier", + "type": "string" }, "nb_topics": { - "title": "Number of topics", - "type": "number" + "title": "Number of topics", + "type": "number" }, "description": { - "title": "Description", - "type": "string" + "title": "Description", + "type": "string" }, "corpus": { - "title": "Corpus name", - "type": "string" + "title": "Corpus name", + "type": "string" }, "uri": { - "title": "URI", - "type": "string" + "title": "URI", + "type": "string" } - } - }, - "required": [ - "model_id" - ] - }, - "topic_description": { - "type": "array", - "title": "Topic information", - "items": { - "type": "object", - "properties": { + } + }, + "required": [ + "model_id" + ] + }, + "topic_description": { + "type": "array", + "title": "Topic information", + "items": { + "type": "object", + "properties": { "topic_id": { - "title": "Topic identifier", - "type": ["integer", "string"] + "title": "Topic identifier", + "type": [ + "integer", + "string" + ] }, "topic_score": { - "title": "Topic score", - "type": ["number", "string"] + "title": "Topic score", + "type": [ + "number", + "string" + ] }, "topic_label": { - "title": "Topic label", - "type": "string" + "title": "Topic label", + "type": "string" }, "topic_words": { - "type": "array", - "title": "Topic words", - "description": "Words", - "items": { - "type": "object", - "properties": { - "word": { - "title": "Word", - "type": "string" - }, - "word_weight": { - "title": "Word weight", - "type": "number" - } - } - }, - "required": [ - "word" - ] + "type": "array", + "title": "Topic words", + "description": "Words", + "items": { + "type": "object", + "properties": { + "word": { + "title": "Word", + "type": "string" + }, + "word_weight": { + "title": "Word weight", + "type": "number" + } + } + }, + "required": [ + "word" + ] } - } - }, - "required": [ - "topic_id" - ] - } + } }, - "additionalProperties": false - } + "required": [ + "topic_id" + ] + } + }, + "additionalProperties": false + } + }, + "embeddings": { + "type": "array", + "title": "Word embeddings", + "description": "Word embeddings", + "items": { + "type": "object", + "properties": { + "id": { + "title": "Vector Model ID", + "type": "string" }, - "word_vectors":{ - "type": "array", - "title": "Word vectors", - "description": "Word vectors", - "items": { - "type": "object", - "properties": { - "id": { - "title": "Vector Model ID", - "type": "string" - }, - "description": { - "title": "Vector Model Description", - "type": "string" - }, - "date": { - "title": "Date (YYYY-MM-DD)", - "type": "string" - }, - "vector": { - "title": "Vector", - "type": "object" - } - } - }, - "required": [ - "id","vector" - ] + "description": { + "title": "Vector Model Description", + "type": "string" }, - "series_groups": { - "type": "array", - "title": "Series groups", - "description": "Series included in groups", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "title": "Name" - }, - "version": { - "type": "string", - "title": "Version" - }, - "uri": { - "type": "string", - "title": "URI" - } - } - }, - "required": [ - "name" - ] - } - }, - "required": [ - "idno", - "name" - ] - - }, - "provenance":{ - "type":"array", - "description":"Provenance", - "items":{ - "$ref":"provenance-schema.json" - } - }, - "tags": { - "type": "array", - "title": "Tags (user-defined)", - "description": "Tags", - "items": { - "type": "object", - "properties": { - "tag": { - "title": "Tag", - "type": "string" - }, - "tag_group": { - "title": "Tag group", - "type": "string" - } + "date": { + "title": "Date (YYYY-MM-DD)", + "type": "string" + }, + "vector": { + "title": "Vector", + "type": [ + "object", + "array" + ] + } + }, + "required": [ + "id", + "vector" + ] } - }, - "required": [ - "tag" - ] }, "additional": { - "type": "object", - "title":"Additional custom metadata", - "description": "Any other custom metadata not covered by the schema", - "properties": {} + "type": "object", + "title": "Additional custom metadata", + "description": "Any other custom metadata not covered by the schema", + "properties": {} } - }, - "required": [ + }, + "required": [ "series_description" - ] - } \ No newline at end of file + ] +} \ No newline at end of file diff --git a/application/schemas/variable-group-schema.json b/application/schemas/variable-group-schema.json new file mode 100644 index 000000000..d0911475c --- /dev/null +++ b/application/schemas/variable-group-schema.json @@ -0,0 +1,75 @@ +{ + "$id": "http://ihsn.org/schemas/variable-group", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "definitions": {}, + "properties": { + "vgid": { + "title": "Variable Group ID", + "description": "Unique ID for the variable group e.g. VG1", + "type": "string", + "maxLength": 45 + }, + "variables": { + "title": "Variables", + "description": "List of variables for the group seperated by space e.g. V1 V2 V3", + "type": "string", + "maxLength": 5000 + }, + "variable_groups": { + "title": "Variable groups", + "description": "List of sub-groups e.g. VG2 VG3 VG4", + "type": "string", + "maxLength": 1000 + }, + "group_type": { + "title": "Type", + "type": "string", + "enum": [ + "subject", + "section", + "multiResp", + "grid", + "display", + "repetition", + "version", + "iteration", + "analysis", + "pragmatic", + "record", + "file", + "randomized", + "other" + ], + "maxLength": 45 + }, + "label": { + "title": "Label", + "type": "string", + "maxLength": 255 + }, + "universe": { + "title": "Universe", + "type": "string", + "maxLength": 255 + }, + "notes": { + "title": "Notes", + "type": "string", + "maxLength": 500 + }, + "txt": { + "title": "Text", + "type": "string", + "maxLength": 500 + }, + "definition": { + "title": "Definition", + "type": "string", + "maxLength": 500 + } + }, + "required": [ + "vgid" + ] +} \ No newline at end of file diff --git a/application/schemas/variable-schema.json b/application/schemas/variable-schema.json index 7ef70cedc..c29c7df68 100644 --- a/application/schemas/variable-schema.json +++ b/application/schemas/variable-schema.json @@ -1,6 +1,6 @@ { "$id": "http://ihsn.org/schemas/variable", - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "definitions": {}, "properties": { @@ -24,9 +24,12 @@ }, "var_intrvl": { "type": "string", - "title" : "Interval type", + "title": "Interval type", "description": "indicates the interval type; options are discrete or continuous.", - "enum": [ "discrete", "contin"] + "enum": [ + "discrete", + "contin" + ] }, "var_dcml": { "type": "string", @@ -35,25 +38,35 @@ }, "var_wgt": { "type": "integer", - "title":"Weight", + "title": "Weight", "description": "indicates whether the variable is a weight", "default": 0 - }, - "var_start_pos": { + }, + "loc_start_pos": { "type": "integer", "title": "Variable start position" }, - "var_end_pos": { + "loc_end_pos": { "type": "integer", "title": "Variable end position" }, - "var_width": { + "loc_width": { + "type": "integer", + "title": "Variable width" + }, + "loc_rec_seg_no": { "type": "integer", - "title": "Variable width" - }, + "title": "Record segment number, deck or card number the variable is located on" + }, "var_imputation": { "type": "string", - "title": "Imputation" + "title": "Imputation", + "description": "According to the Statistical Terminology glossary maintained by the National Science Foundation, this is `the process by which one estimates missing values for items that a survey respondent failed to provide,` and if applicable in this context, it refers to the type of procedure used. " + }, + "var_derivation": { + "type": "string", + "title": "Derivation", + "description": "Used only in the case of a derived variable, this element provides both a description of how the derivation was performed and the command used to generate the derived variable, as well as a specification of the other variables in the study used to generate the derivation. The `var` attribute provides the ID values of the other variables in the study used to generate this derived variable." }, "var_security": { "type": "string", @@ -76,6 +89,16 @@ "type": "string", "title": "Post-question text" }, + "var_forward": { + "type": "string", + "title": "Forward skip", + "description": "Contains a reference to IDs of possible following questions. This can be used to document forward skip instructions." + }, + "var_backward": { + "type": "string", + "title": "Backward skip", + "description": "Contains a reference to IDs of possible preceding questions. This can be used to document backward skip instructions." + }, "var_qstn_ivulnstr": { "type": "string", "title": "Interviewer instructions" @@ -85,8 +108,8 @@ "title": "Universe" }, "var_sumstat": { - "type": "array", - "description": "One or more statistical measures that describe the responses to a particular variable and may include one or more standard summaries, e.g., minimum and maximum values, median, mode, etc. \n\n The attribute 'type' denotes the type of statistics being shown: mean, median, mode, valid cases, invalid cases, minimum, maximum, or standard deviation.", + "type": "array", + "description": "One or more statistical measures that describe the responses to a particular variable and may include one or more standard summaries, e.g., minimum and maximum values, median, mode, etc. \n\n The attribute 'type' denotes the type of statistics being shown: mean, median, mode, valid cases, invalid cases, minimum, maximum, or standard deviation.", "items": { "type": "object", "properties": { @@ -95,7 +118,10 @@ "title": "Type" }, "value": { - "type": ["integer", "string"], + "type": [ + "integer", + "string" + ], "title": "Value" }, "wgtd": { @@ -111,8 +137,8 @@ "title": "Variable description" }, "var_catgry": { - "type": "array", - "title": "Categories", + "type": "array", + "title": "Categories", "items": { "type": "object", "properties": { @@ -137,20 +163,46 @@ "description": "Type such as frequency, percent, etc" }, "value": { - "type": ["integer", "string"], + "type": [ + "integer", + "string" + ], "title": "Value" }, "wgtd": { "type": "string", "title": "Weighted", "description": "For weighted values, enter `weighted`" - } + } } } } } } }, + "var_std_catgry": { + "type": "object", + "title": "Standard categories", + "description": "Standard category codes used in the variable, like industry codes, employment codes, or social class codes. The attribute `date` is provided to indicate the version of the code in place at the time of the study. The attribute `URI` is provided to indicate a URN or URL that can be used to obtain an electronic list of the category codes.", + "properties": { + "name": { + "title": "Standard classification name", + "type": "string" + }, + "source": { + "title": "Source", + "type": "string" + }, + "date": { + "title": "Date", + "type": "string" + }, + "uri": { + "title": "URI", + "type": "string" + } + } + }, "var_codinstr": { "type": "string", "title": "Recoding and derivation" @@ -159,49 +211,54 @@ "type": "array", "title": "Concepts", "items": { - "type": "object", - "properties": { - "title": { - "title": "Concept", - "type": "string" + "type": "object", + "properties": { + "title": { + "title": "Concept", + "type": "string" + }, + "vocab": { + "title": "Vocabulary", + "type": "string" + }, + "uri": { + "title": "Vocabulary URI", + "type": "string" + } }, - "vocab": { - "title": "Vocabulary", - "type": "string" + "required": [ + "title" + ] + } + }, + "var_format": { + "type": "object", + "title": "Variable format", + "description": "The technical format of the variable in question. Attributes for this element include: 'type', which indicates if the variable is character or numeric; 'formatname,' which in some cases may provide the name of the particular, proprietary format actually used; 'schema,' which identifies the vendor or standards body that defined the format (acceptable choices are SAS, SPSS, IBM, ANSI, ISO, XML-data or other); 'category,' which describes what kind of data the format represents, and includes date, time, currency, or 'other' conceptual possibilities.", + "properties": { + "type": { + "type": "string", + "title": "Type" }, - "uri": { - "title": "Vocabulary URI", - "type": "string" + "name": { + "type": "string", + "title": "Name" + }, + "note": { + "type": "string", + "title": "Note" } - }, - "required": [ - "title" - ] } - }, - "var_format": { - "type": "object", - "title": "Variable format", - "description": "The technical format of the variable in question. Attributes for this element include: 'type', which indicates if the variable is character or numeric; 'formatname,' which in some cases may provide the name of the particular, proprietary format actually used; 'schema,' which identifies the vendor or standards body that defined the format (acceptable choices are SAS, SPSS, IBM, ANSI, ISO, XML-data or other); 'category,' which describes what kind of data the format represents, and includes date, time, currency, or 'other' conceptual possibilities.", - "properties": { - "type": { - "type": "string", - "title": "Type" - }, - "name": { - "type": "string", - "title": "Name" - }, - "value": { - "type": "string", - "title": "Value" - } - } - }, + }, "var_notes": { "type": "string", "title": "Variable notes" } - }, - "required": [ "vid", "file_id", "name","labl" ] + }, + "required": [ + "vid", + "file_id", + "name", + "labl" + ] } \ No newline at end of file diff --git a/application/schemas/video-schema.json b/application/schemas/video-schema.json index 6690084f7..42243302c 100644 --- a/application/schemas/video-schema.json +++ b/application/schemas/video-schema.json @@ -87,7 +87,29 @@ "idno": { "type": "string", "title": "Unique video identifier" - }, + }, + "identifiers": { + "type": "array", + "title": "Other identifiers", + "description": "Other identifiers", + "items": { + "type": "object", + "properties": { + "type": { + "title": "Identifier type", + "description": "Type of identifier e.g. `doi`, `handle`, `other`", + "type": "string" + }, + "identifier": { + "title": "Identifier", + "type": "string" + } + }, + "required": [ + "identifier" + ] + } + }, "title": { "type": "string", "description": "Title" @@ -104,33 +126,60 @@ "type": "string", "description": "Genre" }, - "keywords": { - "type": "string", - "description": "Keywords" - }, - - "topics":{ + "keywords":{ "type":"array", - "title":"Topic Classification", - "description":"Topic Classification", "items":{ "type":"object", "properties":{ - "topic":{ - "title":"Topic", + "name":{ + "title":"Name", "type":"string" }, - "vocab":{ - "title":"Vocab", + "vocabulary":{ + "title":"Vocabulary name", "type":"string" }, "uri":{ - "title":"URI", + "title":"Vocabulary URI", "type":"string" } + } + } + }, + + "topics": { + "type": "array", + "title": "Topics", + "description": "Topics covered by the table (ideally, the list of topics will be a controlled vocabulary)", + "items": { + "type": "object", + "properties": { + "id": { + "title": "Unique Identifier", + "type": "string" + }, + "name": { + "title": "Topic", + "type": "string" + }, + "parent_id": { + "title": "Parent topic Identifier", + "description":"For subtopics, provide the ID of the parent topic", + "type": "string" + }, + "vocabulary": { + "title": "Vocabulary", + "description": "Name of the controlled vocabulary, if the topic is from a taxonomy.", + "type": "string" + }, + "uri": { + "title": "Vocabulary URI", + "description": "Link to the controlled vocabulary web page, if the topic is from a taxonomy.", + "type": "string" + } }, - "required":[ - "topic" + "required": [ + "name" ] } }, @@ -160,34 +209,40 @@ "description": "Primary entity described in the video" }, - "video_provider": { - "type": "string", - "description": "Video provider e.g. youtube, vimeo, facebook" - }, - - "video_url": { + "date_created": { "type": "string", - "description": "Video URL" + "description": "Date of creation (YYYY-MM-DD)" }, - - "embed_url": { + "date_published": { "type": "string", - "description": "Video embed URL" + "description": "Date published (YYYY-MM-DD)" }, - "encoding_format": { + "version": { "type": "string", - "title":"Encoding format", - "description": "Media type using a MIME format" + "description": "Version" }, - "duration": { + "status": { "type": "string", - "title":"Duration", - "description": "The duration of the video in ISO 8601 date time format - `hh:mm:ss`" + "title":"Creative work status", + "description": "Status of a creative work in terms of its stage in lifecycle. e.g. `incomplete`, `draft`, `published`, `obsolete`" }, - "content_location": { - "type": "string", - "description": "Location depicted or described in the video" + "country": { + "type": "array", + "title": "Countries", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Country name", + "type": "string" + }, + "code": { + "title": "Country code", + "type": "string" + } + } + } }, "spatial_coverage": { @@ -205,39 +260,250 @@ "description": "Period that the content applies to using ISO 8601 date time format" }, + "recorded_at": { + "type": "string", + "description": "Location where video was recorded" + }, + "audience": { "type": "string", "description": "Intended audience" }, - - "country": { - "type": "string", - "description": "Country" + + "bbox": { + "title": "Geographic bounding box", + "type": "array", + "items": { + "type": "object", + "properties": { + "west": { + "title": "West", + "type": "string" + }, + "east": { + "title": "East", + "type": "string" + }, + "south": { + "title": "South", + "type": "string" + }, + "north": { + "title": "North", + "type": "string" + } + } + } }, + "language": { + "type": "array", + "description": "languages", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "Language name", + "type": "string" + }, + "code": { + "title": "code", + "Descripton": "Language code", + "type": "string" + } + } + }, + "required": [ + "name" + ] + }, + + "creator": { "type": "string", - "description": "Language" + "description": "Creator" }, - "author": { + + "production_company": { "type": "string", - "description": "Author" + "description": "Production company" }, + "publisher": { "type": "string", "description": "Publisher" }, - "contributor": { + + "repository": { + "type": "string", + "title": "Repository" + }, + "contacts": { + "type": "array", + "title": "Contacts", + "description": "Contacts", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string" + }, + "role": { + "title": "Role", + "type": "string" + }, + "affiliation": { + "title": "Affiliation", + "type": "string" + }, + "email": { + "title": "Email", + "type": "string" + }, + "telephone": { + "title": "Telephone", + "type": "string" + }, + "uri": { + "title": "URI", + "type": "string" + } + } + }, + "required": [ + "name" + ] + }, + + "contributors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string" + }, + "affiliation": { + "title": "Affiliation", + "type": "string" + }, + "abbreviation": { + "title": "Abbreviation", + "type": "string" + }, + "role": { + "title": "Role", + "type": "string" + }, + "uri": { + "title": "URI", + "type": "string" + } + }, + "required": [ + "name" + ] + } + }, + "sponsors": { + "type": "array", + "title": "Funding Agency/Sponsor", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Funding Agency/Sponsor", + "type": "string" + }, + "abbr": { + "title": "Abbreviation", + "type": "string" + }, + "grant": { + "title": "Grant Number", + "type": "string" + }, + "role": { + "title": "Role", + "type": "string" + } + }, + "required": [ + "name" + ] + } + }, + + "translators": { + "type": "array", + "title": "Translators", + "description": "Translators", + "items": { + "type": "object", + "properties": { + "first_name": { + "title": "First name", + "type": "string" + }, + "initial": { + "title": "Initial", + "type": "string" + }, + "last_name": { + "title": "Last name", + "type": "string" + }, + "affiliation": { + "title": "Affiliation", + "type": "string" + } + } + }, + "required": [ + "first_name" + ] + }, + + "is_based_on": { + "type": "string", + "title":"A resource from which this work is derived", + "description": "A resource from which this work is derived or from which it is a modification or adaption" + }, + "is_part_of": { + "type": "string", + "title":"Indicate an item that this item is part of" + }, + + "relations": { + "type": "array", + "title":"Defines, as a free text field, the relation between the video being documented and other resources. This is a Dublin Core element." + }, + + "video_provider": { + "type": "string", + "description": "Video provider e.g. youtube, vimeo, facebook" + }, + + "video_url": { + "type": "string", + "description": "Video URL" + }, + + "embed_url": { "type": "string", - "description": "Contributor" + "description": "Video embed URL" }, - "funder": { + "encoding_format": { "type": "string", - "description": "Funder" + "title":"Encoding format", + "description": "Media type using a MIME format" }, - "translator": { + "duration": { "type": "string", - "title": "Translator", - "description": "Organization or person who adapts a creative work to different languages" + "title":"Duration", + "description": "The duration of the video in ISO 8601 date time format - `hh:mm:ss`" }, "rights": { "type": "string", @@ -261,34 +527,73 @@ "description": "Year during which claimed copyright for the video was first asserted" }, - - - "date_created": { - "type": "string", - "description": "Date of creation (YYYY-MM-DD)" - }, - "date_published": { + "credit_text": { "type": "string", - "description": "Date published (YYYY-MM-DD)" + "title": "Credits", + "description": "This element that can be used to credit the person(s) and/or organization(s) associated with a published video. It corresponds to the `creditText` element of VideoObject." }, - "version": { + + "citation": { "type": "string", - "description": "Version" + "title": "Citation", + "description": "This element provides a required or recommended citation of the audio file." }, - "status": { - "type": "string", - "title":"Creative work status", - "description": "Status of a creative work in terms of its stage in lifecycle. e.g. `incomplete`, `draft`, `published`, `obsolete`" + + "transcript": { + "type": "array", + "title": "Transcript", + "items": { + "type": "object", + "properties": { + "language": { + "title": "Language", + "type": "string" + }, + "text": { + "title": "Text", + "type": "string" + } + } + }, + "required": [ + "text" + ] }, - "is_based_on": { - "type": "string", - "title":"A resource from which this work is derived", - "description": "A resource from which this work is derived or from which it is a modification or adaption" + + "media": { + "type": "array", + "title": "Media", + "items": { + "type": "string" + } }, - "is_part_of": { - "type": "string", - "title":"Indicate an item that this item is part of" - } + + "album": { + "type": "array", + "title": "Album", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Name of album", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + }, + "owner": { + "title": "Owner", + "type": "string" + }, + "uri": { + "title": "URI", + "type": "string" + } + } + } + } + }, "required": [ @@ -324,6 +629,136 @@ "tag" ] }, + "lda_topics": { + "type": "array", + "title": "LDA topics", + "description": "LDA topics", + "items": { + "type": "object", + "properties": { + "model_info": { + "type": "array", + "title": "Model information", + "items": { + "type": "object", + "properties": { + "source": { + "title": "Source", + "type": "string" + }, + "author": { + "title": "Author", + "type": "string" + }, + "version": { + "title": "Version", + "type": "string" + }, + "model_id": { + "title": "Model Identifier", + "type": "string" + }, + "nb_topics": { + "title": "Number of topics", + "type": "number" + }, + "description": { + "title": "Description", + "type": "string" + }, + "corpus": { + "title": "Corpus name", + "type": "string" + }, + "uri": { + "title": "URI", + "type": "string" + } + } + }, + "required": [ + "model_id" + ] + }, + "topic_description": { + "type": "array", + "title": "Topic information", + "items": { + "type": "object", + "properties": { + "topic_id": { + "title": "Topic identifier", + "type": ["integer", "string"] + }, + "topic_score": { + "title": "Topic score", + "type": ["number", "string"] + }, + "topic_label": { + "title": "Topic label", + "type": "string" + }, + "topic_words": { + "type": "array", + "title": "Topic words", + "description": "Words", + "items": { + "type": "object", + "properties": { + "word": { + "title": "Word", + "type": "string" + }, + "word_weight": { + "title": "Word weight", + "type": "number" + } + } + }, + "required": [ + "word" + ] + } + } + }, + "required": [ + "topic_id" + ] + } + + }, + "additionalProperties": false + } + }, + "embeddings":{ + "type": "array", + "title": "Word embeddings", + "description": "Word embeddings", + "items": { + "type": "object", + "properties": { + "id": { + "title": "Vector Model ID", + "type": "string" + }, + "description": { + "title": "Vector Model Description", + "type": "string" + }, + "date": { + "title": "Date (YYYY-MM-DD)", + "type": "string" + }, + "vector": { + "title": "Vector", + "type": "object" + } + }, + "required": [ + "id","vector" + ] + } + }, "additional": { "type": "object", diff --git a/application/schemas/visualization-schema.json b/application/schemas/visualization-schema.json index 538f102d6..14aac2b7d 100644 --- a/application/schemas/visualization-schema.json +++ b/application/schemas/visualization-schema.json @@ -935,35 +935,7 @@ "required": [ "name" ] - }, - "provenance":{ - "type":"array", - "description":"Provenance", - "items":{ - "$ref":"provenance-schema.json" - } - }, - "tags": { - "type": "array", - "title": "Tags", - "description": "Tags", - "items": { - "type": "object", - "properties": { - "tag": { - "title": "Tag", - "type": "string" - }, - "tag_group": { - "title": "Tag group", - "type": "string" - } - } - }, - "required": [ - "tag" - ] - } + } }, "additionalProperties": false @@ -999,6 +971,164 @@ ] } }, + "provenance":{ + "type":"array", + "description":"Provenance", + "items":{ + "$ref":"provenance-schema.json" + } + }, + "tags": { + "type": "array", + "title": "Tags", + "description": "Tags", + "items": { + "type": "object", + "properties": { + "tag": { + "title": "Tag", + "type": "string" + }, + "tag_group": { + "title": "Tag group", + "type": "string" + } + } + }, + "required": [ + "tag" + ] + }, + "lda_topics": { + "type": "array", + "title": "LDA topics", + "description": "LDA topics", + "items": { + "type": "object", + "properties": { + "model_info": { + "type": "array", + "title": "Model information", + "items": { + "type": "object", + "properties": { + "source": { + "title": "Source", + "type": "string" + }, + "author": { + "title": "Author", + "type": "string" + }, + "version": { + "title": "Version", + "type": "string" + }, + "model_id": { + "title": "Model Identifier", + "type": "string" + }, + "nb_topics": { + "title": "Number of topics", + "type": "number" + }, + "description": { + "title": "Description", + "type": "string" + }, + "corpus": { + "title": "Corpus name", + "type": "string" + }, + "uri": { + "title": "URI", + "type": "string" + } + } + }, + "required": [ + "model_id" + ] + }, + "topic_description": { + "type": "array", + "title": "Topic information", + "items": { + "type": "object", + "properties": { + "topic_id": { + "title": "Topic identifier", + "type": ["integer", "string"] + }, + "topic_score": { + "title": "Topic score", + "type": ["number", "string"] + }, + "topic_label": { + "title": "Topic label", + "type": "string" + }, + "topic_words": { + "type": "array", + "title": "Topic words", + "description": "Words", + "items": { + "type": "object", + "properties": { + "word": { + "title": "Word", + "type": "string" + }, + "word_weight": { + "title": "Word weight", + "type": "number" + } + } + }, + "required": [ + "word" + ] + } + } + }, + "required": [ + "topic_id" + ] + } + + }, + "additionalProperties": false + } + }, + "embeddings":{ + "type": "array", + "title": "Word embeddings", + "description": "Word embeddings", + "items": { + "type": "object", + "properties": { + "id": { + "title": "Vector Model ID", + "type": "string" + }, + "description": { + "title": "Vector Model Description", + "type": "string" + }, + "date": { + "title": "Date (YYYY-MM-DD)", + "type": "string" + }, + "vector": { + "title": "Vector", + "type": "object" + } + }, + "required": [ + "id","vector" + ] + } + }, "additional": { "type": "object", "description": "Additional metadata", diff --git a/application/views/catalog/batch_file_upload.php b/application/views/catalog/batch_file_upload.php index fe37534f5..24b9bbb49 100644 --- a/application/views/catalog/batch_file_upload.php +++ b/application/views/catalog/batch_file_upload.php @@ -6,8 +6,7 @@ // Convert divs to queue widgets when the DOM is ready $(function() { - function log() - { + function log() { } $("#uploader").pluploadQueue({ @@ -21,9 +20,11 @@ function log() multipart_params: { 'upload_folder': 'default', 'overwrite':0}, // Specify what files to browse for - filters : [ + filters : { + mime_types: [ {title : "External Resources", extensions : ""} - ], + ] + }, // Flash settings flash_swf_url : 'javascript/plupload/js/Moxie.swf', @@ -79,12 +80,12 @@ function log() FileUploaded: function(up, file, info) { // Called when a file has finished uploading - //console.log('[FileUploaded] File:', file, "Info:", info); + console.log('[FileUploaded] File:', file, "Info:", info); }, ChunkUploaded: function(up, file, info) { // Called when a file chunk has finished uploading - //log('[ChunkUploaded] File:', file, "Info:", info); + log('[ChunkUploaded] File:', file, "Info:", info); }, UploadComplete: function (up, file) { diff --git a/application/views/catalog/ddi_batch_import.php b/application/views/catalog/ddi_batch_import.php index 442b09f51..1b830d015 100644 --- a/application/views/catalog/ddi_batch_import.php +++ b/application/views/catalog/ddi_batch_import.php @@ -15,49 +15,68 @@ } ?> -'xml,rdf', - 'destination_url' =>'admin/catalog/batch_import', - 'upload_url' =>'admin/catalog/process_batch_uploads' + 'destination_url' =>'admin/catalog/batch_import', + 'upload_url' =>'admin/catalog/process_batch_uploads' ); $batch_uploader=$this->load->view('catalog/batch_file_upload',$batch_upload_options,TRUE); ?>
| @@ -93,7 +112,7 @@ diff --git a/application/views/catalog/ddi_upload_form.php b/application/views/catalog/ddi_upload_form.php index a4c8bc0e2..a71d2c386 100644 --- a/application/views/catalog/ddi_upload_form.php +++ b/application/views/catalog/ddi_upload_form.php @@ -24,39 +24,52 @@ |
|---|