active-fedora 1.0.5 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (246) hide show
  1. data/.document +5 -0
  2. data/.gitignore +21 -0
  3. data/.hg/00changelog.i +0 -0
  4. data/.hg/branch +1 -0
  5. data/.hg/branch.cache +2 -0
  6. data/.hg/dirstate +0 -0
  7. data/.hg/hgrc +2 -0
  8. data/.hg/requires +2 -0
  9. data/.hg/store/00changelog.i +0 -0
  10. data/.hg/store/00manifest.i +0 -0
  11. data/.hg/store/data/.hgignore.i +0 -0
  12. data/.hg/store/data/.hgtags.i +0 -0
  13. data/.hg/store/data/_c_o_p_y_i_n_g.txt.i +0 -0
  14. data/.hg/store/data/_c_o_y_i_n_g._l_e_s_s_e_r.txt.i +0 -0
  15. data/.hg/store/data/_history.txt.i +0 -0
  16. data/.hg/store/data/_license.txt.i +0 -0
  17. data/.hg/store/data/_manifest.txt.i +0 -0
  18. data/.hg/store/data/_post_install.txt.i +0 -0
  19. data/.hg/store/data/_r_e_a_d_m_e.rdoc.i +0 -0
  20. data/.hg/store/data/_r_e_a_d_m_e.txt.i +0 -0
  21. data/.hg/store/data/_rakefile.i +0 -0
  22. data/.hg/store/data/_v_e_r_s_i_o_n.i +0 -0
  23. data/.hg/store/data/active-fedora.gemspec.i +0 -0
  24. data/.hg/store/data/active__fedora/_history.txt.i +0 -0
  25. data/.hg/store/data/active__fedora/_manifest.txt.i +0 -0
  26. data/.hg/store/data/active__fedora/_post_install.txt.i +0 -0
  27. data/.hg/store/data/active__fedora/_r_e_a_d_m_e.rdoc.i +0 -0
  28. data/.hg/store/data/active__fedora/_rakefile.i +0 -0
  29. data/.hg/store/data/active__fedora/lib/active__fedora.rb.i +0 -0
  30. data/.hg/store/data/active__fedora/script/console.i +0 -0
  31. data/.hg/store/data/active__fedora/script/destroy.i +0 -0
  32. data/.hg/store/data/active__fedora/script/generate.i +0 -0
  33. data/.hg/store/data/active__fedora/spec/active__fedora__spec.rb.i +0 -0
  34. data/.hg/store/data/active__fedora/spec/spec__helper.rb.i +0 -0
  35. data/.hg/store/data/config/fedora.yml.i +0 -0
  36. data/.hg/store/data/config/solr__mappings.yml.i +0 -0
  37. data/.hg/store/data/config/solr__mappings__af__0.1.yml.i +0 -0
  38. data/.hg/store/data/config/solr__mappings__bl__2.4.yml.i +0 -0
  39. data/.hg/store/data/lib/active-fedora.rb.i +0 -0
  40. data/.hg/store/data/lib/active__fedora.rb.i +0 -0
  41. data/.hg/store/data/lib/active__fedora/base.rb.i +0 -0
  42. data/.hg/store/data/lib/active__fedora/content__model.rb.i +0 -0
  43. data/.hg/store/data/lib/active__fedora/datastream.rb.i +0 -0
  44. data/.hg/store/data/lib/active__fedora/fedora__object.rb.i +0 -0
  45. data/.hg/store/data/lib/active__fedora/metadata__datastream.rb.i +0 -0
  46. data/.hg/store/data/lib/active__fedora/model.rb.i +0 -0
  47. data/.hg/store/data/lib/active__fedora/property.rb.i +0 -0
  48. data/.hg/store/data/lib/active__fedora/qualified__dublin__core__datastream.rb.i +0 -0
  49. data/.hg/store/data/lib/active__fedora/relationship.rb.i +0 -0
  50. data/.hg/store/data/lib/active__fedora/rels__ext__datastream.rb.i +0 -0
  51. data/.hg/store/data/lib/active__fedora/semantic__node.rb.i +0 -0
  52. data/.hg/store/data/lib/active__fedora/solr__mapper.rb.i +0 -0
  53. data/.hg/store/data/lib/active__fedora/solr__service.rb.i +0 -0
  54. data/.hg/store/data/lib/fedora/base.rb.i +0 -0
  55. data/.hg/store/data/lib/fedora/connection.rb.i +0 -0
  56. data/.hg/store/data/lib/fedora/datastream.rb.i +0 -0
  57. data/.hg/store/data/lib/fedora/fedora__object.rb.i +0 -0
  58. data/.hg/store/data/lib/fedora/formats.rb.i +0 -0
  59. data/.hg/store/data/lib/fedora/generic__search.rb.i +0 -0
  60. data/.hg/store/data/lib/fedora/repository.rb.i +0 -0
  61. data/.hg/store/data/lib/ruby-fedora.rb.i +0 -0
  62. data/.hg/store/data/lib/util/class__level__inheritable__attributes.rb.i +0 -0
  63. data/.hg/store/data/script/console.i +0 -0
  64. data/.hg/store/data/script/destroy.i +0 -0
  65. data/.hg/store/data/script/generate.i +0 -0
  66. data/.hg/store/data/solr/config/schema-1.5.xml.i +0 -0
  67. data/.hg/store/data/solr/config/schema.xml.i +0 -0
  68. data/.hg/store/data/solr/config/solrconfig-1.5.xml.i +0 -0
  69. data/.hg/store/data/spec/fixtures/changeme155.xml.i +0 -0
  70. data/.hg/store/data/spec/fixtures/dino.jpg.i +0 -0
  71. data/.hg/store/data/spec/fixtures/minivan.jpg.d +0 -0
  72. data/.hg/store/data/spec/fixtures/minivan.jpg.i +0 -0
  73. data/.hg/store/data/spec/fixtures/test__12.foxml.xml.i +0 -0
  74. data/.hg/store/data/spec/integration/active__fedora/base__spec.rb.i +0 -0
  75. data/.hg/store/data/spec/integration/active__fedora/datastream__spec.rb.i +0 -0
  76. data/.hg/store/data/spec/integration/active__fedora/fedora__object__spec.rb.i +0 -0
  77. data/.hg/store/data/spec/integration/active__fedora/full__featured__model__spec.rb.i +0 -0
  78. data/.hg/store/data/spec/integration/active__fedora/model__spec.rb.i +0 -0
  79. data/.hg/store/data/spec/integration/active__fedora/rels__ext__datastream__spec.rb.i +0 -0
  80. data/.hg/store/data/spec/integration/active__fedora/semantic__node__spec.rb.i +0 -0
  81. data/.hg/store/data/spec/integration/base__file__management__spec.rb.i +0 -0
  82. data/.hg/store/data/spec/integration/base__spec.rb.i +0 -0
  83. data/.hg/store/data/spec/integration/bug__spec.rb.i +0 -0
  84. data/.hg/store/data/spec/integration/datastream__spec.rb.i +0 -0
  85. data/.hg/store/data/spec/integration/datastreams__crud__spec.rb.i +0 -0
  86. data/.hg/store/data/spec/integration/fedora__object__spec.rb.i +0 -0
  87. data/.hg/store/data/spec/integration/full__featured__model__spec.rb.i +0 -0
  88. data/.hg/store/data/spec/integration/model__spec.rb.i +0 -0
  89. data/.hg/store/data/spec/integration/rels__ext__datastream__spec.rb.i +0 -0
  90. data/.hg/store/data/spec/integration/repository__spec.rb.i +0 -0
  91. data/.hg/store/data/spec/integration/rf__fedora__object__spec.rb.i +0 -0
  92. data/.hg/store/data/spec/integration/semantic__node__spec.rb.i +0 -0
  93. data/.hg/store/data/spec/integration/solr__service__spec.rb.i +0 -0
  94. data/.hg/store/data/spec/samples/models/audio__record.rb.i +0 -0
  95. data/.hg/store/data/spec/samples/models/image.rb.i +0 -0
  96. data/.hg/store/data/spec/samples/models/oral__history.rb.i +0 -0
  97. data/.hg/store/data/spec/samples/models/seminar.rb.i +0 -0
  98. data/.hg/store/data/spec/samples/models/seminar__audio__file.rb.i +0 -0
  99. data/.hg/store/data/spec/samples/oh__qdc.xml.i +0 -0
  100. data/.hg/store/data/spec/samples/oral__history.rb.i +0 -0
  101. data/.hg/store/data/spec/samples/oral__history__sample.xml.i +0 -0
  102. data/.hg/store/data/spec/samples/oral__history__sample__model.rb.i +0 -0
  103. data/.hg/store/data/spec/samples/oral__history__xml.xml.i +0 -0
  104. data/.hg/store/data/spec/spec.opts.i +0 -0
  105. data/.hg/store/data/spec/spec__helper.rb.i +0 -0
  106. data/.hg/store/data/spec/unit/active__fedora/base__cma__spec.rb.i +0 -0
  107. data/.hg/store/data/spec/unit/active__fedora/base__extra__spec.rb.i +0 -0
  108. data/.hg/store/data/spec/unit/active__fedora/base__spec.rb.i +0 -0
  109. data/.hg/store/data/spec/unit/active__fedora/content__model__spec.rb.i +0 -0
  110. data/.hg/store/data/spec/unit/active__fedora/datastream__spec.rb.i +0 -0
  111. data/.hg/store/data/spec/unit/active__fedora/inheritance__spec.rb.i +0 -0
  112. data/.hg/store/data/spec/unit/active__fedora/metadata__datastream__spec.rb.i +0 -0
  113. data/.hg/store/data/spec/unit/active__fedora/model__spec.rb.i +0 -0
  114. data/.hg/store/data/spec/unit/active__fedora/property__spec.rb.i +0 -0
  115. data/.hg/store/data/spec/unit/active__fedora/qualified__dublin__core__datastream__spec.rb.i +0 -0
  116. data/.hg/store/data/spec/unit/active__fedora/relationship__spec.rb.i +0 -0
  117. data/.hg/store/data/spec/unit/active__fedora/rels__ext__datastream__spec.rb.i +0 -0
  118. data/.hg/store/data/spec/unit/active__fedora/semantic__node__spec.rb.i +0 -0
  119. data/.hg/store/data/spec/unit/active__fedora/solr__service__spec.rb.i +0 -0
  120. data/.hg/store/data/spec/unit/active__fedora__spec.rb.i +0 -0
  121. data/.hg/store/data/spec/unit/base__cma__spec.rb.i +0 -0
  122. data/.hg/store/data/spec/unit/base__datastream__management__spec.rb.i +0 -0
  123. data/.hg/store/data/spec/unit/base__extra__spec.rb.i +0 -0
  124. data/.hg/store/data/spec/unit/base__file__management__spec.rb.i +0 -0
  125. data/.hg/store/data/spec/unit/base__loader__spec.rb.i +0 -0
  126. data/.hg/store/data/spec/unit/base__spec.rb.i +0 -0
  127. data/.hg/store/data/spec/unit/connection__spec.rb.i +0 -0
  128. data/.hg/store/data/spec/unit/content__model__spec.rb.i +0 -0
  129. data/.hg/store/data/spec/unit/datastream__concurrency__spec.rb.i +0 -0
  130. data/.hg/store/data/spec/unit/datastream__spec.rb.i +0 -0
  131. data/.hg/store/data/spec/unit/fedora__object__spec.rb.i +0 -0
  132. data/.hg/store/data/spec/unit/inheritance__spec.rb.i +0 -0
  133. data/.hg/store/data/spec/unit/metadata__datastream__spec.rb.i +0 -0
  134. data/.hg/store/data/spec/unit/model__spec.rb.i +0 -0
  135. data/.hg/store/data/spec/unit/property__spec.rb.i +0 -0
  136. data/.hg/store/data/spec/unit/qualified__dublin__core__datastream__spec.rb.i +0 -0
  137. data/.hg/store/data/spec/unit/relationship__spec.rb.i +0 -0
  138. data/.hg/store/data/spec/unit/rels__ext__datastream__spec.rb.i +0 -0
  139. data/.hg/store/data/spec/unit/repository__spec.rb.i +0 -0
  140. data/.hg/store/data/spec/unit/rf__datastream__spec.rb.i +0 -0
  141. data/.hg/store/data/spec/unit/semantic__node__spec.rb.i +0 -0
  142. data/.hg/store/data/spec/unit/solr__config__options__spec.rb.i +0 -0
  143. data/.hg/store/data/spec/unit/solr__mapper__spec.rb.i +0 -0
  144. data/.hg/store/data/spec/unit/solr__service__spec.rb.i +0 -0
  145. data/.hg/store/data/tasks/rspec.rake.i +0 -0
  146. data/.hg/store/undo +0 -0
  147. data/.hg/undo.branch +1 -0
  148. data/.hg/undo.dirstate +0 -0
  149. data/.hgignore +7 -0
  150. data/.hgtags +14 -0
  151. data/COPYING.txt +674 -0
  152. data/COYING.LESSER.txt +165 -0
  153. data/History.txt +34 -0
  154. data/LICENSE +20 -0
  155. data/License.txt +58 -0
  156. data/Manifest.txt +1 -1
  157. data/README.rdoc +13 -54
  158. data/README.txt +59 -0
  159. data/Rakefile +35 -0
  160. data/VERSION +1 -0
  161. data/active-fedora.gemspec +359 -0
  162. data/config/fedora.yml +16 -0
  163. data/config/solr_mappings.yml +14 -0
  164. data/config/solr_mappings_af_0.1.yml +16 -0
  165. data/config/solr_mappings_bl_2.4.yml +14 -0
  166. data/lib/active_fedora.rb +66 -6
  167. data/lib/active_fedora/base.rb +59 -23
  168. data/lib/active_fedora/datastream.rb +1 -1
  169. data/lib/active_fedora/metadata_datastream.rb +14 -7
  170. data/lib/active_fedora/model.rb +4 -4
  171. data/lib/active_fedora/rels_ext_datastream.rb +1 -1
  172. data/lib/active_fedora/semantic_node.rb +4 -3
  173. data/lib/active_fedora/solr_mapper.rb +17 -0
  174. data/lib/active_fedora/solr_service.rb +44 -2
  175. data/lib/fedora/base.rb +38 -0
  176. data/lib/fedora/connection.rb +210 -0
  177. data/lib/fedora/datastream.rb +56 -0
  178. data/lib/fedora/fedora_object.rb +161 -0
  179. data/lib/fedora/formats.rb +30 -0
  180. data/lib/fedora/generic_search.rb +71 -0
  181. data/lib/fedora/repository.rb +287 -0
  182. data/lib/ruby-fedora.rb +20 -0
  183. data/lib/util/class_level_inheritable_attributes.rb +23 -0
  184. data/script/console +15 -0
  185. data/script/destroy +14 -0
  186. data/script/generate +14 -0
  187. data/solr/config/schema-1.5.xml +468 -0
  188. data/solr/config/schema.xml +174 -212
  189. data/solr/config/solrconfig-1.5.xml +1069 -0
  190. data/spec/active_fedora_spec.rb +7 -0
  191. data/spec/fixtures/changeme155.xml +255 -0
  192. data/spec/fixtures/dino.jpg +0 -0
  193. data/spec/fixtures/minivan.jpg +0 -0
  194. data/spec/fixtures/test_12.foxml.xml +121 -0
  195. data/spec/integration/base_file_management_spec.rb +20 -0
  196. data/spec/integration/base_spec.rb +196 -0
  197. data/spec/integration/bug_spec.rb +57 -0
  198. data/spec/integration/datastream_spec.rb +60 -0
  199. data/spec/integration/datastreams_crud_spec.rb +208 -0
  200. data/spec/integration/fedora_object_spec.rb +77 -0
  201. data/spec/integration/full_featured_model_spec.rb +207 -0
  202. data/spec/integration/model_spec.rb +54 -0
  203. data/spec/integration/rels_ext_datastream_spec.rb +67 -0
  204. data/spec/integration/repository_spec.rb +297 -0
  205. data/spec/integration/rf_fedora_object_spec.rb +95 -0
  206. data/spec/integration/semantic_node_spec.rb +95 -0
  207. data/spec/integration/solr_service_spec.rb +33 -0
  208. data/spec/samples/models/audio_record.rb +29 -0
  209. data/spec/samples/models/image.rb +5 -0
  210. data/spec/samples/models/oral_history.rb +50 -0
  211. data/spec/samples/models/seminar.rb +29 -0
  212. data/spec/samples/models/seminar_audio_file.rb +34 -0
  213. data/spec/samples/oh_qdc.xml +32 -0
  214. data/spec/samples/oral_history_sample.xml +38 -0
  215. data/spec/samples/oral_history_sample_model.rb +39 -0
  216. data/spec/samples/oral_history_xml.xml +35 -0
  217. data/spec/spec.opts +5 -0
  218. data/spec/spec_helper.rb +41 -0
  219. data/spec/unit/active_fedora_spec.rb +15 -0
  220. data/spec/unit/base_cma_spec.rb +25 -0
  221. data/spec/unit/base_datastream_management_spec.rb +119 -0
  222. data/spec/unit/base_extra_spec.rb +108 -0
  223. data/spec/unit/base_file_management_spec.rb +90 -0
  224. data/spec/unit/base_loader_spec.rb +43 -0
  225. data/spec/unit/base_spec.rb +584 -0
  226. data/spec/unit/connection_spec.rb +25 -0
  227. data/spec/unit/content_model_spec.rb +51 -0
  228. data/spec/unit/datastream_concurrency_spec.rb +59 -0
  229. data/spec/unit/datastream_spec.rb +85 -0
  230. data/spec/unit/fedora_object_spec.rb +66 -0
  231. data/spec/unit/inheritance_spec.rb +46 -0
  232. data/spec/unit/metadata_datastream_spec.rb +290 -0
  233. data/spec/unit/model_spec.rb +186 -0
  234. data/spec/unit/property_spec.rb +50 -0
  235. data/spec/unit/qualified_dublin_core_datastream_spec.rb +177 -0
  236. data/spec/unit/relationship_spec.rb +77 -0
  237. data/spec/unit/rels_ext_datastream_spec.rb +99 -0
  238. data/spec/unit/repository_spec.rb +136 -0
  239. data/spec/unit/rf_datastream_spec.rb +49 -0
  240. data/spec/unit/semantic_node_spec.rb +354 -0
  241. data/spec/unit/solr_config_options_spec.rb +98 -0
  242. data/spec/unit/solr_mapper_spec.rb +31 -0
  243. data/spec/unit/solr_service_spec.rb +83 -0
  244. data/tasks/hoe.rake +0 -0
  245. data/tasks/rspec.rake +29 -0
  246. metadata +373 -55
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.1.0
@@ -0,0 +1,359 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{active-fedora}
8
+ s.version = "1.1.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Matt Zumwalt", "McClain Looney"]
12
+ s.date = %q{2010-03-21}
13
+ s.description = %q{ActiveFedora provides for creating and managing objects in the Fedora Repository Architecture.}
14
+ s.email = %q{matt.zumwalt@yourmediashelf.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.rdoc",
18
+ "README.txt"
19
+ ]
20
+ s.files = [
21
+ ".document",
22
+ ".gitignore",
23
+ ".hg/00changelog.i",
24
+ ".hg/branch",
25
+ ".hg/branch.cache",
26
+ ".hg/dirstate",
27
+ ".hg/hgrc",
28
+ ".hg/requires",
29
+ ".hg/store/00changelog.i",
30
+ ".hg/store/00manifest.i",
31
+ ".hg/store/data/.hgignore.i",
32
+ ".hg/store/data/.hgtags.i",
33
+ ".hg/store/data/_c_o_p_y_i_n_g.txt.i",
34
+ ".hg/store/data/_c_o_y_i_n_g._l_e_s_s_e_r.txt.i",
35
+ ".hg/store/data/_history.txt.i",
36
+ ".hg/store/data/_license.txt.i",
37
+ ".hg/store/data/_manifest.txt.i",
38
+ ".hg/store/data/_post_install.txt.i",
39
+ ".hg/store/data/_r_e_a_d_m_e.rdoc.i",
40
+ ".hg/store/data/_r_e_a_d_m_e.txt.i",
41
+ ".hg/store/data/_rakefile.i",
42
+ ".hg/store/data/_v_e_r_s_i_o_n.i",
43
+ ".hg/store/data/active-fedora.gemspec.i",
44
+ ".hg/store/data/active__fedora/_history.txt.i",
45
+ ".hg/store/data/active__fedora/_manifest.txt.i",
46
+ ".hg/store/data/active__fedora/_post_install.txt.i",
47
+ ".hg/store/data/active__fedora/_r_e_a_d_m_e.rdoc.i",
48
+ ".hg/store/data/active__fedora/_rakefile.i",
49
+ ".hg/store/data/active__fedora/lib/active__fedora.rb.i",
50
+ ".hg/store/data/active__fedora/script/console.i",
51
+ ".hg/store/data/active__fedora/script/destroy.i",
52
+ ".hg/store/data/active__fedora/script/generate.i",
53
+ ".hg/store/data/active__fedora/spec/active__fedora__spec.rb.i",
54
+ ".hg/store/data/active__fedora/spec/spec__helper.rb.i",
55
+ ".hg/store/data/config/fedora.yml.i",
56
+ ".hg/store/data/config/solr__mappings.yml.i",
57
+ ".hg/store/data/config/solr__mappings__af__0.1.yml.i",
58
+ ".hg/store/data/config/solr__mappings__bl__2.4.yml.i",
59
+ ".hg/store/data/lib/active-fedora.rb.i",
60
+ ".hg/store/data/lib/active__fedora.rb.i",
61
+ ".hg/store/data/lib/active__fedora/base.rb.i",
62
+ ".hg/store/data/lib/active__fedora/content__model.rb.i",
63
+ ".hg/store/data/lib/active__fedora/datastream.rb.i",
64
+ ".hg/store/data/lib/active__fedora/fedora__object.rb.i",
65
+ ".hg/store/data/lib/active__fedora/metadata__datastream.rb.i",
66
+ ".hg/store/data/lib/active__fedora/model.rb.i",
67
+ ".hg/store/data/lib/active__fedora/property.rb.i",
68
+ ".hg/store/data/lib/active__fedora/qualified__dublin__core__datastream.rb.i",
69
+ ".hg/store/data/lib/active__fedora/relationship.rb.i",
70
+ ".hg/store/data/lib/active__fedora/rels__ext__datastream.rb.i",
71
+ ".hg/store/data/lib/active__fedora/semantic__node.rb.i",
72
+ ".hg/store/data/lib/active__fedora/solr__mapper.rb.i",
73
+ ".hg/store/data/lib/active__fedora/solr__service.rb.i",
74
+ ".hg/store/data/lib/fedora/base.rb.i",
75
+ ".hg/store/data/lib/fedora/connection.rb.i",
76
+ ".hg/store/data/lib/fedora/datastream.rb.i",
77
+ ".hg/store/data/lib/fedora/fedora__object.rb.i",
78
+ ".hg/store/data/lib/fedora/formats.rb.i",
79
+ ".hg/store/data/lib/fedora/generic__search.rb.i",
80
+ ".hg/store/data/lib/fedora/repository.rb.i",
81
+ ".hg/store/data/lib/ruby-fedora.rb.i",
82
+ ".hg/store/data/lib/util/class__level__inheritable__attributes.rb.i",
83
+ ".hg/store/data/script/console.i",
84
+ ".hg/store/data/script/destroy.i",
85
+ ".hg/store/data/script/generate.i",
86
+ ".hg/store/data/solr/config/schema-1.5.xml.i",
87
+ ".hg/store/data/solr/config/schema.xml.i",
88
+ ".hg/store/data/solr/config/solrconfig-1.5.xml.i",
89
+ ".hg/store/data/spec/fixtures/changeme155.xml.i",
90
+ ".hg/store/data/spec/fixtures/dino.jpg.i",
91
+ ".hg/store/data/spec/fixtures/minivan.jpg.d",
92
+ ".hg/store/data/spec/fixtures/minivan.jpg.i",
93
+ ".hg/store/data/spec/fixtures/test__12.foxml.xml.i",
94
+ ".hg/store/data/spec/integration/active__fedora/base__spec.rb.i",
95
+ ".hg/store/data/spec/integration/active__fedora/datastream__spec.rb.i",
96
+ ".hg/store/data/spec/integration/active__fedora/fedora__object__spec.rb.i",
97
+ ".hg/store/data/spec/integration/active__fedora/full__featured__model__spec.rb.i",
98
+ ".hg/store/data/spec/integration/active__fedora/model__spec.rb.i",
99
+ ".hg/store/data/spec/integration/active__fedora/rels__ext__datastream__spec.rb.i",
100
+ ".hg/store/data/spec/integration/active__fedora/semantic__node__spec.rb.i",
101
+ ".hg/store/data/spec/integration/base__file__management__spec.rb.i",
102
+ ".hg/store/data/spec/integration/base__spec.rb.i",
103
+ ".hg/store/data/spec/integration/bug__spec.rb.i",
104
+ ".hg/store/data/spec/integration/datastream__spec.rb.i",
105
+ ".hg/store/data/spec/integration/datastreams__crud__spec.rb.i",
106
+ ".hg/store/data/spec/integration/fedora__object__spec.rb.i",
107
+ ".hg/store/data/spec/integration/full__featured__model__spec.rb.i",
108
+ ".hg/store/data/spec/integration/model__spec.rb.i",
109
+ ".hg/store/data/spec/integration/rels__ext__datastream__spec.rb.i",
110
+ ".hg/store/data/spec/integration/repository__spec.rb.i",
111
+ ".hg/store/data/spec/integration/rf__fedora__object__spec.rb.i",
112
+ ".hg/store/data/spec/integration/semantic__node__spec.rb.i",
113
+ ".hg/store/data/spec/integration/solr__service__spec.rb.i",
114
+ ".hg/store/data/spec/samples/models/audio__record.rb.i",
115
+ ".hg/store/data/spec/samples/models/image.rb.i",
116
+ ".hg/store/data/spec/samples/models/oral__history.rb.i",
117
+ ".hg/store/data/spec/samples/models/seminar.rb.i",
118
+ ".hg/store/data/spec/samples/models/seminar__audio__file.rb.i",
119
+ ".hg/store/data/spec/samples/oh__qdc.xml.i",
120
+ ".hg/store/data/spec/samples/oral__history.rb.i",
121
+ ".hg/store/data/spec/samples/oral__history__sample.xml.i",
122
+ ".hg/store/data/spec/samples/oral__history__sample__model.rb.i",
123
+ ".hg/store/data/spec/samples/oral__history__xml.xml.i",
124
+ ".hg/store/data/spec/spec.opts.i",
125
+ ".hg/store/data/spec/spec__helper.rb.i",
126
+ ".hg/store/data/spec/unit/active__fedora/base__cma__spec.rb.i",
127
+ ".hg/store/data/spec/unit/active__fedora/base__extra__spec.rb.i",
128
+ ".hg/store/data/spec/unit/active__fedora/base__spec.rb.i",
129
+ ".hg/store/data/spec/unit/active__fedora/content__model__spec.rb.i",
130
+ ".hg/store/data/spec/unit/active__fedora/datastream__spec.rb.i",
131
+ ".hg/store/data/spec/unit/active__fedora/inheritance__spec.rb.i",
132
+ ".hg/store/data/spec/unit/active__fedora/metadata__datastream__spec.rb.i",
133
+ ".hg/store/data/spec/unit/active__fedora/model__spec.rb.i",
134
+ ".hg/store/data/spec/unit/active__fedora/property__spec.rb.i",
135
+ ".hg/store/data/spec/unit/active__fedora/qualified__dublin__core__datastream__spec.rb.i",
136
+ ".hg/store/data/spec/unit/active__fedora/relationship__spec.rb.i",
137
+ ".hg/store/data/spec/unit/active__fedora/rels__ext__datastream__spec.rb.i",
138
+ ".hg/store/data/spec/unit/active__fedora/semantic__node__spec.rb.i",
139
+ ".hg/store/data/spec/unit/active__fedora/solr__service__spec.rb.i",
140
+ ".hg/store/data/spec/unit/active__fedora__spec.rb.i",
141
+ ".hg/store/data/spec/unit/base__cma__spec.rb.i",
142
+ ".hg/store/data/spec/unit/base__datastream__management__spec.rb.i",
143
+ ".hg/store/data/spec/unit/base__extra__spec.rb.i",
144
+ ".hg/store/data/spec/unit/base__file__management__spec.rb.i",
145
+ ".hg/store/data/spec/unit/base__loader__spec.rb.i",
146
+ ".hg/store/data/spec/unit/base__spec.rb.i",
147
+ ".hg/store/data/spec/unit/connection__spec.rb.i",
148
+ ".hg/store/data/spec/unit/content__model__spec.rb.i",
149
+ ".hg/store/data/spec/unit/datastream__concurrency__spec.rb.i",
150
+ ".hg/store/data/spec/unit/datastream__spec.rb.i",
151
+ ".hg/store/data/spec/unit/fedora__object__spec.rb.i",
152
+ ".hg/store/data/spec/unit/inheritance__spec.rb.i",
153
+ ".hg/store/data/spec/unit/metadata__datastream__spec.rb.i",
154
+ ".hg/store/data/spec/unit/model__spec.rb.i",
155
+ ".hg/store/data/spec/unit/property__spec.rb.i",
156
+ ".hg/store/data/spec/unit/qualified__dublin__core__datastream__spec.rb.i",
157
+ ".hg/store/data/spec/unit/relationship__spec.rb.i",
158
+ ".hg/store/data/spec/unit/rels__ext__datastream__spec.rb.i",
159
+ ".hg/store/data/spec/unit/repository__spec.rb.i",
160
+ ".hg/store/data/spec/unit/rf__datastream__spec.rb.i",
161
+ ".hg/store/data/spec/unit/semantic__node__spec.rb.i",
162
+ ".hg/store/data/spec/unit/solr__config__options__spec.rb.i",
163
+ ".hg/store/data/spec/unit/solr__mapper__spec.rb.i",
164
+ ".hg/store/data/spec/unit/solr__service__spec.rb.i",
165
+ ".hg/store/data/tasks/rspec.rake.i",
166
+ ".hg/store/undo",
167
+ ".hg/undo.branch",
168
+ ".hg/undo.dirstate",
169
+ ".hgignore",
170
+ ".hgtags",
171
+ "COPYING.txt",
172
+ "COYING.LESSER.txt",
173
+ "History.txt",
174
+ "LICENSE",
175
+ "License.txt",
176
+ "Manifest.txt",
177
+ "PostInstall.txt",
178
+ "README.rdoc",
179
+ "README.txt",
180
+ "Rakefile",
181
+ "VERSION",
182
+ "active-fedora.gemspec",
183
+ "config/fedora.yml",
184
+ "config/solr_mappings.yml",
185
+ "config/solr_mappings_af_0.1.yml",
186
+ "config/solr_mappings_bl_2.4.yml",
187
+ "lib/active-fedora.rb",
188
+ "lib/active_fedora.rb",
189
+ "lib/active_fedora/base.rb",
190
+ "lib/active_fedora/content_model.rb",
191
+ "lib/active_fedora/datastream.rb",
192
+ "lib/active_fedora/fedora_object.rb",
193
+ "lib/active_fedora/metadata_datastream.rb",
194
+ "lib/active_fedora/model.rb",
195
+ "lib/active_fedora/property.rb",
196
+ "lib/active_fedora/qualified_dublin_core_datastream.rb",
197
+ "lib/active_fedora/relationship.rb",
198
+ "lib/active_fedora/rels_ext_datastream.rb",
199
+ "lib/active_fedora/semantic_node.rb",
200
+ "lib/active_fedora/solr_mapper.rb",
201
+ "lib/active_fedora/solr_service.rb",
202
+ "lib/fedora/base.rb",
203
+ "lib/fedora/connection.rb",
204
+ "lib/fedora/datastream.rb",
205
+ "lib/fedora/fedora_object.rb",
206
+ "lib/fedora/formats.rb",
207
+ "lib/fedora/generic_search.rb",
208
+ "lib/fedora/repository.rb",
209
+ "lib/ruby-fedora.rb",
210
+ "lib/util/class_level_inheritable_attributes.rb",
211
+ "script/console",
212
+ "script/destroy",
213
+ "script/generate",
214
+ "solr/config/schema-1.5.xml",
215
+ "solr/config/schema.xml",
216
+ "solr/config/solrconfig-1.5.xml",
217
+ "spec/active_fedora_spec.rb",
218
+ "spec/fixtures/changeme155.xml",
219
+ "spec/fixtures/dino.jpg",
220
+ "spec/fixtures/minivan.jpg",
221
+ "spec/fixtures/test_12.foxml.xml",
222
+ "spec/integration/base_file_management_spec.rb",
223
+ "spec/integration/base_spec.rb",
224
+ "spec/integration/bug_spec.rb",
225
+ "spec/integration/datastream_spec.rb",
226
+ "spec/integration/datastreams_crud_spec.rb",
227
+ "spec/integration/fedora_object_spec.rb",
228
+ "spec/integration/full_featured_model_spec.rb",
229
+ "spec/integration/model_spec.rb",
230
+ "spec/integration/rels_ext_datastream_spec.rb",
231
+ "spec/integration/repository_spec.rb",
232
+ "spec/integration/rf_fedora_object_spec.rb",
233
+ "spec/integration/semantic_node_spec.rb",
234
+ "spec/integration/solr_service_spec.rb",
235
+ "spec/samples/models/audio_record.rb",
236
+ "spec/samples/models/image.rb",
237
+ "spec/samples/models/oral_history.rb",
238
+ "spec/samples/models/seminar.rb",
239
+ "spec/samples/models/seminar_audio_file.rb",
240
+ "spec/samples/oh_qdc.xml",
241
+ "spec/samples/oral_history_sample.xml",
242
+ "spec/samples/oral_history_sample_model.rb",
243
+ "spec/samples/oral_history_xml.xml",
244
+ "spec/spec.opts",
245
+ "spec/spec_helper.rb",
246
+ "spec/unit/active_fedora_spec.rb",
247
+ "spec/unit/base_cma_spec.rb",
248
+ "spec/unit/base_datastream_management_spec.rb",
249
+ "spec/unit/base_extra_spec.rb",
250
+ "spec/unit/base_file_management_spec.rb",
251
+ "spec/unit/base_loader_spec.rb",
252
+ "spec/unit/base_spec.rb",
253
+ "spec/unit/connection_spec.rb",
254
+ "spec/unit/content_model_spec.rb",
255
+ "spec/unit/datastream_concurrency_spec.rb",
256
+ "spec/unit/datastream_spec.rb",
257
+ "spec/unit/fedora_object_spec.rb",
258
+ "spec/unit/inheritance_spec.rb",
259
+ "spec/unit/metadata_datastream_spec.rb",
260
+ "spec/unit/model_spec.rb",
261
+ "spec/unit/property_spec.rb",
262
+ "spec/unit/qualified_dublin_core_datastream_spec.rb",
263
+ "spec/unit/relationship_spec.rb",
264
+ "spec/unit/rels_ext_datastream_spec.rb",
265
+ "spec/unit/repository_spec.rb",
266
+ "spec/unit/rf_datastream_spec.rb",
267
+ "spec/unit/semantic_node_spec.rb",
268
+ "spec/unit/solr_config_options_spec.rb",
269
+ "spec/unit/solr_mapper_spec.rb",
270
+ "spec/unit/solr_service_spec.rb",
271
+ "tasks/hoe.rake",
272
+ "tasks/rspec.rake"
273
+ ]
274
+ s.homepage = %q{http://yourmediashelf.com/activefedora}
275
+ s.rdoc_options = ["--charset=UTF-8"]
276
+ s.require_paths = ["lib"]
277
+ s.rubygems_version = %q{1.3.6}
278
+ s.summary = %q{A convenience libary for manipulating MODS (Metadata Object Description Schema) documents.}
279
+ s.test_files = [
280
+ "spec/active_fedora_spec.rb",
281
+ "spec/integration/base_file_management_spec.rb",
282
+ "spec/integration/base_spec.rb",
283
+ "spec/integration/bug_spec.rb",
284
+ "spec/integration/datastream_spec.rb",
285
+ "spec/integration/datastreams_crud_spec.rb",
286
+ "spec/integration/fedora_object_spec.rb",
287
+ "spec/integration/full_featured_model_spec.rb",
288
+ "spec/integration/model_spec.rb",
289
+ "spec/integration/rels_ext_datastream_spec.rb",
290
+ "spec/integration/repository_spec.rb",
291
+ "spec/integration/rf_fedora_object_spec.rb",
292
+ "spec/integration/semantic_node_spec.rb",
293
+ "spec/integration/solr_service_spec.rb",
294
+ "spec/samples/models/audio_record.rb",
295
+ "spec/samples/models/image.rb",
296
+ "spec/samples/models/oral_history.rb",
297
+ "spec/samples/models/seminar.rb",
298
+ "spec/samples/models/seminar_audio_file.rb",
299
+ "spec/samples/oral_history_sample_model.rb",
300
+ "spec/spec_helper.rb",
301
+ "spec/unit/active_fedora_spec.rb",
302
+ "spec/unit/base_cma_spec.rb",
303
+ "spec/unit/base_datastream_management_spec.rb",
304
+ "spec/unit/base_extra_spec.rb",
305
+ "spec/unit/base_file_management_spec.rb",
306
+ "spec/unit/base_loader_spec.rb",
307
+ "spec/unit/base_spec.rb",
308
+ "spec/unit/connection_spec.rb",
309
+ "spec/unit/content_model_spec.rb",
310
+ "spec/unit/datastream_concurrency_spec.rb",
311
+ "spec/unit/datastream_spec.rb",
312
+ "spec/unit/fedora_object_spec.rb",
313
+ "spec/unit/inheritance_spec.rb",
314
+ "spec/unit/metadata_datastream_spec.rb",
315
+ "spec/unit/model_spec.rb",
316
+ "spec/unit/property_spec.rb",
317
+ "spec/unit/qualified_dublin_core_datastream_spec.rb",
318
+ "spec/unit/relationship_spec.rb",
319
+ "spec/unit/rels_ext_datastream_spec.rb",
320
+ "spec/unit/repository_spec.rb",
321
+ "spec/unit/rf_datastream_spec.rb",
322
+ "spec/unit/semantic_node_spec.rb",
323
+ "spec/unit/solr_config_options_spec.rb",
324
+ "spec/unit/solr_mapper_spec.rb",
325
+ "spec/unit/solr_service_spec.rb"
326
+ ]
327
+
328
+ if s.respond_to? :specification_version then
329
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
330
+ s.specification_version = 3
331
+
332
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
333
+ s.add_runtime_dependency(%q<solr-ruby>, [">= 0.0.6"])
334
+ s.add_runtime_dependency(%q<xml-simple>, [">= 1.0.12"])
335
+ s.add_runtime_dependency(%q<mime-types>, [">= 1.16"])
336
+ s.add_runtime_dependency(%q<multipart-post>, [">= 0"])
337
+ s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
338
+ s.add_development_dependency(%q<mocha>, [">= 1.2.9"])
339
+ s.add_development_dependency(%q<ruby-debug>, [">= 0"])
340
+ else
341
+ s.add_dependency(%q<solr-ruby>, [">= 0.0.6"])
342
+ s.add_dependency(%q<xml-simple>, [">= 1.0.12"])
343
+ s.add_dependency(%q<mime-types>, [">= 1.16"])
344
+ s.add_dependency(%q<multipart-post>, [">= 0"])
345
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
346
+ s.add_dependency(%q<mocha>, [">= 1.2.9"])
347
+ s.add_dependency(%q<ruby-debug>, [">= 0"])
348
+ end
349
+ else
350
+ s.add_dependency(%q<solr-ruby>, [">= 0.0.6"])
351
+ s.add_dependency(%q<xml-simple>, [">= 1.0.12"])
352
+ s.add_dependency(%q<mime-types>, [">= 1.16"])
353
+ s.add_dependency(%q<multipart-post>, [">= 0"])
354
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
355
+ s.add_dependency(%q<mocha>, [">= 1.2.9"])
356
+ s.add_dependency(%q<ruby-debug>, [">= 0"])
357
+ end
358
+ end
359
+
@@ -0,0 +1,16 @@
1
+ development:
2
+ fedora:
3
+ url: http://fedoraAdmin:fedoraAdmin@127.0.0.1:8080/fedora
4
+ solr:
5
+ url: http://127.0.0.1:8080/solr
6
+ test:
7
+ fedora:
8
+ url: http://fedoraAdmin:fedoraAdmin@127.0.0.1:8080/fedora
9
+ solr:
10
+ url: http://127.0.0.1:8080/solr
11
+ production:
12
+ fedora:
13
+ url: http://fedoraAdmin:fedoraAdmin@127.0.0.1:8080/fedora
14
+ solr:
15
+ url: http://sulwebappdev1.stanford.edu:8100/salt_solr
16
+
@@ -0,0 +1,14 @@
1
+ id: id
2
+ date: _dt
3
+ string: _t
4
+ text: _t
5
+ symbol: _s
6
+ integer: _i
7
+ long: _l
8
+ boolean: _b
9
+ float: _f
10
+ double: _d
11
+ facet: _facet
12
+ display: _display
13
+ sort: _sort
14
+ unstemmed_search: _unstem_search
@@ -0,0 +1,16 @@
1
+ id: id
2
+ date: _date
3
+ string: _field
4
+ text: _field
5
+ symbol: _field
6
+ integer: _field
7
+ long: _field
8
+ boolean: _field
9
+ float: _field
10
+ double: _field
11
+ facet: _facet
12
+ display: _display
13
+ sort: _sort
14
+ unstemmed_search: _unstem_search
15
+
16
+
@@ -0,0 +1,14 @@
1
+ id: id
2
+ date: _dt
3
+ string: _t
4
+ text: _t
5
+ symbol: _s
6
+ integer: _i
7
+ long: _l
8
+ boolean: _b
9
+ float: _f
10
+ double: _d
11
+ facet: _facet
12
+ display: _display
13
+ sort: _sort
14
+ unstemmed_search: _unstem_search
@@ -1,11 +1,12 @@
1
1
  require 'rubygems'
2
- gem 'ruby-fedora'
3
2
  gem 'solr-ruby'
4
- module ActiveFedora #:nodoc:
5
- VERSION='1.0.5'
6
- end
7
3
 
8
- SOLR_DOCUMENT_ID = "id" unless defined?(SOLR_DOCUMENT_ID)
4
+ $: << 'lib'
5
+ require 'logger'
6
+ require 'active_fedora/solr_service.rb'
7
+ require 'active_fedora/solr_mapper.rb'
8
+
9
+ SOLR_DOCUMENT_ID = ActiveFedora::SolrService.mappings["id"] unless defined?(SOLR_DOCUMENT_ID)
9
10
  ENABLE_SOLR_UPDATES = true unless defined?(ENABLE_SOLR_UPDATES)
10
11
 
11
12
  require 'ruby-fedora'
@@ -20,7 +21,62 @@ require 'active_fedora/qualified_dublin_core_datastream.rb'
20
21
  require 'active_fedora/relationship.rb'
21
22
  require 'active_fedora/rels_ext_datastream.rb'
22
23
  require 'active_fedora/semantic_node.rb'
23
- require 'active_fedora/solr_service.rb'
24
+
25
+ module ActiveFedora #:nodoc:
26
+
27
+ class << self
28
+ attr_accessor :solr_config, :fedora_config
29
+ end
30
+
31
+ # The configuration hash that gets used by RSolr.connect
32
+ @solr_config ||= {}
33
+ @fedora_config ||= {}
34
+
35
+ def self.init( config_path=nil )
36
+
37
+ config_env = defined?(RAILS_ENV) ? RAILS_ENV : "development"
38
+
39
+ if config_path.nil?
40
+ if defined?(RAILS_ROOT)
41
+ config_path = "#{RAILS_ROOT}/config/fedora.yml"
42
+ else
43
+ raise "Don't know where to look for fedora.yml. You should either set RAILS_ROOT or pass the path to fedora.yml as an argument to ActiveFedora.init"
44
+ end
45
+ end
46
+
47
+ logger.info("FEDORA: loading ActiveFedora config from #{File.expand_path(config_path)}")
48
+
49
+ fedora_config = YAML::load(File.open(config_path))
50
+ raise "The #{config_env} environment settings were not found in the fedora.yml config. If you already have a fedora.yml file defined, make sure it defines settings for the #{config_env} environment" unless fedora_config[config_env]
51
+
52
+ ActiveFedora.solr_config[:url] = fedora_config[config_env]['solr']['url']
53
+
54
+ # Register Solr
55
+ logger.info("FEDORA: initializing ActiveFedora::SolrService with solr_config: #{ActiveFedora.solr_config.inspect}")
56
+
57
+ ActiveFedora::SolrService.register(ActiveFedora.solr_config[:url])
58
+ logger.info("FEDORA: initialized Solr with ActiveFedora.solr_config: #{ActiveFedora::SolrService.instance.inspect}")
59
+
60
+ ActiveFedora.fedora_config[:url] = fedora_config[config_env]['fedora']['url']
61
+ logger.info("FEDORA: initializing Fedora with fedora_config: #{ActiveFedora.fedora_config.inspect}")
62
+
63
+ Fedora::Repository.register(ActiveFedora.fedora_config[:url])
64
+ logger.info("FEDORA: initialized Fedora as: #{Fedora::Repository.instance.inspect}")
65
+
66
+ end
67
+
68
+ def self.solr
69
+ ActiveFedora::SolrService.instance
70
+ end
71
+
72
+ def self.fedora
73
+ Fedora::Repository.instance
74
+ end
75
+
76
+ def self.logger
77
+ @logger ||= defined?(RAILS_DEFAULT_LOGGER) ? RAILS_DEFAULT_LOGGER : Logger.new(STDOUT)
78
+ end
79
+ end
24
80
 
25
81
 
26
82
  if ![].respond_to?(:count)
@@ -35,3 +91,7 @@ if ![].respond_to?(:count)
35
91
  end
36
92
  end
37
93
 
94
+ # module ActiveFedora
95
+ # class ServerError < Fedora::ServerError; end # :nodoc:
96
+ # end
97
+