Module: Sufia::IdService
- Defined in:
- app/services/sufia/id_service.rb
Class Method Summary collapse
Class Method Details
.mint ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'app/services/sufia/id_service.rb', line 19 def self.mint @semaphore.synchronize do while true pid = self.next_id return pid unless ActiveFedora::Base.exists?(pid) end end end |
.noid_template ⇒ Object
6 7 8 |
# File 'app/services/sufia/id_service.rb', line 6 def self.noid_template Sufia.config.noid_template end |
.valid?(identifier) ⇒ Boolean
14 15 16 17 18 |
# File 'app/services/sufia/id_service.rb', line 14 def self.valid?(identifier) # remove the fedora namespace since it's not part of the noid noid = identifier.split(":").last return @minter.valid? noid end |