ims_caliper 0.1.3 → 0.9.0

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 (131) hide show
  1. checksums.yaml +5 -13
  2. data/.gitignore +3 -0
  3. data/LICENSE +156 -58
  4. data/NOTICE +42 -8
  5. data/README.md +2 -2
  6. data/lib/caliper/defaults.rb +21 -1
  7. data/lib/caliper/entities/agent/organization.rb +37 -0
  8. data/lib/caliper/entities/agent/person.rb +38 -0
  9. data/lib/caliper/entities/agent/software_application.rb +39 -0
  10. data/lib/caliper/entities/annotation/annotation.rb +21 -11
  11. data/lib/caliper/entities/annotation/bookmark_annotation.rb +19 -9
  12. data/lib/caliper/entities/annotation/highlight_annotation.rb +19 -8
  13. data/lib/caliper/entities/annotation/shared_annotation.rb +19 -9
  14. data/lib/caliper/entities/annotation/tag_annotation.rb +19 -9
  15. data/lib/caliper/entities/assessment/assessment.rb +19 -9
  16. data/lib/caliper/entities/assessment/assessment_item.rb +19 -8
  17. data/lib/caliper/entities/assignable/assignable_digital_resource.rb +19 -11
  18. data/lib/caliper/entities/assignable/attempt.rb +21 -8
  19. data/lib/caliper/entities/digital_resource.rb +29 -18
  20. data/lib/caliper/entities/entity.rb +27 -13
  21. data/lib/caliper/entities/foaf/agent.rb +22 -3
  22. data/lib/caliper/entities/generatable.rb +21 -2
  23. data/lib/caliper/entities/jsonable.rb +17 -5
  24. data/lib/caliper/entities/learning_context.rb +30 -9
  25. data/lib/caliper/entities/learning_objective.rb +19 -12
  26. data/lib/caliper/entities/lis/course_offering.rb +23 -13
  27. data/lib/caliper/entities/lis/course_section.rb +20 -13
  28. data/lib/caliper/entities/lis/group.rb +23 -13
  29. data/lib/caliper/entities/lis/membership.rb +22 -16
  30. data/lib/caliper/entities/lis/roles.rb +18 -6
  31. data/lib/caliper/entities/lis/status.rb +18 -6
  32. data/lib/caliper/entities/media/audio_object.rb +21 -7
  33. data/lib/caliper/entities/media/image_object.rb +21 -7
  34. data/lib/caliper/entities/media/media_location.rb +19 -4
  35. data/lib/caliper/entities/media/media_object.rb +19 -8
  36. data/lib/caliper/entities/media/video_object.rb +21 -7
  37. data/lib/caliper/entities/outcome/result.rb +23 -2
  38. data/lib/caliper/entities/reading/epub_chapter.rb +23 -7
  39. data/lib/caliper/entities/reading/epub_part.rb +24 -8
  40. data/lib/caliper/entities/reading/epub_sub_chapter.rb +22 -5
  41. data/lib/caliper/entities/reading/epub_volume.rb +20 -12
  42. data/lib/caliper/entities/reading/frame.rb +22 -6
  43. data/lib/caliper/entities/reading/web_page.rb +37 -0
  44. data/lib/caliper/entities/response/fillin_blank_response.rb +21 -3
  45. data/lib/caliper/entities/response/multiple_choice_response.rb +20 -3
  46. data/lib/caliper/entities/response/multiple_response_response.rb +20 -3
  47. data/lib/caliper/entities/response/response.rb +24 -3
  48. data/lib/caliper/entities/response/response_type.rb +20 -0
  49. data/lib/caliper/entities/response/select_type_response.rb +23 -5
  50. data/lib/caliper/entities/response/true_false_response.rb +20 -3
  51. data/lib/caliper/entities/schemadotorg/creative_work.rb +22 -2
  52. data/lib/caliper/entities/schemadotorg/software_application.rb +22 -2
  53. data/lib/caliper/entities/schemadotorg/thing.rb +19 -0
  54. data/lib/caliper/entities/schemadotorg/web_page.rb +22 -2
  55. data/lib/caliper/entities/session/session.rb +44 -0
  56. data/lib/caliper/entities/targetable.rb +19 -3
  57. data/lib/caliper/entities/w3c/membership.rb +32 -0
  58. data/lib/caliper/entities/w3c/organization.rb +30 -0
  59. data/lib/caliper/entity_envelope.rb +20 -7
  60. data/lib/caliper/event/annotation_event.rb +21 -6
  61. data/lib/caliper/event/assessment_event.rb +22 -2
  62. data/lib/caliper/event/assessment_item_event.rb +22 -2
  63. data/lib/caliper/event/assignable_event.rb +22 -2
  64. data/lib/caliper/event/event.rb +23 -1
  65. data/lib/caliper/event/jsonable.rb +18 -6
  66. data/lib/caliper/event/media_event.rb +22 -2
  67. data/lib/caliper/event/navigation_event.rb +22 -3
  68. data/lib/caliper/event/outcome_event.rb +22 -3
  69. data/lib/caliper/event/session_event.rb +21 -7
  70. data/lib/caliper/event/view_event.rb +22 -8
  71. data/lib/caliper/event_envelope.rb +20 -8
  72. data/lib/caliper/jsonable.rb +24 -7
  73. data/lib/caliper/options.rb +21 -2
  74. data/lib/caliper/profiles/annotation_profile.rb +21 -3
  75. data/lib/caliper/profiles/assessment_item_profile.rb +48 -0
  76. data/lib/caliper/profiles/assessment_profile.rb +22 -23
  77. data/lib/caliper/profiles/assignable_profile.rb +21 -4
  78. data/lib/caliper/profiles/media_profile.rb +20 -3
  79. data/lib/caliper/profiles/profile.rb +20 -24
  80. data/lib/caliper/profiles/reading_profile.rb +21 -4
  81. data/lib/caliper/profiles/session_profile.rb +20 -2
  82. data/lib/caliper/request/event_store_envelope.rb +20 -2
  83. data/lib/caliper/request/event_store_requestor.rb +21 -2
  84. data/lib/caliper/request/http_requestor.rb +28 -9
  85. data/lib/caliper/sensor.rb +21 -11
  86. data/lib/caliper/stats/atomic_wrapper.rb +21 -4
  87. data/lib/caliper/stats/statistic.rb +21 -1
  88. data/lib/caliper/stats/statistics.rb +20 -2
  89. data/lib/caliper/stats/statistics_map.rb +20 -0
  90. data/lib/caliper/validators/error_message.rb +20 -0
  91. data/lib/caliper/validators/event_validator.rb +20 -0
  92. data/lib/caliper/validators/event_validator_context.rb +21 -1
  93. data/lib/caliper/validators/property_type_check.rb +23 -4
  94. data/lib/caliper/validators/session_login_event_validator.rb +39 -21
  95. data/lib/caliper/validators/session_logout_event_validator.rb +31 -13
  96. data/lib/caliper/validators/time_check.rb +20 -0
  97. data/lib/caliper/version.rb +22 -3
  98. data/lib/caliper.rb +18 -1
  99. data/spec/lib/entities/{lis → agent}/person_spec.rb +26 -6
  100. data/spec/lib/entities/{lis → agent}/student.json +0 -0
  101. data/spec/lib/entities/entity_spec.rb +19 -4
  102. data/spec/lib/event/annotation_event_bookmark_spec.rb +23 -8
  103. data/spec/lib/event/annotation_event_highlight_spec.rb +23 -8
  104. data/spec/lib/event/annotation_event_shared_spec.rb +25 -10
  105. data/spec/lib/event/annotation_event_tag_spec.rb +23 -8
  106. data/spec/lib/event/assessment_event_spec.rb +22 -8
  107. data/spec/lib/event/assessment_item_completed_event_spec.rb +24 -10
  108. data/spec/lib/event/assessment_item_started_event_spec.rb +24 -10
  109. data/spec/lib/event/assignable_event_spec.rb +225 -0
  110. data/spec/lib/event/media_event_spec.rb +22 -7
  111. data/spec/lib/event/navigated_event_spec.rb +26 -11
  112. data/spec/lib/event/session_event_login_spec.rb +26 -12
  113. data/spec/lib/event/session_event_logout_spec.rb +25 -12
  114. data/spec/lib/event/session_event_timeout_spec.rb +25 -12
  115. data/spec/lib/event/viewed_event_spec.rb +23 -8
  116. data/spec/lib/event_helper.rb +25 -9
  117. data/spec/lib/sensor_spec.rb +43 -13
  118. data/spec/spec_helper.rb +18 -3
  119. metadata +19 -22
  120. data/.idea/caliper-ruby.iml +0 -156
  121. data/.idea/encodings.xml +0 -5
  122. data/.idea/misc.xml +0 -5
  123. data/.idea/modules.xml +0 -9
  124. data/.idea/scopes/scope_settings.xml +0 -5
  125. data/.idea/vcs.xml +0 -7
  126. data/lib/caliper/entities/lis/organization.rb +0 -25
  127. data/lib/caliper/entities/lis/person.rb +0 -25
  128. data/lib/caliper/entities/session.rb +0 -34
  129. data/lib/caliper/entities/software_application.rb +0 -28
  130. data/lib/caliper/entities/web_page.rb +0 -15
  131. data/spec/lib/request/http_request_spec.rb +0 -216
