cul_hydra 1.8.0 → 1.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/concerns/cul/hydra/application_id_behavior.rb +5 -6
  3. data/app/models/administrative_set.rb +0 -1
  4. data/app/models/concept.rb +0 -1
  5. data/app/models/concerns/cul/hydra/models.rb +1 -0
  6. data/app/models/concerns/cul/hydra/models/common.rb +8 -9
  7. data/app/models/concerns/cul/hydra/models/rels_int.rb +18 -0
  8. data/app/models/concerns/ore/proxy.rb +2 -3
  9. data/app/models/cul/hydra/datastreams/rels_int.rb +179 -0
  10. data/app/models/dc_document.rb +0 -1
  11. data/app/models/generic_aggregator.rb +0 -1
  12. data/app/models/generic_object.rb +0 -1
  13. data/app/models/generic_resource.rb +1 -3
  14. data/fixtures/spec/CUL_RELS_INT/rels_int_blank.xml +2 -0
  15. data/fixtures/spec/CUL_RELS_INT/rels_int_profile.xml +19 -0
  16. data/fixtures/spec/CUL_RELS_INT/rels_int_test.xml +12 -0
  17. data/fixtures/spec/FOXML/resource-thumb.xml +2 -1
  18. data/lib/cul_hydra.rb +1 -4
  19. data/lib/cul_hydra/rels_int.rb +9 -0
  20. data/lib/cul_hydra/rels_int/rdf_xml_writer.rb +33 -0
  21. data/lib/cul_hydra/version.rb +1 -1
  22. data/lib/tasks/cul_hydra_dev.rake +0 -28
  23. metadata +32 -58
  24. data/app/models/jp2_image_aggregator.rb +0 -34
  25. data/app/models/mets_structured_aggregator.rb +0 -18
  26. data/app/models/resource.rb +0 -78
  27. data/app/models/resource_aggregator.rb +0 -22
  28. data/app/models/static_audio_aggregator.rb +0 -12
  29. data/app/models/static_image_aggregator.rb +0 -32
  30. data/lib/cul_hydra/controllers.rb +0 -14
  31. data/lib/cul_hydra/controllers/aggregates.rb +0 -93
  32. data/lib/cul_hydra/controllers/aggregator_controller_helper.rb +0 -27
  33. data/lib/cul_hydra/controllers/catalog.rb +0 -12
  34. data/lib/cul_hydra/controllers/collections.rb +0 -81
  35. data/lib/cul_hydra/controllers/content_aggregators.rb +0 -81
  36. data/lib/cul_hydra/controllers/datastreams.rb +0 -145
  37. data/lib/cul_hydra/controllers/helpers.rb +0 -10
  38. data/lib/cul_hydra/controllers/helpers/active_fedora_helper_behavior.rb +0 -9
  39. data/lib/cul_hydra/controllers/helpers/application_helper_behavior.rb +0 -16
  40. data/lib/cul_hydra/controllers/helpers/dc_metadata_helper_behavior.rb +0 -9
  41. data/lib/cul_hydra/controllers/helpers/hydra_assets_helper_behavior.rb +0 -46
  42. data/lib/cul_hydra/controllers/helpers/hydra_autocomplete_helper_behavior.rb +0 -35
  43. data/lib/cul_hydra/controllers/helpers/hydra_uploader_helper_behavior.rb +0 -34
  44. data/lib/cul_hydra/controllers/helpers/resources_helper_behavior.rb +0 -159
  45. data/lib/cul_hydra/controllers/resources.rb +0 -161
  46. data/lib/cul_hydra/controllers/static_image_aggregators.rb +0 -105
  47. data/lib/cul_hydra/controllers/suggestions.rb +0 -126
  48. data/lib/cul_hydra/controllers/terms.rb +0 -205
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8467bb84e67bddce15ffaf614759619ea3118f9394b313f01f1a81972067a25f
4
- data.tar.gz: 3778549e6620a5b85267e4be6e7ae3a1657789eff74c8ec17350d0e8c94ad902
3
+ metadata.gz: 508c0e32e914c363417b52a01d19ee0612b4dafebeccf8034d257b48aa9bc202
4
+ data.tar.gz: 8e3f07a2e0a5bb2e2ff926fb9cf51060e69c2a301a746709cb07195f4d0e01e5
5
5
  SHA512:
