Class: Stanford::ActiveFedoraObject
- Inherits:
-
Object
- Object
- Stanford::ActiveFedoraObject
- Defined in:
- lib/stanford/active_fedora_object.rb
Overview
Copyright © 2012 by The Board of Trustees of the Leland Stanford Junior University. All rights reserved. See LICENSE for details.
Utility Class for extracting content or other information from a Fedora Instance
Data Model
-
DorMetadata = utility methods for interfacing with Stanford metadata files (esp contentMetadata)
-
ContentInventory [1..1] = utilities for transforming contentMetadata to versionInventory and doing comparisons
-
ActiveFedoraObject [1..*] = utility for extracting content or other information from a Fedora Instance
-
Instance Attribute Summary collapse
-
#fedora_object ⇒ Object
The Active Fedora representation of the Fedora Object.
Instance Method Summary collapse
-
#get_datastream_content(ds_id) ⇒ String
The content of the specified datastream.
-
#initialize(fedora_object) ⇒ Stanford::ActiveFedoraObject
constructor
Create a u.
Constructor Details
#initialize(fedora_object) ⇒ Stanford::ActiveFedoraObject
Returns Create a u.
14 15 16 |
# File 'lib/stanford/active_fedora_object.rb', line 14 def initialize(fedora_object) @fedora_object = fedora_object end |
Instance Attribute Details
#fedora_object ⇒ Object
Returns The Active Fedora representation of the Fedora Object.
19 20 21 |
# File 'lib/stanford/active_fedora_object.rb', line 19 def fedora_object @fedora_object end |
Instance Method Details
#get_datastream_content(ds_id) ⇒ String
Returns The content of the specified datastream.
24 25 26 |
# File 'lib/stanford/active_fedora_object.rb', line 24 def get_datastream_content(ds_id) @fedora_object.datastreams[ds_id].content end |