Class: EgaAccessionService

Inherits:
AccessionService show all
Defined in:
app/models/ega_accession_service.rb

Constant Summary

Constants inherited from AccessionService

AccessionService::AccessionServiceError, AccessionService::CenterName, AccessionService::Hold, AccessionService::NumberNotGenerated, AccessionService::NumberNotRequired, AccessionService::Protect

Instance Method Summary collapse

Methods inherited from AccessionService

#accession_dac_xml, #accession_policy_xml, #accession_sample_xml, #accession_study_xml, #dac_visibility, #policy_visibility, #submit, #submit_sample_for_user, #submit_study_for_user

Instance Method Details

#accession_optionsObject


9
10
11
# File 'app/models/ega_accession_service.rb', line 9

def accession_options
  configatron.accession.ega!.to_hash
end

#brokerObject


21
22
23
# File 'app/models/ega_accession_service.rb', line 21

def broker
  'EGA'
end

#private?Boolean

Returns:

  • (Boolean)

34
35
36
# File 'app/models/ega_accession_service.rb', line 34

def private?
  true
end

#providerObject


5
6
7
# File 'app/models/ega_accession_service.rb', line 5

def provider
  :EGA
end

#sample_visibility(_sample) ⇒ Object


13
14
15
# File 'app/models/ega_accession_service.rb', line 13

def sample_visibility(_sample)
  Protect
end

#study_visibility(_study) ⇒ Object


17
18
19
# File 'app/models/ega_accession_service.rb', line 17

def study_visibility(_study)
  Protect
end

#submit_dac_for_user(study, user) ⇒ Object


25
26
27
# File 'app/models/ega_accession_service.rb', line 25

def submit_dac_for_user(study, user)
  submit(user, Accessionable::Dac.new(study))
end

#submit_policy_for_user(study, user) ⇒ Object


29
30
31
32
# File 'app/models/ega_accession_service.rb', line 29

def submit_policy_for_user(study, user)
  policy = Accessionable::Policy.new(study)
  submit(user, policy)
end