6
- metadata.gz: 72aed1e10c7f2f064a9e694a32294677db91d179e434b71d7c316331ac3c99b87bf2f8ade614493e50a4c9e730a8c96454432935a7bb49eaf2c4128daee0cc6d
7
- data.tar.gz: 88409f4788ceb83586556a1687c80385515aa06c924cbdfd63b3609364421ca6cae29a2ebf0d71a3198cfcfe8ca124da13f06f1f04ce6c6d50b4303d6ba0ec7b
6
+ metadata.gz: 43002c0a624e05152e017b2cffecac2f95533075648e18de883b8fdec64bd652a77887a8386df0e242a5d7c74f7a851632010ad4b73adf6c500ce64b1ce7a5e9
7
+ data.tar.gz: e090e289157046e51ba2e129776d760043d0c4770e0ea82a8d66999a5a01ddf007da1afb501533293a5e28b34c737d6957fdbd0b7d3ff5c9b441b276e47fbacf
@@ -1,11 +1,8 @@
1
1
  module Cul::Hydra::ApplicationIdBehavior
2
2
  extend ActiveSupport::Concern
3
- included do
4
- include Blacklight::SolrHelper
5
- end
6
3
 
7
4
  def find_for_params(path,solr_params)
8
- res = blacklight_solr.send_and_receive(path, {key=>solr_params.to_hash, method:blacklight_config.http_method})
5
+ res = blacklight_config.repository.send_and_receive(path, {key=>solr_params.to_hash, method:blacklight_config.http_method})
9
6
  Blacklight::SolrResponse.new(res, solr_params, solr_document_model: blacklight_config.solr_document_model)
10
7
  end
11
8
 
@@ -19,7 +16,8 @@ module Cul::Hydra::ApplicationIdBehavior
19
16
  p[:fq] = "identifier_ssim:#{(id)}"
20
17
  p[:fl] ||= '*'
21
18
  #p[:qt] ||= blacklight_config.document_solr_request_handler
22
- solr_response = find(blacklight_config.document_solr_path, p)
19
+ repository = blacklight_config.repository_class.new(blacklight_config)
20
+ solr_response = repository.search(p)
23
21
  raise Blacklight::Exceptions::InvalidSolrID.new(id) if solr_response.docs.empty?
24
22
  document = SolrDocument.new(solr_response.docs.first, solr_response)
25
23
  @response, @document = [solr_response, document]
@@ -35,7 +33,8 @@ module Cul::Hydra::ApplicationIdBehavior
35
33
  p[:fq] = "dc_identifier_ssim:#{(id)}"
36
34
  p[:fl] ||= '*'
37
35
  #p[:qt] ||= blacklight_config.document_solr_request_handler
38
- solr_response = find(blacklight_config.document_solr_path, p)
36
+ repository = blacklight_config.repository_class.new(blacklight_config)
37
+ solr_response = repository.search(p)
39
38
  raise Blacklight::Exceptions::InvalidSolrID.new(id) if solr_response.docs.empty?
40
39
  document = SolrDocument.new(solr_response.docs.first, solr_response)
41
40
  @response, @document = [solr_response, document]
@@ -3,7 +3,6 @@ require "active_fedora_finders"
3
3
  class AdministrativeSet < ::ActiveFedora::Base
4
4
  include ::ActiveFedora::FinderMethods::RepositoryMethods
5
5
  include ::ActiveFedora::DatastreamCollections
6
- include Hydra::ModelMethods
7
6
  include Cul::Hydra::Models::Common
8
7
  include Pcdm::Models
9
8
 
@@ -3,7 +3,6 @@ require "active_fedora_finders"
3
3
  class Concept < GenericAggregator
4
4
  include ::ActiveFedora::FinderMethods::RepositoryMethods
5
5
  include ::ActiveFedora::DatastreamCollections
6
- include ::Hydra::ModelMethods
7
6
  include Cul::Hydra::Models::Common
8
7
  include Cul::Hydra::Models::Aggregator
9
8
 
@@ -18,6 +18,7 @@ module Hydra
18
18
  autoload :Common, 'cul/hydra/models/common'
19
19
  autoload :ImageResource, 'cul/hydra/models/image_resource'
20
20
  autoload :LinkableResources, 'cul/hydra/models/linkable_resources'
21
+ autoload :RelsInt, 'cul/hydra/models/rels_int'
21
22
  autoload :Resource, 'cul/hydra/models/resource'
22
23
  end
23
24
  end
@@ -8,7 +8,6 @@ module Cul::Hydra::Models::Common
8
8
  define_model_callbacks :create
9
9
  has_metadata :name => "DC", :type=>Cul::Hydra::Datastreams::DCMetadata, :versionable => true
