active-fedora 1.1.6 → 1.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,9 @@
1
+ 1.1.7
2
+
3
+ Nokogiri Datastream support using Nokogiri and OM::XML. Includes indexing of xml contents into solr based on accessors declared using OM::XML:Accessor module.
4
+ You now have the option of calling has_metadata without passing in a block
5
+
6
+
1
7
  1.1.6
2
8
 
3
9
  Bug #959: Base.delete fails to delete objects from Solr even when ENABLE_SOLR_UPDATES == true
data/Rakefile CHANGED
@@ -21,6 +21,8 @@ begin
21
21
  gem.add_dependency('mime-types', '>= 1.16')
22
22
  gem.add_dependency('multipart-post')
23
23
  gem.add_dependency('nokogiri')
24
+ gem.add_dependency('om', '>= 0.1.4')
25
+ # gem.add_dependency('yaml')
24
26
 
25
27
  gem.add_development_dependency "rspec", ">= 1.2.9"
26
28
  gem.add_development_dependency "mocha", ">= 1.2.9"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.6
1
+ 1.1.7
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{active-fedora}
8
- s.version = "1.1.6"
8
+ s.version = "1.1.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Matt Zumwalt", "McClain Looney"]
12
- s.date = %q{2010-06-14}
12
+ s.date = %q{2010-06-23}
13
13
  s.description = %q{ActiveFedora provides for creating and managing objects in the Fedora Repository Architecture.}
14
14
  s.email = %q{matt.zumwalt@yourmediashelf.com}
