class Fedora::Datastream
def control_group
def control_group @attributes[:controlGroup] end
def control_group=(cg)
def control_group=(cg) @attributes[:controlGroup]=cg end
def dsid
def dsid if attributes.has_key?(:dsid) attributes[:dsid] else attributes[:dsID] end end
def initialize(attrs = {})
def initialize(attrs = {}) super if attrs if attrs[:mime_type] self.mime_type = attrs[:mime_type] elsif attrs[:mimeType] self.mime_type = attrs[:mimeType] end end self.control_group='M' if @attributes[:mimeType] end
def label
def label @attributes[:dsLabel] end
def label=(new_label)
def label=(new_label) @attributes[:dsLabel] = new_label end
def pid
def pid attributes[:pid] end
def uri
def uri "fedora:info/#{pid}/datastreams/#{dsid}" end
def url
def url return "#{Fedora::Repository.instance.base_url}/objects/#{pid}/datastreams/#{dsid}" end