10
10
  has_metadata :name => "descMetadata", :type=>Cul::Hydra::Datastreams::ModsDocument, :versionable => true
11
- has_metadata :name => "rightsMetadata", :type=>::Hydra::Datastream::RightsMetadata, :versionable => true
12
11
  has_many :publishers, :property => :publisher, :class_name=>'ActiveFedora::Base'
13
12
  after_create :rdf_types!
14
13
  end
@@ -247,7 +246,7 @@ module Cul::Hydra::Models::Common
247
246
  else
248
247
  # If there isn't a structMap, just get the first child
249
248
  member_pids = Cul::Hydra::RisearchMembers.get_direct_member_pids(self.pid, true)
250
- logger.warn "Warning: #{self.pid} is a member of itself!" if member_pids.include?(self.pid)
249
+ Rails.logger.warn "Warning: #{self.pid} is a member of itself!" if member_pids.include?(self.pid)
251
250
  if member_pids.first
252
251
  child_obj = ActiveFedora::Base.find(member_pids.first)
253
252
  return child_obj.get_representative_generic_resource
@@ -257,12 +256,12 @@ module Cul::Hydra::Models::Common
257
256
  end
258
257
  end
259
258
  rescue ActiveFedora::ObjectNotFoundError
260
- logger.warn "#{get_singular_rel(:schema_image)} not found in repository for #{self.pid}"
259
+ Rails.logger.warn "#{get_singular_rel(:schema_image)} not found in repository for #{self.pid}"
261
260
  return nil
262
261
  end
263
262
 
264
263
  def update_datastream_attributes(params={}, opts={})
265
- logger.debug "Common.update_datastream_attributes"
264
+ Rails.logger.debug "Common.update_datastream_attributes"
266
265
  result = params.dup
267
266
  params.each_pair do |dsid, ds_params|
268
267
  if datastreams.include?(dsid)
@@ -272,12 +271,12 @@ module Cul::Hydra::Models::Common
272
271
  changed ||= value_changed?(datastreams[dsid],pointer,values)
273
272
  }
274
273
  if changed
275
- logger.debug "Common.update_datastream_attributes calling update_indexed_attributes"
274
+ Rails.logger.debug "Common.update_datastream_attributes calling update_indexed_attributes"
276
275
  result[dsid] = datastreams[dsid].update_indexed_attributes(ds_params)
277
276
  else
278
277
  result[dsid] = no_update(ds_params)
279
278
  end
280
- logger.debug "change detected? #{changed} digital_object? #{datastreams[dsid].changed?}"
279
+ Rails.logger.debug "change detected? #{changed} digital_object? #{datastreams[dsid].changed?}"
281
280
  else
282
281
  result.delete(dsid)
283
282
  end
@@ -308,7 +307,7 @@ module Cul::Hydra::Models::Common
308
307
  else
309
308
  values = {"0"=>values}
310
309
  end
311
- logger.debug "submitted values for #{pointer.inspect} : #{values.inspect}"
310
+ Rails.logger.debug "submitted values for #{pointer.inspect} : #{values.inspect}"
312
311
  return true if values["-1"]
313
312
  changed = false
314
313
  old_values = ds.get_values(pointer)
@@ -316,10 +315,10 @@ module Cul::Hydra::Models::Common
316
315
  old_values.each_index {|ix| indexed_values[ix.to_s] = old_values[ix] }
317
316
  indexed_values.each {|k,v|
318
317
  new_val = values.delete(k)
319
- logger.debug "old: #{v} new: #{new_val} changed? #{!(v.eql? new_val)}"
318
+ Rails.logger.debug "old: #{v} new: #{new_val} changed? #{!(v.eql? new_val)}"
320
319
  changed ||= !(v.eql? new_val)
321
320
  }
322
- logger.debug "remaining values! #{values.inspect}" if values.length > 0
321
+ Rails.logger.debug "remaining values! #{values.inspect}" if values.length > 0
323
322
  changed || (values.length > 0)
324
323
  end
325
324
 
@@ -0,0 +1,18 @@
1
+ # -*- encoding : utf-8 -*-
2
+ require 'active_support'
3
+ module Cul::Hydra::Models
4
+ module RelsInt
5
+ extend ActiveSupport::Concern
6
+ included do
7
+ self.has_metadata :name=>"RELS-INT", :type=>Cul::Hydra::Datastreams::RelsInt
8
+ end
9
+
10
+ def rels_int
11
+ if !datastreams.has_key?("RELS-INT")
12
+ ds = Cul::Hydra::Datastreams::RelsInt.new(@inner_object, "RELS-INT")
13
+ add_datastream(ds)
14
+ end
15
+ return datastreams["RELS-INT"]
16
+ end
17
+ end
18
+ end
@@ -5,7 +5,7 @@ module ORE
5
5
  class Proxy < ActiveTriples::Resource
