Changes between Version 2 and Version 3 of Ticket #189
- Timestamp:
- 11/23/09 13:06:28 (4 years ago)
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). 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). 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. 2 2 3 3 == As a == … … 15 15 == Implementation == 16 16 17 There is an object called ' Distribution' with the following attributes:17 There is an object called 'Resource' with the following attributes: 18 18 19 19 * url (text) (required in UI, but not in db table) 20 20 * format (text) 21 21 * description (text) 22 * package (association) - a distributionis always associated with 1 package22 * package (association) - a resource is always associated with 1 package 23 23 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'.24 A 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'). 25 25 26 26 === How to replace download url === 27 27 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.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 resource. Ensures backward compatibility. 29 29 30 REST API has new attribute in package dictionary ' distributions' - an ordered list.30 REST API has new attribute in package dictionary 'resouces' - an ordered list. 31 31 32 32 In WUI, replace download url in package read with a table of the distributions.