@@ -1,30 +1,40 @@
1
- require_relative './organization'
2
- require_relative '../../entities/jsonable'
3
-
1
+ ##
2
+ # This file is part of IMS Caliper Analytics™ and is licensed to
3
+ # IMS Global Learning Consortium, Inc. (http://www.imsglobal.org)
4
+ # under one or more contributor license agreements. See the NOTICE
5
+ # file distributed with this work for additional information.
4
6
  #
7
+ # IMS Caliper is free software: you can redistribute it and/or modify it under
8
+ # the terms of the GNU Lesser General Public License as published by the Free
9
+ # Software Foundation, version 3 of the License.
5
10
  #
6
- # @copyright @copyright ©2013 IMS Global Learning Consortium, Inc. All Rights Reserved.
7
- # @license For license information contact, info@imsglobal.org
11
+ # IMS Caliper is distributed in the hope that it will be useful, but WITHOUT
12
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
+ # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
8
14
  #
15
+ # You should have received a copy of the GNU Lesser General Public License along
16
+ # with this program. If not, see http://www.gnu.org/licenses/.
17
+
18
+ require_relative '../entity'
19
+ require_relative '../w3c/organization'
20
+
9
21
  #
10
- # a LIS Course Section
22
+ # LIS Course Offering.
11
23
  #
