Feature #501

avatar

Support for using (reading) Disseminators

Added by Matt Zumwalt 300 days ago. Updated 295 days ago.

Status:New Start:10/02/2009
Priority:Normal Due date:
Assigned to:- % Done:

0%

Category:Fedora CMA Spent time: -
Target version:-
Sponsor:


Description

RubyFedora should provide an accessor to the disseminators listed when you call /methods on an object in Fedora's REST API.

Using demo:SmileyStuff as an example:

The REST API returns this when you call /demo:SmileyStuff/methods

<objectMethods xsi:schemaLocation="http://www.fedora.info/definitions/1/0/access/ http://localhost:8080/listMethods.xsd" pid="demo:SmileyStuff" baseURL="http://localhost:8080/fedora/">
<sDef pid="demo:Collection">
<method name="list"/>
<method name="view"/>
</sDef>
<sDef pid="fedora-system:3">
<method name="viewObjectProfile"/>
<method name="viewMethodIndex"/>
<method name="viewItemIndex"/>
<method name="viewDublinCore"/>
</sDef>
</objectMethods>
So calling
obj.inner_object.disseminators
should return a hash with the methods listed by sDef. ie.
{:pid="demo:SmileyStuff", 
 :baseURL="http://localhost:8080/fedora/", 
 "demo:Collection"=>["list","view"], 
 "fedora-system:3"=>["viewObjectProfile","viewMethodIndex","viewItemIndex","viewDublinCore"]}

Calling

obj.call_disseminator("demo:Collection", "list")
should call that disseminator on the object and return the result.

For completeness, the call_disseminator method in ActiveFedora should rely on a RubyFedora method like this

Fedora::Repository.instance.call_disseminator(obj.pid, "demo:Collection", "list")

History

Updated by Matt Zumwalt 295 days ago

avatar
  • Category changed from Consuming Fedora APIs to Fedora CMA

Also available in: Atom PDF