Class: Stash::Sword::DepositReceipt

Inherits:
Object
  • Object
show all
Includes:
XML::MappingExtensions::Namespaced
Defined in:
lib/stash/sword/deposit_receipt.rb

Instance Method Summary collapse

Instance Method Details

#edit_iri



33
34
35
36
# File 'lib/stash/sword/deposit_receipt.rb', line 33

def edit_iri
  edit_iri = link(rel: 'edit')
  edit_iri.href if edit_iri
end

#em_iri



28
29
30
31
# File 'lib/stash/sword/deposit_receipt.rb', line 28

def em_iri
  em_iri = link(rel: 'edit-media')
  em_iri.href if em_iri
end


23
24
25
26
# File 'lib/stash/sword/deposit_receipt.rb', line 23

def link(rel:)
  rel = rel.to_s if rel
  links.find { |l| l.rel == rel }
end

#se_iri



38
39
40
41
# File 'lib/stash/sword/deposit_receipt.rb', line 38

def se_iri
  se_iri = link(rel: URI('http://purl.org/net/sword/terms/add'))
  se_iri.href if em_iri
end