6
6
  include Digest
7
7
  include Solrizer::Common
8
- include ActiveFedora::Rdf::Indexing
8
+ include ActiveFedora::RDF::Indexing
9
9
 
10
10
  module Id
11
11
  class Descriptor < Solrizer::Descriptor
@@ -22,7 +22,7 @@ class Proxy < ActiveTriples::Resource
22
22
  def self.type
23
23
  RDF::ORE.Proxy
24
24
  end
25
- property :id, predicate: RDF.nodeID, multivalue: false do |ix|
25
+ property :id_node, predicate: RDF.nodeID, multivalue: false do |ix|
26
26
  ix.as Id::Descriptor.new
27
27
  end
28
28
  property :isAggregatedBy, predicate: RDF::ORE.isAggregatedBy, multivalue: false do |ix|
@@ -119,6 +119,5 @@ class Proxy < ActiveTriples::Resource
119
119
  config
120
120
  end
121
121
  end
122
-
123
122
  end
124
123
  end
@@ -0,0 +1,179 @@
1
+ # -*- encoding : utf-8 -*-
2
+ require 'active-fedora'
3
+ require 'rdf/rdfxml'
4
+ module Cul
5
+ module Hydra
6
+ module Datastreams
7
+ class RelsInt < ActiveFedora::Datastream
8
+ XSD_INT_BITLENGTH = 31
9
+ class_attribute :profile_solr_name
10
+ attr_accessor :relationships_loaded
11
+
12
+ self.profile_solr_name = ActiveFedora::SolrService.solr_name("rels_int_profile", :stored_searchable)
13
+
14
+ def serialize!
15
+ self.content = to_rels_int() if changed_attributes.include? 'relationships'
16
+ clear_attribute_changes 'relationships'
17
+ end
18
+
19
+ def relationships_will_change!
20
+ changed_attributes['relationships'] = nil
21
+ end
22
+
23
+ def content
24
+ if self.new? and @content.nil?
25
+ content= RelsInt.xml_template
26
+ else
27
+ super
28
+ end
29
+ end
30
+
31
+ def content= new_content
32
+ super
33
+ relationships_loaded=false
34
+ load_relationships
35
+ end
36
+
37
+ def to_resource(object, literal=false)
38
+ if object.is_a? ActiveFedora::Datastream
39
+ ::RDF::URI.new("info:fedora/#{object.pid}/#{object.dsid}")
40
+ elsif object.respond_to? :internal_uri
41
+ ::RDF::URI.new(object.internal_uri)
42
+ elsif object.is_a? ::RDF::Resource
43
+ object
44
+ elsif literal
45
+ result = ::RDF::Literal.new(object)
46
+ case # invalid datatypes for FCRepo 3
47
+ when result.datatype.eql?(::RDF::XSD.integer)
48
+ result.datatype = (signed_bit_length(result.object) > XSD_INT_BITLENGTH ? ::RDF::XSD.long : ::RDF::XSD.int)
49
+ when result.datatype.eql?(::RDF::XSD.decimal)
50
+ result.datatype = ::RDF::XSD.double
51
+ when result.datatype.eql?(::RDF::XSD.boolean)
52
+ result.datatype = nil
53
+ when result.datatype.eql?(::RDF::XSD.date)
54
+ result = ::RDF::Literal.new(object.to_datetime)
55
+ when result.datatype.eql?(::RDF::XSD.time)
56
+ result = ::RDF::Literal.new(object.to_datetime)
57
+ end
58
+ result
59
+ else
60
+ ::RDF::URI.new(object.to_s)
61
+ end
62
+ end
63
+
64
+ def to_predicate(arg)
65
+ return :p if arg.nil?
66
+ if arg.is_a? Symbol
67
+ arg = ActiveFedora::Predicates.find_graph_predicate(arg)
68
+ elsif arg.is_a? ::RDF::Resource
69
+ arg
70
+ else
71
+ ::RDF::URI.new(arg.to_s)
72
+ end
73
+ end
74
+
75
+ def build_statement(datastream, predicate, object, literal=false)
76
+ subject = to_resource(datastream)
77
+ predicate = to_predicate(predicate)
78
+ object = to_resource(object,literal)
79
+ ::RDF::Statement.new(subject,predicate,object)
80
+ end
81
+
82
+ def add_relationship(datastream, predicate, target, literal=false)
83
+ stmt = build_statement(datastream, predicate, target, literal)
84
+ graph.insert(stmt) unless graph.has_statement? stmt
85
+ relationships_will_change!
86
+ end
87
+
88
+ def remove_relationship(datastream, predicate, target, literal=false)
89
+ stmt = build_statement(datastream, predicate, target, literal)
90
+ graph.delete(stmt)
91
+ relationships_will_change!
92
+ end
93
+
94
+ def clear_relationship(datastream, predicate)
95
+ graph.delete [to_resource(datastream), to_predicate(predicate), nil]
96
+ relationships_will_change!
97
+ end
98
+
99
+ def relationships(*args)
100
+ q_args = args.empty? ? [:s, :p, :o] : [to_resource(args.first), to_predicate(args[1]), (args[2] || :o)]
101
+ query = ::RDF::Query.new do |query|
102
+ query << q_args
103
+ end
104
+ query.execute(graph).map(&:to_hash).map do |hash|
105
+ stmt = q_args.map {|k| hash[k] || k}
106
+ ::RDF::Statement.new(*stmt)
107
+ end
108
+ end
109
+
110
+ def load_relationships
111
+ # load from content
112
+ g = ::RDF::Graph.new
113
+ ::RDF::RDFXML::Reader.new(content).each do |stmt|
114
+ g << stmt
115
+ end
116
+ self.relationships_loaded = true
117
+ clear_attribute_changes 'relationships'
118
+ @graph = g
119
+ end
120
+
121
+ def graph
122
+ @graph ||= load_relationships
123
+ end
124
+
125
+ def to_rels_int
126
+ xml = Cul::Hydra::RelsInt::RDFXMLWriter.buffer(:max_depth=>1) do |writer|
127
+ graph.each_statement do |statement|
128
+ writer << statement
129
+ end
130
+ end
131
+ xml
132
+ end
133
+
134
+ def self.xml_template
135
+ "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"></rdf:RDF>"
136
+ end
137
+
138
+ def to_solr(solr_doc=Hash.new)
139
+ result = super(solr_doc)
140
+ result = solrize_relationships(result)
141
+ result
142
+ end
143
+
144
+ def from_solr(solr_doc)
145
+ predicate_symbol = self.profile_solr_name
146
+ value = (solr_doc[predicate_symbol].nil? ? solr_doc[predicate_symbol.to_s]: solr_doc[predicate_symbol])
147
+ @solr_hash = value.blank? ? nil : JSON.parse(value[0])
148
+ end
149
+
150
+ def solrize_relationships(solr_doc=Hash.new)
151
+ rel_hash = {} # the rels_int_profile is a hash of hashes in json
152
+ graph.each_statement do |statement|
153
+ predicate = ActiveFedora::Predicates.short_predicate(statement.predicate)
154
+ literal = statement.object.kind_of?(::RDF::Literal)
155
+ val = literal ? statement.object.value : statement.object.to_str
156
+ rel_hash[statement.subject] ||= {}
157
+ rel_hash[statement.subject][predicate] ||= []
158
+ rel_hash[statement.subject][predicate] << val
159
+ end
160
+ solr_doc[self.class.profile_solr_name] = rel_hash.to_json unless rel_hash.blank?
161
+ solr_doc
162
+ end
163
+ class UriObject
164
+ def initialize(resource)
165
+ @resource = resource
166
+ end
167
+ end
168
+ private
169
+ def signed_bit_length(num)
170
+ if num.respond_to? :bit_length
171
+ num.bit_length
172
+ else # in MRI 1.9.x, we need to implement the two complement bitlength
173
+ Math.log2(num < 0 ? num.abs : num+1).ceil
174
+ end
175
+ end
176
+ end
177
+ end
178
+ end
179
+ end
@@ -4,7 +4,6 @@ class DcDocument < ActiveFedora::Base
4
4
  include ::ActiveFedora::Associations
