Class: Cul::Hydra::Fedora::DummyObject
- Inherits:
-
Object
- Object
- Cul::Hydra::Fedora::DummyObject
- Defined in:
- lib/cul_hydra/fedora/dummy_object.rb
Instance Attribute Summary collapse
-
#pid ⇒ Object
Returns the value of attribute pid.
Instance Method Summary collapse
- #connection ⇒ Object
-
#initialize(pid, isNew = false) ⇒ DummyObject
constructor
A new instance of DummyObject.
- #internal_uri ⇒ Object
- #new_record=(val) ⇒ Object
- #new_record? ⇒ Boolean
- #repository ⇒ Object
- #spawn(pid) ⇒ Object
Constructor Details
#initialize(pid, isNew = false) ⇒ DummyObject
Returns a new instance of DummyObject.
6 7 8 9 |
# File 'lib/cul_hydra/fedora/dummy_object.rb', line 6 def initialize(pid, isNew=false) @pid = pid @isNew = isNew end |
Instance Attribute Details
#pid ⇒ Object
Returns the value of attribute pid.
5 6 7 |
# File 'lib/cul_hydra/fedora/dummy_object.rb', line 5 def pid @pid end |
Instance Method Details
#connection ⇒ Object
19 20 21 |
# File 'lib/cul_hydra/fedora/dummy_object.rb', line 19 def connection Cul::Hydra::Fedora.connection end |
#internal_uri ⇒ Object
16 17 18 |
# File 'lib/cul_hydra/fedora/dummy_object.rb', line 16 def internal_uri @uri ||= "info:fedora/#{@pid}" end |
#new_record=(val) ⇒ Object
13 14 15 |
# File 'lib/cul_hydra/fedora/dummy_object.rb', line 13 def new_record=(val) @isNew = val end |
#new_record? ⇒ Boolean
10 11 12 |
# File 'lib/cul_hydra/fedora/dummy_object.rb', line 10 def new_record? @isNew end |
#repository ⇒ Object
22 23 24 |
# File 'lib/cul_hydra/fedora/dummy_object.rb', line 22 def repository Cul::Hydra::Fedora.repository end |
#spawn(pid) ⇒ Object
25 26 27 28 29 30 |
# File 'lib/cul_hydra/fedora/dummy_object.rb', line 25 def spawn(pid) s = DummyObject.new(pid, @isNew) s.connection= connection s.repository= repository s end |