active-fedora 7.3.1 → 8.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +17 -7
  3. data/Gemfile +0 -3
  4. data/active-fedora.gemspec +5 -5
  5. data/gemfiles/rails3.gemfile +5 -0
  6. data/gemfiles/rails4.1.gemfile +5 -0
  7. data/gemfiles/rails4.gemfile +5 -0
  8. data/lib/active_fedora.rb +1 -1
  9. data/lib/active_fedora/associations/belongs_to_association.rb +8 -21
  10. data/lib/active_fedora/attributes.rb +13 -12
  11. data/lib/active_fedora/base.rb +1 -1
  12. data/lib/active_fedora/datastream.rb +3 -6
  13. data/lib/active_fedora/indexing.rb +1 -1
  14. data/lib/active_fedora/om_datastream.rb +1 -5
  15. data/lib/active_fedora/predicates.rb +2 -2
  16. data/lib/active_fedora/rdf.rb +6 -2
  17. data/lib/active_fedora/rdf/fcrepo.rb +326 -0
  18. data/lib/active_fedora/rdf/identifiable.rb +6 -3
  19. data/lib/active_fedora/rdf/indexing.rb +3 -15
  20. data/lib/active_fedora/rdf/persistence.rb +33 -0
  21. data/lib/active_fedora/rdf/project_hydra.rb +12 -0
  22. data/lib/active_fedora/rdf/rdf_datastream.rb +33 -15
  23. data/lib/active_fedora/rdf_xml_writer.rb +2 -2
  24. data/lib/active_fedora/relationship_graph.rb +8 -8
  25. data/lib/active_fedora/semantic_node.rb +3 -15
  26. data/lib/active_fedora/solr_digital_object.rb +2 -2
  27. data/lib/active_fedora/solr_service.rb +1 -8
  28. data/lib/active_fedora/version.rb +1 -1
  29. data/lib/generators/active_fedora/config/fedora/templates/fedora.yml +24 -0
  30. data/lib/tasks/active_fedora_dev.rake +1 -1
  31. data/spec/integration/belongs_to_association_spec.rb +0 -5
  32. data/spec/integration/json_serialization_spec.rb +1 -1
  33. data/spec/integration/load_from_solr_spec.rb +8 -1
  34. data/spec/integration/ntriples_datastream_spec.rb +18 -18
  35. data/spec/integration/om_datastream_spec.rb +2 -2
  36. data/spec/integration/rdf_nested_attributes_spec.rb +1 -1
  37. data/spec/integration/relation_delegation_spec.rb +3 -3
  38. data/spec/samples/hydra-mods_article_datastream.rb +0 -4
  39. data/spec/support/an_active_model.rb +0 -4
  40. data/spec/unit/active_fedora_spec.rb +3 -3
  41. data/spec/unit/attributes_spec.rb +37 -54
  42. data/spec/unit/base_extra_spec.rb +0 -9
  43. data/spec/unit/om_datastream_spec.rb +14 -14
  44. data/spec/unit/rdf_resource_datastream_spec.rb +59 -9
  45. data/spec/unit/rdf_vocab_spec.rb +30 -0
  46. data/spec/unit/solr_digital_object_spec.rb +2 -2
  47. data/spec/unit/solr_service_spec.rb +0 -6
  48. data/spec/unit/validations_spec.rb +4 -4
  49. metadata +27 -32
  50. data/lib/active_fedora/rdf/object_resource.rb +0 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 57d7918db145ba9a065916eabcf7186aca11ea0d
4
- data.tar.gz: 39bed85ba848af7ffd39959bf895fbe0d55df622
3
+ metadata.gz: 7909cf9014f4e3665227e1f03944fa2054069851
4
+ data.tar.gz: 526a2cc9e465cfa6609ee0d081112c499c0eb7e2
5
5
  SHA512:
6
- metadata.gz: aa143531f06d9705b621370eb0b627e4422d73a3efd76f1a3749e44799a2749db3cd3a77a8ccac59363dd612a10f3782f2f7aa858770d7a5e9ecbb85cc680d86
7
- data.tar.gz: e2206daff741dac75327639cd8bc5cf9cbf69b319cc5728f6ebef3fc0102ed4d373a0105218b2105f0dbc751c67a9f647e02834172e19db34d7808c9936925c3
6
+ metadata.gz: f469d40ec49ab052e6e450bcfd5dc241833ba0841dbcc5b2810438741ca9439d4d998f98f0467e4a90de951b228b6cc91e8d5ce50a70babc1739bdbbe9da6553
7
+ data.tar.gz: fd2c7523a5417eca49f6d496269796fad41da72f2b51f1a178bad3782324f9bdb1d68f07216257d7429f39d0468c36e07e135ed4e5e8ee172f8dda23260b6c6c
data/.travis.yml CHANGED
@@ -1,16 +1,26 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.3.1
3
+ - 2.1.1
4
4
 
5
+ gemfile:
6
+ - gemfiles/rails3.gemfile
7
+ - gemfiles/rails4.gemfile
8
+ - gemfiles/rails4.1.gemfile
9
+
10
+
5
11
  matrix:
6
12
  include:
