Sha256: 442d32c04851088f951abc8ce674a4a98f850a0c21c1bca194e189fbdc4789fe
Contents?: true
Size: 1.24 KB
Versions: 20
Compression:
Stored size: 1.24 KB
Contents
module Sufia module GenericFile module Metadata extend ActiveSupport::Concern included do has_metadata "descMetadata", type: GenericFileRdfDatastream has_metadata "properties", type: PropertiesDatastream has_file_datastream "content", type: FileContentDatastream has_file_datastream "thumbnail" has_attributes :relative_path, :depositor, :import_url, datastream: :properties, multiple: false has_attributes :date_uploaded, :date_modified, datastream: :descMetadata, multiple: false has_attributes :related_url, :based_near, :part_of, :creator, :contributor, :title, :tag, :description, :rights, :publisher, :date_created, :subject, :resource_type, :identifier, :language, datastream: :descMetadata, multiple: true end # Add a schema.org itemtype def itemtype # Look up the first non-empty resource type value in a hash from the config Sufia.config.resource_types_to_schema[resource_type.to_a.reject { |type| type.empty? }.first] || 'http://schema.org/CreativeWork' rescue 'http://schema.org/CreativeWork' end end end end
Version data entries
20 entries across 20 versions & 2 rubygems