Versions Compared

Key

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

...

Panel

markup artifacts and incorrect translations. Consult the
the original page preserved here if you need precise
answers about URI syntax, identifiers, etc.

Panel

Contents

Table of Contents
outlinetrue
stylenone

A Lightweight Network Interface (for DSpace)

...

About the "prefix" Prefix is the initial URL path at which
the LNI service is "mounted" on its Web server. Since the LNI is intended
to be run out of a Java Servlet container such as Tomcat, possibly
the same one running other DSpace services (e.g. the Web UI), it
will probably be mounted under a separate initial path to distinguish
its requests from those bound for other servlets. For example,
on a server host `"library.uni.edu"`, if the LNI is mounted at `/dspace/dav`,
the complete prefix is `http://library.uni.edu/dspace/davImage Removed`.

The absolute path of the URI for each type of content object
is composed as follows:

...

DSpace assigns "persistent identifiers", such as Handles, to all of its
first-class content objects. The LNI's resource URIs do not contain
literal DSpace identifiers, however,
because some identifier formats contain characters (e.g. '/') which
cause problems with existing WebDAV software, _even when properly "escaped".
_To work around this problem and to prevent similar trouble with any new
persistent identifier schemes adopted in the future, the LNI transforms
an identifier by its own proprietary process before putting it into a
resource URI. The exact transformation is not published so it can be
changed without affecting clients.

...

Code Block
<nowiki>
  http://uni.edu/dspace/dav/?type=COMMUNITY&type=COLLECTION

  http://uni.edu/dspace/dav/dso_1721.1$3549?type=collection
</nowiki>

More on PROPFIND

See the #propfindpropfind_xml description of the `propfind` XML element and
the WebDAV protocol specifcation
for complete details on the use of

...

The #properties properties supported by the DSpace LNI are described below.
Each kind of DSpace Object (e.g. Collection, Item, etc) has its own
set of supported properties, and there are a few common ones.
Not all properties may be modified. Some are inherently read-only,
some are derived from e.g. the descriptive metadata which administrators
may not want to be modified through the LNI.

See the #propfindpropfind_xml description of the `proppatch` XML element andhttp://www.webdav.org/specs/rfc2518.htmlImage Removed the WebDAV protocol specifcation]
for complete details on the use of

...

Panel

GET URI for Item:: *

Code Block
<nowiki>/</nowiki>

* prefix *

Code Block
<nowiki>/</nowiki>

* resource_path *

Code Block
<nowiki>?package=</nowiki>

* package-format &other-packager-parameters
GET URI for Bitstream:: *

Code Block
<nowiki>/</nowiki>

* prefix *

Code Block
<nowiki>/</nowiki>

Wiki Markup
\* _resource_path_ _\[ .optional-extension \]_

Where prefix and the URI path are as described in the section above
on Resource URIs.

...