15
15
  s.extra_rdoc_files = [
@@ -209,8 +209,8 @@ Gem::Specification.new do |s|
209
209
  "lib/fedora/generic_search.rb",
210
210
  "lib/fedora/repository.rb",
211
211
  "lib/hydra.rb",
212
- "lib/hydra_libs/mods_datastream.rb",
213
- "lib/hydra_libs/opinionated_mods_document.rb",
212
+ "lib/hydra/mods_article.rb",
213
+ "lib/hydra/opinionated_mods_document.rb",
214
214
  "lib/ruby-fedora.rb",
215
215
  "lib/util/class_level_inheritable_attributes.rb",
216
216
  "script/console",
@@ -221,7 +221,9 @@ Gem::Specification.new do |s|
221
221
  "solr/config/solrconfig-1.5.xml",
222
222
  "spec/fixtures/changeme155.xml",
223
223
  "spec/fixtures/dino.jpg",
224
+ "spec/fixtures/hydrangea_fixture_mods_article1.foxml.xml",
224
225
  "spec/fixtures/minivan.jpg",
226
+ "spec/fixtures/mods_articles/hydrangea_article1.xml",
225
227
  "spec/fixtures/oh_qdc.xml",
226
228
  "spec/fixtures/test_12.foxml.xml",
227
229
  "spec/integration/base_file_management_spec.rb",
@@ -262,7 +264,6 @@ Gem::Specification.new do |s|
262
264
  "spec/unit/inheritance_spec.rb",
263
265
  "spec/unit/metadata_datastream_spec.rb",
264
266
  "spec/unit/model_spec.rb",
265
- "spec/unit/mods_datastream_spec.rb",
266
267
  "spec/unit/nokogiri_datastream_spec.rb",
267
268
  "spec/unit/property_spec.rb",
268
269
  "spec/unit/qualified_dublin_core_datastream_spec.rb",
@@ -281,7 +282,7 @@ Gem::Specification.new do |s|
281
282
  s.rdoc_options = ["--charset=UTF-8"]
282
283
  s.require_paths = ["lib"]
283
284
  s.rubyforge_project = %q{rubyfedora}
284
- s.rubygems_version = %q{1.3.6}
285
+ s.rubygems_version = %q{1.3.7}
285
286
  s.summary = %q{A convenience libary for manipulating MODS (Metadata Object Description Schema) documents.}
286
287
  s.test_files = [
287
288
  "spec/integration/base_file_management_spec.rb",
@@ -319,7 +320,6 @@ Gem::Specification.new do |s|
319
320
  "spec/unit/inheritance_spec.rb",
320
321
  "spec/unit/metadata_datastream_spec.rb",
321
322
  "spec/unit/model_spec.rb",
322
- "spec/unit/mods_datastream_spec.rb",
323
323
  "spec/unit/nokogiri_datastream_spec.rb",
324
324
  "spec/unit/property_spec.rb",
325
325
  "spec/unit/qualified_dublin_core_datastream_spec.rb",
@@ -337,12 +337,13 @@ Gem::Specification.new do |s|
337
337
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
338
338
  s.specification_version = 3
339
339
 
340
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
340
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
341
341
  s.add_runtime_dependency(%q<solr-ruby>, [">= 0.0.6"])
342
342
  s.add_runtime_dependency(%q<xml-simple>, [">= 1.0.12"])
343
343
  s.add_runtime_dependency(%q<mime-types>, [">= 1.16"])
344
344
  s.add_runtime_dependency(%q<multipart-post>, [">= 0"])
345
345
  s.add_runtime_dependency(%q<nokogiri>, [">= 0"])
346
+ s.add_runtime_dependency(%q<om>, [">= 0.1.4"])
346
347
  s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
347
348
  s.add_development_dependency(%q<mocha>, [">= 1.2.9"])
348
349
  s.add_development_dependency(%q<ruby-debug>, [">= 0"])
@@ -352,6 +353,7 @@ Gem::Specification.new do |s|
352
353
  s.add_dependency(%q<mime-types>, [">= 1.16"])
353
354
  s.add_dependency(%q<multipart-post>, [">= 0"])
354
355
  s.add_dependency(%q<nokogiri>, [">= 0"])
356
+ s.add_dependency(%q<om>, [">= 0.1.4"])
355
357
  s.add_dependency(%q<rspec>, [">= 1.2.9"])
356
358
  s.add_dependency(%q<mocha>, [">= 1.2.9"])
357
359
  s.add_dependency(%q<ruby-debug>, [">= 0"])
@@ -362,6 +364,7 @@ Gem::Specification.new do |s|
362
364
  s.add_dependency(%q<mime-types>, [">= 1.16"])
363
365
  s.add_dependency(%q<multipart-post>, [">= 0"])
364
366
  s.add_dependency(%q<nokogiri>, [">= 0"])
367
+ s.add_dependency(%q<om>, [">= 0.1.4"])
365
368
  s.add_dependency(%q<rspec>, [">= 1.2.9"])
366
369
  s.add_dependency(%q<mocha>, [">= 1.2.9"])
367
370
  s.add_dependency(%q<ruby-debug>, [">= 0"])
@@ -353,7 +353,14 @@ module ActiveFedora
353
353
  doc.xpath("//foxml:datastream[@ID='#{name}']").each do |node|
354
354
  # datastreams remain marked as new if the foxml doesn't have an entry for that datastream
355
355
  ds.new_object = false
356
- proto.datastreams[name]=ds.class.from_xml(ds, node)
356
+ # Nokogiri Datstreams use a new syntax for .from_xml (tmpl is optional!) and expects the actual xml content rather than the foxml datstream xml
357
+ # NB: Base.deserialize, or a separately named method, should set any other info from the foxml if necessary though by this point it's all been grabbed elsewhere...
358
+ if ds.kind_of?(ActiveFedora::NokogiriDatastream)
359
+ node = node.search('./foxml:datastreamVersion[last()]/foxml:xmlContent/*').first
360
+ proto.datastreams[name]=ds.class.from_xml(node, ds)
361
+ else
362
+ proto.datastreams[name]=ds.class.from_xml(ds, node)
363
+ end
357
364
  end
358
365
  end
359
366
  proto.inner_object.new_object = false
@@ -529,7 +536,10 @@ module ActiveFedora
529
536
  attributes = {:label=>""}
530
537
  end
531
538
  ds = ar.first.new(:dsid=>name)
532
- ar.last.call(ds)
539
+ # If you called has_metadata with a block, pass the block into the Datastream class
540
+ if ar.last.class == Proc
541
+ ar.last.call(ds)
542
+ end
533
543
  ds.attributes = attributes.merge(ds.attributes)
534
544
  self.add_datastream(ds)
535
545
  end
@@ -38,15 +38,15 @@ module ActiveFedora
38
38
  # return xml.to_s
39
39
  # end
40
40
  #
41
- # # @tmpl ActiveFedora::MetadataDatastream
42
- # # @node Nokogiri::XML::Node
43
- # def self.from_xml(tmpl, node) # :nodoc:
44
- # node.xpath("./foxml:datastreamVersion[last()]/foxml:xmlContent/fields/node()").each do |f|
45
- # tmpl.send("#{f.name}_append", f.text) unless f.class == Nokogiri::XML::Text
46
- # end
47
- # tmpl.send(:dirty=, false)
48
- # tmpl
49
- # end
41
+ # @tmpl ActiveFedora::MetadataDatastream
42
+ # @node Nokogiri::XML::Node
43
+ def self.from_xml(tmpl, node) # :nodoc:
44
+ node.xpath("./foxml:datastreamVersion[last()]/foxml:xmlContent/fields/node()").each do |f|
45
+ tmpl.send("#{f.name}_append", f.text) unless f.class == Nokogiri::XML::Text
46
+ end
47
+ tmpl.send(:dirty=, false)
48
+ tmpl
49
+ end
50
50
 
51
51
  # This method generates the various accessor and mutator methods on self for the datastream metadata attributes.
52
52
  # each field will have the 3 magic methods:
@@ -12,16 +12,6 @@ module ActiveFedora::MetadataDatastreamHelper
12
12
  @@classFields
13
13
  end
14
14
 
15
- # @tmpl ActiveFedora::MetadataDatastream
16
- # @node Nokogiri::XML::Node
17
- def from_xml(tmpl, node) # :nodoc:
18
- node.xpath("./foxml:datastreamVersion[last()]/foxml:xmlContent/fields/node()").each do |f|
19
- tmpl.send("#{f.name}_append", f.text) unless f.class == Nokogiri::XML::Text
20
- end
21
- tmpl.send(:dirty=, false)
22
- tmpl
23
- end
24
-
25
15
  end
26
16
 
27
17
  def self.included(klass)
@@ -75,22 +65,6 @@ module ActiveFedora::MetadataDatastreamHelper
75
65
  end
76
66
  end
77
67
  end
78
-
79
- # fields.each_pair do |field,field_info|
80
- # el = REXML::Element.new("#{field.to_s}")
81
- # if field_info[:element_attrs]
82
- # field_info[:element_attrs].each{|k,v| el.add_attribute(k.to_s, v.to_s)}
83
- # end
84
- # field_info[:values].each do |val|
85
- # el = el.clone
86
- # el.text = val.to_s
87
- # if xml.class == REXML::Document
88
- # xml.root.elements.add(el)
89
- # else
90
- # xml.add(el)
91
- # end
92
- # end
93
- # end
94
68
  return builder.to_xml
95
69
  end
96
70
 
@@ -1,60 +1,93 @@
1
1
  require "nokogiri"
2
+ require "om"
2
3
  #this class represents a MetadataDatastream, a special case of ActiveFedora::Datastream
3
4
  class ActiveFedora::NokogiriDatastream < ActiveFedora::Datastream
4
-
5
+
5
6
  include ActiveFedora::MetadataDatastreamHelper
6
-
7
- self.xml_model = Nokogiri::XML::Document
8
-
7
+ include OM::XML
8
+
9
9
  attr_accessor :ng_xml
10
10
 
11
11
  #constructor, calls up to ActiveFedora::Datastream's constructor
12
12
  def initialize(attrs=nil)
13
13
  super
14
14
  @fields={}
15
- @ng_xml = self.class.xml_model.new()
15
+ self.class.from_xml(blob, self)
16
+ end
17
+
18
+
19
+ def to_xml(xml = self.ng_xml)
20
+ ng_xml = self.ng_xml
21
+ if ng_xml.root.nil? && self.class.respond_to?(:root_property_ref) && !self.class.root_property_ref.nil?
22
+ ng_xml = self.class.generate(self.class.root_property_ref, "")
23
+ if xml.root.nil?
24
+ xml = ng_xml
25
+ end
26
+ end
27
+
28
+ unless xml == ng_xml || ng_xml.root.nil?
29
+ if xml.kind_of?(Nokogiri::XML::Document)
30
+ xml.root.add_child(ng_xml.root)
31
+ elsif xml.kind_of?(Nokogiri::XML::Node)
32
+ xml.add_child(ng_xml.root)
33
+ else
34
+ raise "You can only pass instances of Nokogiri::XML::Node into this method. You passed in #{xml}"
35
+ end
36
+ end
37
+
38
+ return xml.to_xml {|config| config.no_declaration}
16
39
  end
17
40
 
18
41
  def to_solr(solr_doc = Solr::Document.new) # :nodoc:
19
- fields.each do |field_key, field_info|
20
- if field_info.has_key?(:values) && !field_info[:values].nil?
21
- field_symbol = generate_solr_symbol(field_key, field_info[:type])
22
- field_info[:values].each do |val|
23
- solr_doc << Solr::Field.new(field_symbol => val)
24
- end
42
+
43
+ unless self.class.accessors.nil?
44
+ self.class.accessors.each_pair do |accessor_name,accessor_info|
45
+ solrize_accessor(accessor_name, accessor_info, :solr_doc=>solr_doc)
25
46
  end
26
47
  end
27
48
 
28
49
  return solr_doc
29
50
  end
30
51
 
31
- def to_xml(xml = REXML::Document.new("<fields />")) #:nodoc:
32
- fields.each_pair do |field,field_info|
33
- el = REXML::Element.new("#{field.to_s}")
34
- if field_info[:element_attrs]
35
- field_info[:element_attrs].each{|k,v| el.add_attribute(k.to_s, v.to_s)}
36
- end
37
- field_info[:values].each do |val|
38
- el = el.clone
39
- el.text = val.to_s
40
- if xml.class == REXML::Document
41
- xml.root.elements.add(el)
42
- else
43
- xml.add(el)
44
- end
52
+ def solrize_accessor(accessor_name, accessor_info, opts={})
53
+ solr_doc = opts.fetch(:solr_doc, Solr::Document.new)
54
+ parents = opts.fetch(:parents, [])
55
+
56
+ accessor_pointer = parents+[accessor_name]
57
+
58
+ if accessor_info.nil?
59
+ accessor_info = self.class.accessor_info(accessor_pointer)
60
+ if accessor_info.nil?
61
+ raise "No accessor is defined for #{accessor_info.select}"
62
+ end
63
+ end
64
+
65
+ # prep children hash
66
+ child_accessors = accessor_info.fetch(:children, {})
67
+ xpath = self.class.accessor_xpath(*accessor_pointer)
68
+ nodeset = lookup(xpath)
69
+
70
+ nodeset.each do |node|
71
+ # create solr fields
72
+ solrize_node(node, accessor_pointer, solr_doc)
73
+ child_accessors.each_pair do |child_accessor_name, child_accessor_info|
74
+ solrize_accessor(child_accessor_name, child_accessor_info, opts={:solr_doc=>solr_doc, :parents=>parents+[{accessor_name=>nodeset.index(node)}] })
45
75
  end
46
76
  end
47
- return xml.to_s
77
+
48
78
  end
49
79
 
50
- # @tmpl ActiveFedora::MetadataDatastream
51
- # @node Nokogiri::XML::Node
52
- def self.from_xml(tmpl, node) # :nodoc:
53
- node.xpath("./foxml:datastreamVersion[last()]/foxml:xmlContent/fields/node()").each do |f|
54
- tmpl.send("#{f.name}_append", f.text) unless f.class == Nokogiri::XML::Text
80
+ def solrize_node(node, accessor_pointer, solr_doc = Solr::Document.new)
81
+ generic_field_name_base = self.class.accessor_generic_name(*accessor_pointer)
82
+ generic_field_name = generate_solr_symbol(generic_field_name_base, :text)
83
+
84
+ solr_doc << Solr::Field.new(generic_field_name => node.text)
85
+
86
+ if accessor_pointer.length > 1
87
+ hierarchical_field_name_base = self.class.accessor_hierarchical_name(*accessor_pointer)
88
+ hierarchical_field_name = generate_solr_symbol(hierarchical_field_name_base, :text)
89
+ solr_doc << Solr::Field.new(hierarchical_field_name => node.text)
55
90
  end
56
- tmpl.send(:dirty=, false)
57
- tmpl
58
91
  end
59
92
 
60
93
  end
@@ -1,5 +1,6 @@
1
1
  require 'solr'
2
2
  require "active_fedora/solr_mapper"
3
+ require "yaml"
3
4
  module ActiveFedora
4
5
  class SolrService
5
6
 
@@ -1,2 +1,2 @@
1
- # module Hydra;end
2
- require "hydra_libs/mods_datastream"
1
+ module Hydra;end
2
+ require "hydra/mods_article"
@@ -0,0 +1,49 @@
1
+ module Hydra
2
+ class ModsArticle < ActiveFedora::NokogiriDatastream
3
+
4
+ # have to call this in order to set namespace & schema
5
+ root_property :mods, "mods", "http://www.loc.gov/mods/v3", :attributes=>["id", "version"], :schema=>"http://www.loc.gov/standards/mods/v3/mods-3-2.xsd"
6
+
7
+ accessor :title_info, :relative_xpath=>'oxns:titleInfo', :children=>[
8
+ {:main_title=>{:relative_xpath=>'oxns:title'}},
9
+ {:language =>{:relative_xpath=>{:attribute=>"lang"} }}
10
+ ]
11
+ accessor :abstract
12
+ accessor :topic_tag, :relative_xpath=>'oxns:subject/oxns:topic'
13
+ accessor :person, :relative_xpath=>'oxns:name[@type="personal"]', :children=>[
14
+ {:last_name=>{:relative_xpath=>'oxns:namePart[@type="family"]'}},
15
+ {:first_name=>{:relative_xpath=>'oxns:namePart[@type="given"]'}},
16
+ {:institution=>{:relative_xpath=>'oxns:affiliation'}},
17
+ {:role=>{:children=>[
18
+ {:text=>{:relative_xpath=>'oxns:roleTerm[@type="text"]'}},
19
+ {:code=>{:relative_xpath=>'oxns:roleTerm[@type="code"]'}}
20
+ ]}}
21
+ ]
22
+ accessor :organization, :relative_xpath=>'oxns:name[@type="institutional"]', :children=>[
23
+ {:role=>{:children=>[
24
+ {:text=>{:relative_xpath=>'oxns:roleTerm[@type="text"]'}},
25
+ {:code=>{:relative_xpath=>'oxns:roleTerm[@type="code"]'}}
26
+ ]}}
27
+ ]
28
+ accessor :conference, :relative_xpath=>'oxns:name[@type="conference"]', :children=>[
29
+ {:role=>{:children=>[
30
+ {:text=>{:relative_xpath=>'oxns:roleTerm[@type="text"]'}},
31
+ {:code=>{:relative_xpath=>'oxns:roleTerm[@type="code"]'}}
32
+ ]}}
33
+ ]
34
+ accessor :journal, :relative_xpath=>'oxns:relatedItem[@type="host"]', :children=>[
35
+ {:title=>{:relative_xpath=>'oxns:titleInfo/oxns:title'}},
36
+ {:publisher=>{:relative_xpath=>'oxns:originInfo/oxns:publisher'}},
37
+ {:issn=>{:relative_xpath=>'oxns:identifier[@type="issn"]'}},
38
+ {:date_issued=>{:relative_xpath=>'oxns:originInfo/oxns:dateIssued'}},
39
+ {:issue => {:relative_xpath=>"oxns:part", :children=>[
40
+ {:volume=>{:relative_xpath=>'oxns:detail[@type="volume"]'}},
41
+ {:level=>{:relative_xpath=>'oxns:detail[@type="level"]'}},
42
+ {:start_page=>{:relative_xpath=>'oxns:extent[@unit="pages"]/oxns:start'}},
43
+ {:end_page=>{:relative_xpath=>'oxns:extent[@unit="pages"]/oxns:end'}},
44
+ {:publication_date=>{:relative_xpath=>'oxns:date'}}
45
+ ]}}
46
+ ]
47
+
48
+ end
49
+ end
@@ -0,0 +1,14 @@
1
+ class OpinionatedModsDocument < Nokogiri::XML::Document
2
+
3
+ include OM::XML
4
+
5
+ self.schema_url = "http://www.loc.gov/standards/mods/v3/mods-3-2.xsd"
6
+
7
+ # Could add support for multiple root declarations.
8
+ # For now, assume that any modsCollections have already been broken up and fed in as individual mods documents
9
+ # root :mods_collection, :path=>"modsCollection",
10
+ # :attributes=>[],
11
+ # :subelements => :mods
12
+ root_property :mods, "mods", "http://www.loc.gov/mods/v3", :attributes=>["id", "version"]
13
+
14
+ end
@@ -0,0 +1,187 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <foxml:digitalObject VERSION="1.1" PID="hydrangea:fixture_mods_article1"
3
+ xmlns:foxml="info:fedora/fedora-system:def/foxml#"
4
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5
+ xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
6
+ <foxml:objectProperties>
7
+ <foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
8
+ <foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE=""/>
9
+ <foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
10
+ <foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2010-06-17T19:56:19.301Z"/>
11
+ <foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2010-06-17T19:57:30.688Z"/>
12
+ </foxml:objectProperties>
13
+ <foxml:datastream ID="AUDIT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="false">
14
+ <foxml:datastreamVersion ID="AUDIT.0" LABEL="Audit Trail for this object" CREATED="2010-06-17T19:56:19.301Z" MIMETYPE="text/xml" FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit">
15
+ <foxml:xmlContent>
16
+ <audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
17
+ <audit:record ID="AUDREC1">
18
+ <audit:process type="Fedora API-M"/>
19
+ <audit:action>addDatastream</audit:action>
20
+ <audit:componentID>descMetadata</audit:componentID>
21
+ <audit:responsibility>fedoraAdmin</audit:responsibility>
22
+ <audit:date>2010-06-17T19:56:22.150Z</audit:date>
23
+ <audit:justification></audit:justification>
24
+ </audit:record>
25
+ <audit:record ID="AUDREC2">
26
+ <audit:process type="Fedora API-M"/>
27
+ <audit:action>addDatastream</audit:action>
28
+ <audit:componentID>RELS-EXT</audit:componentID>
29
+ <audit:responsibility>fedoraAdmin</audit:responsibility>
30
+ <audit:date>2010-06-17T19:56:22.353Z</audit:date>
31
+ <audit:justification></audit:justification>
32
+ </audit:record>
33
+ <audit:record ID="AUDREC3">
34
+ <audit:process type="Fedora API-M"/>
35
+ <audit:action>addDatastream</audit:action>
36
+ <audit:componentID>rightsMetadata</audit:componentID>
37
+ <audit:responsibility>fedoraAdmin</audit:responsibility>
38
+ <audit:date>2010-06-17T19:56:23.335Z</audit:date>
39
+ <audit:justification></audit:justification>
40
+ </audit:record>
41
+ <audit:record ID="AUDREC4">
42
+ <audit:process type="Fedora API-M"/>
43
+ <audit:action>addDatastream</audit:action>
44
+ <audit:componentID>properties</audit:componentID>
45
+ <audit:responsibility>fedoraAdmin</audit:responsibility>
46
+ <audit:date>2010-06-17T19:56:23.477Z</audit:date>
47
+ <audit:justification></audit:justification>
48
+ </audit:record>
49
+ <audit:record ID="AUDREC5">
50
+ <audit:process type="Fedora API-M"/>
51
+ <audit:action>modifyObject</audit:action>
52
+ <audit:componentID></audit:componentID>
53
+ <audit:responsibility>fedoraAdmin</audit:responsibility>
54
+ <audit:date>2010-06-17T19:57:30.688Z</audit:date>
55
+ <audit:justification></audit:justification>
56
+ </audit:record>
57
+ </audit:auditTrail>
58
+ </foxml:xmlContent>
59
+ </foxml:datastreamVersion>
60
+ </foxml:datastream>
61
+ <foxml:datastream ID="DC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
62
+ <foxml:datastreamVersion ID="DC1.0" LABEL="Dublin Core Record for this object" CREATED="2010-06-17T19:56:19.301Z" MIMETYPE="text/xml" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/" SIZE="360">
63
+ <foxml:xmlContent>
64
+ <oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
65
+ <dc:identifier>hydrangea:fixture_mods_article1</dc:identifier>
66
+ </oai_dc:dc>
67
+ </foxml:xmlContent>
68
+ </foxml:datastreamVersion>
69
+ </foxml:datastream>
70
+ <foxml:datastream ID="descMetadata" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
71
+ <foxml:datastreamVersion ID="descMetadata.0" LABEL="" CREATED="2010-06-17T19:56:22.150Z" MIMETYPE="text/xml" SIZE="19">
72
+ <foxml:xmlContent>
73
+ <mods version="3.0" xsi:schemaLocation="http://www.loc.gov/mods/v3
74
+ http://www.loc.gov/standards/mods/v3/mods-3-0.xsd" xmlns="http://www.loc.gov/mods/v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
75
+
76
+ <titleInfo>
77
+ <nonSort>THE</nonSort>
78
+ <title>ARTICLE TITLE</title>
79
+ <subTitle>SUBTITLE</subTitle>
80
+ </titleInfo>
81
+ <titleInfo type="alternative">
82
+ <title>VARYING FORM OF TITLE</title>
83
+ </titleInfo>
84
+
85
+ <name type="personal">
86
+ <namePart type="family">FAMILY NAME</namePart>
87
+ <namePart type="given">GIVEN NAMES</namePart>
88
+ <namePart type="termsOfAddress">DR.</namePart>
89
+ <displayForm>NAME AS IT APPEARS</displayForm>
90
+ <affiliation>FACULTY, UNIVERSITY</affiliation>
91
+ <role>
92
+ <roleTerm authority="marcrelator" type="text">creator</roleTerm>
93
+ </role>
94
+ <role>
95
+ <roleTerm type="text">submitter</roleTerm>
96
+ </role>
97
+ </name>
98
+
99
+ <typeOfResource>text</typeOfResource>
100
+ <genre authority="local">journal article</genre>
101
+
102
+ <abstract>ABSTRACT</abstract>
103
+ <subject>
104
+ <topic>TOPIC 1</topic>
105
+ <topic>TOPIC 2</topic>
106
+ </subject>
107
+ <subject authority="AUTHORITY SOURCE (RFCD, LCSH)">
108
+ <topic>CONTROLLED TERM</topic>
109
+ </subject>
110
+
111
+ <language>
112
+ <languageTerm authority="iso639-2b" type="code">en-aus </languageTerm>
113
+ </language>
114
+
115
+ <physicalDescription>
116
+ <internetMediaType>application/pdf</internetMediaType>
117
+ <extent>36 p.</extent>
118
+ </physicalDescription>
119
+
120
+ <relatedItem type="host">
121
+ <titleInfo>
122
+ <title>TITLE OF HOST JOURNAL</title>
123
+ </titleInfo>
124
+ <originInfo>
125
+ <publisher>PUBLISHER</publisher>
126
+ <dateIssued>DATE</dateIssued>
127
+ </originInfo>
128
+ <identifier type="issn">0013-8908</identifier>
129
+ <part>
130
+ <detail type="volume">
131
+ <number>2</number>
132
+ </detail>
133
+ <detail type="level">
134
+ <number>2</number>
135
+ </detail>
136
+ <extent unit="pages">
137
+ <start>195</start>
138
+ <end>230</end>
139
+ </extent>
140
+ <date>FEB. 2007</date>
141
+ </part>
142
+ </relatedItem>
143
+
144
+ <identifier type="uri">http://URL.edu.au/</identifier>
145
+ <identifier type="doi">doi:10.1006/jmbi.1995.0238</identifier>
146
+ <location>
147
+ <url>http://URL.edu.au/</url>
148
+ </location>
149
+ <accessCondition type="restrictionOnAccess">EMBARGO NOTE</accessCondition>
150
+ <accessCondition type="use and reproduction">OPEN ACCESS</accessCondition>
151
+
152
+ </mods>
153
+ </foxml:xmlContent>
154
+ </foxml:datastreamVersion>
155
+ </foxml:datastream>
156
+ <foxml:datastream ID="RELS-EXT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
157
+ <foxml:datastreamVersion ID="RELS-EXT.0" LABEL="" CREATED="2010-06-17T19:56:22.353Z" MIMETYPE="text/xml" SIZE="306">
158
+ <foxml:xmlContent>
159
+ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
160
+ <rdf:Description rdf:about="info:fedora/hydrangea:fixture_mods_article1">
161
+ <hasModel xmlns="info:fedora/fedora-system:def/relations-external#" rdf:resource="info:fedora/afmodel:ModsArticle"></hasModel>
162
+ </rdf:Description>
163
+ </rdf:RDF>
164
+ </foxml:xmlContent>
165
+ </foxml:datastreamVersion>
166
+ </foxml:datastream>
167
+ <foxml:datastream ID="rightsMetadata" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
168
+ <foxml:datastreamVersion ID="rightsMetadata.0" LABEL="" CREATED="2010-06-17T19:56:23.335Z" MIMETYPE="text/xml" SIZE="19">
169
+ <foxml:xmlContent>
170
+ <fields>
171
+ <discover_access_group>public</discover_access_group>
172
+ <read_access_group>public</read_access_group>
173
+ <edit_access_group>researcher</edit_access_group>
174
+ <edit_access_group>archivist</edit_access_group>
175
+ <edit_access>researcher1</edit_access>
176
+ </fields>
177
+ </foxml:xmlContent>
178
+ </foxml:datastreamVersion>
179
+ </foxml:datastream>
180
+ <foxml:datastream ID="properties" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
181
+ <foxml:datastreamVersion ID="properties.0" LABEL="" CREATED="2010-06-17T19:56:23.477Z" MIMETYPE="text/xml" SIZE="19">
182
+ <foxml:xmlContent>
183
+ <fields></fields>
184
+ </foxml:xmlContent>
185
+ </foxml:datastreamVersion>
186
+ </foxml:datastream>
187
+ </foxml:digitalObject>