ims_caliper 0.9.3.15 → 1.0.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 (115) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -5
  3. data/lib/caliper/{profiles/annotation_profile.rb → actions/annotation_actions.rb} +3 -41
  4. data/lib/caliper/{profiles/assessment_profile.rb → actions/assessment_actions.rb} +3 -19
  5. data/lib/caliper/actions/assessment_item_actions.rb +31 -0
  6. data/lib/caliper/{profiles/assignable_profile.rb → actions/assignable_actions.rb} +3 -28
  7. data/lib/caliper/{profiles/media_profile.rb → actions/media_actions.rb} +4 -29
  8. data/lib/caliper/{event/view_event.rb → actions/navigation_actions.rb} +5 -11
  9. data/lib/caliper/{validators/event_validator_context.rb → actions/outcome_actions.rb} +7 -15
  10. data/lib/caliper/{event/navigation_event.rb → actions/reading_actions.rb} +6 -14
  11. data/lib/caliper/actions/session_actions.rb +30 -0
  12. data/lib/caliper/context/context.rb +31 -0
  13. data/lib/caliper/entities/agent/organization.rb +4 -3
  14. data/lib/caliper/entities/agent/person.rb +4 -3
  15. data/lib/caliper/entities/agent/software_application.rb +4 -3
  16. data/lib/caliper/entities/annotation/annotation.rb +4 -12
  17. data/lib/caliper/entities/annotation/annotation_type.rb +32 -0
  18. data/lib/caliper/entities/annotation/bookmark_annotation.rb +3 -1
  19. data/lib/caliper/entities/annotation/highlight_annotation.rb +4 -4
  20. data/lib/caliper/entities/annotation/shared_annotation.rb +3 -1
  21. data/lib/caliper/entities/annotation/tag_annotation.rb +3 -1
  22. data/lib/caliper/entities/assessment/assessment.rb +1 -1
  23. data/lib/caliper/entities/assessment/assessment_item.rb +2 -0
  24. data/lib/caliper/entities/assignable/assignable_digital_resource.rb +3 -13
  25. data/lib/caliper/{event/session_event.rb → entities/assignable/assignable_digital_resource_type.rb} +7 -11
  26. data/lib/caliper/entities/assignable/attempt.rb +8 -9
  27. data/lib/caliper/entities/digital_resource.rb +5 -22
  28. data/lib/caliper/entities/digital_resource_type.rb +33 -0
  29. data/lib/caliper/entities/entity.rb +7 -37
  30. data/lib/caliper/entities/{learning_context.rb → entity_base.rb} +19 -15
  31. data/lib/caliper/entities/entity_type.rb +39 -0
  32. data/lib/caliper/entities/foaf/agent.rb +0 -2
  33. data/lib/caliper/entities/jsonable.rb +14 -3
  34. data/lib/caliper/entities/learning_objective.rb +4 -3
  35. data/lib/caliper/entities/lis/course_offering.rb +9 -6
  36. data/lib/caliper/entities/lis/course_section.rb +3 -1
  37. data/lib/caliper/entities/lis/group.rb +5 -3
  38. data/lib/caliper/entities/lis/membership.rb +5 -7
  39. data/lib/caliper/entities/media/audio_object.rb +2 -1
  40. data/lib/caliper/entities/media/image_object.rb +2 -1
  41. data/lib/caliper/entities/media/media_location.rb +2 -1
  42. data/lib/caliper/entities/media/media_object.rb +2 -9
  43. data/lib/caliper/entities/media/media_object_type.rb +31 -0
  44. data/lib/caliper/entities/media/video_object.rb +2 -1
  45. data/lib/caliper/entities/outcome/result.rb +23 -16
  46. data/lib/caliper/entities/reading/epub_chapter.rb +2 -1
  47. data/lib/caliper/entities/reading/epub_part.rb +2 -1
  48. data/lib/caliper/entities/reading/epub_sub_chapter.rb +2 -1
  49. data/lib/caliper/entities/reading/epub_volume.rb +2 -1
  50. data/lib/caliper/entities/reading/frame.rb +4 -3
  51. data/lib/caliper/entities/reading/web_page.rb +3 -2
  52. data/lib/caliper/entities/response/fillin_blank_response.rb +3 -3
  53. data/lib/caliper/entities/response/multiple_choice_response.rb +3 -3
  54. data/lib/caliper/entities/response/multiple_response_response.rb +3 -3
  55. data/lib/caliper/entities/response/response.rb +8 -10
  56. data/lib/caliper/entities/response/response_type.rb +5 -5
  57. data/lib/caliper/entities/response/select_type_response.rb +3 -3
  58. data/lib/caliper/entities/response/true_false_response.rb +2 -3
  59. data/lib/caliper/entities/session/session.rb +8 -7
  60. data/lib/caliper/{event → events}/annotation_event.rb +11 -3
  61. data/lib/caliper/{event → events}/assessment_event.rb +11 -8
  62. data/lib/caliper/{event → events}/assessment_item_event.rb +11 -8
  63. data/lib/caliper/{event → events}/assignable_event.rb +11 -8
  64. data/lib/caliper/{profiles/profile.rb → events/event.rb} +15 -15
  65. data/lib/caliper/events/event_context.rb +24 -0
  66. data/lib/caliper/events/event_type.rb +33 -0
  67. data/lib/caliper/{event → events}/jsonable.rb +2 -2
  68. data/lib/caliper/{event → events}/media_event.rb +11 -8
  69. data/lib/caliper/events/navigation_event.rb +47 -0
  70. data/lib/caliper/events/outcome_event.rb +44 -0
  71. data/lib/caliper/{event/outcome_event.rb → events/reading_event.rb} +13 -10
  72. data/lib/caliper/events/session_event.rb +42 -0
  73. data/lib/caliper/events/view_event.rb +44 -0
  74. data/lib/caliper/request/envelope.rb +4 -15
  75. data/lib/caliper/request/event_store_requestor.rb +1 -1
  76. data/lib/caliper/request/{envelope_jsonable.rb → jsonable.rb} +9 -11
  77. data/lib/caliper/sensor.rb +1 -1
  78. data/lib/caliper/version.rb +1 -1
  79. data/lib/caliper.rb +1 -1
  80. data/spec/lib/entities/agent/{student.json → person.json} +4 -3
  81. data/spec/lib/entities/agent/person_spec.rb +5 -6
  82. data/spec/lib/entities/assessment/assessment.json +23 -0
  83. data/spec/lib/entities/assessment/assessment_spec.rb +54 -0
  84. data/spec/lib/event_helper.rb +33 -41
  85. data/spec/lib/{event/annotation_event_bookmark_spec.rb → events/annotation_bookmarked_event_spec.rb} +36 -46
  86. data/spec/lib/{event/annotation_event_highlight_spec.rb → events/annotation_highlighted_event_spec.rb} +36 -46
  87. data/spec/lib/{event/annotation_event_shared_spec.rb → events/annotation_shared_event_spec.rb} +42 -52
  88. data/spec/lib/{event/annotation_event_tag_spec.rb → events/annotation_tagged_event_spec.rb} +36 -46
  89. data/spec/lib/{event → events}/assessment_item_completed_event_spec.rb +41 -65
  90. data/spec/lib/{event → events}/assessment_item_started_event_spec.rb +38 -56
  91. data/spec/lib/{event/assessment_event_spec.rb → events/assessment_started_event_spec.rb} +36 -51
  92. data/spec/lib/{event/assignable_event_spec.rb → events/assignable_activated_event_spec.rb} +37 -52
  93. data/spec/lib/{event/media_event_spec.rb → events/media_paused_video_event_spec.rb} +33 -43
  94. data/spec/lib/{event/navigated_event_spec.rb → events/navigation_navigated_to_event_spec.rb} +36 -45
  95. data/spec/lib/events/outcome_graded_event_spec.rb +163 -0
  96. data/spec/lib/{event/session_event_login_spec.rb → events/session_logged_in_event_spec.rb} +38 -46
  97. data/spec/lib/{event/session_event_logout_spec.rb → events/session_logged_out-event_spec.rb} +28 -37
  98. data/spec/lib/{event/session_event_timeout_spec.rb → events/session_timed_out_event_spec.rb} +24 -34
  99. data/spec/lib/{event/viewed_event_spec.rb → events/view_viewed_event_spec.rb} +33 -41
  100. data/spec/lib/request/{http_requestor_spec.rb → http_requestor_single_event_spec.rb} +46 -47
  101. data/spec/lib/request/http_requestor_single_minimal_event_spec.rb +84 -0
  102. data/spec/lib/sensor_spec.rb +1 -1
  103. metadata +77 -70
  104. data/lib/caliper/event/event.rb +0 -114
  105. data/lib/caliper/profiles/assessment_item_profile.rb +0 -48
  106. data/lib/caliper/profiles/reading_profile.rb +0 -56
  107. data/lib/caliper/profiles/session_profile.rb +0 -46
  108. data/lib/caliper/validators/error_message.rb +0 -63
  109. data/lib/caliper/validators/event_validator.rb +0 -57
  110. data/lib/caliper/validators/property_type_check.rb +0 -33
  111. data/lib/caliper/validators/session_login_event_validator.rb +0 -121
  112. data/lib/caliper/validators/session_logout_event_validator.rb +0 -120
  113. data/lib/caliper/validators/time_check.rb +0 -50
  114. data/spec/lib/entities/entity.json +0 -9
  115. data/spec/lib/entities/entity_spec.rb +0 -52
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d787d10711e9df110e47808696cc7320a4d38fac
4
- data.tar.gz: 829240aa1cfbc63aa8738b15f12f460da5f9b83a
3
+ metadata.gz: c8f8b82d69f8412b3be27a29ec5e9f3f8e144acd
4
+ data.tar.gz: d24cffc6b24c29129a31d48fe2f0d22670dc2c09
5
5
  SHA512:
