Versions Compared

Key

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

...

In order to use this package, you must install Jython and also have the org.apache.commons.httpclient jar in your JAVA class path. Jython is available from The Jython Project web site . The HTTPClient is available from Apache Commons at http://hc.apache.org/httpclient-3.xImage Added.

JyFedoREST was written by Rick Moore for Fedora Commons and the Cornell University Library. Funding for this project was provided under a grant from the Mellon Foundation.

...

FCRepoRestAPI class

Usage :

Code Block

from fcrepo.http.restapi import FCRepoRestAPI

rest = FCRepoRestAPI(repository_url='http://localhost:8080/fedora', username='fedoraAdmin',
                     password='fedora', realm='any', namespace='fedora')

...

FCRepoRequestFactory class

Usage:

Code Block

from fcrepo.http.RequestFactory import FCRepoRequestFactory

factory = FCRepoRequestFactory(repository_url='http://localhost:8080/fedora', username='fedoraAdmin',
                               password='fedora', realm='any')

...

  • getBody()
    • Returns the body content returned by the request.
    • DOES NOT support streamed content yet.
  • getFooter(name, default=None)
    • Returns the value of the request footer specified in name.
    • If the footer does not exist, the value specified in default is returned.
  • getFooters()
    • Returns all footers from the request as a Python dictionary.
  • getHeader(name, default=None)
    • Returns the value of the request header specified in name.
    • If the header does not exist, the value specified in default is returned.
  • getHeaders()
    • Returns all headers from the request as a Python dictionary.
  • getStatus()
    • Returns the status code returned by the request.
  • getRequestMethod()
    • Returns the name of the HTTP method in the request.
    • One of GET, PUT, POST or DELETE.
  • getRequestURI()
    • Returns the URI representation of the request.