ims_caliper 0.1.1

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 (97) hide show
  1. checksums.yaml +15 -0
  2. data/Gemfile +13 -0
  3. data/Gemfile.lock +16 -0
  4. data/README.md +16 -0
  5. data/caliper.gemspec +26 -0
  6. data/config/locales/en.yml +86 -0
  7. data/lib/caliper/client.rb +33 -0
  8. data/lib/caliper/consumer/base.rb +46 -0
  9. data/lib/caliper/consumer/queue.rb +40 -0
  10. data/lib/caliper/consumer/socket.rb +132 -0
  11. data/lib/caliper/defaults.rb +8 -0
  12. data/lib/caliper/entities/annotation/annotation.rb +29 -0
  13. data/lib/caliper/entities/annotation/bookmark_annotation.rb +17 -0
  14. data/lib/caliper/entities/annotation/highlight_annotation.rb +18 -0
  15. data/lib/caliper/entities/annotation/shared_annotation.rb +18 -0
  16. data/lib/caliper/entities/annotation/tag_annotation.rb +17 -0
  17. data/lib/caliper/entities/annotation/text_position_selector.rb +14 -0
  18. data/lib/caliper/entities/digital_resource.rb +52 -0
  19. data/lib/caliper/entities/entity.rb +44 -0
  20. data/lib/caliper/entities/foaf/agent.rb +12 -0
  21. data/lib/caliper/entities/generatable.rb +9 -0
  22. data/lib/caliper/entities/learning_context.rb +21 -0
  23. data/lib/caliper/entities/lis/course_section.rb +18 -0
  24. data/lib/caliper/entities/lis/organization.rb +22 -0
  25. data/lib/caliper/entities/lis/person.rb +12 -0
  26. data/lib/caliper/entities/outcome/result.rb +23 -0
  27. data/lib/caliper/entities/reading/epub_chapter.rb +20 -0
  28. data/lib/caliper/entities/reading/epub_part.rb +20 -0
  29. data/lib/caliper/entities/reading/epub_sub_chapter.rb +20 -0
  30. data/lib/caliper/entities/reading/epub_volume.rb +20 -0
  31. data/lib/caliper/entities/reading/frame.rb +32 -0
  32. data/lib/caliper/entities/schemadotorg/audio_object.rb +15 -0
  33. data/lib/caliper/entities/schemadotorg/creative_work.rb +12 -0
  34. data/lib/caliper/entities/schemadotorg/image_object.rb +15 -0
  35. data/lib/caliper/entities/schemadotorg/media_object.rb +19 -0
  36. data/lib/caliper/entities/schemadotorg/software_application.rb +11 -0
  37. data/lib/caliper/entities/schemadotorg/thing.rb +9 -0
  38. data/lib/caliper/entities/schemadotorg/video_object.rb +15 -0
  39. data/lib/caliper/entities/schemadotorg/web_page.rb +11 -0
  40. data/lib/caliper/entities/session.rb +26 -0
  41. data/lib/caliper/entities/software_application.rb +19 -0
  42. data/lib/caliper/entities/targetable.rb +12 -0
  43. data/lib/caliper/entities/web_page.rb +13 -0
  44. data/lib/caliper/event/.shared.rb.swp +0 -0
  45. data/lib/caliper/event/annotation_event.rb +14 -0
  46. data/lib/caliper/event/event.rb +68 -0
  47. data/lib/caliper/event/media_event.rb +19 -0
  48. data/lib/caliper/event/navigation_event.rb +23 -0
  49. data/lib/caliper/event/outcome_event.rb +20 -0
  50. data/lib/caliper/event/session_event.rb +21 -0
  51. data/lib/caliper/event/view_event.rb +20 -0
  52. data/lib/caliper/options.rb +18 -0
  53. data/lib/caliper/profiles/annotation_profile.rb +61 -0
  54. data/lib/caliper/profiles/profile.rb +46 -0
  55. data/lib/caliper/profiles/reading_profile.rb +36 -0
  56. data/lib/caliper/profiles/session_profile.rb +29 -0
  57. data/lib/caliper/request/event_store_envelope.rb +9 -0
  58. data/lib/caliper/request/event_store_requestor.rb +41 -0
  59. data/lib/caliper/request/http_requestor.rb +42 -0
  60. data/lib/caliper/sensor.rb +37 -0
  61. data/lib/caliper/stats/atomic_wrapper.rb +86 -0
  62. data/lib/caliper/stats/statistic.rb +104 -0
  63. data/lib/caliper/stats/statistics.rb +45 -0
  64. data/lib/caliper/stats/statistics_map.rb +39 -0
  65. data/lib/caliper/validators/error_message.rb +43 -0
  66. data/lib/caliper/validators/event_validator.rb +37 -0
  67. data/lib/caliper/validators/event_validator_context.rb +16 -0
  68. data/lib/caliper/validators/property_type_check.rb +14 -0
  69. data/lib/caliper/validators/session_login_event_validator.rb +103 -0
  70. data/lib/caliper/validators/session_logout_event_validator.rb +102 -0
  71. data/lib/caliper/validators/time_check.rb +30 -0
  72. data/lib/caliper/version.rb +4 -0
  73. data/lib/caliper.rb +17 -0
  74. data/spec/lib/client_spec.rb +35 -0
  75. data/spec/lib/consumer/base_spec.rb +28 -0
  76. data/spec/lib/consumer/queue_spec.rb +16 -0
  77. data/spec/lib/event/annotation_spec.rb +12 -0
  78. data/spec/lib/event/bookmarked_spec.rb +17 -0
  79. data/spec/lib/event/commented_spec.rb +19 -0
  80. data/spec/lib/event/highlighted_spec.rb +18 -0
  81. data/spec/lib/event/navigation_spec.rb +15 -0
  82. data/spec/lib/event/shared_spec.rb +18 -0
  83. data/spec/lib/event/tagged_spec.rb +17 -0
  84. data/spec/lib/event/used_spec.rb +15 -0
  85. data/spec/lib/event/viewed_spec.rb +15 -0
  86. data/spec/spec_helper.rb +26 -0
  87. data/test/caliper/events/session_login_event_test.rb +58 -0
  88. data/test/caliper/events/session_logout_event_test.rb +55 -0
  89. data/test/caliper/events/session_timeout_event_test.rb +55 -0
  90. data/test/caliper/request/http_requestor_test.rb +59 -0
  91. data/test/caliper/test_event.rb +53 -0
  92. data/test/caliper/test_utils.rb +198 -0
  93. data/test/fixtures/caliper_session_login_event.json +71 -0
  94. data/test/fixtures/caliper_session_logout_event.json +52 -0
  95. data/test/fixtures/caliper_session_timeout_event.json +52 -0
  96. data/test/fixtures/event_store_payload.json +85 -0
  97. metadata +165 -0
