openagent 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (221) hide show
  1. data/README.md +64 -0
  2. data/lib/openagent.rb +4 -0
  3. data/lib/openagent/agent.rb +24 -0
  4. data/lib/openagent/client.rb +170 -0
  5. data/lib/openagent/errors.rb +30 -0
  6. data/lib/openagent/message_builder.rb +171 -0
  7. data/lib/openagent/ssl_config.rb +26 -0
  8. data/lib/openagent/version.rb +3 -0
  9. data/lib/openagent/xml_helpers.rb +24 -0
  10. data/lib/openagent/zone.rb +58 -0
  11. data/lib/sif/infra/common/application.rb +13 -0
  12. data/lib/sif/infra/common/condition.rb +13 -0
  13. data/lib/sif/infra/common/condition_group.rb +14 -0
  14. data/lib/sif/infra/common/data.rb +11 -0
  15. data/lib/sif/infra/common/error.rb +14 -0
  16. data/lib/sif/infra/common/event.rb +0 -0
  17. data/lib/sif/infra/common/event_object.rb +12 -0
  18. data/lib/sif/infra/common/extended_query.rb +15 -0
  19. data/lib/sif/infra/common/extended_query_results.rb +12 -0
  20. data/lib/sif/infra/common/header.rb +27 -0
  21. data/lib/sif/infra/common/message.rb +49 -0
  22. data/lib/sif/infra/common/object.rb +11 -0
  23. data/lib/sif/infra/common/object_data.rb +46 -0
  24. data/lib/sif/infra/common/other_id.rb +12 -0
  25. data/lib/sif/infra/common/property.rb +12 -0
  26. data/lib/sif/infra/common/protocol.rb +16 -0
  27. data/lib/sif/infra/common/provision.rb +17 -0
  28. data/lib/sif/infra/common/query.rb +16 -0
  29. data/lib/sif/infra/common/query_object.rb +12 -0
  30. data/lib/sif/infra/common/secure_channel.rb +12 -0
  31. data/lib/sif/infra/common/security.rb +13 -0
  32. data/lib/sif/infra/common/status.rb +16 -0
  33. data/lib/sif/infra/common/unprovision.rb +9 -0
  34. data/lib/sif/infra/common/vendor.rb +13 -0
  35. data/lib/sif/infra/messages/ack.rb +16 -0
  36. data/lib/sif/infra/messages/event.rb +12 -0
  37. data/lib/sif/infra/messages/get_agent_acl.rb +11 -0
  38. data/lib/sif/infra/messages/get_message.rb +11 -0
  39. data/lib/sif/infra/messages/get_zone_status.rb +10 -0
  40. data/lib/sif/infra/messages/ping.rb +10 -0
  41. data/lib/sif/infra/messages/provide.rb +16 -0
  42. data/lib/sif/infra/messages/provision.rb +18 -0
  43. data/lib/sif/infra/messages/register.rb +21 -0
  44. data/lib/sif/infra/messages/request.rb +16 -0
  45. data/lib/sif/infra/messages/responder.rb +9 -0
  46. data/lib/sif/infra/messages/response.rb +18 -0
  47. data/lib/sif/infra/messages/sleep.rb +11 -0
  48. data/lib/sif/infra/messages/subscribe.rb +12 -0
  49. data/lib/sif/infra/messages/system_control.rb +15 -0
  50. data/lib/sif/infra/messages/system_control_data.rb +39 -0
  51. data/lib/sif/infra/messages/unprovide.rb +12 -0
  52. data/lib/sif/infra/messages/unregister.rb +11 -0
  53. data/lib/sif/infra/messages/unsubscribe.rb +12 -0
  54. data/lib/sif/infra/messages/wakeup.rb +11 -0
  55. data/lib/sif/infra/messages/zone_status_role.rb +12 -0
  56. data/lib/sif/infra/objects/agent_acl.rb +19 -0
  57. data/lib/sif/infra/objects/zone_status.rb +30 -0
  58. data/lib/sif/models/common/address.rb +21 -0
  59. data/lib/sif/models/common/alert_message.rb +12 -0
  60. data/lib/sif/models/common/base_name.rb +12 -0
  61. data/lib/sif/models/common/calendar_summary.rb +28 -0
  62. data/lib/sif/models/common/code.rb +12 -0
  63. data/lib/sif/models/common/contact_info.rb +21 -0
  64. data/lib/sif/models/common/credits_attempted.rb +12 -0
  65. data/lib/sif/models/common/demographics.rb +31 -0
  66. data/lib/sif/models/common/dwelling_arrangement.rb +14 -0
  67. data/lib/sif/models/common/earned_status.rb +15 -0
  68. data/lib/sif/models/common/electronic_id.rb +12 -0
  69. data/lib/sif/models/common/email.rb +13 -0
  70. data/lib/sif/models/common/english_proficiency.rb +14 -0
  71. data/lib/sif/models/common/exceptionality_category.rb +13 -0
  72. data/lib/sif/models/common/grade_level.rb +12 -0
  73. data/lib/sif/models/common/grid_location.rb +12 -0
  74. data/lib/sif/models/common/identification_info.rb +12 -0
  75. data/lib/sif/models/common/language.rb +14 -0
  76. data/lib/sif/models/common/meal_status.rb +16 -0
  77. data/lib/sif/models/common/medical_alert_message.rb +12 -0
  78. data/lib/sif/models/common/meeting_time.rb +12 -0
  79. data/lib/sif/models/common/name.rb +19 -0
  80. data/lib/sif/models/common/other_code.rb +12 -0
  81. data/lib/sif/models/common/other_id.rb +12 -0
  82. data/lib/sif/models/common/phone_number.rb +15 -0
  83. data/lib/sif/models/common/principal_info.rb +12 -0
  84. data/lib/sif/models/common/race.rb +15 -0
  85. data/lib/sif/models/common/sced_code.rb +15 -0
  86. data/lib/sif/models/common/schedule_info.rb +14 -0
  87. data/lib/sif/models/common/schedule_info_override.rb +13 -0
  88. data/lib/sif/models/common/school_contact.rb +13 -0
  89. data/lib/sif/models/common/school_course_info_override.rb +18 -0
  90. data/lib/sif/models/common/street.rb +22 -0
  91. data/lib/sif/models/common/subject_area.rb +13 -0
  92. data/lib/sif/models/groups/data_model/term_span.rb +14 -0
  93. data/lib/sif/models/groups/sis/attendance_code_info.rb +23 -0
  94. data/lib/sif/models/groups/sis/calendar_date.rb +25 -0
  95. data/lib/sif/models/groups/sis/discipline_incident.rb +31 -0
  96. data/lib/sif/models/groups/sis/lea_info.rb +28 -0
  97. data/lib/sif/models/groups/sis/personal_representer.rb +22 -0
  98. data/lib/sif/models/groups/sis/school_course_info.rb +30 -0
  99. data/lib/sif/models/groups/sis/school_info.rb +32 -0
  100. data/lib/sif/models/groups/sis/section_info.rb +26 -0
  101. data/lib/sif/models/groups/sis/sis_representer.rb +15 -0
  102. data/lib/sif/models/groups/sis/staff_personal.rb +20 -0
  103. data/lib/sif/models/groups/sis/student_personal.rb +37 -0
  104. data/lib/sif/models/groups/sis/student_section_enrollment.rb +21 -0
  105. data/lib/sif/models/groups/sis/term_info.rb +29 -0
  106. data/lib/sif/representations/infra/common/application.rb +16 -0
  107. data/lib/sif/representations/infra/common/condition.rb +16 -0
  108. data/lib/sif/representations/infra/common/condition_group.rb +18 -0
  109. data/lib/sif/representations/infra/common/data.rb +17 -0
  110. data/lib/sif/representations/infra/common/error.rb +17 -0
  111. data/lib/sif/representations/infra/common/event.rb +0 -0
  112. data/lib/sif/representations/infra/common/event_object.rb +15 -0
  113. data/lib/sif/representations/infra/common/extended_query.rb +18 -0
  114. data/lib/sif/representations/infra/common/extended_query_results.rb +15 -0
  115. data/lib/sif/representations/infra/common/header.rb +23 -0
  116. data/lib/sif/representations/infra/common/message.rb +54 -0
  117. data/lib/sif/representations/infra/common/object.rb +14 -0
  118. data/lib/sif/representations/infra/common/object_data.rb +43 -0
  119. data/lib/sif/representations/infra/common/other_id.rb +15 -0
  120. data/lib/sif/representations/infra/common/property.rb +15 -0
  121. data/lib/sif/representations/infra/common/protocol.rb +22 -0
  122. data/lib/sif/representations/infra/common/provision.rb +38 -0
  123. data/lib/sif/representations/infra/common/query.rb +24 -0
  124. data/lib/sif/representations/infra/common/query_object.rb +15 -0
  125. data/lib/sif/representations/infra/common/secure_channel.rb +15 -0
  126. data/lib/sif/representations/infra/common/security.rb +18 -0
  127. data/lib/sif/representations/infra/common/status.rb +18 -0
  128. data/lib/sif/representations/infra/messages/ack.rb +25 -0
  129. data/lib/sif/representations/infra/messages/event.rb +19 -0
  130. data/lib/sif/representations/infra/messages/get_message.rb +12 -0
  131. data/lib/sif/representations/infra/messages/ping.rb +13 -0
  132. data/lib/sif/representations/infra/messages/provide.rb +19 -0
  133. data/lib/sif/representations/infra/messages/provision.rb +37 -0
  134. data/lib/sif/representations/infra/messages/register.rb +30 -0
  135. data/lib/sif/representations/infra/messages/request.rb +24 -0
  136. data/lib/sif/representations/infra/messages/response.rb +29 -0
  137. data/lib/sif/representations/infra/messages/sleep.rb +14 -0
  138. data/lib/sif/representations/infra/messages/subscribe.rb +19 -0
  139. data/lib/sif/representations/infra/messages/system_control.rb +23 -0
  140. data/lib/sif/representations/infra/messages/system_control_data.rb +31 -0
  141. data/lib/sif/representations/infra/messages/wakeup.rb +14 -0
  142. data/lib/sif/representations/models/common/address.rb +24 -0
  143. data/lib/sif/representations/models/common/alert_message.rb +16 -0
  144. data/lib/sif/representations/models/common/contact_info.rb +28 -0
  145. data/lib/sif/representations/models/common/credits_attempted.rb +15 -0
  146. data/lib/sif/representations/models/common/demographics.rb +43 -0
  147. data/lib/sif/representations/models/common/dwelling_arrangement.rb +18 -0
  148. data/lib/sif/representations/models/common/electronic_id.rb +16 -0
  149. data/lib/sif/representations/models/common/email.rb +16 -0
  150. data/lib/sif/representations/models/common/english_proficiency.rb +17 -0
  151. data/lib/sif/representations/models/common/identification_info.rb +16 -0
  152. data/lib/sif/representations/models/common/language.rb +19 -0
  153. data/lib/sif/representations/models/common/medical_alert_message.rb +15 -0
  154. data/lib/sif/representations/models/common/meeting_time.rb +16 -0
  155. data/lib/sif/representations/models/common/name.rb +22 -0
  156. data/lib/sif/representations/models/common/other_code.rb +15 -0
  157. data/lib/sif/representations/models/common/other_id.rb +15 -0
  158. data/lib/sif/representations/models/common/phone_number.rb +18 -0
  159. data/lib/sif/representations/models/common/principal_info.rb +15 -0
  160. data/lib/sif/representations/models/common/race.rb +18 -0
  161. data/lib/sif/representations/models/common/sced_code.rb +18 -0
  162. data/lib/sif/representations/models/common/schedule_info.rb +19 -0
  163. data/lib/sif/representations/models/common/schedule_info_override.rb +18 -0
  164. data/lib/sif/representations/models/common/school_contact.rb +17 -0
  165. data/lib/sif/representations/models/common/school_course_info_override.rb +21 -0
  166. data/lib/sif/representations/models/common/street.rb +26 -0
  167. data/lib/sif/representations/models/common/subject_area.rb +17 -0
  168. data/lib/sif/representations/models/groups/data_model/term_span.rb +20 -0
  169. data/lib/sif/representations/models/groups/sis/personal_representer.rb +38 -0
  170. data/lib/sif/representations/models/groups/sis/school_course_info.rb +36 -0
  171. data/lib/sif/representations/models/groups/sis/school_info.rb +47 -0
  172. data/lib/sif/representations/models/groups/sis/section_info.rb +29 -0
  173. data/lib/sif/representations/models/groups/sis/sis_representer.rb +17 -0
  174. data/lib/sif/representations/models/groups/sis/staff_personal.rb +19 -0
  175. data/lib/sif/representations/models/groups/sis/student_personal.rb +37 -0
  176. data/lib/sif/representations/models/groups/sis/student_section_enrollment.rb +26 -0
  177. data/lib/sif/representations/models/groups/sis/term_info.rb +30 -0
  178. data/lib/sif/sif.rb +249 -0
  179. data/openagent.gemspec +33 -0
  180. data/spec/agent_spec.rb +32 -0
  181. data/spec/client_spec.rb +96 -0
  182. data/spec/fixtures/agent.yaml +31 -0
  183. data/spec/fixtures/messages/event.xml +72 -0
  184. data/spec/fixtures/messages/response.xml +107 -0
  185. data/spec/fixtures/sif/attendance_code_info.xml +9 -0
  186. data/spec/fixtures/sif/calendar_date.xml +22 -0
  187. data/spec/fixtures/sif/calendar_summary.xml +21 -0
  188. data/spec/fixtures/sif/demographics.xml +33 -0
  189. data/spec/fixtures/sif/discipline_incident.xml +70 -0
  190. data/spec/fixtures/sif/lea_info.xml +55 -0
  191. data/spec/fixtures/sif/section_info.xml +1536 -0
  192. data/spec/fixtures/sif/sif_header.xml +12 -0
  193. data/spec/fixtures/sif/sif_message__response.xml +107 -0
  194. data/spec/fixtures/sif/sif_object_data.xml +5 -0
  195. data/spec/fixtures/sif/sif_protocol.xml +3 -0
  196. data/spec/fixtures/sif/sif_protocol__properties.xml +10 -0
  197. data/spec/fixtures/sif/sif_provide.xml +9 -0
  198. data/spec/fixtures/sif/sif_provision.xml +33 -0
  199. data/spec/fixtures/sif/sif_register.xml +20 -0
  200. data/spec/fixtures/sif/sif_request.xml +21 -0
  201. data/spec/fixtures/sif/sif_response.xml +19 -0
  202. data/spec/fixtures/sif/sif_system_control.xml +10 -0
  203. data/spec/fixtures/sif/stu_pers_resp.xml +2 -0
  204. data/spec/fixtures/sif/student_personal.xml +42 -0
  205. data/spec/fixtures/zone.yaml +6 -0
  206. data/spec/message_builder_spec.rb +81 -0
  207. data/spec/response_spec.rb +35 -0
  208. data/spec/sif/representations/xml/header_spec.rb +30 -0
  209. data/spec/sif/representations/xml/message_spec.rb +20 -0
  210. data/spec/sif/representations/xml/object_data_spec.rb +19 -0
  211. data/spec/sif/representations/xml/protocol_spec.rb +34 -0
  212. data/spec/sif/representations/xml/provide_spec.rb +19 -0
  213. data/spec/sif/representations/xml/provision_spec.rb +56 -0
  214. data/spec/sif/representations/xml/register_spec.rb +17 -0
  215. data/spec/sif/representations/xml/request_spec.rb +17 -0
  216. data/spec/sif/representations/xml/response_spec.rb +16 -0
  217. data/spec/sif/representations/xml/spec_helper.rb +7 -0
  218. data/spec/sif/representations/xml/student_personal_spec.rb +69 -0
  219. data/spec/spec_helper.rb +7 -0
  220. data/spec/zone_spec.rb +26 -0
  221. metadata +455 -0
