Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Pertaining to the selection of a Control Group, you have two choices if you want the datastream Datastream to point to content that resides outside the Fedora repository (External Referenced Content and Redirect). In this case we chose Redirect . To review, the meaning of the two options for mapping to external content are:
    o External Referenced Content is useful when you want Fedora to mediate access to the datastreamDatastream, for example when you want to hide the source URL from the user. Fedora mediates access to these datastreamsDatastreams, meaning that the content is streamed through the Fedora server.
    o Redirect. makes use of a simple HTTP redirect to provide the content. This is useful when there are relative hyperlinks in the external content, but reveals the source URL to the user.
  • Make sure that the MIME Type choice matches that of the content offered by the external source, in this case image/gif.

In the same manner, you can now proceed to add the two other datastreams Datastreams with locations: http://www.werc.usgs.gov/fieldguide/images/hycafr.jpg Image Removed and http://www.aquariumofpacific.org/images/olc/treefrog600.jpgImage Removed.

You should respectively identify these datastreams Datastreams as IMAGE2 and IMAGE3. (Note that if these sample URLs are no longer active, you can enter other URLs pointing to JPEG images to complete this tutorial exercise.)

Finally, add another datastream Datastream labeled MyText (containing some descriptive text about the images), with MIME Type text/html. Assign this datastream Datastream a Control Group of Managed Content indicating that the content will be imported and stored permanently in the Fedora repository. Import the content from the following location:

FEDORA_HOME/userdocs/tutorials/2/example2/mytext.html.

The resulting datastream Datastream window should now look like that shown in Figure 10.

...

You can access the Datastreams for this digital object by viewing the item linked to from the object profile page. Then, select the link for one of the redirected Datastreams. Fedora will redirect your browser to the location of the datastream Datastream content, without streaming the content through the Fedora repository server.

...

  1. Client: Clients make requests for content disseminations through the Fedora Access service APIs (i.e., API-A-LITE and API-A). These interfaces include operations for discovering and accessing all disseminations that are available for a particular digital object. A digital object can have both static and dynamic disseminations, which are described below.
  2. Fedora APIs: The Fedora repository service is exposed via a uniform set of APIs. Fedora's API-A and API-A-Lite provide operations (methods) for accessing digital object content. While the default mode of accessing a digital object directly delivers the datastreams Datastreams (i.e., repository returns a bitstream for a datastream Datastream un-transformed), the CMA (Content Model Architecture) enables defining any number of custom services for accessing datastream Datastream content. These custom services are produced when the Fedora repository service calls another Web service to transform datastream Datastream content. Such transformations can be thought of "virtual" views of digital object content, since these views are created dynamically at runtime.
  3. Web Services: These are Web-accessible programs that are invoked by HTTP to produce disseminations of digital object content. Note that the Fedora repository itself is a Web service to access the default services of digital objects. Also, Fedora can interact with other Web services to product custom access services that transform digital object content on-the-fly. In this tutorial we will describe how Fedora interacts with simple REST-based services to product such custom services. Custom services are produced when the Fedora repository service itself makes outbound service calls to other Web services using simple REST-based requests. We will not discuss Fedora interacting with SOAP-based web services here.
  4. Storage: Digital objects are stored in the Fedora repository service. Datastreams are constituent parts of digital objects – essentially the content streams. Fedora interacts with low-level storage to access digital objects to fulfill client requests for access to content. Datastreams capture the raw content. As shown in the previous examples, Datastreams can be directly disseminated via the Fedora Access service. Also, datastreams Datastreams can serve as input to other custom services that are produced on-the-fly when the Fedora repository service calls upon another Web service at run time (using a raw Datastream as input).

...

At the end of the day, digital objects make references to SDefs, SDeps and CModels as the way of providing extended access points for digital objects (i.e., dynamic content disseminations.) This is done by adding special relationships between the objects that are stored in the RELS-EXT datastreams Datastreams of those objects.
Figure 13 indicates the relationships that exist between the four object types. Data objects assert that they conform to a particular Content Model using the hasModel relationship. Content Model objects assert they provide the services included in an SDef using the hasService relationship. Service Deployment objects assert the services for which they provide binding information by using the isDeploymentOf relationship, as well as asserting the Content Models for which they provide service bindings using the isContractorOf relationship.

...

Figure 14 illustrates the interactions among Fedora and Web services in response to an access request. As indicated, a client makes a request to the Fedora API (with a URL in this case.) The Fedora repository service then determines the content model that is associated with the digital object for which the request is being made. Once it knows the content model, the Fedora repository can discover what SDefs and SDeps are in play for this digital object. Once all of this information is gathered, the Fedora repository can construct a request to the appropriate web service to transform the datastreams Datastreams of the target digital object (demo:2). The Fedora repository service invokes a REST-based request to the web service via HTTP, sending along arguments to enable the web service to obtain the required datastream Datastream inputs to fulfill the request. The Fedora repository mediates all invocations with the external web service. When it receives a response from the web service it streams it back to the original calling client. In this case, the response is a transformation based on the raw material of Datastream1 and Datastream2 in the digital object.