7
- - rvm: 2.2.5
8
- env: RAILS_VERSION=4.2.7.1
9
- - rvm: 2.1.10
10
- env: RAILS_VERSION=4.2.7.1
13
+ - rvm: 2.1.0
14
+ gemfile: gemfiles/rails4.gemfile
15
+ - rvm: 2.0.0
16
+ gemfile: gemfiles/rails4.gemfile
17
+ - rvm: 1.9.3
18
+ gemfile: gemfiles/rails4.gemfile
19
+
20
+
21
+ notifications:
22
+ irc: "irc.freenode.org#projecthydra"
11
23
 
12
24
  env:
13
25
  global:
14
26
  - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
15
-
16
- jdk: oraclejdk8
data/Gemfile CHANGED
@@ -9,6 +9,3 @@ group :test do
9
9
  end
10
10
 
11
11
  gem 'jruby-openssl', :platform=> :jruby
12
- gem 'activemodel', ENV['RAILS_VERSION'] if ENV['RAILS_VERSION']
13
- gem 'linkeddata', '~> 1.99'
14
- gem 'rake', '< 12'
@@ -14,20 +14,20 @@ Gem::Specification.new do |s|
14
14
  s.license = "APACHE2"
15
15
  s.required_ruby_version = '>= 1.9.3'
16
16
 
17
- s.add_dependency 'rsolr', ">= 1.0.10", '< 3'
17
+ s.add_dependency 'rsolr', "~> 1.0.10"
18
18
  s.add_dependency 'om', '~> 3.1'
19
19
  s.add_dependency 'nom-xml', '>= 0.5.1'
20
20
  s.add_dependency "activesupport", '>= 3.0.0'
21
- s.add_dependency "rubydora", '>= 1.8.0', '< 3'
22
- s.add_dependency "active-triples", '~> 0.2.2'
23
- s.add_dependency "rdf-rdfxml", '~> 1.1'
21
+ s.add_dependency "rubydora", '~> 1.8'
22
+ s.add_dependency "active-triples", '~> 0.4.0'
23
+ s.add_dependency "rdf-rdfxml", '~> 1.1.0'
24
24
  s.add_dependency "deprecation"
25
25
  s.add_development_dependency "rdoc"
26
26
  s.add_development_dependency "yard"
27
27
  s.add_development_dependency "rake"
28
28
  s.add_development_dependency "jettywrapper", ">=1.4.0"
29
29
  s.add_development_dependency "rspec", "~> 2.99"
30
- s.add_development_dependency "rspec-its", "~> 1.0.1"
30
+ s.add_development_dependency "rspec-its"
31
31
  s.add_development_dependency "equivalent-xml"
32
32
  s.add_development_dependency "rest-client"
33
33
  s.add_development_dependency "webmock"
@@ -0,0 +1,5 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec :path=>"../"
4
+
5
+ gem 'activemodel', '~> 3.2.13'
@@ -0,0 +1,5 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec :path=>"../"
4
+
5
+ gem 'activemodel', '4.1.0.rc1'
@@ -0,0 +1,5 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec :path=>"../"
4
+
5
+ gem 'activemodel', '~> 4.0.0'
data/lib/active_fedora.rb CHANGED
@@ -53,7 +53,7 @@ module ActiveFedora #:nodoc:
53
53
  autoload :Persistence
54
54
  autoload :QualifiedDublinCoreDatastream
55
55
  autoload :Querying
56
- autoload :Rdf
56
+ autoload :RDF
57
57
  autoload_under 'rdf' do
58
58
  autoload :RDFDatastream
59
59
  autoload :RdfxmlRDFDatastream
@@ -10,25 +10,22 @@ module ActiveFedora
10
10
  end
11
11
 
12
12
  def id_reader
13
- begin
13
+ @full_result ||= begin
14
14
  # need to find the id with the correct class
15
15
  ids = @owner.ids_for_outbound(@reflection.options[:property])
16
16
 
17
- return if ids.empty?
18
-
17
+ return if ids.empty?
19
18
  # This incurs a lot of overhead, but it's necessary if the users use one property for more than one association.
20
19
  # e.g.
21
20
  # belongs_to :author, property: :has_member, class_name: 'Person'
22
21
  # belongs_to :publisher, property: :has_member
23
-
24
- if @owner.reflections.one? { |k, v| v.options[:property] == @reflection.options[:property] }
25
- @full_results = nil
26
- ids.first
27
- else
28
- @full_results = SolrService.query(construct_query(ids))
29
- @full_results.first['id'] if @full_results.present?
22
+
23
+ results = SolrService.query(construct_query(ids))
24
+ if results.present?
25
+ results.first
30
26
  end
31
27
  end
28
+ @full_result['id'] if @full_result
32
29
  end
33
30
 
34
31
  def replace(record)
@@ -58,17 +55,7 @@ module ActiveFedora
58
55
 
59
56
  private
60
57
  def find_target
