Versions Compared

Key

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

...

The PythonActor was used extensively in this project. It is based on the Jython interpreter which provides standard Python functionality within a Java application. Because Jython is implemented in Java, it also provides access to any Java class or class library available to the JVM. In this way, it provides a rapid prototyping tool that supports coding in both Java and Python.

...

FCRepo Add Datastream Actor

This actor establishes a connection connects to a Fedora Repository Respoitory and sends a request using the Fedora REST APIadds a datastream to an existing object.

Required Packages :
  • JyFedoREST
Source file :

    ...

    • AddDatastreamActor.py
    Input

    ...

    port:
    • injest_info : ObjectToken containing a Jython dictionary containing data from a form usbmitted via "FCRepo Datastream Dialog". Alternately, any Jython dictionary with the following keys:
      • fcrepoURL =
      repository : StringToken containing the username : StringToken containing the
      • base URL of the Fedora Repository.
    • method_uri : StringToken containing the URI for the REST API method to be executed.
      • username = name of a Fedora Repository user
      with sufficient access authority to execute the method
      • .
      • password
      : StringToken containing the
      • = password corresponding to the username.
      • pid = identifier for object to be queried.

    ...

    Output ports:

    ...

      • dsid = identifier of datastream to be queried.
      • dsLabel = label for datastream to be created.
      • dsLocation = URL of file containing datastream content.
      • mimeType = mime type of datastream content.
      • controlGroup = datastream control group, optional, defaults to 'M'.
      • dsState = datastream state, optional, defaults to 'A'.
      • versionable = whether datastream is versionable, optional, defaults to True.
      • formatURI = URI of datastream format description, optional, no default.
      • checksumType = datastream checksum type, optional, no default.
      • altIDs = list of alternate IDs for datastream, optional, no default.

    ...

    Output port:

    ...

    • result : StringToken containing results of the request to add a dissemination
    • out - ObjectToken - a Jython object containing the results of the method execution.

    The "FCRepo REST GETAdd Datastream " PythonActor is used in the following workflows:

    • REST API Test1
    • REST API Test2
    • REST API Test3
    • REST API Test4

    FormatSerializerActor

    ...

    • Ingest With Datastream

    FCRepo Datastream Dialog Actor

    This actor displays a SWING dialog that allows the user to enter parameters required to connect to a Fedora Repository and access a particular datastream.

    ...

    Required Packages :

    ...

    • FCRepoKepler
    Source file :

    FormatSerializerActorFCRepoDatastreamDialogActor.py

    ...

    Input port :

    ...

    • None

    ...

    Output port:

    ...

    • in out : ObjectToken containing the results of the method executed by a "FCRepo REST GET" actor.

    ...

    Output ports:

    ...

    • image_out : AWTImageToken containg an AWT Image. It is broadcast only if the an image was supplied to the "in" port.
    • string_out : StringToken. It is broadcast only if a string was supplied to the "in" port.
    • a Jython dictionary with name/value pairs for all input fields in the form. This object contains the following keys:
      • passalong = name of button pressed.
      • fcrepoURL = base URL of the Fedora Repository.
      • username = name of a Fedora Repository user.
      • password = password corresponding to the username.
      • pid = identifier for object to be accessed.
      • dsid = identifier of datastream to be accessed.

    The "FCRepo Datastream DialogThe "Format Serialzer" PythonActor is used in the following workflows:

    • REST API Test1
    • REST API Test2
    • REST API Test3
    • REST API Test4
    • REST API Test5

    FCRepoDialogActorFCRepo Dialog Actor

    This actor displays a SWING dialog that allows the user to enter parameters required to connect to a Fedora Repository.

    ...

    Required Packages :

    ...

    • FCRepoKepler
    Source file :

    FCRepoDialogActor.py

    ...

    Input ports :

    ...

    • None

    ...

    Output port :

    ...

    • out : ObjectToken containing a Jython dictionary with name/value pairs for all input fields in the form. This object contains the following keys:
      • passalong = name of button pressed.
      • fcrepoURL = base URL of the Fedora Repository.
      • username = name of a Fedora Repository user.
      • password = password corresponding to the username.

    The "FCRepo Dialog" PythonActor is used in the following workflows:

    • REST API Test3
    • REST API Test4

    FCRepo Dissemination Actor

    This actor connects to a Fedora Respoitory and retrieves a datastream dissemination.

    ...

    Required Packages :

    ...

    • JyFedoREST

    ...

    Source file :

    ...

    ...

    Input port:

    ...

    • dialog_info : ObjectToken containing a Jython dictionary containing data from a form usbmitted via "FCRepo Datastream Dialog". Alternately, any Jython dictionary with the following keys:
      • fcrepoURL = base URL of the Fedora Repository.
      • username = name of a Fedora Repository user.
      • password = password corresponding to the username.
      • pid = identifier for object to be queried.
      • dsid = identifier of datastream to be queried.

    ...

    Output port:

    ...

    • out : ObjectToken containing a Jython object with the data returned by the request for a dissemination.

    The ""FCRepo Dissemination" PythonActor is used in the following workflows:

    • REST API Test5

    FCRepo GET Actor

    This actor establishes a connection to a Fedora Repository and sends a request using the Fedora REST API.

    ...

    Required Packages :

    ...

    • JyFedoREST

    ...

    Source file :

    ...

    FCRepoGETActor.py

    ...

    Input ports :

    ...

    • repository : StringToken containing the base URL of the Fedora Repository.
    • method_uri : StringToken containing the URI for the REST API method to be executed.
    • username : StringToken containing the name of a Fedora Repository user with sufficient access authority to execute the method.
    • password : StringToken containing the password corresponding to the username.

    ...

    Output ports:

    ...

    • out - ObjectToken - a Jython object containing the results of the method execution.

    The "FCRepo REST GETFC Repository Dialog" PythonActor is used in the following workflows:

    • REST API Test1
    • REST API Test2
    • REST API Test3
    • REST API Test4

    ...

    FCRepo Ingest Dialog Actor

    This actor displays a SWING dialog that allows the user to enter parameters required to connect to a Fedora Repository and access a particular create a new object with a single datastream.

    ...

    Required Packages :

    ...

    • FCRepoKepler

    ...

    Source file :

    ...

    FCRepoDatastreamDialogActorIngestDialogActor.py

    Input

    ...

    ports :
    • None

    ...

    Output port :

    ...

    • out : ObjectToken containing a Jython dictionary with name/value pairs for all input fields in the form. This object contains the following keys:
      • passalong = name of button pressed.
      • fcrepoURL = base URL of the Fedora Repository.
      • username = name of a Fedora Repository user.
      • password = password corresponding to the username.
      • pid = identifier of object to create.
      • objLabel = label for object to be accessedcreate.
      • dsid = identifier of datastream to be accessedqueried.
      • dsLabel = label for datastream to be created.
      • dsLocation = URL of file containing datastream content.
      • mimeType = mime type of datastream content.

    The "FCRepo Datastream Ingest Dialog" PythonActor is used in the following workflows:

    • REST API Test5
    • Ingest With Datastream

    FCRepo Object Create Actor

    ...

    This actor connects to a Fedora Respoitory and retrieves creates a datastream disseminationnew object.

    ...

    Required Packages :

    ...

    • JyFedoREST

    ...

    Source file :

    ...

    • DatastreamDisseminationActorObjectCreateActor.py

    ...

    Input port:

    ...

    • dialoginjest_info : ObjectToken containing a Jython dictionary containing data from a form usbmitted via "FCRepo Datastream Ingest Dialog". Alternately, any Jython dictionary with the following keys:
      • fcrepoURL = base URL of the Fedora Repository.
      • username = name of a Fedora Repository user.
      • password = password corresponding to the username.
      • pid = identifier for object to be queried.
      • objLabel = label for object to be created.
      • dsid = identifier of datastream to be queried.
      • dsLabel = label for datastream to be created.

    ...

    Output port:

    ...

      • dsLocation = URL of file containing datastream content.
      • mimeType = mime type of datastream content.

    ...

    Output ports:

    ...

    • result : StringToken containing results of the request to add a dissemination.
    • datastream
    • out : ObjectToken containing a Jython object with the data returned by the request for a dissemnation.dictionary with name/value pairs from input form. This object contains the following keys:
      • passalong = name of button pressed.
      • fcrepoURL = base URL of the Fedora Repository.
      • username = name of a Fedora Repository user.
      • password = password corresponding to the username.
      • pid = identifier of object to create.
      • dsid = identifier of datastream to be queried.
      • dsLabel = label for datastream to be created.
      • dsLocation = URL of file containing datastream content.
      • mimeType = mime type of datastream content.

    The "FCRepo Add Datastream " PythonActor is used in the following workflows:

    • Ingest With Datastream

    Format Serializer Actor

    This actor is a helper that determines the type of object returned by a GET request and reformats the output so that other Kepler actors can handle it.

    ...

    Source file :

    ...

    FormatSerializerActor.py

    ...

    Input port:

    ...

    • in : ObjectToken containing the results of the method executed by a "FCRepo REST GET" actor.

    ...

    Output ports:

    ...

    • image_out : AWTImageToken containg an AWT Image. It is broadcast only if the an image was supplied to the "in" port.
    • string_out : StringToken. It is broadcast only if a string was supplied to the "in" port.

    The "Format SerialzerThe "FCRepo Dissemination" PythonActor is used in the following workflows:

    • REST API Test1
    • REST API Test2
    • REST API Test3
    • REST API Test4
    • REST API Test5

    Kepler Workflows

    REST API Test1

    A simple workflow to retrieve an XML string from a Fedora Repository containing the 'Smiley' demo data set.

    Screenshot :

    ...

    Source file :

    ...

    REST-API-Test1.xml

    REST API Test2

    A simple workflow to retrieve an image from a Fedora Repository containing the 'Smiley' demo data set.

    Screenshot :

    ...

    Source file :

    ...

    REST-API-Test2.xml

    REST API Test3

    A workflow to retrieve a list of all objects in a Fedora Repository.

    Screenshot :

    ...

    Source file :

    ...

    REST-API-Test3.xml

    REST API Test4

    A variation of REST-API-Test4.xml to be customized to retrieve a datastream dissemination from a local repository.

    Screenshot :

    ...

    Source file :

    ...

    REST-API-Test4.xml

    REST API Test5

    A workflow thast that uses the fcrepo.http.restapi client code to retrieve a datastream dissemenation.

    ...

    1. Display a form dialog for entering parameters to be used to retrieve a datastream dissemination. Uses SimpleHTMLDialog
      from fcrepo.kepler to display and manage the form.
    2. Use fcrepo.http.restapi to get a datastream dissemnination.
    3. Serialize the dissemination into a displayable format.
    4. Display results.
    Screenshot :

    ...

    Source file :

    ...

    REST-API-Test5.xml

    Ingest With Datastream

    A workflow that uses the fcrepo.http.restapi client code to create a new object with a single datastream.

    This is a three step workflow:

    1. Display a form dialog for entering parameters that can be used to create a new object with a single datastream. Uses SimpleHTMLDialog from fcrepo.kepler to display and manage the form.
    2. Use fcrepo.http.restapi to create the new object. Display results.
    3. Use fcrepo.http.restapi to add a datastream. Display results.

    ...

    Screenshot :

    ...

    IngestWithDatastream.jpg

    ...

    Source file :

    ...

    IngestWithDatastream.xml