12
24
  module Caliper
13
25
  module Entities
14
26
  module LIS
15
-
16
- class CourseOffering < Caliper::Entities::LIS::Organization
17
- include Caliper::Entities::Jsonable
27
+ class CourseOffering < Entity
28
+ include Caliper::Entities::W3c::Organization
18
29
 
19
30
  attr_accessor :courseNumber,
20
- :academicSession
31
+ :academicSession
21
32
 
22
33
  def initialize
23
34
  super
24
- @type = OrganizationType::COURSE_OFFERING
35
+ @type = EntityType::COURSE_OFFERING
25
36
  end
26
-
27
37
  end
28
38
  end
29
39
  end
30
- end
40
+ end
@@ -1,30 +1,37 @@
1
- require_relative './organization'
2
- require_relative '../../entities/jsonable'
3
- require_relative './course_offering'
4
-
1
+ ##
2
+ # This file is part of IMS Caliper Analytics™ and is licensed to
3
+ # IMS Global Learning Consortium, Inc. (http://www.imsglobal.org)
4
+ # under one or more contributor license agreements. See the NOTICE
5
+ # file distributed with this work for additional information.
5
6
  #
6
- #
7
- # @copyright @copyright ©2013 IMS Global Learning Consortium, Inc. All Rights Reserved.
8
- # @license For license information contact, info@imsglobal.org
7
+ # IMS Caliper is free software: you can redistribute it and/or modify it under
8
+ # the terms of the GNU Lesser General Public License as published by the Free
9
+ # Software Foundation, version 3 of the License.
9
10
  #
