Module: CurationConcern::Model
Instance Method Summary
collapse
#human_readable_type
#noid, #to_key, #to_param
Instance Method Details
#as_json(options) ⇒ Object
22
23
24
|
# File 'app/repository_models/curation_concern/model.rb', line 22
def as_json(options)
{ pid: pid, title: title, model: self.class.to_s, curation_concern_type: human_readable_type }
end
|
#as_rdf_object ⇒ Object
26
27
28
|
# File 'app/repository_models/curation_concern/model.rb', line 26
def as_rdf_object
RDF::URI.new(internal_uri)
end
|
#can_be_member_of_collection?(collection) ⇒ Boolean
48
49
50
|
# File 'app/repository_models/curation_concern/model.rb', line 48
def can_be_member_of_collection?(collection)
collection == self ? false : true
end
|
#to_partial_path ⇒ Object
Returns a string identifying the path associated with the object. ActionPack uses this to find a suitable partial to represent the object.
44
45
46
|
# File 'app/repository_models/curation_concern/model.rb', line 44
def to_partial_path
"curation_concern/#{super}"
end
|
#to_s ⇒ Object
39
40
41
|
# File 'app/repository_models/curation_concern/model.rb', line 39
def to_s
title
end
|
#to_solr(solr_doc = {}, opts = {}) ⇒ Object
30
31
32
33
34
35
36
37
|
# File 'app/repository_models/curation_concern/model.rb', line 30
def to_solr(solr_doc={}, opts={})
super(solr_doc, opts)
index_collection_pids(solr_doc)
solr_doc[Solrizer.solr_name('noid', Sufia::GenericFile.noid_indexer)] = noid
solr_doc[Solrizer.solr_name('representative', :stored_searchable)] = self.representative
add_derived_date_created(solr_doc)
return solr_doc
end
|