module ActiveFedora::Datastreams::ClassMethods

def has_file_datastream(args)

The type of controlGroup to store the datastream as. Defaults to M
[:control_group]
The default value to put in the dsLabel field
[:label]
The class the datastream should have
[:type]
The dsid of the datastream
[:name]
=== Options

Specify the attributes of a file bearing datastream
def has_file_datastream(args)
  ds_specs[args.fetch(:name, "content")]= {:type => args[:type], :label =>  args.fetch(:label,"File Datastream"), :control_group => args.fetch(:control_group,"M")}
end

def has_metadata(args, &block)

Other tags:
    Yield: - block executed by some kinds of datastreams

Options Hash: (**args)
  • :versionable (Boolean) -- Should versioned datastreams be stored
  • :url (String) --
  • :disseminator (String) -- Sets the disseminator location see {#add_disseminator_location_to_datastreams}
  • :control_group (String) -- must be one of 'E', 'X', 'M', 'R'
  • :label (String) -- sets the fedora label
  • :name (String) -- the handle to refer to this datastream as
  • :type (Class) -- The class that will represent this datastream, should extend ``Datastream''

Parameters:
  • args (Hash) --
def has_metadata(args, &block)
  spec = {:type => args[:type], :label =>  args.fetch(:label,""), :control_group => args.fetch(:control_group,"X"), :disseminator => args.fetch(:disseminator,""), :url => args.fetch(:url,""),:block => block}
  spec[:versionable] = args[:versionable] if args.has_key? :versionable
  ds_specs[args[:name]]= spec
end