11
+ # IMS Caliper is distributed in the hope that it will be useful, but WITHOUT
12
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
+ # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public License along
16
+ # with this program. If not, see http://www.gnu.org/licenses/.
17
+
18
+ require_relative './course_offering'
19
+
10
20
  #
11
- # a LIS Course Section
21
+ # LIS Course Section.
12
22
  #
13
23
  module Caliper
14
24
  module Entities
15
25
  module LIS
16
-
17
26
  class CourseSection < Caliper::Entities::LIS::CourseOffering
18
- include Caliper::Entities::Jsonable
19
27
 
20
28
  attr_accessor :category
21
29
 
22
30
  def initialize
23
31
  super
24
- @type = OrganizationType::LIS_COURSE_SECTION
32
+ @type = EntityType::COURSE_SECTION
25
33
  end
26
-
27
34
  end
28
35
  end
29
36
  end
30
- end
37
+ end
@@ -1,27 +1,37 @@
1
- require_relative './organization'
2
- require_relative '../../entities/jsonable'
3
-
1
+ ##
2
+ # This file is part of IMS Caliper Analytics™ and is licensed to
3
+ # IMS Global Learning Consortium, Inc. (http://www.imsglobal.org)
4
+ # under one or more contributor license agreements. See the NOTICE
5
+ # file distributed with this work for additional information.
6
+ #
7
+ # IMS Caliper is free software: you can redistribute it and/or modify it under
8
+ # the terms of the GNU Lesser General Public License as published by the Free
9
+ # Software Foundation, version 3 of the License.
4
10
  #
5
- #
6
- # @copyright @copyright ©2013 IMS Global Learning Consortium, Inc. All Rights Reserved.
7
- # @license For license information contact, info@imsglobal.org
11
+ # IMS Caliper is distributed in the hope that it will be useful, but WITHOUT
12
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
+ # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
8
14
  #
15
+ # You should have received a copy of the GNU Lesser General Public License along
16
+ # with this program. If not, see http://www.gnu.org/licenses/.
17
+
18
+ require_relative '../entity'
19
+ require_relative '../w3c/organization'
20
+
9
21
  #
10
- # a LIS Course Section
22
+ # LIS Group.
11
23
  #
12
24
  module Caliper
13
25
  module Entities
14
26
  module LIS
15
-
16
- class Group < Caliper::Entities::LIS::Organization
17
- include Caliper::Entities::Jsonable
27
+ class Group < Entity
28
+ include Caliper::Entities::W3c::Organization
18
29
 
19
30
  def initialize
20
31
  super
21
- @type = OrganizationType::GROUP
32
+ @type = EntityType::GROUP
22
33
  end
23
-
24
34
  end
25
35
  end
26
36
  end
27
- end
37
+ end
@@ -1,25 +1,31 @@
1
- require_relative './organization'
2
- require_relative '../../entities/jsonable'
3
-
1
+ ##
2
+ # This file is part of IMS Caliper Analytics™ and is licensed to
3
+ # IMS Global Learning Consortium, Inc. (http://www.imsglobal.org)
4
+ # under one or more contributor license agreements. See the NOTICE
5
+ # file distributed with this work for additional information.
6
+ #
7
+ # IMS Caliper is free software: you can redistribute it and/or modify it under
8
+ # the terms of the GNU Lesser General Public License as published by the Free
9
+ # Software Foundation, version 3 of the License.
4
10
  #
5
- #
6
- # @copyright @copyright ©2013 IMS Global Learning Consortium, Inc. All Rights Reserved.
7
- # @license For license information contact, info@imsglobal.org
11
+ # IMS Caliper is distributed in the hope that it will be useful, but WITHOUT
12
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
+ # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
8
14
  #