In WebDAV, the `PUT` method creates a new resource at the given URI (if there
wasn't already anything there) or replaces the contents of an existing
resource. In the DSpace LNI, `PUT` can only create a new resource under
an existing "collection" (in the WebDAV sense of "collection") resource.
It cannot create a new resource at a specified URI because DSpace must
determine the persistent identifier, and thus the URI, after the object
is created. The DSpace LNI `PUT` can also replace the contents of an
existing resource, if this is allowed and implemented.

...

The most obvious and common application of WebDAV is to create a new
resource by supplying the exact URI at which it will reside.
This conflicts with the way DSpace names new objects, since a DSpace
URI is based on a Handle (or other persistent identifier), and that
is only available after the resource is created, – not at the
time the client is sending its `PUT` request.

...

  • Code Block
    <nowiki>dspace:logo</nowiki>
    – actual image content of the logo image, in a `<bitstream>` tag #bitstreambitstream_xml (see below).
  • Code Block
    <nowiki>dspace:short_description</nowiki>
    – short description.
  • Code Block
    <nowiki>dspace:introductory_text</nowiki>
    – short introductory text.
  • Code Block
    <nowiki>dspace:side_bar_text</nowiki>
    – sidebar text (news) to show on community page.
  • Code Block
    <nowiki>dspace:copyright_text</nowiki>
    – copyright statement to show on community page.
  • Code Block
    <nowiki>dspace:handle</nowiki>
    – the persistent identifier of this resource in URN format, e.g. `hdl:123.45/6789`.

...

  • Code Block
    <nowiki>dspace:logo</nowiki>
    – actual image content of the logo image, in a `<bitstream>` tag #bitstreambitstream_xml (see below).
  • Code Block
    <nowiki>dspace:short_description</nowiki>
    – short description.
  • Code Block
    <nowiki>dspace:introductory_text</nowiki>
    – short introductory text.
  • Code Block
    <nowiki>dspace:side_bar_text</nowiki>
    – sidebar text (news) to show on collection page.
  • Code Block
    <nowiki>dspace:copyright_text</nowiki>
    – copyright statement to show on collection page.
  • Code Block
    <nowiki>dspace:default_license</nowiki>
    – default license text applying to new items.
  • Code Block
    <nowiki>dspace:provenance_description</nowiki>
    – the `"provenance_description"` metadata for collection, whatever that is.
  • Code Block
    <nowiki>dspace:handle</nowiki>
    – the persistent identifier of this resource in URN format, e.g. `hdl:123.45/6789`.

...

  • Code Block
    <nowiki>dspace:submitter</nowiki>
    – ePerson resource of original submitter of this item.
  • Code Block
    <nowiki>dspace:owning_collection</nowiki>
    – persistent identifier (handle) of Collection that owns this item.
  • Code Block
    <nowiki>dspace:license</nowiki>
    – contents of license bitstream for this item, in a `<bitstream>` tag #bitstreambitstream_xml (see below).
  • Code Block
    <nowiki>dspace:cc_license_text</nowiki>
    – text of Creative Commons license bitstream for this item, in a `<bitstream>` tag #bitstreambitstream_xml (see below).
  • Code Block
    <nowiki>dspace:cc_license_rdf</nowiki>
    – RDF of Creative Commons license bitstream for this item, in a `<bitstream>` tag #bitstreambitstream_xml (see below).
  • Code Block
    <nowiki>dspace:cc_license_url</nowiki>
    – URL of Creative Commons license for this item.
  • Code Block
    <nowiki>DAV:getlastmodified</nowiki>
    – This DAV property is assigned the DSpace last-modified date.
  • Code Block
    <nowiki>dspace:handle</nowiki>
    – the persistent identifier of this resource in URN format, e.g. `hdl:123.45/6789`.
  • Code Block
    <nowiki>dspace:withdrawn</nowiki>
    – `true` or `false`, indicating whether the Item has been withdrawn. This is the only property most users will have permission to read on a withdrawn Item.

...

  • all properties of the In-progress Item, and:
  • Code Block
    <nowiki>dspace:owner</nowiki>
    – EPerson resource of owner of this workflow item.
    *
    Code Block
    <nowiki>dspace:state</nowiki>
    – When read, returns the symbolic name of the current workflow step, e.g. `STEP1_POOL`. You can also*set* this property to one of the following keywords to manipulate its place in the workflow: (See API doc for `org.dspace.workflow.Workflow Manager` for details)
  • `abort` – Aborts workflow, returning item to its submitter's workspace.
  • `reject` – Reject an item at `STEP1`, send mail to submitter, otherwise the same as `abort`.
  • `advance` – Move an item to the pool for the next step, or archive it if it was on the last step. You must have previously claimed the workflow item.
  • `claim` – Take responsibility for a workflow item that was in the pool of unclaimed items.
  • `unclaim` – Return an item you have claimed to the pool.

EPerson Collection::

  • (None other than the default)

...

NOTE: The SOAP servlet accepts WebDAV `GET` and `PUT` requests as well
as SOAP messages, which simplifies the switching of modes in your
client code. Typically, you will start with a SOAP endpoint URL that looks
something like `http://uni.edu/dspace/lni/DSpaceLNIImage Removed`. The final pathname
element, `DSpaceLNI`, names a SOAP application within the servlet, so
the servlet path is actually everything up to `/dspace/lni/`. To construct
a WebDAV URL, simply use that servlet path as your WebDAV prefix, so
e.g. a resource URL would become:
`http://uni.edu/dspace/lni/dso_1721.1$5543Image Removed`. There is a convenience
method in the Java class `L N I Client Utils` to help manage this, but you will
have to implement it yourself for SOAP clients in other languages.

...

Code Block
<nowiki>
public class org.dspace.app.dav.client.[[L N I Soap Servlet]] {

  /**
  *** Returns Resource URI for the DSpace Object whose persistent   
  *** identifier (i.e. Handle) is  "handle".  Optionally add Persistent ID
  *** (sequence ID) of a bitstream under the Item, if a URI to a bitstream
  *** is desired, otherwise bitstreamPID should be null.
  *** This does the same thing as the /lookup URI.
  ***/
  public String lookup(String handle, String bitstreamPID)
    throws java.rmi.[[Remote Exception]], org.dspace.app.dav.client.[[L N I Remote Exception]]

  /** 
  *** Same as PROPFIND WebDAV method.  "uri" may be relative to DSpace LNI
  *** prefix, or absolute; "propfind" is the propfind element, and depth is 
  *** the content of the "Depth:" header.  Depth should be 0, 1, or the
  *** constant org.dspace.app.dav.client.[[L N I Client Utils]].INFINITY (-1).
  *** Types is a comma-separated list of DSpace item types to which to
  *** restrict the query (see "type" option of PROPFIND method). May be null.
  *** Returns the multistatus document from the method's response.
  ***/
  public String propfind(String uri, Document propfind, int depth, String types)
    throws java.rmi.[[Remote Exception]], org.dspace.app.dav.client.[[L N I Remote Exception]]
  
  /**
  *** Same as PROPPATCH WebDAV method.  "uri" may be relative to DSpace
  *** LNI prefix, or absolute; "propertyupdate" is the propertyupdate
  *** element.  Returns the multistatus document from the method's response.
  ***/
  public String proppatch(String uri, String propertyupdate)
    throws java.rmi.[[Remote Exception]], org.dspace.app.dav.client.[[L N I Remote Exception]]

  /**
  *** Executes COPY method; "uri" and "destination_uri" may be relative
  *** to DSpace LNI prefix, or absolute.
  *** The depth and [[keep Properties]] parameters correspond to
  *** parameters on the actual COPY WebDAV method, but DSpace ignores them
  *** at this time.
  *** The overwrite option will allow the copy to overwrite an existing
  *** resource if necessary.
  ***
  *** Returns the HTTP status code.
  ***/
  public int copy(String uri, String destination_uri, int depth,
                  boolean overwrite, boolean [[keep Properties]])
    throws java.rmi.[[Remote Exception]], org.dspace.app.dav.client.[[L N I Remote Exception]]
  }

  public class org.dspace.app.dav.client.[[L N I Client Utils]] {

  /** Depth of infinity in SOAP propfind() */
  public final static int INFINITY = -1;

  /**
  *** Make up a URL to access a WebDAV resource, given the SOAP "endpoint" URL
  *** and a relative URI such as is returned by lookup().  Clients should
  *** use this to obtain URLs to make HTTP GET and PUT requests.
  *** Packager may be null for a resource such as a Bitstream that does
  *** not require a packager.
  ***/
  public static URL makeDAVURL(String endpoint, String davURI, String packager);
    throws MalformedURLException

  /** alternate version that does not require packager. */
  public static URL makeDAVURL(String endpoint, String davURI);
    throws MalformedURLException

  /**
  *** Translates a WebDAV URL, such as would be returned by the PUT
  *** method, into a resource URI relative to the DAV root which can
  *** be passed to the SOAP methods.  Inverse of makeDAVURL.
  ***/
  public static String makeLNIURI(String endpoint, String davURL)
    throws MalformedURLException
  }
</nowiki>

...

The LNI's approach to security has two layers: First, authentication
and authorization, to let DSpace administrators control access
to the resources in the archive. Second is confidentiality, which
protects the contents of LNI transactions and the archive content itself
from being copied as they are transmitted over the Internet.

...

If you are letting users make authenticated LNI transactions on a server
that is on the public Internet, I strongly recommend requiring
all authenticated transactions to be encrypted (e.g. by SSL) to protect
the user's credentials, as well as the material being transferred.

Wiki Markup
Both the SOAP and WebDAV modes of the LNI work perfectly well over


HTTPS, which is HTTP over SSL.  All you need to do is configure your web


servlet container (e.g.


\[Apache Jakarta


Tomcat 5.0\|http://tomcat.apache.org/tomcat-5.0-doc/setup.html\]) for SSL connections.

You can also add a `security-constraint` tag to the `web.xml`
configuration file in the DSpace web application, to require
SSL connections on LNI transactions. There will be notes
about this in the `dspace-web.xml` file in the source distribution.

...

Model the Bitstream Format registry as one resource of the "collection"
type. That top-level resource is just a container for the format
records, so they can all be listed (e.g. by `PROPFIND`). The formats
themselves are child resources of the Registry, named by the string
returned by `get Short Description()` on the format.

  • The Registry URI is _/prefix_
    Code Block
    <nowiki>/format/</nowiki>
  • Each Bitstream Format's URI is /prefix_
    Code Block
    <nowiki>/format/</nowiki>
    _short-description
  • `GET` is not implemented on any of these resources.
  • `PUT` of a new Bitstream Format URI creates it. The request body must be empty.
  • Bitstream Format resources have the following properties. They are all settable unless marked read-only.
    • `DAV:displayname` – same as description
    • `DAV:resourcetype` – empty. (`/format/` is a collection).
    • `dspace:type` – `<bitstream-format/>`
  • *`description` – Full description of the bitstream format.
  • *`extensions` – Comma-separated list of filename extensions associated with this format.
  • *`ID` – READ-ONLY; internal database ID of this format.
  • *`MIMEType` – Internet format type, aka MIME type, associated with this format. May not be unique amongst formats.
  • *`support Level` – Support level, one of `UNKNOWN`, `KNOWN`, `SUPPORTED`.
  • *`is Internal` – Is this format useed to store internal system information, rather than content? One of `TRUE`, `FALSE`.

...

  • http://dsug2006.uib.no/archive/reilly.ppt
    "Technical Introduction To and Initial Use Of the Lightweight Network Interface (LNI) (—to ---to DSpace!)"
  • It's rather difficult to post external link on this page.
    DSpace User Group Meeting, Bergen, Norway, April 2006

...