...

Next follow the same procedure to ingest a sample CModel object into the repository. Select the file FEDORA_HOME/userdocs/tutorials/2/example3/CModel.xml. This will create the digital object with the PID demo:ex3CModel. This CModel describes the datastreams Datastreams that should be present in data objects that conform to this content model, it also has a RELS-EXT hasService relationship link to the digital object demo:ex3SDef ingested previously.

...

Now you need to create the new digital object based on this SDef, SDep and CModel. To get started follow the same procedure as illustrated in Figure 3, this time entering demo:300 as the datastream Datastream ID and Example 3 as the Label.

You now need to add the two datastreamsDatastreams: the xml source document and the xsl transform document. Using the same method described in Example 1, select the Datastreams tab and:

  • Add a datastream Datastream with:
    • ID – source
    • Control Group – Managed Content
    • Mime type – text/xml
    • Label – Poem XML Source
    • Import location: FEDORA_HOME/userdocs/tutorials/2/example3/poem.xml
  • Add a datastream Datastream with:
    • ID – xsl
    • Control Group – Managed Content
    • Mime type – text/xml
    • Label - Poem XSL Transform
    • Import location: FEDORA_HOME/userdocs/tutorials/2/example3/poem.xsl

...

  1. Select the Edit button, then the Add... button to create a new relationship.
  2. In the Enter Relationship dialog that appears, in the Predicate: drop-down dialog, select the entry fedora-model:hasModel and in the Object: text entry box, enter the string info:fedora/demo:ex3CModel, and then press the OK button.
  3. hould then see the newly created relationship in the table at the bottom of the New RELS-EXT... window. Press the Save Datastream button to save this newly created datastreamDatastream.

The resulting Object window should look like that illustrated in Figure 15.

...

Example 3 packages the XSL transform datastream Datastream in the same digital object as the source XML datastreamDatastream. However, in many cases you will have XSL transform code that you want to share across several XML sources. This section modifies Example 3 to enable this sharing.

This is done by packaging the XSL transform code in a digital object of its own. Then every digital object that needs to make use of the XSL transform code can use the Fedora REST URL to access that datastreamDatastream. This is done by defining a redirect datastream Datastream using the REST URL as the redirect target. Then, the same disseminator design used in Example 3 can be reused. This is known as dissemination chaining, whereby the dissemination of one digital object is used by another.

...

  • Create a new digital object (the "XSL" digital object) assigning the PID demo:400. Create one datastream Datastream in addition to the DC with ID XSL. As before, this datastream Datastream should be configured as:
    • ID – xsl
    • Control Group – Managed Content
    • Mime type – text/xml
    • Label - Poem XSL Transform
    • Import location: FEDORA_HOME/userdocs/tutorials/2/example3/poem.xsl
  • Create another digital object (the "disseminator" digital object) assigning the PID demo:500.
  • Create two new datastreams Datastreams
    • One configured as follows (the same as the Source datastream Datastream in Example 3):
      1. ID – source
      2. Control Group – Managed Content
      3. MIME type – text/xml
      4. Label - Poem XML Source
      5. Import location: FEDORA_HOME/userdocs/tutorials/2/example3/poem.xml
    • Now create the datastream Datastream that will redirect to the XSL in demo:400 as follows:
      1. ID – xsl
      2. Control Group – Redirect
      3. Mime Type – text/xml
      4. Label - Poem XSL Transform
      5. location: http://localhost:8080/fedora/get/demo:400/XSL
      6. • On the New RELS-EXT... tab add the same hasContentModel relationship to demo:ex3CModel as you did in example 3.

...

Section
Wiki Markup
{center}
!worddav3835f918a3adabdc4b86f8fb9fc60c16.png|height=296,width=508!  
*Figure 17 - Dissemination with redirectRedirect datastreamDatastream*
{center}

What's next?

You should now understand the basic mechanisms through which SDefs, SDeps and CModels interact with Data objects to provide a richer dynamic view of the data stored in those objects. The next tutorial (Tutorial 3 – Not yet available) steps you through the process of using the admin client to create a SDef, a SDep, and a CModel from scratch and a Data object that will function with the control objects to provide customized services similar to those described in the last example of this tutorial. To explore the other features of Fedora, refer to the Fedora Repository Documentation. You can also join the Fedora-users mailing list to ask questions and learn from the experience of other Fedora users.