Changes between Version 1 and Version 2 of Ticket #189


Ignore:
Timestamp:
11/17/09 10:27:20 (4 years ago)
Author:
dread
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #189

    • Property Priority changed from awaiting triage to critical
  • Ticket #189 – Description

    v1 v2  
    1 Cost: 4 days 
     1See also: PackageResources which defines a 'distribution' as a package's payload (perhaps with metadata). In our case, at least within CKAN, the representation of the distribution will just be the reference to get it (plus some minor metadata). 
    22 
    3 Replacement of the single 'Download url' field with a table that can have multiple rows, each containing a URL, the format and a description. Full read and write access to this table in the Web UI and over the REST API. 
     3== As a == 
     4 
     5User (package editor and package user) 
     6 
     7== I want to == 
     8 
     9(package editor)  
     10Associate multiple distributions with a package. 
     11 
     12(package user) 
     13Easily have access to multiple distributions of a package should they exist. 
     14 
     15== Implementation == 
     16 
     17There is an object called 'Distribution' with the following attributes:  
     18 
     19 * url (text) (required in UI, but not in db table) 
     20 * format (text) 
     21 * description (text) 
     22 * package (association) - a distribution is always associated with 1 package 
     23 
     24A package's list of distributions will have an order which is preserved. The first in the list will be known as the 'default distribution'. 
     25 
     26=== How to replace download url === 
     27 
     28download_url removed and replaced as a proxy attribute. Read returns the url of the default distribution. Write changes the url of the default distribution. Ensures backward compatibility. 
     29 
     30REST API has new attribute in package dictionary 'distributions' - an ordered list. 
     31 
     32In WUI, replace download url in package read with a table  of the distributions.  
     33 
     34In the WUI package edit, be able to add/remove/edit/reorder distributions. 
     35 
     36== Example == 
    437 
    538Example part of package: 
    639 
    7 === Downloads: === 
    8 || !http://some.com/pollution.xls || PDF || Original report || 
     40=== Distributions: === 
     41|| !http://some.com/pollution.pdf || PDF || Original report || 
    942|| !http://some.com/pollution.csv || csv || Original data || 
    1043|| !http://some.com/pollution || sparql || Linked version of data || 
    1144 
    12 = Implementation details = 
    13 Download table has columns:  
    14 ||id || package_id || url (text) || format (text) || description (text) || 
    1545Existing data to be migrated to new structure. 
     46 
     47Cost: 4 days