bcgov / ckanext-bcgov

BC Data Catalogue source code, main ckan extension
http://catalogue.data.gov.bc.ca
GNU Affero General Public License v3.0
24 stars 23 forks source link

Creating resources for geographic data from the geographic warehouse #213

Closed gjlawran closed 7 years ago

gjlawran commented 7 years ago

As an editor when I am creating a record for a geographic dataset the system should generate one resource for each format that is available and should populate many of the fields automatically.

When the objectname field is populated and the editor is editing a record and the new "+ Add New Resource" or the "Next Add Data" buttons are clicked the interface should provide the editor a modal OFI resource configuration window that will be used to automatically create resources for every format that is available from the DWDS OFI API.

This OFI modal window needs to be able to add, delete and update the OFI resources. Other resources not created via the OFI need to be supported.

In this version when the editor selects to add,update or delete OFI generated resources this will occur without validating anything with the OFI.

A future version of this interface will be possible when the OFI API supports obtaining the following information: 1)object_name is known by the system, 2) the maximum area extract that it supports, 3) the security roles it is available under, 4) the formats that the object can be made available under )currently it is the the same for all objects).

As of the first OFI release there are 5 available formats in OFI. BCDC will show all 5 - this is expected to change in the next release of OFI - there will be two formats retired (E00 and GeoRSS) and a new one (GeoJSON) added but we will show all that are available .

The OFI modal window will collect metadata for population into all of the OFI created resources.

These resource metadata field entries will be created automatically:

  1. *Link to the resource - this will be an internal link that will bring up a Modal Order Window (MOW). Note: This will not be a client side link to OFI/DWDS - this will be a link to an interface within BCDC - it will raise a modal window that will interface with the OFI via BCDC.
  2. *Resource name => “Dataset name truncated …”
  3. *Resource access method => Indirect access
  4. *Resource storage location => BCGW DataStore
  5. *Resource storage format => one for each format available from OFI
  6. *Projection Name = EPSG_3005 - NAD83 BC Albers
  7. *Resource Type = Data

All other resource metadata fields (e.g. Resource Description, Resource Update Cycle, Supplemental Information, Temporal Extent, will available for entry - and the content entered will added to all the resource that are created by this OFI editor interface.

kfishwick commented 7 years ago

@gjlawran we would like to talk about the behaviour for edit dataset (manage OFI resources). Currently, on the resource page you see "Manage" next to each resource.

For the set of OFI resources we have a couple options. Option 1: Leave the "Manage" button next to each OFI resource, but have it pop up the modal window that will actually update all OFI resources with any changes you make to resource metadata.

Option 2: Hide the "Manage" button for OFI resources and put another single button somewhere near them (maybe we visually separate them a bit from non-OFI resources?) that says "Manage OFI Resources" and pops up the modal window.

We are going to deliver a version very soon that will show the OFI modal dialog on add resource, but it does not yet have the functionality to manage the OFI resources as a group.

gjlawran commented 7 years ago

@kfishwick I prefer Option 1:

Also I note the existing button has a spelling mistake in CAD - and the delivery tag version has not been updated. Still showing 1.5.3.

kfishwick commented 7 years ago

@gjlawran and @Mbrownshoes we were just wondering what buttons you want on the modal window? "Save" and "Cancel"? I assume "Save" would save & close the modal, and Cancel would juts cancel and not save the changes (which could be either adding the OFI resources or editing the common information for the resources).

gjlawran commented 7 years ago

@kfishwick and @Mbrownshoes Thanks - "Save" and "Cancel" is great.

kfishwick commented 7 years ago

Some clarifications after conversation with @gjlawran

  1. On confirmation of resources added or saved, only allow the user to click "Finish" (remove the "Close")

  2. On view dataset page (logged in or not logged in), clicking the OFI resource doesn't do anything (it should go to the view resource page). Note, the "More Information" link works.

kfishwick commented 7 years ago

This is code complete, we know of one issue which is if you are adding the OFI resources and do not select the update cycle (the only required field that is not auto-populated) then the validation message is not very user friendly. Please let us know if you find anything else.

gjlawran commented 7 years ago

@jrods one additional important change ...

Please structure the resource names for OFI created resources like this ... Additional information for [shapefile] resource. Additional information for [E00] resource. Additional information for [file geodatabase] resource. ...

Mbrownshoes commented 7 years ago

After adding object names in cat, I'm seeing the 'Object is not avaiable, please contact your administrator.' message. I should be seeing the multiple format resource creation window. I've tried with a couple of different objects with the same results.

avaiable is also spelled wrong in the message :)

jrods commented 7 years ago

@Mbrownshoes when you say cat, which env are you referring to? ckan or data warehouse?

Mbrownshoes commented 7 years ago

I mean our test ckan environment

jrods commented 7 years ago

@Mbrownshoes what's most likely is happening is the OFI Manager modal is probably using the dwds delivery env. I can't comfirm because I don't have access to any OFI datasets on cat.

Mbrownshoes commented 7 years ago

@jrods turns out only a few resource have been configured. Auto resource creation and download is working for the object I just tested.