5
5
  include ::ActiveFedora::FinderMethods::RepositoryMethods
6
6
  include ::ActiveFedora::DatastreamCollections
7
- include Hydra::ModelMethods
8
7
  include Cul::Hydra::Models::Common
9
8
  #alias :file_objects :resources
10
9
 
@@ -3,7 +3,6 @@ require "active_fedora_finders"
3
3
  class GenericAggregator < ::ActiveFedora::Base
4
4
  include ::ActiveFedora::FinderMethods::RepositoryMethods
5
5
  include ::ActiveFedora::DatastreamCollections
6
- include Hydra::ModelMethods
7
6
  include Cul::Hydra::Models::Common
8
7
  include Cul::Hydra::Models::Aggregator
9
8
 
@@ -4,7 +4,6 @@ class GenericObject < ::ActiveFedora::Base
4
4
  extend ActiveModel::Callbacks
5
5
  include ::ActiveFedora::FinderMethods::RepositoryMethods
6
6
  include ::ActiveFedora::DatastreamCollections
7
- include ::Hydra::ModelMethods
8
7
  include Cul::Hydra::Models::Common
9
8
  include Cul::Hydra::Models::Aggregator
10
9
 
@@ -8,11 +8,10 @@ class GenericResource < ::ActiveFedora::Base
8
8
  extend ActiveModel::Callbacks