15
+ # You should have received a copy of the GNU Lesser General Public License along
16
+ # with this program. If not, see http://www.gnu.org/licenses/.
17
+
18
+ require_relative '../entity'
19
+ require_relative '../w3c/membership'
20
+
9
21
  #
10
- # W3C Membership
22
+ # W3C Membership.
11
23
  #
12
24
  module Caliper
13
25
  module Entities
14
26
  module LIS
15
-
16
- class Membership < Caliper::Entities::LIS::Organization
17
- include Caliper::Entities::Jsonable
18
-
19
- attr_accessor :member,
20
- :organization,
21
- :roles,
22
- :status
27
+ class Membership < Entity
28
+ include Caliper::Entities::W3c::Membership
23
29
 
24
30
  def initialize
25
31
  super
@@ -29,4 +35,4 @@ module Caliper
29
35
  end
30
36
  end
31
37
  end
32
- end
38
+ end
@@ -1,10 +1,22 @@
1
- require_relative '../../entities/entity'
2
- require_relative '../../entities/foaf/agent.rb'
3
- require_relative '../../entities/jsonable'
1
+ ##
2
+ # This file is part of IMS Caliper Analytics™ and is licensed to
3
+ # IMS Global Learning Consortium, Inc. (http://www.imsglobal.org)
4
+ # under one or more contributor license agreements. See the NOTICE
5
+ # file distributed with this work for additional information.
4
6
  #
7
+ # IMS Caliper is free software: you can redistribute it and/or modify it under
8
+ # the terms of the GNU Lesser General Public License as published by the Free
9
+ # Software Foundation, version 3 of the License.
5
10
  #
6
- # @copyright @copyright ©2013 IMS Global Learning Consortium, Inc. All Rights Reserved.
7
- # @license For license information contact, info@imsglobal.org
11
+ # IMS Caliper is distributed in the hope that it will be useful, but WITHOUT
12
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
+ # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public License along
16
+ # with this program. If not, see http://www.gnu.org/licenses/.
17
+
18
+ #
19
+ # LTI LIS roles.
8
20
  #
9
21
  module Caliper
10
22
  module Entities
@@ -74,4 +86,4 @@ module Caliper
74
86
  end
75
87
  end
76
88
  end
77
- end
89
+ end
@@ -1,10 +1,22 @@
1
- require_relative '../../entities/entity'
2
- require_relative '../../entities/foaf/agent.rb'
3
- require_relative '../../entities/jsonable'
1
+ ##
2
+ # This file is part of IMS Caliper Analytics™ and is licensed to
3
+ # IMS Global Learning Consortium, Inc. (http://www.imsglobal.org)
4
+ # under one or more contributor license agreements. See the NOTICE
5
+ # file distributed with this work for additional information.
4
6
  #
7
+ # IMS Caliper is free software: you can redistribute it and/or modify it under
8
+ # the terms of the GNU Lesser General Public License as published by the Free
9
+ # Software Foundation, version 3 of the License.
5
10
  #
6
- # @copyright @copyright ©2013 IMS Global Learning Consortium, Inc. All Rights Reserved.
7
- # @license For license information contact, info@imsglobal.org
11
+ # IMS Caliper is distributed in the hope that it will be useful, but WITHOUT
12
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
+ # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public License along
16
+ # with this program. If not, see http://www.gnu.org/licenses/.
17
+
18
+ #
19
+ # LIS Status
8
20
  #
9
21
  module Caliper
10
22
  module Entities
@@ -16,4 +28,4 @@ module Caliper
16
28
  end
17
29
  end
18
30
  end
19
- end
31
+ end
@@ -1,21 +1,35 @@
1
- require_relative 'media_object'
2
-
3
- # https://schema.org/AudioObject
1
+ ##
2
+ # This file is part of IMS Caliper Analytics™ and is licensed to
3
+ # IMS Global Learning Consortium, Inc. (http://www.imsglobal.org)
4
+ # under one or more contributor license agreements. See the NOTICE
5
+ # file distributed with this work for additional information.
6
+ #
7
+ # IMS Caliper is free software: you can redistribute it and/or modify it under
8
+ # the terms of the GNU Lesser General Public License as published by the Free
9
+ # Software Foundation, version 3 of the License.
4
10
  #
