Class: GalterIrExporter::Export::VersionConverter
- Inherits:
-
Object
- Object
- GalterIrExporter::Export::VersionConverter
- Defined in:
- lib/galter_ir_exporter/export/version_converter.rb
Overview
Convert a single version of a GenericFile content into a PORO so that the metadata
()including pointers to the version content) can be exported in json format using to_json
Instance Attribute Summary collapse
-
#created ⇒ String
readonly
version creation date extracted from the graph for the version identified by the url.
-
#label ⇒ String
readonly
version label extracted from the graph for the version identified by the url.
-
#uri ⇒ String
readonly
location of version in fedora (also id of version).
Instance Method Summary collapse
-
#initialize(uri, version_graph) ⇒ VersionConverter
constructor
Create an instance of a GenericFile version containing all the metadata for json export.
Constructor Details
#initialize(uri, version_graph) ⇒ VersionConverter
Create an instance of a GenericFile version containing all the metadata for json export
16 17 18 19 20 |
# File 'lib/galter_ir_exporter/export/version_converter.rb', line 16 def initialize(uri, version_graph) @uri = content_uri(uri) @created = find_triple(RDF::Vocab::Fcrepo4.created, version_graph) @label = find_triple(RDF::Vocab::Fcrepo4.hasVersionLabel, version_graph) end |
Instance Attribute Details
#created ⇒ String (readonly)
version creation date extracted from the graph for the version identified by the url
9 10 11 |
# File 'lib/galter_ir_exporter/export/version_converter.rb', line 9 def created @created end |
#label ⇒ String (readonly)
version label extracted from the graph for the version identified by the url
9 10 11 |
# File 'lib/galter_ir_exporter/export/version_converter.rb', line 9 def label @label end |
#uri ⇒ String (readonly)
location of version in fedora (also id of version)
9 10 11 |
# File 'lib/galter_ir_exporter/export/version_converter.rb', line 9 def uri @uri end |