hydramata-works 0.0.1.prerelease

Sign up to get free protection for your applications and to get access to all the features.
Files changed (188) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +15 -0
  3. data/.hound.yml +818 -0
  4. data/.rspec +2 -0
  5. data/.travis.yml +20 -0
  6. data/CONTRIBUTING.md +220 -0
  7. data/Gemfile +36 -0
  8. data/Guardfile +36 -0
  9. data/LICENSE +15 -0
  10. data/README.md +36 -0
  11. data/Rakefile +47 -0
  12. data/TODO.md +74 -0
  13. data/VISION.md +19 -0
  14. data/app/forms/hydramata/works/entity_form.rb +92 -0
  15. data/app/forms/hydramata/works/validation_service.rb +78 -0
  16. data/app/models/hydramata/works/data_definition.rb +57 -0
  17. data/app/models/hydramata/works/entities.rb +11 -0
  18. data/app/models/hydramata/works/entity.rb +75 -0
  19. data/app/models/hydramata/works/predicate.rb +35 -0
  20. data/app/models/hydramata/works/predicate_presentation_sequences/storage.rb +29 -0
  21. data/app/models/hydramata/works/predicate_set.rb +44 -0
  22. data/app/models/hydramata/works/predicate_sets/storage.rb +45 -0
  23. data/app/models/hydramata/works/predicates.rb +14 -0
  24. data/app/models/hydramata/works/predicates/storage.rb +33 -0
  25. data/app/models/hydramata/works/presentation_structure.rb +29 -0
  26. data/app/models/hydramata/works/property.rb +72 -0
  27. data/app/models/hydramata/works/property_set.rb +89 -0
  28. data/app/models/hydramata/works/validations.rb +6 -0
  29. data/app/models/hydramata/works/value.rb +34 -0
  30. data/app/models/hydramata/works/work_type.rb +49 -0
  31. data/app/models/hydramata/works/work_types.rb +14 -0
  32. data/app/models/hydramata/works/work_types/storage.rb +42 -0
  33. data/app/parsers/hydramata/works/datastream_parser.rb +36 -0
  34. data/app/parsers/hydramata/works/datastream_parsers/rdf_ntriples_parser.rb +60 -0
  35. data/app/parsers/hydramata/works/datastream_parsers/simple_xml_parser.rb +27 -0
  36. data/app/parsers/hydramata/works/predicate_parser.rb +31 -0
  37. data/app/parsers/hydramata/works/predicate_parsers/simple_parser.rb +13 -0
  38. data/app/parsers/hydramata/works/validations_parser.rb +22 -0
  39. data/app/parsers/hydramata/works/value_parser.rb +26 -0
  40. data/app/parsers/hydramata/works/value_parsers.rb +27 -0
  41. data/app/parsers/hydramata/works/value_parsers/date_parser.rb +13 -0
  42. data/app/parsers/hydramata/works/value_parsers/interrogation_parser.rb +18 -0
  43. data/app/parsers/hydramata/works/value_parsers/simple_parser.rb +14 -0
  44. data/app/presenters/hydramata/works/base_presenter.rb +146 -0
  45. data/app/presenters/hydramata/works/dom_attributes_builder.rb +24 -0
  46. data/app/presenters/hydramata/works/entity_presenter.rb +67 -0
  47. data/app/presenters/hydramata/works/fieldset_presenter.rb +54 -0
  48. data/app/presenters/hydramata/works/property_presenter.rb +51 -0
  49. data/app/presenters/hydramata/works/value_presenter.rb +60 -0
  50. data/app/renderers/hydramata/works/entity_renderer.rb +45 -0
  51. data/app/views/hydramata/works/fieldsets/_edit.html.erb +4 -0
  52. data/app/views/hydramata/works/fieldsets/_show.html.erb +8 -0
  53. data/app/views/hydramata/works/fieldsets/_show.json.jbuilder +8 -0
  54. data/app/views/hydramata/works/properties/_edit.html.erb +12 -0
  55. data/app/views/hydramata/works/properties/_show.html.erb +3 -0
  56. data/app/views/hydramata/works/properties/_show.json.jbuilder +1 -0
  57. data/app/views/hydramata/works/works/_edit.html.erb +8 -0
  58. data/app/views/hydramata/works/works/_new.html.erb +8 -0
  59. data/app/views/hydramata/works/works/_show.html.erb +3 -0
  60. data/app/views/hydramata/works/works/_show.json.jbuilder +13 -0
  61. data/app/wranglers/hydramata/works/fedora_wrangler.rb +66 -0
  62. data/bin/rails +12 -0
  63. data/db/migrate/20140606132349_create_hydramata_work_predicates.rb +13 -0
  64. data/db/migrate/20140606132350_create_hydramata_work_types.rb +9 -0
  65. data/db/migrate/20140606132351_create_hydramata_work_predicate_sets.rb +13 -0
  66. data/db/migrate/20140606132352_create_hydramata_work_predicate_presentation_sequences.rb +12 -0
  67. data/db/migrate/20140623200635_add_validations_to_predicates.rb +5 -0
  68. data/db/migrate/20140627134133_adding_item_type_schema_dot_org_to_work_type.rb +5 -0
  69. data/db/migrate/20140627140840_adding_item_prop_schema_dot_org_to_predicate.rb +5 -0
  70. data/db/seeds.rb +36 -0
  71. data/documents/administrative-set-strawperson.md +45 -0
  72. data/documents/diagrams/hydramata-refactor-tasks.dot +88 -0
  73. data/documents/diagrams/hydramata-sip-dip-aip.dot +88 -0
  74. data/documents/diagrams/hydramata-work-architecture.dot +129 -0
  75. data/documents/diagrams/hydramata-work-subcomponents.dot +36 -0
  76. data/documents/diagrams/map-from-database-to-work-object.dot +44 -0
  77. data/documents/diagrams/map-from-fedora-to-work-object.dot +51 -0
  78. data/documents/diagrams/map-from-input-to-work-object.dot +37 -0
  79. data/documents/diagrams/map-from-work-object-to-database.dot +31 -0
  80. data/documents/diagrams/work-rendering.dot +53 -0
  81. data/documents/diagrams/work-structure.dot +32 -0
  82. data/documents/handling-work.md +224 -0
  83. data/documents/high-level-stories.md +105 -0
  84. data/documents/hydramata-components.md +82 -0
  85. data/documents/interface-between-work-and-permissions.md +131 -0
  86. data/documents/interface-between-work-and-workflow.md +6 -0
  87. data/documents/timeline.md +75 -0
  88. data/fs +3 -0
  89. data/gemfiles/rails4.1.gemfile +12 -0
  90. data/gemfiles/rails4.gemfile +13 -0
  91. data/hydramata-works.gemspec +43 -0
  92. data/lib/hydramata-works.rb +23 -0
  93. data/lib/hydramata/works/conversions.rb +21 -0
  94. data/lib/hydramata/works/conversions/exceptions.rb +18 -0
  95. data/lib/hydramata/works/conversions/predicate.rb +22 -0
  96. data/lib/hydramata/works/conversions/predicate_set.rb +28 -0
  97. data/lib/hydramata/works/conversions/presented_fieldsets.rb +28 -0
  98. data/lib/hydramata/works/conversions/presenter.rb +13 -0
  99. data/lib/hydramata/works/conversions/property.rb +31 -0
  100. data/lib/hydramata/works/conversions/property_set.rb +23 -0
  101. data/lib/hydramata/works/conversions/translation_key_fragment.rb +20 -0
  102. data/lib/hydramata/works/conversions/value.rb +20 -0
  103. data/lib/hydramata/works/conversions/work_type.rb +26 -0
  104. data/lib/hydramata/works/engine.rb +31 -0
  105. data/lib/hydramata/works/linters.rb +99 -0
  106. data/lib/hydramata/works/linters/implement_data_definition_interface_matcher.rb +17 -0
  107. data/lib/hydramata/works/linters/implement_entity_interface_matcher.rb +16 -0
  108. data/lib/hydramata/works/linters/implement_predicate_interface_matcher.rb +17 -0
  109. data/lib/hydramata/works/linters/implement_predicate_set_interface_matcher.rb +8 -0
  110. data/lib/hydramata/works/linters/implement_property_set_interface_matcher.rb +8 -0
  111. data/lib/hydramata/works/linters/implement_value_interface_matcher.rb +8 -0
  112. data/lib/hydramata/works/linters/implement_work_type_interface_matcher.rb +13 -0
  113. data/lib/hydramata/works/linters/interface_matcher_builder.rb +36 -0
  114. data/lib/hydramata/works/translator.rb +67 -0
  115. data/lib/hydramata/works/version.rb +5 -0
  116. data/lib/hydramata_works.rb +2 -0
  117. data/lib/tasks/hydramata_work_tasks.rake +4 -0
  118. data/run_each_spec_in_isolation +16 -0
  119. data/run_each_spec_in_isolation.txt +110 -0
  120. data/script/analyzer.rb +124 -0
  121. data/script/fast_specs +22 -0
  122. data/spec/features/fedora_to_in_memory_spec.rb +60 -0
  123. data/spec/features/format_and_view_path_overrides_spec.rb +72 -0
  124. data/spec/features/in_memory_to_output_buffer_spec.rb +109 -0
  125. data/spec/features/instantiate_entity_from_persisted_work_type_spec.rb +26 -0
  126. data/spec/features/new_user_input_to_in_memory_spec.rb +75 -0
  127. data/spec/features/translation_services_spec.rb +107 -0
  128. data/spec/features/validate_entity_based_on_work_type_structure_spec.rb +19 -0
  129. data/spec/fixtures/cassettes/fedora-object.yml +299 -0
  130. data/spec/fixtures/translations.yml +20 -0
  131. data/spec/forms/hydramata/works/entity_form_spec.rb +83 -0
  132. data/spec/forms/hydramata/works/validation_service_spec.rb +32 -0
  133. data/spec/lib/hydramata-work_spec.rb +14 -0
  134. data/spec/lib/hydramata/works/conversions/predicate_set_spec.rb +50 -0
  135. data/spec/lib/hydramata/works/conversions/predicate_spec.rb +43 -0
  136. data/spec/lib/hydramata/works/conversions/presented_fieldsets_spec.rb +52 -0
  137. data/spec/lib/hydramata/works/conversions/presenter_spec.rb +22 -0
  138. data/spec/lib/hydramata/works/conversions/property_set_spec.rb +42 -0
  139. data/spec/lib/hydramata/works/conversions/property_spec.rb +68 -0
  140. data/spec/lib/hydramata/works/conversions/translation_key_fragment_spec.rb +45 -0
  141. data/spec/lib/hydramata/works/conversions/value_spec.rb +36 -0
  142. data/spec/lib/hydramata/works/conversions/work_type_spec.rb +55 -0
  143. data/spec/lib/hydramata/works/translator_spec.rb +81 -0
  144. data/spec/models/hydramata/works/data_definition_spec.rb +53 -0
  145. data/spec/models/hydramata/works/entity_spec.rb +50 -0
  146. data/spec/models/hydramata/works/predicate_presentation_sequences/storage_spec.rb +15 -0
  147. data/spec/models/hydramata/works/predicate_set_spec.rb +63 -0
  148. data/spec/models/hydramata/works/predicate_sets/storage_spec.rb +37 -0
  149. data/spec/models/hydramata/works/predicate_spec.rb +16 -0
  150. data/spec/models/hydramata/works/predicates/storage_spec.rb +78 -0
  151. data/spec/models/hydramata/works/predicates_spec.rb +18 -0
  152. data/spec/models/hydramata/works/presentation_structure_spec.rb +27 -0
  153. data/spec/models/hydramata/works/property_set_spec.rb +135 -0
  154. data/spec/models/hydramata/works/property_spec.rb +74 -0
  155. data/spec/models/hydramata/works/value_spec.rb +61 -0
  156. data/spec/models/hydramata/works/work_type_spec.rb +45 -0
  157. data/spec/models/hydramata/works/work_types/storage_spec.rb +74 -0
  158. data/spec/models/hydramata/works/work_types_spec.rb +16 -0
  159. data/spec/parsers/hydramata/works/datastream_parser_spec.rb +29 -0
  160. data/spec/parsers/hydramata/works/datastream_parsers/rdf_ntriples_parser_spec.rb +65 -0
  161. data/spec/parsers/hydramata/works/datastream_parsers/simple_xml_parser_spec.rb +37 -0
  162. data/spec/parsers/hydramata/works/predicate_parser_spec.rb +30 -0
  163. data/spec/parsers/hydramata/works/predicate_parsers/simple_parser_spec.rb +20 -0
  164. data/spec/parsers/hydramata/works/validations_parser_spec.rb +31 -0
  165. data/spec/parsers/hydramata/works/value_parser_spec.rb +22 -0
  166. data/spec/parsers/hydramata/works/value_parsers/simple_parser_spec.rb +20 -0
  167. data/spec/parsers/hydramata/works/value_parsers_spec.rb +36 -0
  168. data/spec/presenters/hydramata/works/base_presenter_spec.rb +111 -0
  169. data/spec/presenters/hydramata/works/dom_attributes_builder_spec.rb +26 -0
  170. data/spec/presenters/hydramata/works/entity_presenter_spec.rb +51 -0
  171. data/spec/presenters/hydramata/works/fieldset_presenter_spec.rb +58 -0
  172. data/spec/presenters/hydramata/works/property_presenter_spec.rb +42 -0
  173. data/spec/presenters/hydramata/works/value_presenter_spec.rb +49 -0
  174. data/spec/renderers/hydramata/works/entity_renderer_spec.rb +25 -0
  175. data/spec/spec_active_record_helper.rb +30 -0
  176. data/spec/spec_fast_helper.rb +12 -0
  177. data/spec/spec_slow_helper.rb +56 -0
  178. data/spec/spec_view_helper.rb +14 -0
  179. data/spec/test_app_templates/lib/generators/test_app_generator.rb +21 -0
  180. data/spec/views/hydramata/works/fieldsets/_edit.html.erb_spec.rb +29 -0
  181. data/spec/views/hydramata/works/fieldsets/_show.html.erb_spec.rb +25 -0
  182. data/spec/views/hydramata/works/properties/_edit.html.erb_spec.rb +22 -0
  183. data/spec/views/hydramata/works/properties/_show.html.erb_spec.rb +22 -0
  184. data/spec/views/hydramata/works/works/_edit.html.erb_spec.rb +23 -0
  185. data/spec/views/hydramata/works/works/_new.html.erb_spec.rb +23 -0
  186. data/spec/views/hydramata/works/works/_show.html.erb_spec.rb +24 -0
  187. data/spec/wranglers/hydramata/works/fedora_wrangler_spec.rb +26 -0
  188. metadata +466 -0