5
- # A audio object embedded in a web page..
11
+ # IMS Caliper is distributed in the hope that it will be useful, but WITHOUT
12
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
+ # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public License along
16
+ # with this program. If not, see http://www.gnu.org/licenses/.
17
+
18
+ require_relative './media_object'
6
19
 
20
+ #
21
+ # Audio object embedded in a web page. See https://schema.org/AudioObject
22
+ #
7
23
  module Caliper
8
24
  module Entities
9
25
  module Media
10
-
11
26
  class AudioObject < MediaObject
12
27
 
13
28
  def initialize
14
29
  super
15
30
  @type = MediaType::AUDIO_OBJECT
16
31
  end
17
-
18
32
  end
19
33
  end
20
34
  end
21
- end
35
+ end
@@ -1,21 +1,35 @@
1
- require_relative 'media_object'
2
-
3
- # https://schema.org/ImageObject
1
+ ##
2
+ # This file is part of IMS Caliper Analytics™ and is licensed to
3
+ # IMS Global Learning Consortium, Inc. (http://www.imsglobal.org)
4
+ # under one or more contributor license agreements. See the NOTICE
5
+ # file distributed with this work for additional information.
6
+ #
7
+ # IMS Caliper is free software: you can redistribute it and/or modify it under
8
+ # the terms of the GNU Lesser General Public License as published by the Free
9
+ # Software Foundation, version 3 of the License.
4
10
  #
5
- # A image object embedded in a web page..
11
+ # IMS Caliper is distributed in the hope that it will be useful, but WITHOUT
12
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
+ # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public License along
16
+ # with this program. If not, see http://www.gnu.org/licenses/.
17
+
18
+ require_relative './media_object'
6
19
 
20
+ #
21
+ # A image object embedded in a web page. See https://schema.org/ImageObject
22
+ #
7
23
  module Caliper
8
24
  module Entities
9
25
  module Media
10
-
11
26
  class ImageObject < MediaObject
12
27
 
13
28
  def initialize
14
29
  super
15
30
  @type = MediaType::IMAGE_OBJECT
16
31
  end
17
-
18
32
  end
19
33
  end
20
34
  end
21
- end
35
+ end
@@ -1,12 +1,28 @@
1
- require_relative '../../entities/digital_resource'
1
+ ##
2
+ # This file is part of IMS Caliper Analytics™ and is licensed to
3
+ # IMS Global Learning Consortium, Inc. (http://www.imsglobal.org)
4
+ # under one or more contributor license agreements. See the NOTICE
5
+ # file distributed with this work for additional information.
6
+ #
7
+ # IMS Caliper is free software: you can redistribute it and/or modify it under
8
+ # the terms of the GNU Lesser General Public License as published by the Free
9
+ # Software Foundation, version 3 of the License.
10
+ #
11
+ # IMS Caliper is distributed in the hope that it will be useful, but WITHOUT
12
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
+ # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public License along
16
+ # with this program. If not, see http://www.gnu.org/licenses/.
17
+
18
+ require_relative '../digital_resource'
2
19
 
3
20
  #
4
- # A time based location within a media object
21
+ # A time based location within a media object.
5
22
  #
6
23
  module Caliper
7
24
  module Entities
8
25
  module Media
9
-
10
26
  class MediaLocation < DigitalResource
11
27
 
12
28
  attr_accessor :currentTime
@@ -16,7 +32,6 @@ module Caliper
16
32
  @type = DigitalResourceType::MEDIA_LOCATION
17
33
  @currentTime = nil
18
34
  end
19
-
20
35
  end
21
36
  end
22
37
  end
