Hi Mika,

I don't know what framework / language / environment you want to use
this in, but the SWORD PHP library (http://php.swordapp.org/) contains a
METS packager. It works as follows:

require('packager_mets_swap.php');

// Create a new package with the root and directory of the input files,
and the root and directory of the created package
$package = new PackagerMetsSwap($rootin, $dirin, $rootout, $fileout);

// Add metadata to the package
$package->setType($test_type);
$package->setTitle($title);
$package->setAbstract($abstract);
foreach ($creators as $creator) {
   $package->addCreator($creator);
}

// Add a file to the package
$package->addFile($filename, $mimetype);

// Now deposit the package
require("swordappclient.php");
$sac = new SWORDAPPClient();
$dr = $sac->deposit($depositurl, $username, $password, $onbehalfof,
$filename, $packageformat, $pacakgecontenttype);

I've been thinking of writing a web service front end to this, to make a
packaging service (POST metadata and files, and it returns a package),
or to make a deposit proxy service (POST metadata and files, SWORD
deposit target and authentication details, and it will make the package
and deposit it). If you think this might be a useful service, get in
touch.

Thanks,


Stuart Lewis
Digital Services Programmer
Te Tumu Herenga The University of Auckland Library
Auckland Mail Centre, Private Bag 92019, Auckland 1142, New Zealand
Ph: 64 9 373-7599 x81928
http://www.library.auckland.ac.nz/




-----Original Message-----
From: mikan.d.dspace listmail [mailto:mikan.dsp...@gmail.com] 
Sent: Friday, 5 June 2009 9:25 p.m.
To: Dspace Tech
Subject: [Dspace-tech] Producing mets.xml for SWORD

Im hoping to use SWORD in order to deposit items to DSpace. What would
be the best way to produce mets-metadata for the items to be
submitted? Should I write the entire metadata file myself or is there
templates / frameworks available for this?

Thanks,
Mika

------------------------------------------------------------------------
------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the
latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to