61
- return unless id_reader
62
-
63
- if @full_result # side-effect from #id_reader
64
- ActiveFedora::SolrService.reify_solr_results([@full_result]).first
65
- else
66
- begin
67
- ActiveFedora::Base.find(id_reader, cast: true)
68
- rescue ActiveFedora::ObjectNotFoundError
69
- nil
70
- end
71
- end
58
+ ActiveFedora::SolrService.reify_solr_results([@full_result]).first if id_reader
72
59
  end
73
60
 
74
61
  # Constructs a query that checks solr for the correct id & class_name combination
@@ -3,7 +3,6 @@ module ActiveFedora
3
3
  extend ActiveSupport::Concern
4
4
  extend ActiveSupport::Autoload
5
5
  include ActiveModel::Dirty
6
- extend Deprecation
7
6
 
8
7
  autoload :Serializers
9
8
 
@@ -63,6 +62,7 @@ module ActiveFedora
63
62
  end
64
63
 
65
64
  private
65
+
66
66
  def array_reader(field, *args)
67
67
  if md = /^(.+)_id$/.match(field)
68
68
  # a belongs_to association reader
@@ -71,7 +71,8 @@ module ActiveFedora
71
71
  end
72
72
  raise UnknownAttributeError, "#{self.class} does not have an attribute `#{field}'" unless self.class.defined_attributes.key?(field)
73
73
 
74
- self.class.defined_attributes[field].reader(self, *args)
74
+ value = self.class.defined_attributes[field].reader(self, *args)
75
+ self.class.multiple?(field) ? value : value.first
75
76
  end
76
77
 
77
78
  def array_setter(field, args)
@@ -81,6 +82,13 @@ module ActiveFedora
81
82
  return association.id_writer(args) if association
82
83
  end
83
84
  raise UnknownAttributeError, "#{self.class} does not have an attribute `#{field}'" unless self.class.defined_attributes.key?(field)
85
+ if self.class.multiple?(field)
86
+ unless args.nil? || args.respond_to?(:each)
87
+ raise ArgumentError, "Cannot set the multi-valued attribute `#{field}' to a scalar value."
88
+ end
89
+ elsif args.respond_to?(:each) # unique
90
+ raise ArgumentError, "Cannot set the single-valued attribute `#{field}' to an enumerable value."
91
+ end
84
92
  self.class.defined_attributes[field].writer(self, args)
85
93
  end
86
94
 
@@ -131,22 +139,15 @@ module ActiveFedora
131
139
  find_or_create_defined_attribute(field, dsid, args)
132
140
 
133
141
  define_method field do |*opts|
134
- val = array_reader(field, *opts)
135
- self.class.multiple?(field) ? val : val.first
142
+ array_reader(field, *opts)
136
143
  end
137
144
  end
138
145
 
139
146
  def create_attribute_setter(field, dsid, args)
140
147
  find_or_create_defined_attribute(field, dsid, args)
148
+
141
149
  define_method "#{field}=".to_sym do |v|
142
- if self.class.multiple?(field)
143
- unless v.nil? || v.respond_to?(:each)
144
- Deprecation.warn(ActiveFedora::Attributes, "You attempted to set the attribute `#{field}' on `#{self.class}' to a scalar value. However, this attribute is declared as being multivalued. This behavior is deprecated and will raise an ArgumentError in active-fedora 8.0.0")
145
- end
146
- elsif v.respond_to?(:each) # unique
147
- Deprecation.warn(ActiveFedora::Attributes, "You attempted to set the attribute `#{field}' on `#{self.class}' to an enumerable value. However, this attribute is declared as being singular. This behavior is deprecated and will raise an ArgumentError in active-fedora 8.0.0")
148
- end
149
- self[field]=v
150
+ self[field] = v
150
151
  end
151
152
  end
152
153
  end
@@ -45,7 +45,7 @@ module ActiveFedora
45
45
  include Core
46
46
  include FedoraAttributes
47
47
  include ReloadOnSave
48
- include Rdf::Identifiable
48
+ include ActiveFedora::RDF::Identifiable
49
49
  end
50
50
 
51
51
  ActiveSupport.run_load_hooks(:active_fedora, Base)
@@ -1,8 +1,8 @@
1
1
  module ActiveFedora
2
2
 
3
- #This class represents a Fedora datastream
3
+ # This class represents a Fedora datastream
4
4
  class Datastream < Rubydora::Datastream
5
- extend Deprecation
5
+
6
6
  attr_writer :digital_object
7
7
  attr_accessor :last_modified
8
8
 
@@ -112,10 +112,7 @@ module ActiveFedora
112
112
  # a prefix other than the default
113
113
  def prefix
114
114
  raise RuntimeError, "to_solr requires the dsid to be set" unless dsid
115
- Deprecation.warn ActiveFedora::Datastream, "In active-fedora 8 the solr fields created by #{self.class} will be prefixed with \"#{dsid.underscore}__\". If you want to maintain the existing behavior, you must override #{self.class}.#prefix to return an empty string"
116
- # In ActiveFedora 8 return this:
117
- #"#{dsid.underscore}__"
118
- ""
115
+ "#{dsid.underscore}__"
119
116
  end
120
117
 
121
118
  end
@@ -55,7 +55,7 @@ module ActiveFedora
55
55
  def solrize_relationships(solr_doc = Hash.new)