@@ -0,0 +1,18 @@
1
+ module SIF
2
+ module Representation
3
+ module Model
4
+ module Common
5
+ class ScheduleInfoOverride < SIF::Represent
6
+
7
+ self.representation_wrap = 'ScheduleInfoOverride'
8
+
9
+ property :term_info_ref_id, :as => 'TermInfoRefId', :attribute => true
10
+ property :override, :as => 'Override', :attribute => true
11
+ collection :meeting_times, :as => 'MeetingTime', :wrap => 'MeetingTimeList',
12
+ :class => MODEL_COMMON::MeetingTime,
13
+ :decorator => REPR_COMMON::MeetingTime
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,17 @@
1
+ module SIF
2
+ module Representation
3
+ module Model
4
+ module Common
5
+ class SchoolContact < SIF::Represent
6
+
7
+ self.representation_wrap = 'SchoolContact'
8
+
9
+ property :publish_in_directory, :as => 'PublishInDirectory'
10
+ property :contact_info, :as => 'ContactInfo',
11
+ :class => MODEL_COMMON::ContactInfo,
12
+ :decorator => REPR_COMMON::ContactInfo
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,21 @@
1
+ module SIF
2
+ module Representation
3
+ module Model
4
+ module Common
5
+ class SchoolCourseInfoOverride < SIF::Represent
6
+
7
+ self.representation_wrap = 'SchoolCourseInfoOverride'
8
+
9
+ property :override, :as => 'Override', :attribute => true
10
+ property :course_code, :as => 'CourseCode'
11
+ property :state_courase_code, :as => 'StateCourseCode'
12
+ property :district_course_code, :as => 'DistrictCourseCode'
13
+ property :subject_area, :as => 'SubjectArea'
14
+ property :course_title, :as => 'CourseTitle'
15
+ property :instruction_level, :as => 'InstructionLevel'
16
+ property :course_credits, :as => 'CourseCredits'
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,26 @@
1
+ module SIF
2
+ module Representation
3
+ module Model
4
+ module Common
5
+ class Street < SIF::Represent
6
+
7
+ self.representation_wrap = 'Street'
8
+
9
+ property :line1, :as => 'Line1'
10
+ property :line2, :as => 'Line2'
11
+ property :line3, :as => 'Line3'
12
+ property :complex, :as => 'Complex'
13
+ property :street_number, :as => 'StreetNumber'
14
+ property :street_prefix, :as => 'StreetPrefix'
15
+ property :street_name, :as => 'StreetName'
16
+ property :street_type, :as => 'StreetType'
17
+ property :street_suffix, :as => 'StreetSuffix'
18
+ property :apartment_type, :as => 'ApartmentType'
19
+ property :apartment_number_prefix, :as => 'ApartmentNumberPrefix'
20
+ property :apartment_number, :as => 'ApartmentNumber'
21
+ property :apartment_number_suffix, :as => 'ApartmentNumberSuffix'
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,17 @@
1
+ module SIF
2
+ module Representation
3
+ module Model
4
+ module Common
5
+ class SubjectArea < SIF::Represent
6
+
7
+ self.representation_wrap = 'SubjectArea'
8
+
9
+ property :code, :as => 'Code'
10
+ collection :other_codes, :as => 'OtherCode', :wrap => 'OtherCodeList',
11
+ :class => MODEL_COMMON::OtherCode,
12
+ :decorator => REPR_COMMON::OtherCode
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,20 @@
1
+ module SIF
2
+ module Representation
3
+ module Model
4
+ module Group
5
+ module DataModel
6
+ class TermSpan < Representable::Decorator
7
+ self.representation_wrap = 'TermSpan'
8
+
9
+ collection :other_codes, :as => 'OtherCode', :wrap => 'OtherCodeList',
10
+ :class => MODEL_COMMON::OtherCode,
11
+ :decorator => REPR_COMMON::OtherCode
12
+
13
+ property :code, :as => 'Code'
14
+
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,38 @@
1
+ module SIF
2
+ module Representation
3
+ module Model
4
+ module Group
5
+ module SIS
6
+ module PersonalRepresenter
7
+ include Representable::XML
8
+
9
+ property :name, :as => 'Name',
10
+ :class => MODEL_COMMON::Name,
11
+ :decorator => REPR_COMMON::Name
12
+ property :local_id, :as => 'LocalId'
13
+ property :state_province_id, :as => 'StateProvinceId'
14
+ collection :electronic_ids, :as => 'ElectronicId', :wrap => 'ElectronicIdList',
15
+ :class => MODEL_COMMON::ElectronicId,
16
+ :decorator => REPR_COMMON::ElectronicId
17
+ collection :other_ids, :as => 'OtherId', :wrap => 'OtherIdList',
18
+ :class => MODEL_COMMON::OtherId,
19
+ :decorator => REPR_COMMON::OtherId
20
+ property :other_names, :as => 'OtherNames'
21
+ property :demographics, :as => 'Demographics',
22
+ :class => MODEL_COMMON::Demographics,
23
+ :decorator => REPR_COMMON::Demographics
24
+ collection :addresses, :as => 'Address', :wrap => 'AddressList',
25
+ :class => MODEL_COMMON::Address,
26
+ :decorator => REPR_COMMON::Address
27
+ collection :phone_numbers, :as => 'PhoneNumber', :wrap => 'PhoneNumberList',
28
+ :class => MODEL_COMMON::PhoneNumber,
29
+ :decorator => REPR_COMMON::PhoneNumber
30
+ collection :emails, :as => 'Email', :wrap => 'EmailList',
31
+ :class => MODEL_COMMON::Email,
32
+ :decorator => REPR_COMMON::Email
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,36 @@
1
+ require_relative 'sis_representer'
2
+
3
+ module SIF
4
+ module Representation
5
+ module Model
6
+ module Group
7
+ module SIS
8
+ class SchoolCourseInfo < SIF::Represent
9
+ include SISRepresenter
10
+
11
+ self.representation_wrap = 'SchoolCourseInfo'
12
+
13
+ property :school_info_id, :attribute => true, :as => 'SchoolInfoId'
14
+ property :school_year, :attribute => true, :as => 'SchoolYear'
15
+ property :course_code, :as => 'CourseCode'
16
+ property :state_course_code, :as => 'StateCourseCode'
17
+ property :district_course_code, :as => 'DistrictCourseCode'
18
+ collection :subject_areas, :as =>'SubjectArea', :wrap => 'SubjectAreaList',
19
+ :class => MODEL_COMMON::SubjectArea,
20
+ :decorator => REPR_COMMON::SubjectArea
21
+ property :course_title, :as => 'CourseTitle'
22
+ property :description, :as => 'Description'
23
+ property :instruction_level, :as => 'InstructionLevel'
24
+ property :course_credits, :as => 'CourseCredits'
25
+ property :core_academic_course, :as => 'CoreAcademicCourse'
26
+ property :graduation_requirement, :as => 'GraduationRequirement'
27
+ property :department, :as => 'Department'
28
+ property :sced_code, :as => 'SCEDCode',
29
+ :class => MODEL_COMMON::SCEDCode,
30
+ :decorator => REPR_COMMON::SCEDCode
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,47 @@
1
+ require_relative 'sis_representer'
2
+
3
+ module SIF
4
+ module Representation
5
+ module Model
6
+ module Group
7
+ module SIS
8
+ class SchoolInfo < SIF::Represent
9
+ include SISRepresenter
10
+
11
+ self.representation_wrap = 'SchoolInfo'
12
+
13
+ property :local_id, :as => 'LocalId'
14
+ property :state_province_id, :as => 'StateProvinceId'
15
+ property :nces_id, :as => 'NCESId'
16
+ property :school_name, :as => 'SchoolName'
17
+ property :lea_info_ref_id, :as => 'LEAInfoRefId'
18
+ property :other_lea, :as => 'OtherLEA'
19
+ property :school_type, :as => 'SchoolType'
20
+ collection :school_focuses, :as => 'SchoolFocus', :wrap => 'SchoolFocusList'
21
+ property :school_url, :as => 'SchoolURL'
22
+ property :principal_info, :as => 'PrincipalInfo',
23
+ :class => MODEL_COMMON::PrincipalInfo,
24
+ :decorator => REPR_COMMON::PrincipalInfo
25
+ collection :school_contacts, :as => 'SchoolContact', :wrap => 'SchoolContactList',
26
+ :class => MODEL_COMMON::SchoolContact,
27
+ :decorator => REPR_COMMON::SchoolContact
28
+ collection :addresses, :as => 'Address', :wrap => 'AddressList',
29
+ :class => MODEL_COMMON::Address,
30
+ :decorator => REPR_COMMON::Address
31
+ collection :phone_numbers, :as => 'PhoneNumber', :wrap => 'PhoneNumberList',
32
+ :class => MODEL_COMMON::PhoneNumber,
33
+ :decorator => REPR_COMMON::PhoneNumber
34
+ property :identification_infos, :as => 'IdentificationInfo', :wrap => 'IdentificationInfoList',
35
+ :class => MODEL_COMMON::IdentificationInfo,
36
+ :decorator => REPR_COMMON::IdentificationInfo
37
+ property :session_type, :as => 'SessionType'
38
+ property :grade_levels, :as => 'GradeLevels'
39
+ property :title_1_status, :as => 'Title1Status'
40
+ property :operational_status, :as => 'OperationalStatus'
41
+ property :congressional_district, :as => 'CongressionalDistrict'
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,29 @@
1
+ module SIF
2
+ module Representation
3
+ module Model
4
+ module Group
5
+ module SIS
6
+ class SectionInfo < SIF::Represent
7
+ include SISRepresenter
8
+ self.representation_wrap = 'SectionInfo'
9
+
10
+ property :school_course_info, :attribute => true, :as => 'SchoolCourseInfoRefId'
11
+ property :school_year, :attribute => true, :as => 'SchoolYear'
12
+ property :local_id, :as => 'LocalId'
13
+ property :description, :as => 'Description'
14
+ collection :schedule_infos, :as => 'ScheduleInfo', :wrap => 'ScheduleInfoList',
15
+ :class => MODEL_COMMON::ScheduleInfo,
16
+ :decorator => REPR_COMMON::ScheduleInfo
17
+ property :medium_of_instruction, :as => 'MediumOfInstruction'
18
+ property :language_of_instruction, :as => 'LanguageOfInstruction'
19
+ property :location_of_instruction, :as => 'LocationOfInstruction'
20
+ property :summer_school, :as => 'SummerSchool'
21
+ property :school_course_info_override, :as => 'SchoolCourseInfoOverride',
22
+ :class => MODEL_COMMON::SchoolCourseInfoOverride,
23
+ :decorator => REPR_COMMON::SchoolCourseInfoOverride
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,17 @@
1
+ module SIF
2
+ module Representation
3
+ module Model
4
+ module Group
5
+ module SIS
6
+ module SISRepresenter
7
+ include Representable::XML
8
+
9
+ property :ref_id, :attribute => true, :as => 'RefId'
10
+ property :metadata, :as => 'SIF_Metadata'
11
+ property :extended_elements, :as => 'SIF_ExtendedElements'
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,19 @@
1
+ module SIF
2
+ module Representation
3
+ module Model
4
+ module Group
5
+ module SIS
6
+ class StaffPersonal < SIF::Represent
7
+ include SISRepresenter
8
+ include PersonalRepresenter
9
+
10
+ self.representation_wrap = 'StaffPersonal'
11
+
12
+ property :employee_personal_ref_id, :as => 'EmployeePersonalRefId'
13
+ property :title, :as => 'Title'
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,37 @@
1
+ module SIF
2
+ module Representation
3
+ module Model
4
+ module Group
5
+ module SIS
6
+ class StudentPersonal < SIF::Represent
7
+ include SISRepresenter
8
+ include PersonalRepresenter
9
+ self.representation_wrap = 'StudentPersonal'
10
+
11
+ collection :alert_messages, :as => 'AlertMessage', :wrap => 'AlertMessages',
12
+ :class => MODEL_COMMON::AlertMessage,
13
+ :decorator => REPR_COMMON::AlertMessage
14
+ collection :medical_alert_messages, :as => 'MedicalAlertMessage', :wrap => 'MedicalAlertMessages',
15
+ :class => MODEL_COMMON::MedicalAlertMessage,
16
+ :decorator => REPR_COMMON::MedicalAlertMessage
17
+ property :projected_graduation_year, :as => 'ProjectedGraduationYear'
18
+ property :on_time_graduation_year, :as => 'OnTimeGraduationYear'
19
+ property :graduation_date, :as => 'GraduationDate'
20
+ property :most_recent, :as => 'MostRecent'
21
+ property :acceptable_use_policy, :as => 'AcceptableUsePolicy'
22
+ property :idea, :as => 'IDEA'
23
+ property :migrant, :as => 'Migrant'
24
+ property :title1, :as => 'Title1'
25
+ property :gifted_talented, :as => 'GiftedTalented'
26
+ property :ell, :as => 'ELL'
27
+ property :homeless, :as => 'Homeless'
28
+ property :section504, :as => 'Section504'
29
+ property :vocational_concentrator, :as => 'VocationalConcentrator'
30
+ property :immigrant, :as => 'Immigrant'
31
+ property :neglected_delinquent, :as => 'NeglectedDelinquent'
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,26 @@
1
+ module SIF
2
+ module Representation
3
+ module Model
4
+ module Group
5
+ module SIS
6
+ class StudentSectionEnrollment < SIF::Represent
7
+ include SISRepresenter
8
+ self.representation_wrap = 'StudentSectionEnrollment'
9
+
10
+ property :student_personal_ref_id, :attribute => true, :as => 'StudentPersonalRefId'
11
+ property :section_info_ref_id, :attribute =>true, :as => 'SectionInfoRefId'
12
+ property :school_year, :attribute => true, :as => 'SchoolYear'
13
+ property :entry_date, :as => 'EntryDate'
14
+ property :exit_date, :as => 'ExitDate'
15
+ property :schedule_info_overrides, :as => 'ScheduleInfoOverride', :wrap => 'ScheduleInfoOverrideList',
16
+ :class => MODEL_COMMON::ScheduleInfoOverride,
17
+ :decorator => REPR_COMMON::ScheduleInfoOverride
18
+ property :credits_attempted, :as => 'CreditsAttempted',
19
+ :class => MODEL_COMMON::CreditsAttempted,
20
+ :class => REPR_COMMON::CreditsAttempted
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,30 @@
1
+ module SIF
2
+ module Representation
3
+ module Model
4
+ module Group
5
+ module SIS
6
+ class TermInfo < SIF::Represent
7
+ include SISRepresenter
8
+
9
+ self.representation_wrap = 'TermInfo'
10
+
11
+ property :school_info_ref_id, :attribute => true, :as => 'SchoolInfoRefId'
12
+ property :school_year, :attribute => true, :as => 'SchoolYear'
13
+ property :start_date, :as => 'StartDate'
14
+ property :end_date, :as => 'EndDate'
15
+ property :description, :as => 'Description'
16
+ property :relative_duration, :as => 'RelativeDuration'
17
+ property :term_code, :as => 'TermCode'
18
+ property :track, :as => 'Track'
19
+ property :term_span, :as => 'TermSpan',
20
+ :class => SIF::Model::Group::DataModel::TermSpan,
21
+ :decorator => SIF::Representation::Model::Group::DataModel::TermSpan
22
+ property :marking_term, :as => 'MarkingTerm'
23
+ property :scheduling_term, :as => 'SchedulingTerm'
24
+ property :attendance_term, :as => 'AttendanceTerm'
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
data/lib/sif/sif.rb ADDED
@@ -0,0 +1,249 @@
1
+ require 'virtus'
2
+ require 'representable'
3
+ require 'representable/xml'
4
+ require 'representable/json'
5
+
6
+ module SIF
7
+ class Represent < Representable::Decorator
8
+ include Representable::XML
9
+ include Representable::JSON
10
+ end
11
+
12
+ module Infra
13
+ module Common
14
+ autoload :Application, 'sif/infra/common/application'
15
+ autoload :Condition, 'sif/infra/common/condition'
16
+ autoload :ConditionGroup, 'sif/infra/common/condition_group'
17
+ autoload :Data, 'sif/infra/common/data'
18
+ autoload :Error, 'sif/infra/common/error'
19
+ autoload :Event, 'sif/infra/common/event'
20
+ autoload :EventObject, 'sif/infra/common/event_object'
21
+ autoload :ExtendedQuery, 'sif/infra/common/extended_query'
22
+ autoload :ExtendedQueryResults, 'sif/infra/common/extended_query_results'
23
+ autoload :Header, 'sif/infra/common/header'
24
+ autoload :Message, 'sif/infra/common/message'
25
+ autoload :Object, 'sif/infra/common/object'
26
+ autoload :ObjectData, 'sif/infra/common/object_data'
27
+ autoload :Property, 'sif/infra/common/property'
28
+ autoload :Protocol, 'sif/infra/common/protocol'
29
+ autoload :Provision, 'sif/infra/common/provision'
30
+ autoload :Query, 'sif/infra/common/query'
31
+ autoload :QueryObject, 'sif/infra/common/query_object'
32
+ autoload :SecureChannel, 'sif/infra/common/secure_channel'
33
+ autoload :Security, 'sif/infra/common/security'
34
+ autoload :Status, 'sif/infra/common/status'
35
+ autoload :Unprovision, 'sif/infra/common/unprovision'
36
+ autoload :Vendor, 'sif/infra/common/vendor'
37
+ end
38
+
39
+ module Message
40
+ autoload :Ack, 'sif/infra/messages/ack'
41
+ autoload :Event, 'sif/infra/messages/event'
42
+ autoload :GetMessage, 'sif/infra/messages/get_message'
43
+ autoload :Ping, 'sif/infra/messages/ping'
44
+ autoload :Provide, 'sif/infra/messages/provide'
45
+ autoload :Provision, 'sif/infra/messages/provision'
46
+ autoload :Register, 'sif/infra/messages/register'
47
+ autoload :Request, 'sif/infra/messages/request'
48
+ autoload :Response, 'sif/infra/messages/response'
49
+ autoload :Sleep, 'sif/infra/messages/sleep'
50
+ autoload :Subscribe, 'sif/infra/messages/subscribe'
51
+ autoload :SystemControl, 'sif/infra/messages/system_control'
52
+ autoload :SystemControlData, 'sif/infra/messages/system_control_data'
53
+ autoload :Unprovide, 'sif/infra/messages/unprovide'
54
+ autoload :Unregister, 'sif/infra/messages/unregister'
55
+ autoload :Unsubscribe, 'sif/infra/messages/unsubscribe'
56
+ autoload :Wakeup, 'sif/infra/messages/wakeup'
57
+ end
58
+
59
+ module Object
60
+ autoload :AgentACL, 'sif/infra/objects/agent_acl'
61
+ autoload :ZoneStatus, 'sif/infra/objects/zone_status'
62
+ end
63
+ end
64
+
65
+ module Model
66
+ module Common
67
+ autoload :Address, 'sif/models/common/address'
68
+ autoload :AlertMessage, 'sif/models/common/alert_message'
69
+ autoload :BaseName, 'sif/models/common/base_name'
70
+ autoload :Code, 'sif/models/common/code'
71
+ autoload :ContactInfo, 'sif/models/common/contact_info'
72
+ autoload :CreditsAttempted, 'sif/models/common/credits_attempted'
73
+ autoload :Demographics, 'sif/models/common/demographics'
74
+ autoload :DwellingArrangement, 'sif/models/common/dwelling_arrangement'
75
+ autoload :Earned_status, 'sif/models/common/earned_status'
76
+ autoload :ElectronicId, 'sif/models/common/electronic_id'
77
+ autoload :EnglishProficiency, 'sif/models/common/english_proficiency'
78
+ autoload :Email, 'sif/models/common/email'
79
+ autoload :ExceptionalityCategory, 'sif/models/common/exceptionality_category'
80
+ autoload :GradeLevel, 'sif/models/common/grade_level'
81
+ autoload :GridLocation, 'sif/models/common/grid_location'
82
+ autoload :IdentificationInfo, 'sif/models/common/identification_info'
83
+ autoload :Language, 'sif/models/common/language'
84
+ autoload :MealStatus, 'sif/models/common/meal_status'
85
+ autoload :MedicalAlertMessage, 'sif/models/common/medical_alert_message'
86
+ autoload :MeetingTime, 'sif/models/common/meeting_time'
87
+ autoload :Name, 'sif/models/common/name'
88
+ autoload :OtherCode, 'sif/models/common/other_code'
89
+ autoload :OtherId, 'sif/models/common/other_id'
90
+ autoload :PhoneNumber, 'sif/models/common/phone_number'
91
+ autoload :PrincipalInfo, 'sif/models/common/principal_info'
92
+ autoload :Race, 'sif/models/common/race'
93
+ autoload :SCEDCode, 'sif/models/common/sced_code'
94
+ autoload :ScheduleInfo, 'sif/models/common/schedule_info'
95
+ autoload :ScheduleInfoOverride, 'sif/models/common/schedule_info_override'
96
+ autoload :SchoolContact, 'sif/models/common/school_contact'
97
+ autoload :SchoolCourseInfoOverride, 'sif/models/common/school_course_info_override'
98
+ autoload :Street, 'sif/models/common/street'
99
+ autoload :SubjectArea, 'sif/models/common/subject_area'
100
+ end
101
+
102
+ module Group
103
+ module DataModel
104
+ autoload :TermSpan, 'sif/models/groups/data_model/term_span'
105
+ end
106
+
107
+ module SIS
108
+ autoload :AttendanceCodeInfo, 'sif/models/groups/sis/attendance_code_info'
109
+ autoload :CalendarDate, 'sif/models/groups/sis/calendar_date'
110
+ autoload :DisciplineIncident, 'sif/models/groups/sis/discipline_incident'
111
+ autoload :LEAInfo, 'sif/models/groups/sis/lea_info'
112
+ autoload :PersonalRepresenter, 'sif/models/groups/sis/personal_representer'
113
+ autoload :SchoolCourseInfo, 'sif/models/groups/sis/school_course_info'
114
+ autoload :SchoolInfo, 'sif/models/groups/sis/school_info'
115
+ autoload :SectionInfo, 'sif/models/groups/sis/section_info'
116
+ autoload :SISRepresenter, 'sif/models/groups/sis/sis_representer'
117
+ autoload :StaffPersonal, 'sif/models/groups/sis/staff_personal'
118
+ autoload :StudentPersonal, 'sif/models/groups/sis/student_personal'
119
+ autoload :StudentSectionEnrollment, 'sif/models/groups/sis/student_section_enrollment'
120
+ autoload :TermInfo, 'sif/models/groups/sis/term_info'
121
+ end
122
+ end
123
+
124
+ module Object
125
+ end
126
+ end
127
+
128
+ module Representation
129
+ module Infra
130
+ module Common
131
+ autoload :Application, 'sif/representations/infra/common/application'
132
+ autoload :Condition, 'sif/representations/infra/common/condition'
133
+ autoload :ConditionGroup, 'sif/representations/infra/common/condition_group'
134
+ autoload :Data, 'sif/representations/infra/common/data'
135
+ autoload :Error, 'sif/representations/infra/common/error'
136
+ autoload :Event, 'sif/representations/infra/common/event'
137
+ autoload :EventObject, 'sif/representations/infra/common/event_object'
138
+ autoload :ExtendedQuery, 'sif/representations/infra/common/extended_query'
139
+ autoload :ExtendedQueryResults, 'sif/representations/infra/common/extended_query_results'
140
+ autoload :Header, 'sif/representations/infra/common/header'
141
+ autoload :Message, 'sif/representations/infra/common/message'
142
+ autoload :Object, 'sif/representations/infra/common/object'
143
+ autoload :ObjectData, 'sif/representations/infra/common/object_data'
144
+ autoload :Property, 'sif/representations/infra/common/property'
145
+ autoload :Protocol, 'sif/representations/infra/common/protocol'
146
+ autoload :Provision, 'sif/representations/infra/common/provision'
147
+ autoload :Query, 'sif/representations/infra/common/query'
148
+ autoload :QueryObject, 'sif/representations/infra/common/query_object'
149
+ autoload :SecureChannel, 'sif/representations/infra/common/secure_channel'
150
+ autoload :Security, 'sif/representations/infra/common/security'
151
+ autoload :Status, 'sif/representations/infra/common/status'
152
+ autoload :Unprovision, 'sif/representations/infra/common/unprovision'
153
+ autoload :Vendor, 'sif/representations/infra/common/vendor'
154
+ end
155
+
156
+ module Message
157
+ autoload :Ack, 'sif/representations/infra/messages/ack'
158
+ autoload :Event, 'sif/representations/infra/messages/event'
159
+ autoload :GetMessage, 'sif/representations/infra/messages/get_message'
160
+ autoload :Ping, 'sif/representations/infra/messages/ping'
161
+ autoload :Provide, 'sif/representations/infra/messages/provide'
162
+ autoload :Provision, 'sif/representations/infra/messages/provision'
163
+ autoload :Register, 'sif/representations/infra/messages/register'
164
+ autoload :Request, 'sif/representations/infra/messages/request'
165
+ autoload :Response, 'sif/representations/infra/messages/response'
166
+ autoload :Sleep, 'sif/representations/infra/messages/sleep'
167
+ autoload :Subscribe, 'sif/representations/infra/messages/subscribe'
168
+ autoload :SystemControl, 'sif/representations/infra/messages/system_control'
169
+ autoload :SystemControlData, 'sif/representations/infra/messages/system_control_data'
170
+ autoload :Unprovide, 'sif/representations/infra/messages/unprovide'
171
+ autoload :Unregister, 'sif/representations/infra/messages/unregister'
172
+ autoload :Unsubscribe, 'sif/representations/infra/messages/unsubscribe'
173
+ autoload :Wakeup, 'sif/representations/infra/messages/wakeup'
174
+ end
175
+
176
+ module Object
177
+ autoload :AgentACL, 'sif/representations/infra/objects/agent_acl'
178
+ autoload :ZoneStatus, 'sif/representations/infra/objects/zone_status'
179
+ end
180
+ end
181
+
182
+ module Model
183
+ module Common
184
+ autoload :Address, 'sif/representations/models/common/address'
185
+ autoload :AlertMessage, 'sif/representations/models/common/alert_message'
186
+ autoload :BaseName, 'sif/representations/models/common/base_name'
187
+ autoload :Code, 'sif/representations/models/common/code'
188
+ autoload :ContactInfo, 'sif/representations/models/common/contact_info'
189
+ autoload :CreditsAttempted, 'sif/representations/models/common/credits_attempted'
190
+ autoload :Demographics, 'sif/representations/models/common/demographics'
191
+ autoload :DwellingArrangement, 'sif/representations/models/common/dwelling_arrangement'
192
+ autoload :Earned_status, 'sif/representations/models/common/earned_status'
193
+ autoload :ElectronicId, 'sif/representations/models/common/electronic_id'
194
+ autoload :EnglishProficiency, 'sif/representations/models/common/english_proficiency'
195
+ autoload :Email, 'sif/representations/models/common/email'
196
+ autoload :ExceptionalityCategory, 'sif/representations/models/common/exceptionality_category'
197
+ autoload :GradeLevel, 'sif/representations/models/common/grade_level'
198
+ autoload :GridLocation, 'sif/representations/models/common/grid_location'
199
+ autoload :IdentificationInfo, 'sif/representations/models/common/identification_info'
200
+ autoload :Language, 'sif/representations/models/common/language'
201
+ autoload :MealStatus, 'sif/representations/models/common/meal_status'
202
+ autoload :MedicalAlertMessage, 'sif/representations/models/common/medical_alert_message'
203
+ autoload :MeetingTime, 'sif/representations/models/common/meeting_time'
204
+ autoload :Name, 'sif/representations/models/common/name'
205
+ autoload :OtherCode, 'sif/representations/models/common/other_code'
206
+ autoload :OtherId, 'sif/representations/models/common/other_id'
207
+ autoload :PhoneNumber, 'sif/representations/models/common/phone_number'
208
+ autoload :PrincipalInfo, 'sif/representations/models/common/principal_info'
209
+ autoload :Race, 'sif/representations/models/common/race'
210
+ autoload :SCEDCode, 'sif/representations/models/common/sced_code'
211
+ autoload :ScheduleInfo, 'sif/representations/models/common/schedule_info'
212
+ autoload :ScheduleInfoOverride, 'sif/representations/models/common/schedule_info_override'
213
+ autoload :SchoolContact, 'sif/representations/models/common/school_contact'
214
+ autoload :SchoolCourseInfoOverride, 'sif/representations/models/common/school_course_info_override'
215
+ autoload :Street, 'sif/representations/models/common/street'
216
+ autoload :SubjectArea, 'sif/representations/models/common/subject_area'
217
+ end
218
+
219
+ module Group
220
+ module DataModel
221
+ autoload :TermSpan, 'sif/representations/models/groups/data_model/term_span'
222
+ end
223
+
224
+ module SIS
225
+ autoload :AttendanceCodeInfo, 'sif/representations/models/groups/sis/attendance_code_info'
226
+ autoload :CalendarDate, 'sif/representations/models/groups/sis/calendar_date'
227
+ autoload :DisciplineIncident, 'sif/representations/models/groups/sis/discipline_incident'
228
+ autoload :LEAInfo, 'sif/representations/models/groups/sis/lea_info'
229
+ autoload :PersonalRepresenter, 'sif/representations/models/groups/sis/personal_representer'
230
+ autoload :SchoolCourseInfo, 'sif/representations/models/groups/sis/school_course_info'
231
+ autoload :SchoolInfo, 'sif/representations/models/groups/sis/school_info'
232
+ autoload :SectionInfo, 'sif/representations/models/groups/sis/section_info'
233
+ autoload :SISRepresenter, 'sif/representations/models/groups/sis/sis_representer'
234
+ autoload :StaffPersonal, 'sif/representations/models/groups/sis/staff_personal'
235
+ autoload :StudentPersonal, 'sif/representations/models/groups/sis/student_personal'
236
+ autoload :StudentSectionEnrollment, 'sif/representations/models/groups/sis/student_section_enrollment'
237
+ autoload :TermInfo, 'sif/representations/models/groups/sis/term_info'
238
+ end
239
+ end
240
+
241
+ module Object
242
+ end
243
+ end
244
+ end
245
+ end
246
+
247
+ MODEL_COMMON = SIF::Model::Common
248
+ REPR_COMMON = SIF::Representation::Model::Common
249
+