9
9
  include ::ActiveFedora::FinderMethods::RepositoryMethods
10
10
  include ::ActiveFedora::DatastreamCollections
11
- include ::Hydra::ModelMethods
12
11
  include Cul::Hydra::Models::Common
13
12
  include Cul::Hydra::Models::ImageResource
13
+ include Cul::Hydra::Models::RelsInt
14
14
  include Cul::Hydra::Fedora::UrlHelperBehavior
15
- include ::ActiveFedora::RelsInt
16
15
 
17
16
  has_and_belongs_to_many :containers, :property=>:cul_member_of, :class_name=>'ActiveFedora::Base'
18
17
 
@@ -22,7 +21,6 @@ class GenericResource < ::ActiveFedora::Base
22
21
 
23
22
  has_datastream :name => "content", :type=>::ActiveFedora::Datastream, :versionable => true
24
23
  has_metadata :name => "accessControlMetadata", :type=>Cul::Hydra::Datastreams::AccessControlMetadata, :versionable => false
25
- has_metadata :name=>"RELS-INT", :type=>ActiveFedora::RelsInt::Datastream
26
24
 
27
25
  rdf_types(RDF::CUL.Resource)
28
26
  rdf_types(RDF::PCDM.Object)
@@ -0,0 +1,2 @@
1
+ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
2
+ </rdf:RDF>
@@ -0,0 +1,19 @@
1
+ <datastreamProfile xmlns="http://www.fedora.info/definitions/1/0/management/"
2
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
+ xsi:schemaLocation="http://www.fedora.info/definitions/1/0/management/ http://www.fedora.info/definitions/1/0/datastreamProfile.xsd"
4
+ pid="test:relsint" dsID="RELS-INT">
5
+ <dsLabel>Mock Profile Response</dsLabel>
6
+ <dsVersionID>RELS-INT.0</dsVersionID>
7
+ <dsCreateDate>2012-07-23T21:56:16.636Z</dsCreateDate>
8
+ <dsState>A</dsState>
9
+ <dsMIME>application/rdf+xml</dsMIME>
10
+ <dsFormatURI />
11
+ <dsControlGroup>X</dsControlGroup>
12
+ <dsSize>802</dsSize>
13
+ <dsVersionable>true</dsVersionable>
14
+ <dsInfoType/>
15
+ <dsLocation>mocked+object</dsLocation>
16
+ <dsLocationType/>
17
+ <dsChecksumType>DISABLED</dsChecksumType>
18
+ <dsChecksum>none</dsChecksum>
19
+ </datastreamProfile>
@@ -0,0 +1,12 @@
1
+ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
2
+ <rdf:Description rdf:about="info:fedora/test:relsint/DC">
3
+ <isMetadataFor rdf:resource="info:fedora/test:relsint/RELS-INT" xmlns="info:fedora/fedora-system:def/relations-external#"/>
4
+ <isMetadataFor rdf:resource="info:fedora/test:relsint/RELS-EXT" xmlns="info:fedora/fedora-system:def/relations-external#"/>
5
+ </rdf:Description>
6
+ <rdf:Description rdf:about="info:fedora/test:relsint/RELS-EXT">
7
+ <asserts xmlns="http://projecthydra.org/ns/relations#">FOO</asserts>
8
+ </rdf:Description>
9
+ <rdf:Description rdf:about="info:fedora/test:relsint/RELS-INT">
10
+ <asserts xmlns="http://projecthydra.org/ns/relations#">BAR</asserts>
11
+ </rdf:Description>
12
+ </rdf:RDF>