56
56
  relationships.each_statement do |statement|
57
57
  predicate = Predicates.short_predicate(statement.predicate)
58
- literal = statement.object.kind_of?(RDF::Literal)
58
+ literal = statement.object.kind_of?(::RDF::Literal)
59
59
  val = literal ? statement.object.value : statement.object.to_str
60
60
  ::Solrizer::Extractor.insert_solr_field_value(solr_doc, solr_name(predicate, :symbol), val )
61
61
  end
@@ -52,8 +52,6 @@ module ActiveFedora
52
52
  solr_doc.merge super({}).each_with_object({}) { |(key, value), new| new[[prefix,key].join] = value }
53
53
  end
54
54
 
55
-
56
- # ** Experimental **
57
55
  # This method is called by +get_values+ if this datastream has been initialized by calling from_solr method via
58
56
  # ActiveFedora::Base.load_instance_from_solr. This method retrieves values from a preinitialized @internal_solr_doc instead of xml.
59
57
  # This makes the datastream read-only and this method is not intended to be used in any other case.
@@ -186,10 +184,9 @@ module ActiveFedora
186
184
  end
187
185
 
188
186
  def generate_solr_symbol(base, data_type)
189
- ActiveFedora::SolrService.solr_name([prefix,base].join, type: data_type)
187
+ ActiveFedora::SolrService.solr_name([prefix, base].join, type: data_type)
190
188
  end
191
189
 
192
- # ** Experimental **
193
190
  #@return [Boolean] true if either the key for name exists in solr or if its string value exists
194
191
  #@param [String] name Name of key to look for
195
192
  #@param [Solr::Document] solr_doc Solr doc to query
@@ -197,7 +194,6 @@ module ActiveFedora
197
194
  !solr_doc[name].nil? || !solr_doc[name.to_s].nil?
198
195
  end
199
196
 
200
- # ** Experimental **
201
197
  #@return true if the term_pointer contains an index
202
198
  # ====Example:
203
199
  # [:image, {:title_set=>1}, :title] return true
@@ -6,7 +6,7 @@ module ActiveFedora
6
6
  namespace = match[1]
7
7
  predicate = match[2]
8
8
  Predicates.predicate_mappings[namespace].invert[predicate]