@@ -0,0 +1,5 @@
1
+ class AddingItemPropSchemaDotOrgToPredicate < ActiveRecord::Migration
2
+ def change
3
+ add_column :hydramata_works_predicates, :itemprop_schema_dot_org, :string
4
+ end
5
+ end
@@ -0,0 +1,36 @@
1
+ article = Hydramata::Works::WorkTypes::Storage.create!(identity: 'article', name_for_application_usage: 'article')
2
+ predicate_set = Hydramata::Works::PredicateSets::Storage.create!(identity: 'required', work_type: article, presentation_sequence: 1, name_for_application_usage: 'required')
3
+
4
+ def within_predicate_set_create_predicate_by_term(predicate_set, term)
5
+ name = "dc_#{term.gsub('#', '_')}"
6
+ predicate = Hydramata::Works::Predicates::Storage.new(identity: "http://purl.org/dc/terms/#{term}", name_for_application_usage: name)
7
+ predicate.save!
8
+ counter = predicate_set.predicate_presentation_sequences.count + 1
9
+ predicate_set.predicate_presentation_sequences.create!(presentation_sequence: counter, predicate: predicate)
10
+ end
11
+
12
+ [
13
+ 'title',
14
+ 'alternative',
15
+ 'creator#author',
16
+ 'contributor#author',
17
+ 'identifier#issn',
18
+ 'identifier#doi',
19
+ 'abstract',
20
+ 'subject',
21
+ 'source',
22
+ 'publisher',
23
+ 'created',
24
+ 'format#mimeType',
25
+ 'bibliographicCitation',
26
+ 'contributor#repository',
27
+ 'relation#ispartof',
28
+ 'temporal',
29
+ 'spatial',
30
+ 'language',
31
+ 'format#extent',
32
+ 'contributor#institution',
33
+ 'rights#permissions',
34
+ ].each do |term|
35
+ within_predicate_set_create_predicate_by_term(predicate_set, term)
36
+ end
@@ -0,0 +1,45 @@
1
+ # Hydramata::AdministrativeSet Strawperson
2
+
3
+ An Administrative Set is concerned with:
4
+
5
+ * Somewhat concerned about presentation (i.e. where is this found)
6
+ * Default values for ingest
7
+ * Might enable bulk editing
8
+ * What happens when something is deposited/ingested
9
+
10
+ * Enable some student to deposit into a specific collection
11
+ * Deposit requires review
12
+
13
+ * What can be added to the set
14
+ * Who can add to the set
15
+ * Who can modify objects in the set
16
+ * What happens when an object that is part of the set changes
17
+ * What happens when an object is created in the set
18
+
19
+ ```gherkin
20
+ Background:
21
+ Given a User with groups:
22
+ | group |
23
+ | Professor of Mathematics |
24
+ | Faculty |
25
+ And the following GroupRoles:
26
+ | group | role |
27
+ | Professor of Mathematics | Math Holdings Manager |
28
+ | Faculty | Faculty Holdings Manager |
29
+ | Students | Self Deposit Submitter |
30
+ And the following AdministrativeSets:
31
+ | set |
32
+ | General Holdings |
33
+ | Self Deposit Holdings |
34
+ | Math Holdings |
35
+ And the following Permissions:
36
+ | role | permissions |
37
+ | General Holdings Manager | can :manage, "General Holdings item of type Article" |
38
+ | General Holdings Manager | can :manage, "General Holdings item of type Document" |
39
+ | Math Holdings Manager | can :manage, "General Holdings item of type Article" |
40
+ | Math Holdings Manager | can :manage, "General Holdings item of type Dataset" |
41
+ | Self Deposit Submitter | can :create, "Self Deposits item of type Document" |
42
+
43
+ Scenario:
44
+ Then they
45
+ ```
@@ -0,0 +1,88 @@
1
+ digraph "G" {
2
+ label="Hydramata Refactor"
3
+ compound=true;
4
+ node[color="grey15" fillcolor=white style=filled shape=record penwidth=2 margin="0.15, 0.125"];
5
+
6
+ subgraph cluster_1 {
7
+ label="Hydramata Base Definitions"
8
+ fillcolor=olivedrab3
9
+ style=filled
10
+ define_works_public_interface[label="{ Work's Public Interface | 1 week }"]
11
+ define_plugin_architecture_spec[label="{ Plugin Architecture Spec | 1 week }"]
12
+ }
13
+
14
+ subgraph cluster_2 {
15
+ label="Hydramata::Works"
16
+ fillcolor=orange
17
+ style=filled
18
+ articulate_work_responsibility[label="{Articulate Work Responsibility | 1 week }"]
19
+ define_presentation_structure[label="{ Define Presentation Structure | 1 week }"]
20
+ splice_presentation_structure[label="{ Splice in Presentation Structure | 3 weeks | SWARM! }"]
21
+ define_predicate_interfaces[label="{ Define Predicates Interfaces | 3 weeks }"]
22
+ define_existing_predicates[label="{ Define Existing Predicates | 3 weeks | SWARM! }"]
23
+ splice_work_wrangler[label="{ Splice Work Wrangler for Fedora | 3 weeks }"]
24
+ splice_actor_shim[label="{ Splice Actor Shim for Hydramata::Works | 2 weeks | SWARM? }"]
25
+ }
26
+
27
+ subgraph cluster_3 {
28
+ label="Hydramata::Worksflow"
29
+ fillcolor=lightblue
30
+ style=filled
31
+ articulate_workflow_responsibility[label="{Articulate WorkFlow Responsibility | 1 week }"]
32
+ define_workflow_interface[label="{Define Workflow Interface | 2 week }"]
33
+ create_asynchronous_workflow[label="{ Create Asynchronous Workflow System | 6 weeks }"]
34
+ create_exsting_tasks[label="{ Create Single Focus Tasks | 3 weeks | SWARM! }"]
35
+ stand_up_workflow_app[label="{ Stand-up Workflow App | 1 week }"]
36
+ replace_existing_actors[label="{ Replace Actors with Workflow | 2 week }"]
37
+ }
38
+
39
+ subgraph cluster_4 {
40
+ label="Hydramata::Permissions"
41
+ fillcolor=firebrick2
42
+ style=filled
43
+ articulate_permission_responsibility[label="{ Articulate Permission Responsibility | 1 week }"]
44
+ define_permission_interface[label="{ Define Permission Interface | 2 weeks }"]
45
+ define_permission_management_system[label="{ Create Permission Management System | 8 weeks }"]
46
+ splice_in_hacl[label="{ Splice in Permission for Hydra::AccessControls | 3 weeks }"]
47
+ replace_repository_admin[label="{ Replace Repository Admin | 1 week }"]
48
+ replace_application_manager[label="{ Replace Application Manager | 1 week }"]
49
+ }
50
+
51
+ subgraph cluster_5 {
52
+ label="Hydramata::AdministrativeContext"
53
+ fillcolor=orchid3
54
+ style=filled
55
+ articulate_administrative_context_responsibility[label="{ Articulate AdministrativeContext Responsibility | 3 weeks }"]
56
+ define_impact_on_work[label="{ Define Impact on Work Datastructure | 1 weeks }"]
57
+ define_impact_on_permissions[label="{ Define Impact on Permissions | 1 weeks }"]
58
+ define_impact_on_workflow[label="{ Define Impact on Workflow | 1 weeks }"]
59
+ make_it_so[label="{ Make it So | ??? weeks }"]
60
+ }
61
+
62
+ define_works_public_interface -> define_plugin_architecture_spec
63
+ define_plugin_architecture_spec -> articulate_work_responsibility -> define_presentation_structure
64
+ define_plugin_architecture_spec -> articulate_permission_responsibility -> define_permission_interface
65
+ define_plugin_architecture_spec -> articulate_workflow_responsibility -> define_workflow_interface -> create_asynchronous_workflow
66
+
67
+ define_presentation_structure -> articulate_administrative_context_responsibility
68
+ define_permission_interface -> articulate_administrative_context_responsibility
69
+ define_workflow_interface -> articulate_administrative_context_responsibility
70
+ articulate_administrative_context_responsibility -> define_impact_on_work -> make_it_so
71
+ articulate_administrative_context_responsibility -> define_impact_on_workflow -> make_it_so
72
+ articulate_administrative_context_responsibility -> define_impact_on_permissions -> make_it_so
73
+
74
+ define_permission_interface -> define_permission_management_system
75
+ define_permission_management_system -> replace_repository_admin
76
+ replace_repository_admin -> replace_application_manager
77
+ define_permission_management_system -> splice_in_hacl
78
+ define_presentation_structure -> splice_presentation_structure
79
+ define_presentation_structure -> define_predicate_interfaces
80
+ define_predicate_interfaces -> define_existing_predicates
81
+ splice_presentation_structure -> splice_work_wrangler
82
+ define_existing_predicates -> splice_work_wrangler
83
+ splice_work_wrangler -> splice_actor_shim
84
+ create_asynchronous_workflow -> create_exsting_tasks
85
+ create_asynchronous_workflow -> stand_up_workflow_app
86
+ stand_up_workflow_app -> replace_existing_actors
87
+ create_exsting_tasks -> replace_existing_actors
88
+ }
@@ -0,0 +1,88 @@
1
+ digraph "G" {
2
+ label="Hydramata SIP / DIP / AIP"
3
+ compound=true;
4
+ node[color="grey15" shape=record penwidth=2 margin="0.15, 0.125"];
5
+
6
+ subgraph cluster_0 {
7
+ label="Operations via Interface";
8
+ color="olivedrab3";
9
+ node[color="grey" style=filled fillcolor=olivedrab3];
10
+
11
+ user_submission [label="{User Submission Interface | rendered HTML form }"];
12
+ batch_submission [label="{Batch Submission Interface | machine readable file }"];
13
+ sip_request [label="{GET SIP by PID}"]
14
+ aip_request [label="{GET AIP by PID}"]
15
+ dip_request [label="{GET DIP by PID}"]
16
+ search_interface [label="{GET SEARCH}"]
17
+ work_viewer [label="{Representation of Work | by content type (i.e. HTML, JSON)}"]
18
+ search_response [label="{Representation of Search | by content type (i.e. HTML, JSON)}"]
19
+ }
20
+
21
+ subgraph 1 {
22
+ label="Data Negotiation"
23
+ color="lightskyblue3";
24
+ node[color="grey" style=filled fillcolor=lightskyblue3]
25
+
26
+ submission_handler [label="{Submission Input Handler | validate input | mint PID | persist input | enqueue submission}"];
27
+ work_wrangler [label="{Work Wrangler | retrieve data from persistence | retrieval sequence (for :edit, :show, etc.)}"]
28
+
29
+ blacklight [label="{Blacklight}"]
30
+ work_wrangler_aip [label="{ActiveFedora}"]
31
+ work_wrangler_sip [label="{ActiveRecord}"]
32
+ rubydora [label="{Rubydora}"]
33
+ solrizer [label="{Solrizer}"]
34
+ work_renderer [label="{Work Renderer}"]
35
+ }
36
+
37
+ subgraph cluster_2 {
38
+ label="Queing System"
39
+ color="pink"
40
+ style="filled"
41
+ hydramata_queue_handler [fillcolor=pink label="{Hydramata Workflow}"]
42
+ hydramata_queue_handler ->
43
+ send_user_notifications ->
44
+ run_anti_virus ->
45
+ characterize_files ->
46
+ generate_derivatives ->
47
+ apply_rights_metadata ->
48
+ etc ->
49
+ ingest_sip
50
+ send_user_notifications
51
+ }
52
+
53
+ subgraph 3 {
54
+ label="Data Storage and Persistence"
55
+ node[color="grey"style=filled fillcolor=grey];
56
+ sip_data_storage [label="{ Database }"];
57
+ sip_file_storage [label="{ File System Workspace }"];
58
+ aip_data_storage [label="{ Fedora }"];
59
+ index_data_storage [label="{ SOLR }"];
60
+ }
61
+
62
+ submission_handler -> sip_data_storage [label="Persist SIP"]
63
+ sip_request -> work_wrangler
64
+ dip_request -> work_wrangler
65
+ aip_request -> work_wrangler
66
+
67
+ work_wrangler -> work_wrangler_sip [arrowhead="none" label="Exists in Database?"]
68
+ work_wrangler_sip -> sip_data_storage [arrowhead="both"]
69
+ work_wrangler -> work_wrangler_aip [arrowhead="none" label="Exists in Fedora or SOLR?"]
70
+ work_wrangler -> work_renderer [label="Well-formed Work object"]
71
+ work_renderer -> work_viewer [label="Negotiated content type (i.e. JSON, HTML, XML)"]
72
+
73
+ work_wrangler_aip -> rubydora [arrowhead="both"]
74
+ work_wrangler_aip -> solrizer [arrowhead="both"]
75
+ search_interface -> blacklight
76
+ blacklight -> index_data_storage
77
+ blacklight -> search_response
78
+ user_submission -> submission_handler [label="User submits a form"];
79
+ batch_submission -> submission_handler [label="Batch file ready to process"];
80
+ submission_handler -> sip_request [label="Response from Submission Input Handler"];
81
+ submission_handler -> hydramata_queue_handler [label="Enqueue PID and workflow ID"];
82
+ hydramata_queue_handler -> sip_data_storage [label="Update SIP data"]
83
+ sip_data_storage -> hydramata_queue_handler [label="Load SIP data"]
84
+ hydramata_queue_handler -> rubydora [label="Ingest (SIP -> AIP)"]
85
+ hydramata_queue_handler -> solrizer [label="Index (SIP -> AIP)"]
86
+ rubydora -> aip_data_storage
87
+ solrizer -> index_data_storage
88
+ }
@@ -0,0 +1,129 @@
1
+ digraph "G" {
2
+ label="Hydramata::Works Architecture"
3
+ compound=true;
4
+ node[color="grey15" style=filled fillcolor=white shape=oval penwidth=2 margin="0.15, 0.15"];
5
+
6
+ subgraph cluster_0 {
7
+ label="Datastores"
8
+ color="olivedrab3"
9
+ style="filled"
10
+ node[shape=record]
11
+ fedora3[fillcolor=orchid4]
12
+ database
13
+ fedora4[fillcolor=orchid2]
14
+ solr
15
+ }
16
+
17
+ subgraph cluster_1 {
18
+ label="Wranglers"
19
+ color="orange"
20
+ style="filled"
21
+ work_resolver
22
+ fedora3_wrangler[fillcolor=orchid4]
23
+ fedora4_wrangler[fillcolor=orchid2]
24
+ database_wrangler[label="database_wrangler*"]
25
+ solr_wrangler
26
+ fedora_work_type_finder
27
+ fedora_work_type_finder
28
+ solr_work_type_finder
29
+ database_work_type_finder
30
+ }
31
+
32
+ subgraph cluster_8 {
33
+ label="Parsers"
34
+ color="orange"
35
+ style="filled"
36
+
37
+ datastream_parsers
38
+ database_serialization_parsers[label="database_serialization_parsers*"]
39
+ solr_document_parsers
40
+ predicate_parsers
41
+ value_parsers
42
+ presentation_structure_builder
43
+ }
44
+
45
+ subgraph cluster_2 {
46
+ label="Data Structure Definition"
47
+ color="olivedrab3"
48
+ style="filled"
49
+ node[shape=record]
50
+
51
+ work_type -> predicate_set -> predicate
52
+ }
53
+
54
+
55
+ subgraph cluster_3 {
56
+ label="Datastore Persister"
57
+ color="orange"
58
+ style="filled"
59
+ fedora3_persister
60
+ fedora4_persister[fillcolor=orchid2]
61
+ database_persister[label="database_persister*"]
62
+ solr_persister
63
+ work_persister
64
+ }
65
+
66
+ subgraph cluster_4 {
67
+ label="In Memory"
68
+ color="lightblue"
69
+ style="filled"
70
+ node[shape=record]
71
+ work
72
+ property_set
73
+ property
74
+ value
75
+ }
76
+
77
+ subgraph cluster_5 {
78
+ label="Buffer Map"
79
+ color="orange"
80
+ style="filled"
81
+ }
82
+
83
+ subgraph cluster_6 {
84
+ label="Output Buffer"
85
+ color="firebrick2"
86
+ style="filled"
87
+ }
88
+
89
+ presentation_structure_builder -> property_set
90
+ database -> database_wrangler
91
+ database_persister -> database
92
+ database_serialization_parsers -> predicate_parsers
93
+ database_wrangler -> database_serialization_parsers
94
+ database_wrangler -> database_work_type_finder
95
+ datastream_parsers -> predicate_parsers
96
+ fedora3 -> fedora3_wrangler
97
+ fedora3_persister -> fedora3
98
+ fedora3_wrangler -> datastream_parsers
99
+ fedora3_wrangler -> fedora_work_type_finder
100
+ fedora_work_type_finder
101
+ fedora4 -> fedora4_wrangler
102
+ fedora4_persister -> fedora4
103
+ fedora4_wrangler -> datastream_parsers
104
+ fedora4_wrangler -> fedora_work_type_finder
105
+ predicate -> presentation_structure_builder
106
+ predicate_parsers -> property
107
+ predicate_parsers -> value_parsers
108
+ predicate_set -> presentation_structure_builder
109
+ property -> value
110
+ property_set -> property
111
+ solr -> solr_wrangler
112
+ solr_document_parsers -> predicate_parsers
113
+ solr_persister -> solr
114
+ solr_wrangler -> solr_document_parsers
115
+ solr_wrangler -> solr_work_type_finder
116
+ value_parsers -> value
117
+ work -> property_set
118
+ work -> work_persister
119
+ work_persister -> database_persister
120
+ work_persister -> fedora3_persister
121
+ work_persister -> fedora4_persister
122
+ work_persister -> solr_persister
123
+ work_resolver -> presentation_structure_builder
124
+ work_resolver -> database_wrangler
125
+ work_resolver -> fedora3_wrangler
126
+ work_resolver -> fedora4_wrangler
127
+ work_resolver -> solr_wrangler
128
+ work_resolver -> work
129
+ }
@@ -0,0 +1,36 @@
1
+ digraph "G" {
2
+ label="Hydramata Refactor"
3
+ compound=true;
4
+ node[color="grey15" fillcolor=white style=filled shape=record penwidth=2 margin="0.15, 0.125"];
5
+
6
+ subgraph cluster_1 {
7
+ label="Hydramata Base Definitions"
8
+ fillcolor=olivedrab3
9
+ style=filled
10
+ }
11
+
12
+ subgraph cluster_2 {
13
+ label="Hydramata::Works"
14
+ fillcolor=orange
15
+ style=filled
16
+ }
17
+
18
+ subgraph cluster_3 {
19
+ label="Hydramata::Worksflow"
20
+ fillcolor=lightblue
21
+ style=filled
22
+ }
23
+
24
+ subgraph cluster_4 {
25
+ label="Hydramata::Permissions"
26
+ fillcolor=firebrick2
27
+ style=filled
28
+ }
29
+
30
+ subgraph cluster_5 {
31
+ label="Hydramata::AdministrativeContext"
32
+ fillcolor=orchid3
33
+ style=filled
34
+ }
35
+
36
+ }
@@ -0,0 +1,44 @@
1
+ digraph "G" {
2
+ label="Map from Database to Work Object"
3
+ compound=true;
4
+ node[color="grey15" shape=record penwidth=2 margin="0.15, 0.125"];
5
+
6
+ subgraph 1 {
7
+ label="Records"
8
+ node[color="grey" style=filled fillcolor=olivedrab3];
9
+ database[label="Database"]
10
+ work[label="{ <f0> Work (in memory) | <f1> #pid | <f2> #work_type | <f3> #property_set }"]
11
+ }
12
+
13
+ subgraph cluster_0 {
14
+ label="Sequence for Transforming\nDatabase object to a Work"
15
+ color="orange"
16
+ style="filled"
17
+ node[style=filled fillcolor=white]
18
+ database_request_pid[label="Request PID"]
19
+ database_retrieve_object[label="Retrieve Object"]
20
+ database_instantiate_work[label="Instantiate Work"]
21
+ database_assign_work_type[label="Assign Work Type"]
22
+ database_parse_datastream[label="Parse Serialized data"]
23
+ database_for_each_property[label="For each Property"]
24
+ database_loop_for_each_property[label="More Properties" shape="diamond"]
25
+ database_push_property_to_work_property_set[label="Push Property to Work Property Set"]
26
+ return_work[label="Return Work object"]
27
+
28
+ database_request_pid -> database_retrieve_object
29
+ database_retrieve_object -> database_instantiate_work ->
30
+ database_instantiate_work -> database_assign_work_type
31
+ database_assign_work_type -> database_parse_datastream
32
+ database_parse_datastream -> database_for_each_property
33
+ database_for_each_property -> database_push_property_to_work_property_set
34
+ database_push_property_to_work_property_set -> database_loop_for_each_property
35
+ database_loop_for_each_property -> database_for_each_property [label="NEXT"]
36
+ database_loop_for_each_property -> return_work [label="NO"]
37
+ }
38
+
39
+ database_instantiate_work -> work[dir=both]
40
+ database_assign_work_type -> work:f2
41
+ database_retrieve_object -> database[dir=both]
42
+ database_push_property_to_work_property_set -> work:f3
43
+ work -> return_work
44
+ }