@@ -1,18 +1,31 @@
1
- require_relative '../../entities/digital_resource'
2
- require_relative '../../entities/schemadotorg/thing'
1
+ ##
2
+ # This file is part of IMS Caliper Analytics™ and is licensed to
3
+ # IMS Global Learning Consortium, Inc. (http://www.imsglobal.org)
4
+ # under one or more contributor license agreements. See the NOTICE
5
+ # file distributed with this work for additional information.
6
+ #
7
+ # IMS Caliper is free software: you can redistribute it and/or modify it under
8
+ # the terms of the GNU Lesser General Public License as published by the Free
9
+ # Software Foundation, version 3 of the License.
10
+ #
11
+ # IMS Caliper is distributed in the hope that it will be useful, but WITHOUT
12
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
+ # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public License along
16
+ # with this program. If not, see http://www.gnu.org/licenses/.
17
+
18
+ require_relative '../digital_resource'
3
19
 
4
20
  # An image, video, or audio object embedded in a web page. Note that a
5
21
  # creative work may have many media objects associated with it on the
6
22
  # same web page. For example, a page about a single song (MusicRecording)
7
23
  # may have a music video (VideoObject), and a high and low bandwidth audio
8
- # stream (2 AudioObject's).
24
+ # stream (2 AudioObject's). See From https://schema.org/MediaObject.
9
25
  #
10
- # From https://schema.org/MediaObject
11
-
12
26
  module Caliper
13
27
  module Entities
14
28
  module Media
15
-
16
29
  module MediaType
17
30
  AUDIO_OBJECT = 'http://purl.imsglobal.org/caliper/v1/AudioObject'
18
31
  IMAGE_OBJECT = 'http://purl.imsglobal.org/caliper/v1/ImageObject'
@@ -22,7 +35,6 @@ module Caliper
22
35
 
23
36
  ## implement the interface Thing
24
37
  class MediaObject < DigitalResource
25
- include Caliper::Entities::SchemaDotOrg::Thing
26
38
 
27
39
  attr_accessor :duration
28
40
 
@@ -31,7 +43,6 @@ module Caliper
31
43
  @type = DigitalResourceType::MEDIA_OBJECT
32
44
  @duration = nil
33
45
  end
34
-
35
46
  end
36
47
  end
37
48
  end
@@ -1,21 +1,35 @@
1
- require_relative 'media_object'
2
-
3
- # https://schema.org/VideoObject
1
+ ##
2
+ # This file is part of IMS Caliper Analytics™ and is licensed to
3
+ # IMS Global Learning Consortium, Inc. (http://www.imsglobal.org)
4
+ # under one or more contributor license agreements. See the NOTICE
5
+ # file distributed with this work for additional information.
6
+ #
7
+ # IMS Caliper is free software: you can redistribute it and/or modify it under
8
+ # the terms of the GNU Lesser General Public License as published by the Free
9
+ # Software Foundation, version 3 of the License.
4
10
  #
5
- # A video object embedded in a web page..
11
+ # IMS Caliper is distributed in the hope that it will be useful, but WITHOUT
12
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
+ # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public License along
16
+ # with this program. If not, see http://www.gnu.org/licenses/.
17
+
18
+ require_relative './media_object'
6
19
 
20
+ #
21
+ # A video object embedded in a web page. See https://schema.org/VideoObject.
22
+ #
7
23
  module Caliper
8
24
  module Entities
9
25
  module Media
10
-
11
26
  class VideoObject < MediaObject
12
27
 
13
28
  def initialize
14
29
  super
15
30
  @type = MediaType::VIDEO_OBJECT
16
31
  end
17
-
18
32
  end
19
33
  end
20
34
  end
21
- end
35
+ end
@@ -1,9 +1,30 @@
1
+ ##
2
+ # This file is part of IMS Caliper Analytics™ and is licensed to
3
+ # IMS Global Learning Consortium, Inc. (http://www.imsglobal.org)
4
+ # under one or more contributor license agreements. See the NOTICE
5
+ # file distributed with this work for additional information.
6
+ #
7
+ # IMS Caliper is free software: you can redistribute it and/or modify it under
8
+ # the terms of the GNU Lesser General Public License as published by the Free
9
+ # Software Foundation, version 3 of the License.
10
+ #
11
+ # IMS Caliper is distributed in the hope that it will be useful, but WITHOUT
12
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
+ # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public License along
16
+ # with this program. If not, see http://www.gnu.org/licenses/.
17
+
1
18
  require_relative '../entity'