@@ -0,0 +1,55 @@
1
+
2
+ require '../../../lib/caliper/entities/learning_context'
3
+ require '../../../lib/caliper/entities/software_application'
4
+ require '../../../lib/caliper/entities/reading/epub_sub_chapter'
5
+ require '../../../lib/caliper/entities/session'
6
+ require '../../../lib/caliper/event/event'
7
+
8
+ require_relative "../../../lib/caliper/request/http_requestor"
9
+ require_relative "../../../lib/caliper/profiles/session_profile"
10
+ require_relative "../../../lib/caliper/profiles/reading_profile"
11
+ require_relative "../test_utils"
12
+
13
+ require 'i18n'
14
+ require 'json'
15
+
16
+ class SessionTimeoutEventTest < Test::Unit::TestCase
17
+ include I18n::Tests
18
+ include TestUtils
19
+
20
+ attr_accessor :learning_context, # LearningContext
21
+ :ed_app, # SoftwareApplication
22
+ :key, # String
23
+ :target, # EpubSubChapter
24
+ :event # Event
25
+
26
+ def setup
27
+
28
+ p File.expand_path("../../", Dir.pwd) + '/config/locales/en.yml'
29
+ I18n.load_path = [[File.expand_path("../../..", Dir.pwd) + '/config/locales/en.yml']]
30
+ I18n.locale = :en
31
+ # I18n.t("actions.annotation.attached")
32
+
33
+ # Build the Learning Context
34
+ @learning_context = TestUtils.build_readium_learning_context
35
+
36
+ # Action
37
+ @ed_app = learning_context.ed_app
38
+
39
+ # Action
40
+ @key = Caliper::Profiles::SessionActions::TIMEOUT
41
+
42
+ # build target
43
+ @target = TestUtils.build_session_end
44
+
45
+ # build event
46
+ @event = TestUtils.build_epub_logout_event(@learning_context, @ed_app, @key, @target)
47
+
48
+ end
49
+
50
+ def test_caliper_event_serializes_to_json
51
+ json_payload_fixture = JSON.parse(File.read(File.expand_path("../../", Dir.pwd) + "/fixtures/caliper_session_logout_event.json")).to_json
52
+ assert_equal("Test if loggedIn event is serialized to JSON with expected values",
53
+ json_payload_fixture, @event.to_json)
54
+ end
55
+ end
@@ -0,0 +1,59 @@
1
+ require_relative "../../../lib/caliper/request/http_requestor"
2
+ require_relative "../../../lib/caliper/profiles/reading_profile"
3
+ require_relative "../test_utils"
4
+ require "test/unit"
5
+
6
+
7
+ class HttpRequestorTest < Test::Unit::TestCase
8
+
9
+ attr_accessor :http_requestor,
10
+ :id,
11
+ :timestamp,
12
+ :expected_content_type,
13
+ :learning_context,
14
+ :epub,
15
+ :from_resource,
16
+ :target,
17
+ :action,
18
+ :event
19
+
20
+ def setup
21
+ now = Time.now
22
+
23
+ options =TestUtils.get_testing_options
24
+ @http_requestor = Caliper::Request::HttpRequestor.new options
25
+
26
+ @id = "caliper-java_fccffd9b-68d5-4183-b563-e22136aafaa3"
27
+ @timestamp = now
28
+ @expected_content_type = "Content-Type: application/json"
29
+
30
+ # build the learning context
31
+ @learning_context = TestUtils.build_readium_learning_context
32
+
33
+ # Build epub
34
+ @epub = TestUtils.build_epub_volume_43
35
+
36
+ # build previous location
37
+ @from_resource = TestUtils.build_am_rev_101_landing_page
38
+
39
+ # build target
40
+ @target = TestUtils.build_epub_sub_chap_431
41
+
42
+ # action
43
+ @reading_profile = Caliper::Profiles::ReadingProfile.new
44
+
45
+ #action = reading_profile.get_action_from_bundle(reading_profile.actions.
46
+
47
+ p @learning_context.class
48
+
49
+ @event = TestUtils.build_epub_navigation_event @learning_context, @epub, @action, @fromResource, @target
50
+
51
+
52
+ end
53
+
54
+ def test_generate_payload_json()
55
+ json_payload = @http_requestor.generate_payload @event, @id, @timestamp
56
+ json_payload_fixture = JSON.parse(File.read(File.expand_path("../../", Dir.pwd) + "/fixtures/event_store_payload.json")).to_json
57
+ assert_equal("Test HTTP Requestor payload JSON",json_payload_fixture, "sss")
58
+ end
59
+ end
@@ -0,0 +1,53 @@
1
+
2
+ require "../../lib/caliper/entities/learning_context"
3
+ require "../../lib/caliper/entities/software_application"
4
+ require "../../lib/caliper/entities/digital_resource"
5
+ require "../../lib/caliper/entities/reading/epub_sub_chapter"
6
+ require "../../lib/caliper/sensor"
7
+ require_relative "test_utils"
8
+ require "test/unit"
9
+
10
+ class TestEvent < Test::Unit::TestCase
11
+ def test
12
+ test_utils = TestUtils.new
13
+ Caliper::Sensor.new(test_utils.test_options())
14
+
15
+ # Build the Learning Context
16
+ learningContext = TestUtils.buildReadiumLearningContext()
17
+
18
+ # Build epub
19
+ epub = TestUtils.buildEpubVolume43()
20
+
21
+ # Build previous location
22
+ from_resource = TestUtils.buildAmRev101LandingPage()
23
+
24
+ # Build target
25
+ target = TestUtils.buildEpubSubChap431()
26
+
27
+ # Action
28
+ action = ReadingProfile.getActionFromBundle(ReadingProfile.Actions.NAVIGATED_TO.key())
29
+
30
+ # Fire event test - Send 50 events
31
+ for i in 0..50
32
+ Sensor.send(TestUtils.buildEpubNavigationEvent(learningContext, epub, action, fromResource, target))
33
+ end
34
+
35
+ # There should be two caliperEvents queued
36
+ assertEquals("Expect fifty Caliper events to be sent", 50,
37
+ Sensor.getStatistics().getMeasures().getCount())
38
+
39
+ # TODO - Describes test - Send five describes
40
+
41
+ # There should be four describes queued assertEquals("Expect five describes to be sent", 5,
42
+ # Caliper.getStatistics().getDescribes().getCount())
43
+
44
+ # There should be two message successfully sent
45
+ successes = Sensor.getStatistics().getSuccessful().getCount()
46
+ assertEquals("Expect fifty messages to be sent successfully", 50, successes);
47
+
48
+ # There should be zero failures
49
+ failures = Sensor.getStatistics().getFailed().getCount();
50
+ assertEquals("Expect zero message failures to be sent", 0, failures);
51
+ end
52
+
53
+ end
@@ -0,0 +1,198 @@
1
+ require "test/unit"
2
+ require_relative '../../lib/caliper/options'
3
+ require_relative '../../lib/caliper/entities/lis/course_section'
4
+ require_relative '../../lib/caliper/entities/lis/person'
5
+ require_relative '../../lib/caliper/entities/learning_context'
6
+ require_relative '../../lib/caliper/entities/software_application'
7
+ require_relative '../../lib/caliper/entities/session'
8
+ require_relative '../../lib/caliper/entities/web_page'
9
+ require_relative '../../lib/caliper/entities/reading/epub_volume'
10
+ require_relative '../../lib/caliper/entities/reading/epub_sub_chapter'
11
+ require_relative '../../lib/caliper/entities/schemadotorg/web_page'
12
+ require_relative '../../lib/caliper/entities/reading/frame'
13
+ require_relative '../../lib/caliper/event/navigation_event'
14
+ require_relative '../../lib/caliper/event/session_event'
15
+
16
+ require 'json'
17
+
18
+
19
+ module TestUtils
20
+
21
+ def TestUtils.get_testing_options
22
+ options = Caliper::Options.new
23
+ options.host ="http://localhost:1080/1.0/event/put"
24
+ options.api_key = "6xp7jKrOSOWOgy3acxHFWA"
25
+ return options
26
+ end
27
+
28
+ def TestUtils.build_readium_learning_context
29
+
30
+ software_application = Caliper::Entities::SoftwareApplication.new
31
+ software_application.id = "https://github.com/readium/readium-js-viewer"
32
+ software_application.name = "Readium"
33
+ software_application.date_modified = Time.now
34
+
35
+ learning_context = Caliper::Entities::LearningContext.new
36
+ learning_context.ed_app = software_application
37
+ learning_context.lis_organization = build_am_rev_101_course_section
38
+ learning_context.agent = build_student_554433
39
+
40
+ return learning_context
41
+ end
42
+
43
+ def TestUtils.build_epub_volume_43
44
+ epub_volume = Caliper::Entities::Reading::EpubVolume.new
45
+ epub_volume.id = "https://github.com/readium/readium-js-viewer/book/34843#epubcfi(/4/3)"
46
+ epub_volume.name = "The Glorious Cause: The American Revolution, 1763-1789 (Oxford History of the United States)"
47
+ epub_volume.date_modified = Time.now
48
+
49
+ return epub_volume
50
+ end
51
+
52
+ # return Am Rev 101 course section.
53
+ def TestUtils.build_am_rev_101_course_section
54
+ course_section = Caliper::Entities::LIS::CourseSection.new
55
+ course_section.id = "https://some-university.edu/politicalScience/2014/american-revolution-101"
56
+ course_section.semester = "Spring-2014"
57
+ course_section.course_number = "AmRev-101"
58
+ course_section.label = "Am Rev 101"
59
+ course_section.name = "American Revolution 101"
60
+ course_section.date_modified = Time.now
61
+
62
+ return course_section
63
+ end
64
+
65
+ def TestUtils.build_student_554433
66
+ person = Caliper::Entities::LIS::Person.new
67
+ person.id = "https://some-university.edu/user/554433"
68
+ person.date_modified = Time.now
69
+
70
+ return person
71
+ end
72
+
73
+ def TestUtils.build_am_rev_101_landing_page
74
+ web_page = Caliper::Entities::WebPage.new
75
+ web_page.id = "AmRev-101-landingPage"
76
+ web_page.name ="American Revolution 101 Landing Page"
77
+ web_page.is_part_of = build_am_rev_101_course_section
78
+ web_page.date_modified = Time.now
79
+ return web_page
80
+ end
81
+
82
+ # sample EPUB sub chapter
83
+ def TestUtils.build_epub_sub_chap_431
84
+ epub_sub_chapter = Caliper::Entities::Reading::EpubSubChapter.new
85
+ epub_sub_chapter.id = "https://github.com/readium/readium-js-viewer/book/34843#epubcfi(/4/3/1)"
86
+ epub_sub_chapter.name = "Key Figures: George Washington"
87
+ epub_sub_chapter.is_part_of = build_epub_volume_43
88
+ epub_sub_chapter.date_modified = Time.now
89
+ return epub_sub_chapter
90
+ end
91
+
92
+ # return json object read from file
93
+ def TestUtils.read_fixture_json_file
94
+ json = File.read('fixtures/event_store_payload.json')
95
+ obj = JSON.parse(json)
96
+ return obj
97
+ end
98
+
99
+ def TestUtils.build_epub_navigation_event(learning_context, #LearningContext
100
+ epub, #digial resource
101
+ action_key,
102
+ from_resource,
103
+ target #EpubSubChapter
104
+ )
105
+ navigation_event = Caliper::Event::NavigationEvent.new
106
+
107
+ raise ArgumentError, "build_epub_navigation_event first param should be of class LearningContext" unless learning_context.is_a? Caliper::Entities::LearningContext
108
+
109
+ navigation_event.ed_app = learning_context.ed_app
110
+ navigation_event.lis_organization = learning_context.lis_organization
111
+ navigation_event.actor = learning_context.agent
112
+ navigation_event.action = action_key
113
+ navigation_event.object = epub
114
+
115
+ frame = Caliper::Entities::Reading::Frame.new
116
+ frame.id = target.id
117
+ frame.name = target.name
118
+ frame.is_part_of = epub
119
+ frame.date_modified = 1402965614516
120
+ frame.index = 1
121
+ navigation_event.target = frame
122
+
123
+ navigation_event.from_resource = from_resource
124
+ navigation_event.started_at_time = 1402965614516
125
+
126
+ return navigation_event
127
+ end
128
+
129
+ # session start
130
+ def TestUtils.build_session_start
131
+ session = Caliper::Entities::Session.new
132
+ session.id = "https://github.com/readium/session-123456789"
133
+ session.name = "session-123456789"
134
+ session.actor = build_student_554433
135
+ session.date_modified = 1402965614516
136
+ session.started_at_time = 1402965614516
137
+ return session
138
+ end
139
+
140
+ #session send
141
+ def TestUtils.build_session_end
142
+ session = Caliper::Entities::Session.new
143
+ session.id = "https://github.com/readium/session-123456789"
144
+ session.name = "session-123456789"
145
+ session.actor = build_student_554433
146
+ session.date_modified = 1402965614516
147
+ session.started_at_time = 1402965614516
148
+ session.ended_at_time = 1402965614516
149
+ return session
150
+ end
151
+
152
+ def TestUtils.build_epub_login_event(learning_context, ed_app,action_key,target,generated)
153
+ # a frame object
154
+ frame = Caliper::Entities::Reading::Frame.new
155
+ frame.id = target.id
156
+ frame.name = target.name
157
+ frame.is_part_of = target.is_part_of
158
+ frame.date_modified = 1402965614516
159
+ frame.index = 1
160
+
161
+ session_event = Caliper::Event::SessionEvent.new
162
+ session_event.ed_app = learning_context.ed_app
163
+ session_event.lis_organization = learning_context.lis_organization
164
+ session_event.actor = learning_context.agent
165
+ session_event.action = action_key
166
+ session_event.object = ed_app
167
+ session_event.target = frame
168
+ session_event.generated = generated
169
+ session_event.started_at_time = 1402965614516
170
+
171
+ return session_event
172
+ end
173
+
174
+ def TestUtils.build_epub_logout_event(learning_context, ed_app, action_key, target)
175
+ session_event = Caliper::Event::SessionEvent.new
176
+ session_event.ed_app = learning_context.ed_app
177
+ session_event.lis_organization = learning_context.lis_organization
178
+ session_event.actor = learning_context.agent
179
+ session_event.action = action_key
180
+ session_event.object = ed_app
181
+ session_event.target = target
182
+ session_event.started_at_time = 1402965614516
183
+ session_event.ended_at_time = 1402965614516
184
+ end
185
+
186
+ def TestUtils.build_epub_timeout_event(learning_context, ed_app, action_key, target)
187
+ session_event = Caliper::Event::SessionEvent.new
188
+ session_event.ed_app = learning_context.ed_app
189
+ session_event.lis_organization = learning_context.lis_organization
190
+ session_event.actor = learning_context.agent
191
+ session_event.action = action_key
192
+ session_event.object = ed_app
193
+ session_event.target = target
194
+ session_event.started_at_time = 1402965614516
195
+ session_event.ended_at_time = 1402965614516
196
+ end
197
+
198
+ end
@@ -0,0 +1,71 @@
1
+ {
2
+ "@context": "http://purl.imsglobal.org/ctx/caliper/v1/SessionEvent",
3
+ "@type": "http://purl.imsglobal.org/caliper/v1/SessionEvent",
4
+ "actor": {
5
+ "@id": "https://some-university.edu/user/554433",
6
+ "@type": "http://purl.imsglobal.org/caliper/v1/lis/Person",
7
+ "name": null,
8
+ "lastModifiedTime": 1402965614516
9
+ },
10
+ "action": "logged in",
11
+ "object": {
12
+ "@id": "https://github.com/readium/readium-js-viewer",
13
+ "@type":"http://purl.imsglobal.org/caliper/v1/SoftwareApplication",
14
+ "name": "Readium",
15
+ "lastModifiedTime": 1402965614516
16
+ },
17
+ "target": {
18
+ "@id": "https://github.com/readium/readium-js-viewer/book/34843#epubcfi(/4/3/1)",
19
+ "@type": "http://purl.imsglobal.org/caliper/v1/Frame",
20
+ "name": "Key Figures: George Washington",
21
+ "objectType": [],
22
+ "alignedLearningObjective": [],
23
+ "keyword": [],
24
+ "partOf": {
25
+ "@id": "https://github.com/readium/readium-js-viewer/book/34843#epubcfi(/4/3)",
26
+ "@type": "http://www.idpf.org/epub/vocab/structure/#volume",
27
+ "name": "The Glorious Cause: The American Revolution, 1763-1789 (Oxford History of the United States)",
28
+ "objectType": [],
29
+ "alignedLearningObjective": [],
30
+ "keyword": [],
31
+ "partOf": null,
32
+ "lastModifiedTime": 1402965614516
33
+ },
34
+ "lastModifiedTime": 1402965614516,
35
+ "index": 1
36
+ },
37
+ "generated": {
38
+ "@id": "https://github.com/readium/session-123456789",
39
+ "@type":"http://purl.imsglobal.org/caliper/v1/Session",
40
+ "name": "session-123456789",
41
+ "lastModifiedTime": 1402965614516,
42
+ "actor": {
43
+ "@id": "https://some-university.edu/user/554433",
44
+ "@type": "http://purl.imsglobal.org/caliper/v1/lis/Person",
45
+ "name": null,
46
+ "lastModifiedTime": 1402965614516
47
+ },
48
+ "startedAtTime": 1402965614516,
49
+ "endedAtTime": 0,
50
+ "duration": null
51
+ },
52
+ "startedAtTime": 1402965614516,
53
+ "endedAtTime": 0,
54
+ "duration": null,
55
+ "edApp": {
56
+ "@id": "https://github.com/readium/readium-js-viewer",
57
+ "@type":"http://purl.imsglobal.org/caliper/v1/SoftwareApplication",
58
+ "name": "Readium",
59
+ "lastModifiedTime": 1402965614516
60
+ },
61
+ "group": {
62
+ "@id": "https://some-university.edu/politicalScience/2014/american-revolution-101",
63
+ "@type": "http://purl.imsglobal.org/caliper/v1/lis/CourseSection",
64
+ "semester": "Spring-2014",
65
+ "courseNumber": "AmRev-101",
66
+ "label": "Am Rev 101",
67
+ "name": "American Revolution 101",
68
+ "parentOrg": null,
69
+ "lastModifiedTime": 1402965614516
70
+ }
71
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "@context": "http://purl.imsglobal.org/ctx/caliper/v1/SessionEvent",
3
+ "@type": "http://purl.imsglobal.org/caliper/v1/SessionEvent",
4
+ "actor": {
5
+ "@id": "https://some-university.edu/user/554433",
6
+ "@type": "http://purl.imsglobal.org/caliper/v1/lis/Person",
7
+ "name": null,
8
+ "lastModifiedTime": 1402965614516
9
+ },
10
+ "action": "logged out",
11
+ "object": {
12
+ "@id": "https://github.com/readium/readium-js-viewer",
13
+ "@type":"http://purl.imsglobal.org/caliper/v1/SoftwareApplication",
14
+ "name": "Readium",
15
+ "lastModifiedTime": 1402965614516
16
+ },
17
+ "target": {
18
+ "@id": "https://github.com/readium/session-123456789",
19
+ "@type":"http://purl.imsglobal.org/caliper/v1/Session",
20
+ "name": "session-123456789",
21
+ "lastModifiedTime": 1402965614516,
22
+ "actor": {
23
+ "@id": "https://some-university.edu/user/554433",
24
+ "@type": "http://purl.imsglobal.org/caliper/v1/lis/Person",
25
+ "name": null,
26
+ "lastModifiedTime": 1402965614516
27
+ },
28
+ "startedAtTime": 1402965614516,
29
+ "endedAtTime": 1402965614516,
30
+ "duration": null
31
+ },
32
+ "generated": null,
33
+ "startedAtTime": 1402965614516,
34
+ "endedAtTime": 1402965614516,
35
+ "duration": null,
36
+ "edApp": {
37
+ "@id": "https://github.com/readium/readium-js-viewer",
38
+ "@type":"http://purl.imsglobal.org/caliper/v1/SoftwareApplication",
39
+ "name": "Readium",
40
+ "lastModifiedTime": 1402965614516
41
+ },
42
+ "group": {
43
+ "@id": "https://some-university.edu/politicalScience/2014/american-revolution-101",
44
+ "@type": "http://purl.imsglobal.org/caliper/v1/lis/CourseSection",
45
+ "semester": "Spring-2014",
46
+ "courseNumber": "AmRev-101",
47
+ "label": "Am Rev 101",
48
+ "name": "American Revolution 101",
49
+ "parentOrg": null,
50
+ "lastModifiedTime": 1402965614516
51
+ }
52
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "@context": "http://purl.imsglobal.org/ctx/caliper/v1/SessionEvent",
3
+ "@type": "http://purl.imsglobal.org/caliper/v1/SessionEvent",
4
+ "actor": {
5
+ "@id": "https://github.com/readium/readium-js-viewer",
6
+ "@type":"http://purl.imsglobal.org/caliper/v1/SoftwareApplication",
7
+ "name": "Readium",
8
+ "lastModifiedTime": 1402965614516
9
+ },
10
+ "action": "timed out",
11
+ "object": {
12
+ "@id": "https://github.com/readium/readium-js-viewer",
13
+ "@type":"http://purl.imsglobal.org/caliper/v1/SoftwareApplication",
14
+ "name": "Readium",
15
+ "lastModifiedTime": 1402965614516
16
+ },
17
+ "target": {
18
+ "@id": "https://github.com/readium/session-123456789",
19
+ "@type":"http://purl.imsglobal.org/caliper/v1/Session",
20
+ "name": "session-123456789",
21
+ "lastModifiedTime": 1402965614516,
22
+ "actor": {
23
+ "@id": "https://some-university.edu/user/554433",
24
+ "@type": "http://purl.imsglobal.org/caliper/v1/lis/Person",
25
+ "name": null,
26
+ "lastModifiedTime": 1402965614516
27
+ },
28
+ "startedAtTime": 1402965614516,
29
+ "endedAtTime": 1402965614516,
30
+ "duration": null
31
+ },
32
+ "generated": null,
33
+ "startedAtTime": 1402965614516,
34
+ "endedAtTime": 1402965614516,
35
+ "duration": null,
36
+ "edApp": {
37
+ "@id": "https://github.com/readium/readium-js-viewer",
38
+ "@type":"http://purl.imsglobal.org/caliper/v1/SoftwareApplication",
39
+ "name": "Readium",
40
+ "lastModifiedTime": 1402965614516
41
+ },
42
+ "group": {
43
+ "@id": "https://some-university.edu/politicalScience/2014/american-revolution-101",
44
+ "@type": "http://purl.imsglobal.org/caliper/v1/lis/CourseSection",
45
+ "semester": "Spring-2014",
46
+ "courseNumber": "AmRev-101",
47
+ "label": "Am Rev 101",
48
+ "name": "American Revolution 101",
49
+ "parentOrg": null,
50
+ "lastModifiedTime": 1402965614516
51
+ }
52
+ }
@@ -0,0 +1,85 @@
1
+ [{
2
+ "id" : "caliper-java_fccffd9b-68d5-4183-b563-e22136aafaa3",
3
+ "type": "caliperEvent",
4
+ "time": "2014-07-01T14:29:29.858-04:00",
5
+ "data": {
6
+ "@context": "http://purl.imsglobal.org/ctx/caliper/v1/NavigationEvent",
7
+ "@type": "http://purl.imsglobal.org/caliper/v1/NavigationEvent",
8
+ "actor": {
9
+ "@id": "https://some-university.edu/user/554433",
10
+ "@type": "http://purl.imsglobal.org/caliper/v1/lis/Person",
11
+ "name": null,
12
+ "lastModifiedTime": 1402965614516
13
+ },
14
+ "action": "navigated to",
15
+ "object": {
16
+ "@id": "https://github.com/readium/readium-js-viewer/book/34843#epubcfi(/4/3)",
17
+ "@type": "http://www.idpf.org/epub/vocab/structure/#volume",
18
+ "name": "The Glorious Cause: The American Revolution, 1763-1789 (Oxford History of the United States)",
19
+ "objectType": [],
20
+ "alignedLearningObjective": [],
21
+ "keyword": [],
22
+ "partOf": null,
23
+ "lastModifiedTime": 1402965614516
24
+ },
25
+ "target": {
26
+ "@id": "https://github.com/readium/readium-js-viewer/book/34843#epubcfi(/4/3/1)",
27
+ "@type": "http://purl.imsglobal.org/caliper/v1/Frame",
28
+ "name": "Key Figures: George Washington",
29
+ "objectType": [],
30
+ "alignedLearningObjective": [],
31
+ "keyword": [],
32
+ "partOf": {
33
+ "@id": "https://github.com/readium/readium-js-viewer/book/34843#epubcfi(/4/3)",
34
+ "@type": "http://www.idpf.org/epub/vocab/structure/#volume",
35
+ "name": "The Glorious Cause: The American Revolution, 1763-1789 (Oxford History of the United States)",
36
+ "objectType": [],
37
+ "alignedLearningObjective": [],
38
+ "keyword": [],
39
+ "partOf": null,
40
+ "lastModifiedTime": 1402965614516
41
+ },
42
+ "lastModifiedTime": 1402965614516,
43
+ "index": 1
44
+ },
45
+ "generated": null,
46
+ "startedAtTime": 1402965614516,
47
+ "endedAtTime": 0,
48
+ "duration": null,
49
+ "edApp": {
50
+ "@id": "https://github.com/readium/readium-js-viewer",
51
+ "@type":"http://purl.imsglobal.org/caliper/v1/SoftwareApplication",
52
+ "name": "Readium",
53
+ "lastModifiedTime": 1402965614516
54
+ },
55
+ "group": {
56
+ "@id": "https://some-university.edu/politicalScience/2014/american-revolution-101",
57
+ "@type": "http://purl.imsglobal.org/caliper/v1/lis/CourseSection",
58
+ "semester": "Spring-2014",
59
+ "courseNumber": "AmRev-101",
60
+ "label": "Am Rev 101",
61
+ "name": "American Revolution 101",
62
+ "parentOrg": null,
63
+ "lastModifiedTime": 1402965614516
64
+ },
65
+ "navigatedFrom": {
66
+ "@id": "AmRev-101-landingPage",
67
+ "@type": "http://purl.imsglobal.org/caliper/v1/WebPage",
68
+ "name": "American Revolution 101 Landing Page",
69
+ "objectType": [],
70
+ "alignedLearningObjective": [],
71
+ "keyword": [],
72
+ "partOf": {
73
+ "@id": "https://some-university.edu/politicalScience/2014/american-revolution-101",
74
+ "@type": "http://purl.imsglobal.org/caliper/v1/lis/CourseSection",
75
+ "semester": "Spring-2014",
76
+ "courseNumber": "AmRev-101",
77
+ "label": "Am Rev 101",
78
+ "name": "American Revolution 101",
79
+ "parentOrg": null,
80
+ "lastModifiedTime": 1402965614516
81
+ },
82
+ "lastModifiedTime": 1402965614516
83
+ }
84
+ }
85
+ }]