hookercookerman-amee 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. data/History.txt +1 -0
  2. data/LICENSE.txt +20 -0
  3. data/Manifest.txt +79 -0
  4. data/README.rdoc +33 -0
  5. data/Rakefile +29 -0
  6. data/features/config.feature +22 -0
  7. data/features/data/data_category.feature +26 -0
  8. data/features/data/data_item.feature +19 -0
  9. data/features/data/data_item_value.feature +17 -0
  10. data/features/data/drill_down.feature +48 -0
  11. data/features/development.feature +13 -0
  12. data/features/profile/create.profile.feature +15 -0
  13. data/features/profile/create.profile_item.feature +12 -0
  14. data/features/profile/delete.profile.feature +12 -0
  15. data/features/profile/delete.profile_item.feature +13 -0
  16. data/features/profile/get.profile.feature +13 -0
  17. data/features/profile/profile_category.feature +14 -0
  18. data/features/profile/profile_item.feature +15 -0
  19. data/features/profile/profiles.feature +15 -0
  20. data/features/profile/update.profile_item.feature +14 -0
  21. data/features/session/reauthenticate.feature +16 -0
  22. data/features/step_definitions/amee_steps.rb +67 -0
  23. data/features/step_definitions/common_steps.rb +194 -0
  24. data/features/step_definitions/config_steps.rb +13 -0
  25. data/features/step_definitions/data_steps.rb +142 -0
  26. data/features/step_definitions/profile_category_steps.rb +23 -0
  27. data/features/step_definitions/profile_item_steps.rb +62 -0
  28. data/features/step_definitions/profile_steps.rb +41 -0
  29. data/features/support/amee/auth/response.json +11 -0
  30. data/features/support/amee/data.json +84 -0
  31. data/features/support/amee/data/transport/car/generic.json +3 -0
  32. data/features/support/amee/data/transport/car/generic/drill.json +66 -0
  33. data/features/support/amee/data/transport/car/generic/drill?fuel=diesel&size=large.json +55 -0
  34. data/features/support/amee/data/transport/car/generic/drill?fuel=diesel.json +59 -0
  35. data/features/support/amee/data/transport/plane/generic.json +225 -0
  36. data/features/support/amee/data/transport/plane/generic/FFC7A05D54AD.json +224 -0
  37. data/features/support/amee/data/transport/plane/generic/FFC7A05D54AD/kgCO2PerPassengerJourney.json +42 -0
  38. data/features/support/amee/data_category.json +84 -0
  39. data/features/support/amee/data_category_with_data_items.json +225 -0
  40. data/features/support/amee/profiles.json +73 -0
  41. data/features/support/amee/profiles/155DD3C63646/transport/motorcycle/generic/D47C465B8157.json +190 -0
  42. data/features/support/amee/profiles/155DD3C63646/transport/motorcycle/generic/D47C465B8157?distance=400&representation=true.json +190 -0
  43. data/features/support/amee/profiles/48B97680BCCF/home/energy/quantity/response.json +9 -0
  44. data/features/support/amee/profiles/7C7D68C2A7CD/home.json +65 -0
  45. data/features/support/amee/profiles/BB1BDB4FDD77/home/energy/quantity/920B54ED665B.json +201 -0
  46. data/features/support/amee/profiles/E0BCB3704D15.json +19 -0
  47. data/features/support/amee/profiles/E0BCB3704D15/Business.json +6 -0
  48. data/features/support/amee/profiles/profile.json +27 -0
  49. data/features/support/env.rb +24 -0
  50. data/init.rb +4 -0
  51. data/lib/amee.rb +37 -0
  52. data/lib/amee/config.rb +59 -0
  53. data/lib/amee/data_api/data_category.rb +50 -0
  54. data/lib/amee/data_api/data_item.rb +28 -0
  55. data/lib/amee/data_api/data_item_value.rb +13 -0
  56. data/lib/amee/data_api/drill_down.rb +23 -0
  57. data/lib/amee/data_api/item_definition.rb +11 -0
  58. data/lib/amee/data_api/item_value_definition.rb +13 -0
  59. data/lib/amee/data_api/value_definition.rb +10 -0
  60. data/lib/amee/logging.rb +43 -0
  61. data/lib/amee/model.rb +128 -0
  62. data/lib/amee/parser.rb +137 -0
  63. data/lib/amee/profile_api/profile.rb +39 -0
  64. data/lib/amee/profile_api/profile_category.rb +42 -0
  65. data/lib/amee/profile_api/profile_item.rb +47 -0
  66. data/lib/amee/service.rb +78 -0
  67. data/lib/amee/session.rb +222 -0
  68. data/lib/amee/utils/string.rb +11 -0
  69. data/script/console +10 -0
  70. data/script/destroy +14 -0
  71. data/script/generate +14 -0
  72. data/script/txt2html +71 -0
  73. data/spec/amee_spec.rb +1 -0
  74. data/spec/service_spec.rb +53 -0
  75. data/spec/session_spec.rb +45 -0
  76. data/spec/spec.opts +1 -0
  77. data/spec/spec_helper.rb +19 -0
  78. data/tasks/rspec.rake +21 -0
  79. data/tasks/yard.rake +4 -0
  80. metadata +184 -0
