User Tools

Site Tools


public:using_the_api_to_pull_push_data_from_to_ckan

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
public:using_the_api_to_pull_push_data_from_to_ckan [2015/09/07 18:32]
acorbi ↷ Links adapted because of a move operation
public:using_the_api_to_pull_push_data_from_to_ckan [2019/11/18 14:36] (current)
Line 55: Line 55:
 ==== Special ODM fields ==== ==== Special ODM fields ====
  
-The different dataset types stored in CKAN ( datasets ​library records ) contain a series of special fields, some of them mandatory. ​+The different dataset types stored in CKAN ( datasets ​library ​records and laws records ) contain a series of special fields, some of them mandatory. ​
  
 These fields allow tagging the datasets with specific metadata used by the staff to fulfill different use cases and should be considered while retrieving dataset information or creating new ones using the API: These fields allow tagging the datasets with specific metadata used by the staff to fulfill different use cases and should be considered while retrieving dataset information or creating new ones using the API:
Line 61: Line 61:
 [[metadata|Open Development Network Metadata template]] [[metadata|Open Development Network Metadata template]]
  
-Defined on https://​github.com/​OpenDevelopmentMekong/ckanext-odm_theme/​blob/​master/​ckanext/​odm_theme/​lib/​odm_theme_helper.py#​L30+Please follow the links below to get the list of metadata fields corresponding to every dataset type. These are defined following the format expected by the [[http://​github.com/​ckan/ckanext-scheming|Ckan scheming extension]]:​
  
-<​code>​ +  * [[https://​raw.githubusercontent.com/​OpenDevelopmentMekong/​ckanext-odm_dataset/​master/​ckanext/​odm_dataset/​odm_dataset_schema.json|Datasets' ​metadata ​definiton]] 
-# (field id, field label, mandatory) +  * [[https://raw.githubusercontent.com/​OpenDevelopmentMekong/​ckanext-odm_library/​master/​ckanext/​odm_library/odm_library_schema.json|Library records' ​metadata definiton]]  ​ 
-metadata_fields = [ +  * [[https://raw.githubusercontent.com/​OpenDevelopmentMekong/​ckanext-odm_laws/​master/​ckanext/​odm_laws/odm_laws_schema.json|Law records' ​metadata definiton]]
-('​odm_format','​Format',​True),​ +
-('​odm_language','​Language',​True),​ +
-('​odm_date_created','​Date Created',​True),​ +
-('​odm_date_uploaded','​Date Uploaded',​True),​ +
-('​odm_date_modified','​Date Modified',​True),​ +
-('​odm_temporal_range','​Temporal Range',​True),​ +
-('​odm_spatial_range','​Spatial Range',​False),​ +
-('​odm_accuracy','​Accuracy',​False),​ +
-('​odm_logical_consistency','​Logical Consistency',​False),​ +
-('​odm_completeness','​Completeness',​False),​ +
-('​odm_process','​Process(es)',​True),​ +
-('​odm_source','​Source(s)',​True),​ +
-('​odm_contact','​Contact',​True),​ +
-('​odm_contact_email','​Contact Email',​True),​ +
-('​odm_access_and_use_constraints','​Access and Use Constraints',​False),​ +
-('​odm_url','​Download URL',​False),​ +
-('​odm_metadata_reference_information','​Metadata Reference Information',​False),​ +
-('​odm_attributes','​Attributes',​False) +
-]</​code>​ +
- +
-[[internal:moving_the_library_from_ngl_to_ckan|Library publications ​metadata ​template]] +
- +
-Defined on https://github.com/​OpenDevelopmentMekong/​ckanext-odm_theme/​blob/​master/​ckanext/​odm_theme/lib/​odm_theme_helper.py#L53 +
- +
-<​code>​ +
-# (field id, field label, mandatory) +
-library_fields = [ +
-('marc21_020','​ISBN',​False),​ +
-('​marc21_022','​ISSN',​False),​ +
-('​marc21_084','​Classification',​False),​ +
-('​marc21_100','​Author',​False),​ +
-('​marc21_110','​Corporate Author',​False),​ +
-('​marc21_245','​Title',​False),​ +
-('​marc21_246','​Varying Form of Title',​False),​ +
-('​marc21_250','​Edition',​False),​ +
-('​marc21_260a','​Publication Place',​False),​ +
-('​marc21_260b','​Publication Name',​False),​ +
-('​marc21_260c','​Publication Date',​False),​ +
-('​marc21_300','​Pagination',​False),​ +
-('​marc21_500','​General Note',​False),​ +
-('​marc21_520','​Summary',​False),​ +
-('​marc21_650','​Subject',​False),​ +
-('​marc21_651','​Subject (Geographic Name)',​False),​ +
-('​marc21_653','​Keyword',​False),​ +
-('​marc21_700','​Co-Author',​False),​ +
-('​marc21_710','​Co-Author (Corporate)',​False),​ +
-('​marc21_850','​Institution',​False),​ +
-('​marc21_852','​Location',​False) +
-+
-</​code>​ +
- +
-ODC Fields ( Fields included in imports of old ODC content e.g Laws) +
- +
-Defined on https://github.com/​OpenDevelopmentMekong/​ckanext-odm_theme/​blob/​master/​ckanext/​odm_theme/lib/​odm_theme_helper.py#L20 +
- +
-<​code>​ +
-# (field id, field label, mandatory) +
-odc_fields = [ +
-('file_name_kh','​File (Khmer)',​False),​ +
-('​file_name_en','​File (English)',​False),​ +
-('​adopted_date','​Adopted Date',​False),​ +
-('​number_en','​Number (English)',​False),​ +
-('​number_kh','​Number (Khmer)',​False),​ +
-('​published_date','​Publication date',​False),​ +
-('​published_under','​Published under',​False) +
-] +
-</​code>​+
  
  
public/using_the_api_to_pull_push_data_from_to_ckan.txt · Last modified: 2019/11/18 14:36 (external edit)