Skip to content

Commit

Permalink
Add schema for DCAT US recommended properties
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Oct 21, 2024
1 parent 36a2846 commit 3f39675
Show file tree
Hide file tree
Showing 4 changed files with 258 additions and 14 deletions.
2 changes: 1 addition & 1 deletion ckanext/dcat/schemas/dcat_ap_full.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
scheming_version: 2
dataset_type: dataset
about: Full DCAT AP 2.1 schema
about: Full DCAT AP (2 and 3) schema
about_url: http://github.com/ckan/ckanext-dcat

dataset_fields:
Expand Down
2 changes: 1 addition & 1 deletion ckanext/dcat/schemas/dcat_ap_recommended.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
scheming_version: 2
dataset_type: dataset
about: Recommended fields for DCAT AP 2.1 schema
about: Recommended properties for the DCAT AP (2 and 3) schema
about_url: http://github.com/ckan/ckanext-dcat

dataset_fields:
Expand Down
12 changes: 0 additions & 12 deletions ckanext/dcat/schemas/dcat_us_full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -312,12 +312,6 @@ dataset_fields:
validators: ignore_missing scheming_multiple_text
help_text: A related resource, such as a publication, that references, cites, or otherwise points to the dataset.

- field_name: applicable_legislation
label: Applicable legislation
preset: multiple_text
validators: ignore_missing scheming_multiple_text
help_text: The legislation that mandates the creation or management of the dataset.

- field_name: data_dictionary
label: Data dictionary
repeating_label: Data dictionary
Expand Down Expand Up @@ -472,12 +466,6 @@ resource_fields:
validators: ignore_missing scheming_multiple_text
help_text: An established schema to which the described resource conforms.

- field_name: applicable_legislation
label: Applicable legislation
preset: multiple_text
validators: ignore_missing scheming_multiple_text
help_text: The legislation that mandates the creation or management of the resource.

- field_name: access_services
label: Access services
repeating_label: Access service
Expand Down
256 changes: 256 additions & 0 deletions ckanext/dcat/schemas/dcat_us_recommended.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,256 @@
scheming_version: 2
dataset_type: dataset
about: Recommended properties of the DCAT US schema
about_url: http://github.com/ckan/ckanext-dcat

dataset_fields:

- field_name: title
label: Title
preset: title
required: true
help_text: A descriptive title for the dataset.

- field_name: name
label: URL
preset: dataset_slug
form_placeholder: eg. my-dataset

- field_name: notes
label: Description
required: true
form_snippet: markdown.html
help_text: A free-text account of the dataset.

- field_name: tag_string
label: Keywords
preset: tag_string_autocomplete
form_placeholder: eg. economy, mental health, government
help_text: Keywords or tags describing the dataset. Use commas to separate multiple values.

- field_name: contact
label: Contact points
repeating_label: Contact point
repeating_subfields:

- field_name: uri
label: URI

- field_name: name
label: Name

- field_name: email
label: Email
display_snippet: email.html
help_text: Contact information for enquiries about the dataset.

- field_name: publisher
label: Publisher
repeating_label: Publisher
repeating_once: true
repeating_subfields:

- field_name: uri
label: URI

- field_name: name
label: Name

- field_name: email
label: Email
display_snippet: email.html

- field_name: url
label: URL
display_snippet: link.html

- field_name: type
label: Type

- field_name: identifier
label: Identifier
help_text: Unique identifier for the publisher, such as a ROR ID.
help_text: Entity responsible for making the dataset available.

- field_name: license_id
label: License
form_snippet: license.html
help_text: License definitions and additional information can be found at http://opendefinition.org/.

- field_name: owner_org
label: Organization
preset: dataset_organization
help_text: The CKAN organization the dataset belongs to.

- field_name: url
label: Landing page
form_placeholder: http://example.com/dataset.json
display_snippet: link.html
help_text: Web page that can be navigated to gain access to the dataset, its distributions and/or additional information.

# Note: this will fall back to metadata_created if not present
- field_name: issued
label: Release date
preset: dcat_date
help_text: Date of publication of the dataset.

# Note: this will fall back to metadata_modified if not present
- field_name: modified
label: Modification date
preset: dcat_date
help_text: Most recent date on which the dataset was changed, updated or modified.

# Note: CKAN will generate a unique identifier for each dataset
- field_name: identifier
label: Identifier
help_text: A unique identifier of the dataset, if not provided it will fall back to CKAN's internal id.

- field_name: temporal_coverage
label: Temporal coverage
repeating_subfields:

- field_name: start
label: Start
preset: dcat_date

- field_name: end
label: End
preset: dcat_date
help_text: The temporal period or periods the dataset covers.

- field_name: bbox
label: Geographic Bounding Box
repeating_subfields:

- field_name: west
label: West Longitude

- field_name: east
label: East Longitude

- field_name: north
label: North Latitude

- field_name: south
label: South Latitude
help_text: A geographic bounding box in WGS84 coordinate system (Lat/Long) that describes the spatial extent of the dataset.

- field_name: spatial_coverage
label: Spatial coverage
repeating_subfields:

- field_name: uri
label: URI

- field_name: text
label: Label

- field_name: geom
label: Geometry

- field_name: bbox
label: Bounding Box

- field_name: centroid
label: Centroid
help_text: A geographic region that is covered by the dataset.

- field_name: theme
label: Theme
preset: multiple_text
validators: ignore_missing scheming_multiple_text
help_text: A category of the dataset. A Dataset may be associated with multiple themes.

- field_name: data_dictionary
label: Data dictionary
repeating_label: Data dictionary
repeating_once: true
repeating_subfields:

- field_name: url
label: URL

- field_name: format
label: Format

- field_name: license
label: License

# Note: if not provided, this will be autogenerated
- field_name: uri
label: URI
help_text: An URI for this dataset (if not provided it will be autogenerated).

# TODO: relation-based properties are not yet included (e.g. is_version_of, source, sample, etc)
#
resource_fields:

- field_name: url
label: URL
preset: resource_url_upload

- field_name: name
label: Name
form_placeholder:
help_text: A descriptive title for the resource.

- field_name: format
label: Format
preset: resource_format_autocomplete
help_text: File format. If not provided it will be guessed.

- field_name: rights
label: Rights
form_snippet: markdown.html
display_snippet: markdown.html
help_text: Some statement about the rights associated with the resource.

- field_name: license
label: License
help_text: License in which the resource is made available. If not provided will be inherited from the dataset.

# Note: this falls back to the standard resource url field
- field_name: access_url
label: Access URL
help_text: URL that gives access to the dataset (defaults to the standard resource URL).

# Note: this falls back to the standard resource url field
- field_name: download_url
label: Download URL
display_snippet: link.html
help_text: URL that provides a direct link to a downloadable file (defaults to the standard resource URL).

- field_name: issued
label: Release date
preset: dcat_date
help_text: Date of publication of the resource.

- field_name: modified
label: Modification date
preset: dcat_date
help_text: Most recent date on which the resource was changed, updated or modified.

- field_name: temporal_resolution
label: Temporal resolution
help_text: Minimum time period resolvable in the distribution.

- field_name: data_dictionary
label: Data dictionary
repeating_label: Data dictionary
repeating_once: true
repeating_subfields:

- field_name: url
label: URL

- field_name: format
label: Format

- field_name: license
label: License


# Note: if not provided, this will be autogenerated
- field_name: uri
label: URI
help_text: An URI for this resource (if not provided it will be autogenerated).

0 comments on commit 3f39675

Please sign in to comment.