Yes, a disseminator will be able to do that for you.  Here's a link to 
the tutorial on creating disseminators:

http://fedora-commons.org/confluence/download/attachments/4718930/tutorial2.pdf?version=1

You can follow the steps in that tutorial to create a disseminator that 
takes a number of datastreams as input parameters, and passes them along 
to an external webservice you've created to concatenate and return the 
streams.  This will be the easiest solution if the datastreams you'll 
concatenate will always be the same ones.

To create a SDeploy that takes only a PID as a parameter, and relies on 
the external webservice to dynamically determine which datastreams it 
needs, then retrieve them is a bit more complicated.

First, your METHODMAP datastream should look something like this:

<fmm:MethodMap bDefPID="uwdc:SDefineSomethingOrOther" name="MethodMap - 
Something or other disseminator method map" 
xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap";>
   <fmm:Method operationLabel="Something or other disseminator" 
operationName="myFunction" wsdlMsgName="myfuncRequest" 
wsdlMsgOutput="dissemResponse">
     <fmm:DefaultInputParm defaultValue="$PID" label="fedora object PID" 
parmName="mypid" passBy="VALUE" required="true"/>
     <fmm:MethodReturnType wsdlMsgName="dissemResponse" 
wsdlMsgTOMIME="text/xml"/>
   </fmm:Method>
</fmm:MethodMap>

Then your DSINPUTSPEC datastream should contain a dummy entry (it won't 
be used, but it needs to be there).  The "DC" datastream is good one to 
use, since every object has one:

<fbs:DSInputSpec bDefPID="uwdc:SDefineSomethingOrOther"
   label="Datastream Input Specification for Something or other 
disseminators that take only PIDs as arguments" 
xmlns:fbs="http://fedora.comm.nsdlib.org/service/bindspec";>
   <fbs:DSInput DSMax="1" DSMin="1" DSOrdinality="false" 
wsdlMsgPartName="DC">
     <fbs:DSInputLabel>DC Binding</fbs:DSInputLabel>
     <fbs:DSMIME>text/xml</fbs:DSMIME>
     <fbs:DSInputInstruction/>
   </fbs:DSInput>
</fbs:DSInputSpec>

Finally, your WSDL datastream will look like this:

<wsdl:definitions name="Something or other disseminations" 
targetNamespace="bmech"
   xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"; 
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap"; 
xmlns:soapenc="http://schemas.xmlsoap.org/wsdl/soap/encoding";
   xmlns:this="bmech" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
   <wsdl:types>
     <xsd:schema targetNamespace="bmech">
       <xsd:simpleType name="PIDType">
         <xsd:restriction base="xsd:string"/>
       </xsd:simpleType>
     </xsd:schema>
   </wsdl:types>
   <wsdl:message name="myfuncRequest">
     <wsdl:part name="mypid" type="this:PIDType"/>
   </wsdl:message>
   <wsdl:message name="dissemResponse">
     <wsdl:part name="dissem" type="xsd:base64Binary"/>
   </wsdl:message>
   <wsdl:portType name="SomethingOrOtherPortType">
     <wsdl:operation name="myFunction">
       <wsdl:input message="this:myfuncRequest"/>
       <wsdl:output message="this:dissemResponse"/>
     </wsdl:operation>
   </wsdl:portType>
   <wsdl:service name="mySDep_service">
     <wsdl:port binding="this:mySDep_binding" name="mySDep_port">
       <http:address location="http://localhost:7777/do_something/"/>
     </wsdl:port>
   </wsdl:service>
   <wsdl:binding name="mySDep_binding" type="this:SomethongOrOtherPortType">
     <http:binding verb="GET"/>
     <wsdl:operation name="myFunction">
       <http:operation location="(mypid)"/>
       <wsdl:input>
         <http:urlReplacement/>
       </wsdl:input>
       <wsdl:output>
         <mime:content type="text/xml"/>
       </wsdl:output>
     </wsdl:operation>
   </wsdl:binding>
</wsdl:definitions>


This will create a disseminator that takes no arguments, but that will 
pass along the PID of any object that calls this disseminator to your 
external web service.  It is up to your web service then to grab the PID 
and implement Fedora's API-A and/or API-M methods to retrieve, 
concatenate, and return the object's datastreams.

-- Scott

[email protected] wrote:
> Hi,
> 
> I need to solve the problem below and I assume fedora services are the right 
> answer. However, neither the Fedora System Documentation nor the tutorials 
> currently seem to have in-depth information on how to create sdef and 
> especially sdep objects. 
> 
> It would be great if you could advise me on whether services are actually the 
> answer to my problem, and if yes where I can find more information on how to 
> create the required sdep object:
> 
> My problem:
> I have objects in Fedora which each have a number of data-streams. The 
> objects all belong to the same content model. I now want to create a special 
> disseminator which dynamically concatenates some of these data-streams for a 
> given object and disseminates the result of this concatenation. My plan is to 
> have a service which receives the PID of the requested object, determines 
> which data-streams from this object need to be concatenated, queries and 
> concatenates those streams and returns the result of the concatenation.
> 
> Cheers,
> Carsten
> 
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image 
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Fedora-commons-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users


-- 
Scott Prater
Library, Instructional, and Research Applications (LIRA)
Division of Information Technology (DoIT)
University of Wisconsin - Madison
[email protected]

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Fedora-commons-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to