6
- metadata.gz: 241b1e7dd90b7cb2fe680f1c4de7ef53576d4d3b1694593ed44c64116d4c7f9a7bc95804f3b231ac8f855b9e51d3025736923238ac47f2eb1df9d4ed02cebde9
7
- data.tar.gz: 15fc41e4d02518ac66a10f7f1f790846377c7a8769f02b0d3bad81ec4d19ffb7397f25f8be2a4a06b9d001d5ebb866dd19a236144e7d9293321944ee95d366f7
6
+ metadata.gz: 2821a168e5d3eb6b99ffe53fa0d3625ea77d7dca06c362a799589cdc90c41eddf467c68dbde78fa7f74f29c7c1c27f62d810835a0e15c8c5c94581bca0f1809d
7
+ data.tar.gz: bdaf13f3aa7de2f4402e0e7c688db8663601a1345f427b657c3159028c9ea013f3dd7fc656fdf6013b2feb7d2705c50455ce0c0bdc9d46802b2a508a5beb27e5
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
- caliper-ruby
1
+ IMS Global caliper-ruby
2
2
  ===================
3
3
 
4
- caliper-ruby is a Ruby client for [Caliper](http://www.imsglobal.org) that provides a Ruby implementation of the Caliper Sensor API
4
+ caliper-ruby is a Ruby client for [Caliper](http://www.imsglobal.org/caliper) that provides an implementation of the Caliper SensorAPI™.
5
5
 
6
6
  ## development notes
7
7
  To set up dev environment and run specs
@@ -19,6 +19,11 @@ To run specs, you need to clone caliper-common-fixtures at the same level as cal
19
19
 
20
20
  gem build caliper.gemspec
21
21
 
22
- ### Use Ruby Style Guide:
23
- https://github.com/styleguide/ruby
24
- https://github.com/bbatsov/ruby-style-guide
22
+ ## Documentation
23
+
24
+ Documentation is available at [http://www.imsglobal.org/caliper](https://www.imsglobal.org/caliper).
25
+
26
+ ©2015 IMS Global Learning Consortium, Inc. All Rights Reserved.
27
+ Trademark Information - http://www.imsglobal.org/copyright.html
28
+
29
+ For license information contact, info@imsglobal.org and read the license file contained in the repository.
@@ -15,16 +15,12 @@
15
15
  # You should have received a copy of the GNU Lesser General Public License along
16
16
  # with this program. If not, see http://www.gnu.org/licenses/.
17
17
 
18
- require_relative './profile'
19
- require_relative '../entities/digital_resource'
20
- require_relative '../entities/annotation/annotation'
21
- require_relative '../entities/reading/frame'
22
-
23
18
  #
24
- # Annotation Profile.
19
+ # Annotation actions.
25
20
  #
21
+
26
22
  module Caliper
27
- module Profiles
23
+ module Actions
28
24
  module AnnotationActions
29
25
  ATTACHED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Attached"
30
26
  BOOKMARKED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Bookmarked"
@@ -44,39 +40,5 @@ module Caliper
44
40
  SUBSCRIBED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Subscribed"
45
41
  TAGGED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Tagged"
46
42
  end
47
-
48
- class ReadingProfile < Profile
49
- include AnnotationActions
50
- attr_accessor :key, # String
51
- :lookup # hash of ReadingActions
52
-
53
- # whether object if of type DigitalResource
54
- def validate_object (object)
55
- if (object.is_a? AnnotationType::BOOKMARK_ANNOTATION)
56
- ## TODO check required properties
57
- return object
58
- elsif (object.is_a? AnnotationType::HIGHLIGHT_ANNOTATION)
59
- ## TODO check required properties
60
- return object
61
- elsif (object.is_a? AnnotationType::SHARED_ANNOTATION)
62
- ## TODO check required properties
63
- return object
64
- elsif (object.is_a? AnnotationType::TAG_ANNOTATION)
65
- ## TODO check required properties
66
- return object
67
- else
68
- fail "Object must be of type Annotation"
69
- end
70
- end
71
-
72
- # whether target is of type Frame
73
- def validate_target(target)
74
- if (target is_a? Frame)
75
- return target
76
- else
77
- fail "Target must be of type Frame."
78
- end
79
- end
80
- end
81
43
  end
82
44
  end
@@ -15,33 +15,17 @@
15
15
  # You should have received a copy of the GNU Lesser General Public License along
16
16
  # with this program. If not, see http://www.gnu.org/licenses/.
17
17
 
18
- require_relative './profile'
19
-
20
18
  #
21
- # Assessment Profile.
19
+ # Assessment actions.
22
20
  #
21
+
23
22
  module Caliper
24
- module Profiles
23
+ module Actions
25
24
  module AssessmentActions
26
25
  PAUSED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Paused"
27
26
  RESTARTED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Restarted"
28
27
  STARTED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Started"
29
28
  SUBMITTED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Submitted"
30
29
  end
31
-
32
- class AssessmentProfile < Caliper::Profiles::Profile
33
-
34
- attr_accessor :key, # String
35
- :lookup # hash of AssessmentActions
36
-
37
- # whether object if of type DigitalResource
38
- def validate_object(object)
39
- if (object.is_a? DigitalResource)
40
- return object
41
- else
42
- fail 'Object must be of type DigitalResource'
43
- end
44
- end
45
- end
46
30
  end
47
31
  end
@@ -0,0 +1,31 @@
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
+ #
19
+ # Assessment item actions.
20
+ #
21
+
22
+ module Caliper
23
+ module Actions
24
+ module AssessmentItemActions
25
+ COMPLETED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Completed"
26
+ REVIEWED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Reviewed"
27
+ SKIPPED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Skipped"
28
+ STARTED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Started"
29
+ end
30
+ end
31
+ end
@@ -15,13 +15,12 @@
15
15
  # You should have received a copy of the GNU Lesser General Public License along
16
16
  # with this program. If not, see http://www.gnu.org/licenses/.
17
17
 
18
- require_relative './profile'
19
-
20
18
  #
21
- # Assignable Profile.
19
+ # Assignable actions.
22
20
  #
21
+
23
22
  module Caliper
24
- module Profiles
23
+ module Actions
25
24
  module AssignableActions
26
25
  ABANDONED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Abandoned"
27
26
  ACTIVATED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Activated"
@@ -33,29 +32,5 @@ module Caliper
33
32
  STARTED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Started"
34
33
  SUBMITTED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Submitted"
35
34
  end
36
-
37
- class AssignableProfile < Caliper::Profiles::Profile
38
-
39
- attr_accessor :key, # String
40
- :lookup # hash of AssignableActions
41
-
42
- # whether object if of type DigitalResource
43
- def validate_object(object)
44
- if (object.is_a? DigitalResource)
45
- return object
46
- else
47
- fail 'Object must e of type DigitalResource'
48
- end
49
- end
50
-
51
- # whether target is of type Frame
52
- def validate_target(target)
53
- if (target is_a? frame)
54
- return target
55
- else
56
- fail 'Target must be of type Frame'
57
- end
58
- end
59
- end
60
35
  end
61
36
  end
@@ -15,13 +15,12 @@
15
15
  # You should have received a copy of the GNU Lesser General Public License along
16
16
  # with this program. If not, see http://www.gnu.org/licenses/.
17
17
 
18
- require_relative './profile'
19
-
20
18
  #
21
- # Media Profile.
19
+ # Media actions.
22
20
  #
21
+
23
22
  module Caliper
24
- module Profiles
23
+ module Actions
25
24
  module MediaActions
26
25
  CHANGED_RESOLUTION = "http://purl.imsglobal.org/vocab/caliper/v1/action#ChangedResolution"
27
26
  CHANGED_SIZE = "http://purl.imsglobal.org/vocab/caliper/v1/action#ChangedSize"
@@ -43,29 +42,5 @@ module Caliper
43
42
  STARTED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Started"
44
43
  UNMUTED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Unmuted"
45
44
  end
46
-
47
- class MediaProfile < Caliper::Profiles::Profile
48
-
49
- attr_accessor :key, # String
50
- :lookup # hash of MediaActions
51
-
52
- # whether object if of type DigitalResource
53
- def validate_object(object)
54
- if (object.is_a? DigitalResource)
55
- return object
56
- else
57
- fail "Object must e of type DigitalResource"
58
- end
59
- end
60
-
61
- # whether target is of type Frame
62
- def validate_target(target)
63
- if (target is_a? frame)
64
- return target
65
- else
66
- fail "Target must be of type Frame."
67
- end
68
- end
69
- end
70
45
  end
71
- end
46
+ end
@@ -15,20 +15,14 @@
15
15
  # You should have received a copy of the GNU Lesser General Public License along
16
16
  # with this program. If not, see http://www.gnu.org/licenses/.
17
17
 
18
- require_relative './event'
19
-
20
18
  #
21
- # View Event per the Caliper Base Profile.
19
+ # Profile actions.
22
20
  #
23
- module Caliper
24
- module Event
25
- class ViewEvent < Event
26
21
 
27
- def initialize
28
- super
29
- @type = EventType::VIEW
30
- @context = EventContext::VIEW
31
- end
22
+ module Caliper
23
+ module Actions
24
+ module NavigationActions
25
+ NAVIGATED_TO = "http://purl.imsglobal.org/vocab/caliper/v1/action#NavigatedTo"
32
26
  end
33
27
  end
34
28
  end
@@ -16,21 +16,13 @@
16
16
  # with this program. If not, see http://www.gnu.org/licenses/.
17
17
 
18
18
  #
19
- # Event Validator context.
19
+ # Outcome actions.
20
20
  #
21
- module Caliper
22
- module Validators
23
- class EventValidatorContext
24
- attr_accessor :validator
25
-
26
- def initialize(validator)
27
- @validator = validator
28
- end
29
21
 
30
- def validate (event)
31
- # do the validation
32
- return @validator.validate(event)
33
- end
34
- end
35
- end
22
+ module Caliper
23
+ module Actions
24
+ module OutcomeActions
25
+ GRADED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Graded"
26
+ end
27
+ end
36
28
  end
@@ -15,23 +15,15 @@
15
15
  # You should have received a copy of the GNU Lesser General Public License along
16
16
  # with this program. If not, see http://www.gnu.org/licenses/.
17
17
 
18
- require_relative './event'
19
-
20
18
  #
21
- # Navigation Event.
19
+ # Reading actions.
22
20
  #
23
- module Caliper
24
- module Event
25
- class NavigationEvent < Event
26
21
 
27
- attr_accessor :navigatedFrom
28
-
29
- def initialize
30
- super
31
- @context = EventContext::NAVIGATION
32
- @type = EventType::NAVIGATION
33
- @navigatedFrom = nil
34
- end
22
+ module Caliper
23
+ module Actions
24
+ module ReadingActions
25
+ SEARCHED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Searched"
26
+ VIEWED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Viewed"
35
27
  end
36
28
  end
37
29
  end
@@ -0,0 +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
+
18
+ #
19
+ # Session actions.
20
+ #
21
+
22
+ module Caliper
23
+ module Actions
24
+ module SessionActions
25
+ LOGGED_IN = 'http://purl.imsglobal.org/vocab/caliper/v1/action#LoggedIn'
26
+ LOGGED_OUT = 'http://purl.imsglobal.org/vocab/caliper/v1/action#LoggedOut'
27
+ TIMED_OUT = 'http://purl.imsglobal.org/vocab/caliper/v1/action#TimedOut'
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,31 @@
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
+ #
19
+ # JSON-LD context.
20
+ #
21
+
22
+ module Caliper
23
+ module Context
24
+ module Context
25
+ CONTEXT = "http://purl.imsglobal.org/ctx/caliper/v1/Context"
26
+ # ENTITY = "http://purl.imsglobal.org/ctx/caliper/v1/Entity"
27
+ # ENVELOPE = "http://purl.imsglobal.org/caliper/ctx/v1/Envelope"
28
+ # EVENT = "http://purl.imsglobal.org/ctx/caliper/v1/Event"
29
+ end
30
+ end
31
+ end
@@ -15,7 +15,8 @@
15
15
  # You should have received a copy of the GNU Lesser General Public License along
16
16
  # with this program. If not, see http://www.gnu.org/licenses/.
17
17
 
18
- require_relative '../entity'
18
+ require_relative '../entity_base'
19
+ require_relative '../entity_type'
19
20
  require_relative '../w3c/organization'
20
21
 
21
22
  #
@@ -24,7 +25,7 @@ require_relative '../w3c/organization'
24
25
  module Caliper
25
26
  module Entities
26
27
  module Agent
27
- class Organization < Entity
28
+ class Organization < EntityBase
28
29
  include Caliper::Entities::FOAF::Agent,
29
30
  Caliper::Entities::W3C::Organization
30
31
 
@@ -32,7 +33,7 @@ module Caliper
32
33
 
33
34
  def initialize
34
35
  super
35
- @type = EntityType::ORGANIZATION
36
+ @type = Caliper::Entities::EntityType::ORGANIZATION
36
37
  end
37
38
  end
38
39
  end
@@ -15,7 +15,8 @@
15
15
  # You should have received a copy of the GNU Lesser General Public License along
16
16
  # with this program. If not, see http://www.gnu.org/licenses/.
17
17
 
18
- require_relative '../entity'
18
+ require_relative '../entity_base'
19
+ require_relative '../entity_type'
19
20
  require_relative '../foaf/agent.rb'
20
21
 
21
22
  #
@@ -25,12 +26,12 @@ require_relative '../foaf/agent.rb'
25
26
  module Caliper
26
27
  module Entities
27
28
  module Agent
28
- class Person < Entity
29
+ class Person < EntityBase
29
30
  include Caliper::Entities::FOAF::Agent
30
31
 
31
32
  def initialize
32
33
  super
33
- @type = EntityType::PERSON
34
+ @type = Caliper::Entities::EntityType::PERSON
34
35
  end
35
36
  end
36
37
  end