9
- elsif predicate.kind_of? RDF::URI
9
+ elsif predicate.kind_of? ::RDF::URI
10
10
  predicate.to_s.split('/', 4).last.gsub(/(\/|#)/, '_').underscore
11
11
  else
12
12
  raise "Unable to parse predicate: #{predicate}"
@@ -44,7 +44,7 @@ module ActiveFedora
44
44
  def self.vocabularies(vocabs = {})
45
45
  @vocabularies ||= vocabs
46
46
  predicate_mappings.keys.each do |ns|
47
- @vocabularies[ns] = RDF::Vocabulary.new(ns) unless @vocabularies.has_key? ns
47
+ @vocabularies[ns] = ::RDF::Vocabulary.new(ns) unless @vocabularies.has_key? ns
48
48
  end
49
49
  @vocabularies
50
50
  end
@@ -1,11 +1,14 @@
1
1
  module ActiveFedora
2
- module Rdf
2
+ module RDF
3
3
  extend ActiveSupport::Autoload
4
+ autoload :Fcrepo
4
5
  autoload :Indexing
5
6
  autoload :Identifiable
6
7
  autoload :ObjectResource
8
+ autoload :Persistence
9
+ autoload :ProjectHydra
7
10
 
8
- # Aliases for deprecated ActiveFedora::Rdf Classes/Modules
11
+ # Aliases for deprecated ActiveFedora::RDF Classes/Modules
9
12
  # TODO: Remove in 8.0.0
10
13
  Resource = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('ActiveFedora::Rdf::Resource', 'ActiveTriples::Resource')
11
14
  Term = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('ActiveFedora::Rdf::Term', 'ActiveTriples::Term')
@@ -16,4 +19,5 @@ module ActiveFedora
16
19
  NodeConfig = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('ActiveFedora::Rdf::NodeConfig', 'ActiveTriples::NodeConfig')
17
20
  NestedAttributes = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('ActiveFedora::Rdf::NestedAttributes', 'ActiveTriples::NestedAttributes')
18
21
  end
22
+ Rdf = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('ActiveFedora::Rdf', 'ActiveFedora::RDF')
19
23
  end
@@ -0,0 +1,326 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # This file generated automatically using vocab-fetch from github.com:fcrepo3/fcrepo/master/fcrepo-server/src/main/resources/rdfs/fedora_relsext_ontology.rdfs
3
+ # and edited for clarity and additional terms published in different serializations of the voabularies
4
+ require 'rdf'
5
+ module ActiveFedora::RDF
6
+ module Fcrepo
7
+ class System < ::RDF::StrictVocabulary("info:fedora/fedora-system:")
8
+ term :"ContentModel-3.0",
9
+ comment: %(Base Fedora 3 CModel cModel).freeze,
10
+ label: "Fedora 3 Content Model".freeze,
11
+ subClassOf: "info:fedora/fedora-system:def/model#FedoraObject".freeze,
12
+ type: "info:fedora/fedora-system:def/model#FedoraObject".freeze
13
+ term :"FedoraObject-3.0",
14
+ comment: %(Base Fedora 3 Object cModel).freeze,
15
+ label: "Fedora 3 Object".freeze,
16
+ subClassOf: "info:fedora/fedora-system:def/model#FedoraObject".freeze,
17
+ type: "info:fedora/fedora-system:def/model#FedoraObject".freeze
18
+ term :"ServiceDefinition-3.0",
19
+ comment: %(Fedora 3 Service Definition/BDef cModel).freeze,
20
+ label: "Fedora 3 Service Definition".freeze,
21
+ subClassOf: "info:fedora/fedora-system:def/model#FedoraObject".freeze,
22
+ type: "info:fedora/fedora-system:def/model#FedoraObject".freeze
23
+ term :"ServiceDeployment-3.0",
24
+ comment: %(Fedora 3 Service Deployment/BMech cModel).freeze,
25
+ label: "Fedora 3 Service Deployment".freeze,
26
+ subClassOf: "info:fedora/fedora-system:def/model#FedoraObject".freeze,
27
+ type: "info:fedora/fedora-system:def/model#FedoraObject".freeze
28
+ end
29
+ class Model < ::RDF::StrictVocabulary("info:fedora/fedora-system:def/model#")
30
+ # Class definitions
31
+ term :FedoraObject,
32
+ comment: %(The base type of all objects in Fedora).freeze,
33
+ label: "FedoraObject".freeze,
34
+ subClassOf: "rdfs:Resource".freeze,
35
+ type: "rdfs:Class".freeze
36
+ term :Datastream,
37
+ comment: %(Binary data associated with a Fedora object).freeze,
38
+ label: "Datastream".freeze,
39
+ subClassOf: "rdfs:Resource".freeze,
40
+ type: "rdfs:Class".freeze
41
+ term :ExtProperty,
42
+ comment: %(Reification of an extension property of a Fedora object used in messaging).freeze,
43
+ label: "ExtProperty".freeze,
44
+ subClassOf: "rdf:Property".freeze,
45
+ type: "rdfs:Class".freeze
46
+ term :State,
47
+ comment: %(The state of a Fedora object or datastream).freeze,
48
+ label: "State".freeze,
49
+ subClassOf: "rdfs:Resource".freeze,
50
+ type: "rdfs:Class".freeze
51
+ term :Active,
52
+ comment: %(State of an object available in the repository).freeze,
53
+ label: "Active".freeze,
54
+ subClassOf: "rdfs:Resource".freeze,
55
+ type: "info:fedora/fedora-system:def/model#State".freeze
56
+ term :Deleted,
57
+ comment: %(State of an object that should be considered deleted, but is not purged).freeze,
58
+ label: "Deleted".freeze,
59
+ subClassOf: "rdfs:Resource".freeze,
60
+ type: "info:fedora/fedora-system:def/model#State".freeze
61
+ term :Inactive,
62
+ comment: %(State of an object that should be considered temporarily unavailable).freeze,
63
+ label: "Inactive".freeze,
64
+ subClassOf: "rdfs:Resource".freeze,
65
+ type: "info:fedora/fedora-system:def/model#State".freeze
66
+ # Property definitions
67
+ property :altIds,
68
+ comment: %(The alternate IDs for a datastream).freeze,
69
+ label: "Alternate IDs".freeze,
70
+ domain: "info:fedora/fedora-system:def/model#Datastream",
71
+ range: "xsd:string".freeze,
72
+ type: "rdf:Property".freeze
73
+ property :controlGroup,
74
+ comment: %(indicates whether a Datastream's content is inline XML (X), Managed (M), Referenced (R) or External (E)).freeze,
75
+ label: "controlGroup".freeze,
76
+ domain: "info:fedora/fedora-system:def/model#Datastream",
77
+ range: "xsd:string".freeze,
78
+ type: "rdf:Property".freeze
79
+ property :createdDate,
80
+ comment: %(The UTC datetime an object was created).freeze,
81
+ label: "createdDate".freeze,
82
+ domain: "info:fedora/fedora-system:def/model#FedoraObject",
83
+ range: "xsd:dateTimeStamp".freeze,
84
+ type: "rdf:Property".freeze
85
+ property :definesMethod,
86
+ comment: %(indicates the name of a service method defined in this interface).freeze,
87
+ label: "definesMethod".freeze,
88
+ domain: "info:fedora/fedora-system:ServiceDefinition-3.0".freeze,
89
+ range: "xsd:NCName".freeze,
90
+ type: "rdf:Property".freeze
91
+ property :digest,
92
+ comment: %(indicates the checksum digest of a datastream's contents or the keyword 'none').freeze,
93
+ label: "digest".freeze,
94
+ domain: "info:fedora/fedora-system:def/model#Datastream",
95
+ range: "xsd:string".freeze,
96
+ type: "rdf:Property".freeze
97
+ property :digestType,
98
+ comment: %(indicates either the checksum algorithm or the keyword DISABLED).freeze,
99
+ label: "digestType".freeze,
100
+ domain: "info:fedora/fedora-system:def/model#Datastream",
101
+ range: "xsd:string".freeze,
102
+ type: "rdf:Property".freeze
103
+ property :downloadFilename,
104
+ comment: %(indicates the name to be used when downloading a datastream's contents).freeze,
105
+ label: "downloadFilename".freeze,
106
+ domain: "info:fedora/fedora-system:def/model#Datastream",
107
+ range: "xsd:string".freeze,
108
+ type: "rdf:Property".freeze
109
+ property :extProperty,
110
+ comment: %(indicates an extension property of an object in Fedora in messaging).freeze,
111
+ label: "extProperty".freeze,
112
+ domain: "info:fedora/fedora-system:def/model#FedoraObject".freeze,
113
+ range: "info:fedora/fedora-system:def/model#ExtProperty".freeze,
114
+ type: "rdf:Property".freeze
115
+ property :formatURI,
116
+ comment: %(A URI indicating the format of a datastream's content).freeze,
117
+ label: "formatURI".freeze,
118
+ type: "rdf:Property".freeze
119
+ property :hasModel,
120
+ comment: %(Indicates the Fedora 3 CModels for this object).freeze,
121
+ label: "hasModel".freeze,
122
+ subPropertyOf: "rdf:type".freeze,
123
+ domain: "info:fedora/fedora-system:FedoraObject-3.0".freeze,
124
+ range: "info:fedora/fedora-system:ContentModel-3.0".freeze,
125
+ type: "rdf:Property".freeze
126
+ property :hasService,
127
+ comment: %(indicates the Fedora 3 Service Definitions applicable to this CModel).freeze,
128
+ label: "hasService".freeze,
129
+ domain: "info:fedora/fedora-system:ContentModel-3.0".freeze,
130
+ range: "info:fedora/fedora-system:ServiceDefinition-3.0".freeze,
131
+ type: "rdf:Property".freeze
132
+ property :isContractorOf,
133
+ comment: %(indicates the Fedora 3 Content Models this deployment applies to).freeze,
134
+ label: "".freeze,
135
+ domain: "info:fedora/fedora-system:ServiceDeployment-3.0".freeze,
136
+ range: "info:fedora/fedora-system:ContentModel-3.0".freeze,
137
+ type: "rdf:Property".freeze
138
+ property :isDeploymentOf,
139
+ comment: %(indicates the Fedora 3 Service Definitions this deployment implements).freeze,
140
+ label: "isDeploymentOf".freeze,
141
+ domain: "info:fedora/fedora-system:ServiceDeployment-3.0".freeze,
142
+ range: "info:fedora/fedora-system:ServiceDefinition-3.0".freeze,
143
+ type: "rdf:Property".freeze
144
+ property :label,
145
+ comment: %(The label applied to a Fedora object).freeze,
146
+ label: "label".freeze,
147
+ domain: "info:fedora/fedora-system:def/model#FedoraObject".freeze,
148
+ range: "xsd:string".freeze,
149
+ type: "rdf:Property".freeze
150
+ property :length,
151
+ comment: %(indicates the length of a datastream's contents).freeze,
152
+ label: "length".freeze,
153
+ domain: "info:fedora/fedora-system:def/model#Datastream".freeze,
154
+ range: "xsd:nonNegativeInteger".freeze,
155
+ type: "rdf:Property".freeze
156
+ property :ownerId,
157
+ comment: %(indicates the owner of an object).freeze,
158
+ label: "ownerId".freeze,
159
+ type: "rdf:Property".freeze
160
+ property :state,
161
+ comment: %(indicates the state of the object or datastream).freeze,
162
+ label: "state".freeze,
163
+ domain: ["info:fedora/fedora-system:def/model#FedoraObject".freeze,"info:fedora/fedora-system:def/model#Datastream".freeze],
164
+ range: "info:fedora/fedora-system:def/model#State".freeze,
165
+ type: "rdf:Property".freeze
166
+ property :versionable,
167
+ comment: %(indicates whether a datastream's property and contents changes are being tracked as versions).freeze,
168
+ label: "versionable".freeze,
169
+ domain: "info:fedora/fedora-system:def/model#Datastream".freeze,
170
+ range: "xsd:boolean".freeze,
171
+ type: "rdf:Property".freeze
172
+ end
173
+ class RelsExt < ::RDF::StrictVocabulary("info:fedora/fedora-system:def/relations-external#")
174
+
175
+ # Property definitions
176
+ property :fedoraRelationship,
177
+ comment: %(The primitive property for all object-to-object relationships in the fedora ontology).freeze,
178
+ label: "Fedora Relationship".freeze,
179
+ type: "rdf:Property".freeze
180
+ property :hasAnnotation,
181
+ comment: %(A refinement of the generic descriptive relationship indicating a commentary relationship between fedora objects. The subject is a fedora object that is being commented on and the predicate is a fedora object that represents an annotation or comment about the subject. ).freeze,
182
+ label: "Has Annotation".freeze,
183
+ subPropertyOf: "info:fedora/fedora-system:def/relations-external#hasDescription".freeze,
184
+ "owl:inverseOf" => %(info:fedora/fedora-system:def/relations-external#isAnnotationOf).freeze,
185
+ type: "rdf:Property".freeze
186
+ property :hasCollectionMember,
187
+ label: "Has Collection Member".freeze,
188
+ subPropertyOf: "info:fedora/fedora-system:def/relations-external#hasMember".freeze,
189
+ "owl:inverseOf" => %(info:fedora/fedora-system:def/relations-external#isMemberOfCollection).freeze,
190
+ type: "rdf:Property".freeze
191
+ property :hasConstituent,
192
+ label: "Has Constituent".freeze,
193
+ subPropertyOf: "info:fedora/fedora-system:def/relations-external#hasPart".freeze,
194
+ "owl:inverseOf" => %(info:fedora/fedora-system:def/relations-external#isConstituentOf).freeze,
195
+ type: "rdf:Property".freeze
196
+ property :hasDependent,
197
+ label: "Has Dependent".freeze,
198
+ subPropertyOf: "info:fedora/fedora-system:def/relations-external#fedoraRelationship".freeze,
199
+ "owl:inverseOf" => %(info:fedora/fedora-system:def/relations-external#isDependentOf).freeze,
200
+ type: "rdf:Property".freeze
201
+ property :hasDerivation,
202
+ label: "Has Derivation".freeze,
203
+ subPropertyOf: "info:fedora/fedora-system:def/relations-external#fedoraRelationship".freeze,
204
+ "owl:inverseOf" => %(info:fedora/fedora-system:def/relations-external#isDerivationOf).freeze,
205
+ type: "rdf:Property".freeze
206
+ property :hasDescription,
207
+ comment: %(A generic descriptive relationship between fedora objects. The subject is a fedora object that is being described in some manner and the predicate is a fedora object that represents a descriptive entity that is about the subject. ).freeze,
208
+ label: "Has Description".freeze,
209
+ subPropertyOf: "info:fedora/fedora-system:def/relations-external#fedoraRelationship".freeze,
210
+ "owl:inverseOf" => %(info:fedora/fedora-system:def/relations-external#isDescriptionOf).freeze,
211
+ type: "rdf:Property".freeze
212
+ property :hasEquivalent,
213
+ label: "Has Equivalent".freeze,
214
+ subPropertyOf: "info:fedora/fedora-system:def/relations-external#fedoraRelationship".freeze,
215
+ type: "rdf:Property".freeze
216
+ property :hasMember,
217
+ label: "Has Member".freeze,
218
+ subPropertyOf: "info:fedora/fedora-system:def/relations-external#hasPart/".freeze,
219
+ "owl:inverseOf" => %(info:fedora/fedora-system:def/relations-external#isMemberOf).freeze,
220
+ type: "rdf:Property".freeze
221
+ property :hasMetadata,
222
+ comment: %(A refinement of the generic descriptive relationship indicating a metadata relationship between fedora objects. The subject is a fedora object and the predicate is a fedora object that represents metadata about the subject. ).freeze,
223
+ label: "Has Metadata".freeze,
224
+ subPropertyOf: "info:fedora/fedora-system:def/relations-external#hasDescription".freeze,
225
+ "owl:inverseOf" => %(info:fedora/fedora-system:def/relations-external#isMetadataFor).freeze,
226
+ type: "rdf:Property".freeze
227
+ property :hasPart,
228
+ label: "Has Part".freeze,
229
+ subPropertyOf: "info:fedora/fedora-system:def/relations-external#fedoraRelationship".freeze,
230
+ "owl:inverseOf" => %(info:fedora/fedora-system:def/relations-external#isPartOf).freeze,
231
+ type: "rdf:Property".freeze
232
+ property :hasSubset,
233
+ label: "Has Subset".freeze,
234
+ subPropertyOf: "info:fedora/fedora-system:def/relations-external#hasMember".freeze,
235
+ "owl:inverseOf" => %(info:fedora/fedora-system:def/relations-external#isSubsetOf).freeze,
236
+ type: "rdf:Property".freeze
237
+ property :isAnnotationOf,
238
+ comment: %(A refinement of the generic descriptive relationship indicating a commentary relationship between fedora objects. The subject is a fedora object that represents an annotation or comment and the predicate is a fedora object that is being commented upon by the subject.).freeze,
239
+ label: "Is Annotation Of".freeze,
240
+ subPropertyOf: "info:fedora/fedora-system:def/relations-external#isDescriptionOf".freeze,
241
+ "owl:inverseOf" => %(info:fedora/fedora-system:def/relations-external#hasAnnotation).freeze,
242
+ type: "rdf:Property".freeze
243
+ property :isConstituentOf,
244
+ label: "Is Constituent Of".freeze,
245
+ subPropertyOf: "info:fedora/fedora-system:def/relations-external#isPartOf".freeze,
246
+ "owl:inverseOf" => %(info:fedora/fedora-system:def/relations-external#hasConstituent).freeze,
247
+ type: "rdf:Property".freeze
248
+ property :isDependentOf,
249
+ label: "Is Dependent Of".freeze,
250
+ subPropertyOf: "info:fedora/fedora-system:def/relations-external#fedoraRelationship".freeze,
251
+ "owl:inverseOf" => %(info:fedora/fedora-system:def/relations-external#hasDependent).freeze,
252
+ type: "rdf:Property".freeze
253
+ property :isDerivationOf,
254
+ label: "Is Derivation Of".freeze,
255
+ subPropertyOf: "info:fedora/fedora-system:def/relations-external#fedoraRelationship".freeze,
256
+ "owl:inverseOf" => %(info:fedora/fedora-system:def/relations-external#hasDerivation).freeze,
257
+ type: "rdf:Property".freeze
258
+ property :isDescriptionOf,
259
+ comment: %(A generic descriptive relationship between fedora objects. The subject is a fedora object that represents a descriptive entity and the predicate is a fedora object that is being described in some manner by the subject.).freeze,
260
+ label: "Is Description Of".freeze,
261
+ subPropertyOf: "info:fedora/fedora-system:def/relations-external#fedoraRelationship".freeze,
262
+ "owl:inverseOf" => %(info:fedora/fedora-system:def/relations-external#hasDescription).freeze,
263
+ type: "rdf:Property".freeze
264
+ property :isMemberOf,
265
+ label: "Is Member Of".freeze,
266
+ subPropertyOf: "info:fedora/fedora-system:def/relations-external#isPartOf".freeze,
267
+ "owl:inverseOf" => %(info:fedora/fedora-system:def/relations-external#hasMember).freeze,
268
+ type: "rdf:Property".freeze
269
+ property :isMemberOfCollection,
270
+ label: "Is Member Of Collection".freeze,
271
+ subPropertyOf: "info:fedora/fedora-system:def/relations-external#isMemberOf".freeze,
272
+ "owl:inverseOf" => %(info:fedora/fedora-system:def/relations-external#hasCollectionMember).freeze,
273
+ type: "rdf:Property".freeze
274
+ property :isMetadataFor,
275
+ comment: %(A refinement of the generic descriptive relationship indicating a metadata relationship between fedora objects. The subject is a fedora object that represents metadata and the predicate is a fedora object for which the subject serves as metadata.).freeze,
276
+ label: "Is Metadata For".freeze,
277
+ subPropertyOf: "info:fedora/fedora-system:def/relations-external#isDescriptionOf".freeze,
278
+ "owl:inverseOf" => %(info:fedora/fedora-system:def/relations-external#hasMetadata).freeze,
279
+ type: "rdf:Property".freeze
280
+ property :isPartOf,
281
+ label: "Is Part Of".freeze,
282
+ subPropertyOf: "info:fedora/fedora-system:def/relations-external#fedoraRelationship".freeze,
283
+ "owl:inverseOf" => %(info:fedora/fedora-system:def/relations-external#hasPart).freeze,
284
+ type: "rdf:Property".freeze
285
+ property :isSubsetOf,
286
+ label: "Is Subset Of".freeze,
287
+ subPropertyOf: "info:fedora/fedora-system:def/relations-external#isMemberOf".freeze,
288
+ "owl:inverseOf" => %(info:fedora/fedora-system:def/relations-external#hasSubset).freeze,
289
+ type: "rdf:Property".freeze
290
+ end
291
+ class View < ::RDF::StrictVocabulary("info:fedora/fedora-system:def/view#")
292
+ property :disseminates,
293
+ comment: %(A property used to indicate that an object contains a datastream).freeze,
294
+ label: "disseminates".freeze,
295
+ domain: "info:fedora/fedora-system:FedoraObject-3.0".freeze,
296
+ range: "info:fedora/fedora-system:def/model#Datastream".freeze,
297
+ type: "rdf:Property".freeze
298
+ property :disseminationType,
299
+ comment: %(A property whose object is common to all Datastreams of a given DSID).freeze,
300
+ label: "dissemination type".freeze,
301
+ type: "rdf:Property".freeze
302
+ property :isVolatile,
303
+ comment: %(A property indicating that a datastream's content is a reference to content external to the repository).freeze,
304
+ label: "isVolatile".freeze,
305
+ domain: "info:fedora/fedora-system:def/model#Datastream".freeze,
306
+ range: "xsd:boolean".freeze,
307
+ type: "rdf:Property".freeze
308
+ property :lastModifiedDate,
309
+ comment: %(UTC datetime of the last change to an object or most recent version of this datastream).freeze,
310
+ label: "lastModifiedDate".freeze,
311
+ domain: ["info:fedora/fedora-system:def/model#FedoraObject".freeze,"info:fedora/fedora-system:def/model#Datastream".freeze],
312
+ range: "xsd:dateTimeStamp".freeze,
313
+ type: "rdf:Property".freeze
314
+ property :mimeType,
315
+ comment: %(The MIME type of this datastream's content).freeze,
316
+ label: "mimeType".freeze,
317
+ domain: "info:fedora/fedora-system:def/model#Datastream".freeze,
318
+ range: "xsd:string".freeze,
319
+ type: "rdf:Property".freeze
320
+ property :version,
321
+ comment: %(indicates Fedora server version in messaging).freeze,
322
+ label: "Server version".freeze,
323
+ type: "rdf:Property".freeze
324
+ end
325
+ end
326
+ end