Changes between Version 2 and Version 3 of Ticket #189


Ignore:
Timestamp:
11/23/09 13:06:28 (4 years ago)
Author:
dread
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #189 – Description

    v2 v3  
    1 See 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). 
     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). We are expanding this functionality to be any kind of 'resource' associated with a package since it is likely in some cases people will want to link to a file containing a part, but not the whole, of a package's data. 
    22 
    33== As a == 
     
    1515== Implementation == 
    1616 
    17 There is an object called 'Distribution' with the following attributes:  
     17There is an object called 'Resource' with the following attributes:  
    1818 
    1919 * url (text) (required in UI, but not in db table) 
    2020 * format (text) 
    2121 * description (text) 
    22  * package (association) - a distribution is always associated with 1 package 
     22 * package (association) - a resource is always associated with 1 package 
    2323 
    24 A package's list of distributions will have an order which is preserved. The first in the list will be known as the 'default distribution'. 
     24A package's list of resources will have an order which is preserved. The first in the list will be known as the 'default resource' (the presumption will always be that this is a 'distribution'). 
    2525 
    2626=== How to replace download url === 
    2727 
    28 download_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. 
     28download_url removed and replaced as a proxy attribute. Read returns the url of the default distribution. Write changes the url of the default resource. Ensures backward compatibility. 
    2929 
    30 REST API has new attribute in package dictionary 'distributions' - an ordered list. 
     30REST API has new attribute in package dictionary 'resouces' - an ordered list. 
    3131 
    3232In WUI, replace download url in package read with a table  of the distributions.