@@ -0,0 +1,23 @@
1
+ Then(/^the profile category should have: \"(.*)\" with: \"(.*)\"$/) do |attribute, value|
2
+ @models["profile_category"].send(attribute).should == value
3
+ end
4
+
5
+ Then(/^the profile category should (?:be|have) (?:an? )?(.*)/) do |predicate|
6
+ @models["profile_category"].should send("be_#{predicate.gsub(' ', '_')}")
7
+ end
8
+
9
+ Then(/^the profile category should not (?:be|have) (?:an? )?(.*)/) do |predicate|
10
+ @models["profile_category"].should_not send("be_#{predicate.gsub(' ', '_')}")
11
+ end
12
+
13
+ Then(/^the profile category's (\S+) should (?:be|have) (?:an? )?(.*)/) do |method, predicate|
14
+ @models["profile_category"].send(method).should send("be_#{predicate.gsub(' ', '_')}")
15
+ end
16
+
17
+ Then(/^the profile category's (\S+) should not (?:be|have) (?:an? )?(.*)/) do |method, predicate|
18
+ @models["profile_category"].send(method).should_not send("be_#{predicate.gsub(' ', '_')}")
19
+ end
20
+
21
+ Then(/^the profile category's profile_categories: (\S+) should be \"(.*)\"/) do |method ,value|
22
+ @models["profile_category"].item_definition.send(method).should == value
23
+ end
@@ -0,0 +1,62 @@
1
+ Then(/^the profile item should have: \"(.*)\" with: \"(.*)\"$/) do |attribute, value|
2
+ @models["profile_item"].send(attribute).to_s.should == value
3
+ end
4
+
5
+ Then(/^the profile item should (?:be|have) (?:an? )?(.*)/) do |predicate|
6
+ @models["profile_item"].should send("be_#{predicate.gsub(' ', '_')}")
7
+ end
8
+
9
+ Then(/^the profile item should not (?:be|have) (?:an? )?(.*)/) do |predicate|
10
+ @models["profile_item"].should_not send("be_#{predicate.gsub(' ', '_')}")
11
+ end
12
+
13
+ Then(/^the profile item's (\S+) should (?:be|have) (?:an? )?(.*)/) do |method, predicate|
14
+ @models["profile_item"].send(method).should send("be_#{predicate.gsub(' ', '_')}")
15
+ end
16
+
17
+ Then(/^the profile item's (\S+) should not (?:be|have) (?:an? )?(.*)/) do |method, predicate|
18
+ @models["profile_item"].send(method).should_not send("be_#{predicate.gsub(' ', '_')}")
19
+ end
20
+
21
+ When(/^I create a profile item with uid: \"(\S+)\" the path: \"(.*)\"/) do |uid, path|
22
+ FakeWeb.register_uri(:post, "http://stage.amee.com#{path}?type=dontmatter&dataItemUid=48B97680BEGG",
23
+ :response => File.join(AMEE_FIXTURE_PATH, "#{path.gsub(/^\//, "")}/response.json")
24
+ )
25
+ @models["create_profile_item"] = @amee_session.create_profile_item(path, uid, :fields => {:type => "dontmatter"})
26
+ end
27
+
28
+ Then(/^the location of the new should be: "(\S+)"/) do |value|
29
+ @models["create_profile_item"].should == value
30
+ end
31
+
32
+ When(/^I update the profile item with: distance=400$/) do
33
+ FakeWeb.register_uri(:put, "http://stage.amee.com#{@models["profile_item"].full_path}?distance=400&representation=true",
34
+ :file => File.join(AMEE_FIXTURE_PATH, "#{@models["profile_item"].full_path.gsub(/^\//, "")}?distance=400&representation=true.json")
35
+ )
36
+ @models["profile_item"] = @models["profile_item"].update(:distance => 400)
37
+ end
38
+
39
+ Then(/^the profile item item_value: with name: \"Distance\" should have value: \"400\"$/) do
40
+ @models["profile_item"].item_values.find{ |item_value| item_value.name == "Distance"}.value.should == "400"
41
+ end
42
+
43
+ Given(/I profile exists with path \"(\S+)\"/) do |path|
44
+ FakeWeb.register_uri(:get, "http://stage.amee.com#{path}",
45
+ :file => File.join(AMEE_FIXTURE_PATH, "#{path.gsub(/^\//, "")}.json")
46
+ )
47
+ @models["profile_item"] = @amee_session.get_profile_item(path)
48
+ end
49
+
50
+ When(/^I delete the profile item$/) do
51
+ FakeWeb.register_uri(:delete, "http://stage.amee.com#{@models["profile_item"].full_path}",
52
+ {:status => [200, "OK"]}
53
+ )
54
+ @models["profile_item"].destroy
55
+ end
56
+
57
+ Then(/^the profile item should no longer exist$/) do
58
+ FakeWeb.register_uri(:get, "http://stage.amee.com#{@models["profile_item"].full_path}",
59
+ {:status => ["404", "Not Found"]}
60
+ )
61
+ lambda{@amee_session.get_profile_item(@models["profile_item"].full_path)}.should raise_error(Amee::Session::NotFound)
62
+ end
@@ -0,0 +1,41 @@
1
+ When(/^I create an amee profile$/) do
2
+ FakeWeb.register_uri(:post, "http://stage.amee.com/profiles?profile=true",
3
+ :file => File.join(AMEE_FIXTURE_PATH, "profiles/profile.json")
4
+ )
5
+ @models["profile"] = @amee_session.create_profile
6
+ end
7
+
8
+ Then(/^I should have a valid amee profile$/) do
9
+ @models["profile"].name.should == "180D73DA5229"
10
+ @models["profile"].uid.should == "180D73DA5229"
11
+ end
12
+
13
+ Then(/^I delete that amme profile$/) do
14
+ FakeWeb.register_uri(:delete, "http://stage.amee.com/profiles/#{@models["profile"].uid}",
15
+ {:status => [200, "OK"]}
16
+ )
17
+ @models["profile"].destroy
18
+ end
19
+
20
+ Then(/^the profile should no longer exist$/) do
21
+ FakeWeb.register_uri(:get, "http://stage.amee.com/profiles/#{@models["profile"].uid}",
22
+ {:status => ["404", "Not Found"]}
23
+ )
24
+ lambda{@amee_session.get_profile(@models["profile"].uid)}.should raise_error(Amee::Session::NotFound)
25
+ end
26
+
27
+ Then(/^the amee profile should have: \"(.*)\" with: \"(.*)\"$/) do |attribute, value|
28
+ @models["profile"].send(attribute).should == value
29
+ end
30
+
31
+ Then(/^the amee profile should (?:be|have) (?:an? )?(.*)/) do |predicate|
32
+ @models["profile"].should send("be_#{predicate.gsub(' ', '_')}")
33
+ end
34
+
35
+ Then(/^the amee profile data_category's: (\S+) should be \"(.*)\"/) do |method ,value|
36
+ @models["profile"].profile_data_categories.send(method).should == value
37
+ end
38
+
39
+ Then(/^the amee profile profile_categories should not (?:be|have) (?:an? )?(.*)/) do |predicate|
40
+ @models["profile"].profile_categories.should_not send("be_#{predicate.gsub(' ', '_')}")
41
+ end
@@ -0,0 +1,11 @@
1
+ HTTP/1.1 302 MOVED_TEMPORARILY
2
+ Date: Fri, 24 Apr 2009 11:29:29 GMT
3
+ Server: Apache/2.2.9 (Debian) DAV/2 SVN/1.4.4 mod_jk/1.2.18 mod_python/3.2.10 Python/2.4.4 PHP/5.2.0-10 mod_ssl/2.2.9 OpenSSL/0.9.8g Phusion_Passenger/2.0.3
4
+ Content-Length: 0
5
+ Set-Cookie: authToken=UjWX6DYFsMzHov+IQCnu3Ad00fwOl/mAKYcdd2u6pLFs1bnBp5FedvDd/FjrnrwRPrnuEhAexWmlEbFV8XRXJ11KbZD2NGbMVnnwIvDFI7TfqZ/OgnHR2w==; Path=/
6
+ Location: http://stage.amee.com/auth
7
+ Accept-Ranges: bytes
8
+ authToken: UjWX6DYFsMzHov+IQCnu3Ad00fwOl/mAKYcdd2u6pLFs1bnBp5FedvDd/FjrnrwRPrnuEhAexWmlEbFV8XRXJ11KbZD2NGbMVnnwIvDFI7TfqZ/OgnHR2w==
9
+ Cache-Control: max-age=3600
10
+ Expires: Fri, 24 Apr 2011 12:29:29 GMT
11
+ Content-Type: text/plain
@@ -0,0 +1,84 @@
1
+ {
2
+ "dataCategory":{
3
+ "uid":"CD310BEBAC52",
4
+ "environment":{
5
+ "uid":"5F5887BCF726",
6
+ "itemsPerFeed":10,
7
+ "description":"",
8
+ "name":"AMEE",
9
+ "owner":"",
10
+ "path":"",
11
+ "itemsPerPage":10
12
+ },
13
+ "created":"2007-07-27 09:30:44.0",
14
+ "name":"Root",
15
+ "path":"",
16
+ "modified":"2007-07-27 09:30:44.0"
17
+ },
18
+ "path":"",
19
+ "children":{
20
+ "pager":{},
21
+ "dataItems":{},
22
+ "dataCategories":[
23
+ {
24
+ "uid":"7E99F5EB43CE",
25
+ "name":"Business",
26
+ "path":"business"
27
+ },
28
+ {
29
+ "uid":"BBA3AC3E795E",
30
+ "name":"Home",
31
+ "path":"home"
32
+ },
33
+ {
34
+ "uid":"85A9172C31AF",
35
+ "name":"Import",
36
+ "path":"import"
37
+ },
38
+ {
39
+ "uid":"9E5362EAB0E7",
40
+ "name":"Metadata",
41
+ "path":"metadata"
42
+ },
43
+ {
44
+ "uid":"A0CF90F6C0B9",
45
+ "name":"Personal",
46
+ "path":"personal"
47
+ },
48
+ {
49
+ "uid":"304FBDB2F3B1",
50
+ "name":"Planet",
51
+ "path":"planet"
52
+ },
53
+ {
54
+ "uid":"6153F468BE05",
55
+ "name":"Test",
56
+ "path":"test"
57
+ },
58
+ {
59
+ "uid":"263FC0186834",
60
+ "name":"Transport",
61
+ "path":"transport"
62
+ },
63
+ {
64
+ "uid":"2957AE9B6E6B",
65
+ "name":"User",
66
+ "path":"user"
67
+ }
68
+ ]
69
+ },
70
+ "dataItemActions":{
71
+ "allowCreate":false,
72
+ "allowView":true,
73
+ "allowList":false,
74
+ "allowModify":false,
75
+ "allowDelete":false
76
+ },
77
+ "actions":{
78
+ "allowCreate":false,
79
+ "allowView":true,
80
+ "allowList":false,
81
+ "allowModify":false,
82
+ "allowDelete":false
83
+ }
84
+ }
@@ -0,0 +1,3 @@
1
+ {"dataCategory":{"uid":"87E55DA88017","dataCategory":{"uid":"1D95119FB149","name":"Car","path":"car"},"environment":{"uid":"5F5887BCF726","itemsPerFeed":10,"description":"","name":"AMEE","owner":"","path":"","itemsPerPage":10},"created":"2007-07-27 09:30:44.0","name":"Generic","path":"generic","itemDefinition":{"uid":"123C4A18B5D6","environment":{"uid":"5F5887BCF726"},"created":"2007-07-27 09:30:44.0","name":"Car Generic","drillDown":"fuel,size","modified":"2007-07-27 09:30:44.0"},"modified":"2007-07-27 09:30:44.0"},"path":"/transport/car/generic","children":{"pager":{"to":10,"lastPage":2,"nextPage":2,"items":13,"start":0,"itemsFound":10,"requestedPage":1,"currentPage":1,"from":1,"itemsPerPage":10,"previousPage":-1},"dataItems":{"label":"DataItems","rows":[{"uid":"E57D6E2828EB","kgCO2PerKmUS":"0.2700","startDate":"2009-03-17T18:37:16Z","typicalDistance":"","kgCO2PerKm":"0.2042","label":"average, average","endDate":"","size":"average","modified":"2009-03-17 18:37:16.0","source":"defra/amee 2008","created":"2009-03-17 18:37:16.0","path":"E57D6E2828EB","fuel":"average"},{"uid":"9B1BDFE5E16D","kgCO2PerKmUS":"0.2243","startDate":"2009-01-18T19:07:24Z","typicalDistance":"","kgCO2PerKm":"0.2243","label":"cng, large","endDate":"","size":"large","modified":"2009-01-18 19:07:24.0","source":"defra/amee 2008","created":"2009-01-18 19:07:24.0","path":"9B1BDFE5E16D","fuel":"cng"},{"uid":"FE331E5CFAAC","kgCO2PerKmUS":"0.2594","startDate":"2009-01-18T19:07:23Z","typicalDistance":"","kgCO2PerKm":"0.2594","label":"cng, medium","endDate":"","size":"medium","modified":"2009-01-18 19:07:23.0","source":"defra/amee 2008","created":"2009-01-18 19:07:23.0","path":"FE331E5CFAAC","fuel":"cng"},
2
+ {"uid":"4F6CBCEE95F7","kgCO2PerKmUS":"0.2300","startDate":"2007-07-27T11:04:57+01:00","typicalDistance":"","kgCO2PerKm":"0.2580","label":"diesel, large","endDate":"","size":"large","modified":"2007-07-27 11:04:57.0","source":"NAEI / Company Reporting Guidelines","created":"2007-07-27 11:04:57.0","path":"4F6CBCEE95F7","fuel":"diesel"},{"uid":"7E2B2426C927","kgCO2PerKmUS":"0.1630","startDate":"2007-07-27T11:04:57+01:00","typicalDistance":"","kgCO2PerKm":"0.1881","label":"diesel, medium","endDate":"","size":"medium","modified":"2007-07-27 11:04:57.0","source":"NAEI / Company Reporting Guidelines","created":"2007-07-27 11:04:57.0","path":"7E2B2426C927","fuel":"diesel"},{"uid":"57E6AC080BF4","kgCO2PerKmUS":"0.1310","startDate":"2007-07-27T11:04:57+01:00","typicalDistance":"","kgCO2PerKm":"0.1513","label":"diesel, small","endDate":"","size":"small","modified":"2007-07-27 11:04:57.0","source":"NAEI / Company Reporting Guidelines","created":"2007-07-27 11:04:57.0","path":"57E6AC080BF4","fuel":"diesel"},{"uid":"8EF8F1A1AB35","kgCO2PerKmUS":"0.2243","startDate":"2009-01-18T19:07:21Z","typicalDistance":"","kgCO2PerKm":"0.2243","label":"lpg, large","endDate":"","size":"large","modified":"2009-01-18 19:07:21.0","source":"defra/amee 2008","created":"2009-01-18 19:07:21.0","path":"8EF8F1A1AB35","fuel":"lpg"},{"uid":"CD299C7A24D6","kgCO2PerKmUS":"0.2594","startDate":"2009-01-18T19:07:20Z","typicalDistance":"","kgCO2PerKm":"0.2594","label":"lpg, medium","endDate":"","size":"medium","modified":"2009-01-18 19:07:20.0","source":"defra/amee 2008","created":"2009-01-18 19:07:20.0","path":"CD299C7A24D6","fuel":"lpg"},{"uid":"CEA465039777","kgCO2PerKmUS":"0.3490","startDate":"2007-07-27T11:04:57+01:00","typicalDistance":"","kgCO2PerKm":"0.2958","label":"petrol, large","endDate":"","size":"large","modified":"2007-07-27 11:04:57.0","source":"UK NAEI / Company Reporting Guidelines; US EPA/dgen","created":"2007-07-27 11:04:57.0","path":"CEA465039777","fuel":"petrol"},{"uid":"9A9E8852220B","kgCO2PerKmUS":"0.2700",
3
+ "startDate":"2007-07-27T11:04:57+01:00","typicalDistance":"","kgCO2PerKm":"0.2139","label":"petrol, medium","endDate":"","size":"medium","modified":"2007-07-27 11:04:57.0","source":"UK NAEI / Company Reporting Guidelines; US EPA/dgen","created":"2007-07-27 11:04:57.0","path":"9A9E8852220B","fuel":"petrol"}]},"dataCategories":[{"uid":"417DD367E9AA","name":"Electric","path":"electric"}]}}
@@ -0,0 +1,66 @@
1
+ {
2
+ "dataCategory":{
3
+ "uid":"87E55DA88017",
4
+ "dataCategory":{
5
+ "uid":"1D95119FB149",
6
+ "name":"Car",
7
+ "path":"car"
8
+ },
9
+ "environment":{
10
+ "uid":"5F5887BCF726",
11
+ "itemsPerFeed":10,
12
+ "description":"",
13
+ "name":"AMEE",
14
+ "owner":"",
15
+ "path":"",
16
+ "itemsPerPage":10
17
+ },
18
+ "created":"2007-07-27 09:30:44.0",
19
+ "name":"Generic",
20
+ "path":"generic",
21
+ "itemDefinition":{
22
+ "uid":"123C4A18B5D6",
23
+ "environment":{
24
+ "uid":"5F5887BCF726"
25
+ },
26
+ "created":"2007-07-27 09:30:44.0",
27
+ "name":"Car Generic",
28
+ "drillDown":"fuel,size",
29
+ "modified":"2007-07-27 09:30:44.0"
30
+ },
31
+ "modified":"2007-07-27 09:30:44.0"
32
+ },
33
+ "choices":{
34
+ "choices":[
35
+ {
36
+ "name":"average",
37
+ "value":"average"
38
+ },
39
+ {
40
+ "name":"cng",
41
+ "value":"cng"
42
+ },
43
+ {
44
+ "name":"diesel",
45
+ "value":"diesel"
46
+ },
47
+ {
48
+ "name":"lpg",
49
+ "value":"lpg"
50
+ },
51
+ {
52
+ "name":"petrol",
53
+ "value":"petrol"
54
+ },
55
+ {
56
+ "name":"petrol hybrid",
57
+ "value":"petrol hybrid"
58
+ }
59
+ ],
60
+ "name":"fuel"
61
+ },
62
+ "selections":[],
63
+ "itemDefinition":{
64
+ "uid":"123C4A18B5D6"
65
+ }
66
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "dataCategory":{
3
+ "uid":"87E55DA88017",
4
+ "dataCategory":{
5
+ "uid":"1D95119FB149",
6
+ "name":"Car",
7
+ "path":"car"
8
+ },
9
+ "environment":{
10
+ "uid":"5F5887BCF726",
11
+ "itemsPerFeed":10,
12
+ "description":"",
13
+ "name":"AMEE",
14
+ "owner":"",
15
+ "path":"",
16
+ "itemsPerPage":10
17
+ },
18
+ "created":"2007-07-27 09:30:44.0",
19
+ "name":"Generic",
20
+ "path":"generic",
21
+ "itemDefinition":{
22
+ "uid":"123C4A18B5D6",
23
+ "environment":{
24
+ "uid":"5F5887BCF726"
25
+ },
26
+ "created":"2007-07-27 09:30:44.0",
27
+ "name":"Car Generic",
28
+ "drillDown":"fuel,size",
29
+ "modified":"2007-07-27 09:30:44.0"
30
+ },
31
+ "modified":"2007-07-27 09:30:44.0"
32
+ },
33
+ "choices":{
34
+ "choices":[
35
+ {
36
+ "name":"4F6CBCEE95F7",
37
+ "value":"4F6CBCEE95F7"
38
+ }
39
+ ],
40
+ "name":"uid"
41
+ },
42
+ "selections":[
43
+ {
44
+ "name":"fuel",
45
+ "value":"diesel"
46
+ },
47
+ {
48
+ "name":"size",
49
+ "value":"large"
50
+ }
51
+ ],
52
+ "itemDefinition":{
53
+ "uid":"123C4A18B5D6"
54
+ }
55
+ }
@@ -0,0 +1,59 @@
1
+ {
2
+ "dataCategory":{
3
+ "uid":"87E55DA88017",
4
+ "dataCategory":{
5
+ "uid":"1D95119FB149",
6
+ "name":"Car",
7
+ "path":"car"
8
+ },
9
+ "environment":{
10
+ "uid":"5F5887BCF726",
11
+ "itemsPerFeed":10,
12
+ "description":"",
13
+ "name":"AMEE",
14
+ "owner":"",
15
+ "path":"",
16
+ "itemsPerPage":10
17
+ },
18
+ "created":"2007-07-27 09:30:44.0",
19
+ "name":"Generic",
20
+ "path":"generic",
21
+ "itemDefinition":{
22
+ "uid":"123C4A18B5D6",
23
+ "environment":{
24
+ "uid":"5F5887BCF726"
25
+ },
26
+ "created":"2007-07-27 09:30:44.0",
27
+ "name":"Car Generic",
28
+ "drillDown":"fuel,size",
29
+ "modified":"2007-07-27 09:30:44.0"
30
+ },
31
+ "modified":"2007-07-27 09:30:44.0"
32
+ },
33
+ "choices":{
34
+ "choices":[
35
+ {
36
+ "name":"large",
37
+ "value":"large"
38
+ },
39
+ {
40
+ "name":"medium",
41
+ "value":"medium"
42
+ },
43
+ {
44
+ "name":"small",
45
+ "value":"small"
46
+ }
47
+ ],
48
+ "name":"size"
49
+ },
50
+ "selections":[
51
+ {
52
+ "name":"fuel",
53
+ "value":"diesel"
54
+ }
55
+ ],
56
+ "itemDefinition":{
57
+ "uid":"123C4A18B5D6"
58
+ }
59
+ }
@@ -0,0 +1,225 @@
1
+ {
2
+ "dataCategory":{
3
+ "uid":"FBA97B70DBDF",
4
+ "dataCategory":{
5
+ "uid":"6F3692D81CD9",
6
+ "name":"Plane",
7
+ "path":"plane"
8
+ },
9
+ "environment":{
10
+ "uid":"5F5887BCF726",
11
+ "itemsPerFeed":10,
12
+ "description":"",
13
+ "name":"AMEE",
14
+ "owner":"",
15
+ "path":"",
16
+ "itemsPerPage":10
17
+ },
18
+ "created":"2007-08-01 09:00:23.0",
19
+ "name":"Generic",
20
+ "path":"generic",
21
+ "itemDefinition":{
22
+ "uid":"441BF4BEA15B",
23
+ "environment":{
24
+ "uid":"5F5887BCF726"
25
+ },
26
+ "created":"2007-07-27 09:30:44.0",
27
+ "name":"Plane Generic",
28
+ "drillDown":"type,size",
29
+ "modified":"2007-07-27 09:30:44.0"
30
+ },
31
+ "modified":"2007-08-01 09:00:23.0"
32
+ },
33
+ "path":"/transport/plane/generic",
34
+ "children":{
35
+ "pager":{
36
+ "to":10,
37
+ "lastPage":2,
38
+ "nextPage":2,
39
+ "items":11,
40
+ "start":0,
41
+ "itemsFound":10,
42
+ "requestedPage":1,
43
+ "currentPage":1,
44
+ "from":1,
45
+ "itemsPerPage":10,
46
+ "previousPage":-1
47
+ },
48
+ "dataItems":{
49
+ "label":"DataItems",
50
+ "rows":[
51
+ {
52
+ "uid":"E98F73AE9B40",
53
+ "startDate":"2009-01-27T17:35:37Z",
54
+ "kgCO2PerPassengerKm":"-1.",
55
+ "source":"N/A",
56
+ "created":"2009-01-27 17:35:37.0",
57
+ "path":"E98F73AE9B40",
58
+ "endDate":"",
59
+ "label":"auto,one way",
60
+ "kgCO2PerPassengerJourney":"0",
61
+ "type":"auto",
62
+ "modified":"2009-01-27 17:35:37.0",
63
+ "size":"one way"
64
+ },
65
+ {
66
+ "uid":"601248F5F793",
67
+ "startDate":"2009-01-27T20:03:26Z",
68
+ "kgCO2PerPassengerKm":"-1.",
69
+ "source":"N/A",
70
+ "created":"2009-01-27 20:03:26.0",
71
+ "path":"601248F5F793",
72
+ "endDate":"",
73
+ "label":"auto,return",
74
+ "kgCO2PerPassengerJourney":"0",
75
+ "type":"auto",
76
+ "modified":"2009-01-27 20:03:26.0",
77
+ "size":"return"
78
+ },
79
+ {
80
+ "uid":"AD63A83B4D41",
81
+ "startDate":"2007-08-01T09:00:41+01:00",
82
+ "kgCO2PerPassengerKm":"0.1753",
83
+ "source":"defra/amee 2008",
84
+ "created":"2007-08-01 09:00:41.0",
85
+ "path":"AD63A83B4D41",
86
+ "endDate":"",
87
+ "label":"domestic",
88
+ "kgCO2PerPassengerJourney":"0.0000",
89
+ "type":"domestic",
90
+ "modified":"2007-08-01 09:00:41.0",
91
+ "size":"-"
92
+ },
93
+ {
94
+ "uid":"FFC7A05D54AD",
95
+ "startDate":"2007-08-01T09:00:41+01:00",
96
+ "kgCO2PerPassengerKm":"0.0000",
97
+ "source":"defra/amee 2008",
98
+ "created":"2007-08-01 09:00:41.0",
99
+ "path":"FFC7A05D54AD",
100
+ "endDate":"",
101
+ "label":"domestic,one way",
102
+ "kgCO2PerPassengerJourney":"81.2000",
103
+ "type":"domestic",
104
+ "modified":"2007-08-01 09:00:41.0",
105
+ "size":"one way"
106
+ },
107
+ {
108
+ "uid":"F5498AD6FC75",
109
+ "startDate":"2007-08-01T09:00:41+01:00",
110
+ "kgCO2PerPassengerKm":"0.0000",
111
+ "source":"defra/amee 2008",
112
+ "created":"2007-08-01 09:00:41.0",
113
+ "path":"F5498AD6FC75",
114
+ "endDate":"",
115
+ "label":"domestic,return",
116
+ "kgCO2PerPassengerJourney":"162.0000",
117
+ "type":"domestic",
118
+ "modified":"2007-08-01 09:00:41.0",
119
+ "size":"return"
120
+ },
121
+ {
122
+ "uid":"7D4220DF72F9",
123
+ "startDate":"2007-08-01T09:00:41+01:00",
124
+ "kgCO2PerPassengerKm":"0.1106",
125
+ "source":"defra/amee 2008",
126
+ "created":"2007-08-01 09:00:41.0",
127
+ "path":"7D4220DF72F9",
128
+ "endDate":"",
129
+ "label":"long haul",
130
+ "kgCO2PerPassengerJourney":"0.0000",
131
+ "type":"long haul",
132
+ "modified":"2007-08-01 09:00:41.0",
133
+ "size":"-"
134
+ },
135
+ {
136
+ "uid":"46117F6C0B7E",
137
+ "startDate":"2007-08-01T09:00:41+01:00",
138
+ "kgCO2PerPassengerKm":"0.0000",
139
+ "source":"defra/amee 2008",
140
+ "created":"2007-08-01 09:00:41.0",
141
+ "path":"46117F6C0B7E",
142
+ "endDate":"",
143
+ "label":"long haul,one way",
144
+ "kgCO2PerPassengerJourney":"844.0000",
145
+ "type":"long haul",
146
+ "modified":"2007-08-01 09:00:41.0",
147
+ "size":"one way"
148
+ },
149
+ {
150
+ "uid":"96D538B1B246",
151
+ "startDate":"2007-08-01T09:00:41+01:00",
152
+ "kgCO2PerPassengerKm":"0.0000",
153
+ "source":"defra/amee 2008",
154
+ "created":"2007-08-01 09:00:41.0",
155
+ "path":"96D538B1B246",
156
+ "endDate":"",
157
+ "label":"long haul,return",
158
+ "kgCO2PerPassengerJourney":"1688.0000",
159
+ "type":"long haul",
160
+ "modified":"2007-08-01 09:00:41.0",
161
+ "size":"return"
162
+ },
163
+ {
164
+ "uid":"9DA419052FDF",
165
+ "startDate":"2007-08-01T09:00:41+01:00",
166
+ "kgCO2PerPassengerKm":"0.0983",
167
+ "source":"defra/amee 2008",
168
+ "created":"2007-08-01 09:00:41.0",
169
+ "path":"9DA419052FDF",
170
+ "endDate":"",
171
+ "label":"short haul",
172
+ "kgCO2PerPassengerJourney":"0.0000",
173
+ "type":"short haul",
174
+ "modified":"2007-08-01 09:00:41.0",
175
+ "size":"-"
176
+ },
177
+ {
178
+ "uid":"84B4A14C7424",
179
+ "startDate":"2007-08-01T09:00:41+01:00",
180
+ "kgCO2PerPassengerKm":"0.0000",
181
+ "source":"defra/amee 2008",
182
+ "created":"2007-08-01 09:00:41.0",
183
+ "path":"84B4A14C7424",
184
+ "endDate":"",
185
+ "label":"short haul,one way",
186
+ "kgCO2PerPassengerJourney":"129.0000",
187
+ "type":"short haul",
188
+ "modified":"2007-08-01 09:00:41.0",
189
+ "size":"one way"
190
+ }
191
+ ]
192
+ },
193
+ "dataCategories":[
194
+ {
195
+ "uid":"01900C469CDB",
196
+ "name":"Airports",
197
+ "path":"airports"
198
+ },
199
+ {
200
+ "uid":"0D4F2C945AA3",
201
+ "name":"Freight",
202
+ "path":"freight"
203
+ },
204
+ {
205
+ "uid":"9959AE4168BA",
206
+ "name":"Passenger class",
207
+ "path":"passengerclass"
208
+ }
209
+ ]
210
+ },
211
+ "dataItemActions":{
212
+ "allowCreate":false,
213
+ "allowView":true,
214
+ "allowList":false,
215
+ "allowModify":false,
216
+ "allowDelete":false
217
+ },
218
+ "actions":{
219
+ "allowCreate":false,
220
+ "allowView":true,
221
+ "allowList":false,
222
+ "allowModify":false,
223
+ "allowDelete":false
224
+ }
225
+ }