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 comparsions
-
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.
18 19 20 |
# File 'lib/stanford/active_fedora_object.rb', line 18 def initialize(fedora_object) @fedora_object = fedora_object end |
Instance Attribute Details
#fedora_object ⇒ Object
Returns The Active Fedora representation of the Fedora Object.
23 24 25 |
# File 'lib/stanford/active_fedora_object.rb', line 23 def fedora_object @fedora_object end |
Instance Method Details
#get_datastream_content(ds_id) ⇒ String
Returns The content of the specified datastream.
28 29 30 |
# File 'lib/stanford/active_fedora_object.rb', line 28 def get_datastream_content(ds_id) @fedora_object.datastreams[ds_id].content end |