2
19
  require_relative '../generatable'
20
+
21
+ #
22
+ # LIS Result
23
+ #
3
24
  module Caliper
4
25
  module Entities
5
26
  class Result < Entity
6
- include Generatable
27
+ include Caliper::Entities::Generatable
7
28
 
8
29
  attr_accessor :type, # String
9
30
  :normal_score,
@@ -20,4 +41,4 @@ module Caliper
20
41
 
21
42
  end
22
43
  end
23
- end
44
+ end
@@ -1,17 +1,33 @@
1
- require_relative "../digital_resource"
2
-
3
- # Public: Representation of an EPUB 3 Chapter.
1
+ ##
2
+ # This file is part of IMS Caliper Analytics™ and is licensed to
3
+ # IMS Global Learning Consortium, Inc. (http://www.imsglobal.org)
4
+ # under one or more contributor license agreements. See the NOTICE
5
+ # file distributed with this work for additional information.
6
+ #
7
+ # IMS Caliper is free software: you can redistribute it and/or modify it under
8
+ # the terms of the GNU Lesser General Public License as published by the Free
9
+ # Software Foundation, version 3 of the License.
4
10
  #
5
- # A major structural division of a piece of writing
6
- # http://www.idpf.org/epub/vocab/structure/#chapter
11
+ # IMS Caliper is distributed in the hope that it will be useful, but WITHOUT
12
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
+ # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public License along
16
+ # with this program. If not, see http://www.gnu.org/licenses/.
17
+
18
+ require_relative '../digital_resource'
7
19
 
20
+ #
21
+ # Representation of an EPUB 3 Chapter. A major structural division of a piece of writing.
22
+ # See http://www.idpf.org/epub/vocab/structure/#chapter
23
+ #
8
24
  module Caliper
9
25
  module Entities
10
26
  module Reading
11
- class EpubChapter < DigitalResource
27
+ class EpubChapter < Caliper::Entities::DigitalResource
28
+
12
29
  def initialize()
13
30
  super
14
- @id = id
15
31
  @type = DigitalResourceType::EPUB_CHAPTER
16
32
  end
17
33
  end
@@ -1,20 +1,36 @@
1
- # Public: Representation of an EPUB 3 Part
2
- # A major structural division of a piece of writing, typically
3
- # encapsulating a set of related chapters.
4
- # http://www.idpf.org/epub/vocab/structure/#part
1
+ ##
2
+ # This file is part of IMS Caliper Analytics™ and is licensed to
3
+ # IMS Global Learning Consortium, Inc. (http://www.imsglobal.org)
4
+ # under one or more contributor license agreements. See the NOTICE
5
+ # file distributed with this work for additional information.
6
+ #
7
+ # IMS Caliper is free software: you can redistribute it and/or modify it under
8
+ # the terms of the GNU Lesser General Public License as published by the Free
9
+ # Software Foundation, version 3 of the License.
10
+ #
11
+ # IMS Caliper is distributed in the hope that it will be useful, but WITHOUT
12
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
+ # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public License along
16
+ # with this program. If not, see http://www.gnu.org/licenses/.
5
17
 
6
- require_relative "../digital_resource"
18
+ require_relative '../digital_resource'
7
19
 
20
+ #
21
+ # Representation of an EPUB 3 Part. A major structural division of a piece of writing, typically
22
+ # encapsulating a set of related chapters. See http://www.idpf.org/epub/vocab/structure/#part.
23
+ #
8
24
  module Caliper
9
25
  module Entities
10
26
  module Reading
11
- class EpubPart < ::Caliper::Entity::DigitalResource
27
+ class EpubPart < Caliper::Entities::DigitalResource
28
+
12
29
  def initialize()
13
30
  super
14
- @id = ""
15
31
  @type = DigitalResourceType::EPUB_PART
16
32
  end
17
33
  end
18
34
  end
19
35
  end
20
- end
36
+ end