Module: Rubydora

Defined in:
lib/rubydora.rb,
lib/rubydora/version.rb,
lib/rubydora/callbacks.rb,
lib/rubydora/datastream.rb,
lib/rubydora/repository.rb,
lib/rubydora/models_mixin.rb,
lib/rubydora/transactions.rb,
lib/rubydora/digital_object.rb,
lib/rubydora/resource_index.rb,
lib/rubydora/rest_api_client.rb,
lib/rubydora/fedora_url_helpers.rb,
lib/rubydora/array_with_callback.rb,
lib/rubydora/relationships_mixin.rb

Defined Under Namespace

Modules: Callbacks, FedoraUrlHelpers, ModelsMixin, RelationshipsMixin, ResourceIndex, RestApiClient, Transactions Classes: ArrayWithCallback, Datastream, DigitalObject, FedoraInvalidRequest, Repository, RubydoraError, Transaction

Constant Summary collapse

VERSION =
self.version

Class Method Summary collapse

Class Method Details

.connect(*args) ⇒ Object

Connect to Fedora Repository

Returns:

  • Rubydora::Repository



33
34
35
# File 'lib/rubydora.rb', line 33

def self.connect *args
  Repository.new *args
end

.default_configObject

Default repository connection information TODO: read ENV variables?

Returns:

  • Hash



53
54
55
# File 'lib/rubydora.rb', line 53

def self.default_config
  {:validateChecksum=>false}
end

.repositoryObject

Connect to the default Fedora Repository

Returns:

  • Rubydora::Repository



39
40
41
# File 'lib/rubydora.rb', line 39

def self.repository
  @repository ||= self.connect(self.default_config)
end

.repository=(repository) ⇒ Object

Set the default Fedora Repository

Parameters:

Returns:

  • Rubydora::Repository



46
47
48
# File 'lib/rubydora.rb', line 46

def self.repository= repository
  @repository = repository
end

.versionObject



4
5
6
# File 'lib/rubydora/version.rb', line 4

def self.version
  @version ||= File.read(File.join(File.dirname(__FILE__), '..', '..', 'VERSION')).chomp
end