On Thu, Mar 29, 2012 at 10:13:15PM +0530, Amit Jha wrote:
> I have created  a custom HTML form for item submission. On submit of the form 
> it creates dublin_core.xml file along with uploaded file and it also creates 
> contents file. 
> 
> So my query is how can I import the item to dspace from the java class. It 
> happening using shell script but I want to import it from servlet. Please 
> help?

To see how the bin/dspace command does something, look in
config/launcher.xml.  For 'dspace import' you'll find that the
'import' command associated with the class
org.dspace.app.itemimport.ItemImport.  The launcher
(org.dspace.app.ScriptLauncher) calls the 'void main(String[]
arguments)' method of that class, passing its own arguments minus the
command name ('import' in this case).  So I think you should be able
to just create a String[] containing the commandline arguments that
would follow 'dspace import' and pass that to
org.dspace.app.itemimport.ItemImport.main(String[]);

-- 
Mark H. Wood, Lead System Programmer   [email protected]
Asking whether markets are efficient is like asking whether people are smart.

Attachment: pgp84fedxwDiR.pgp
Description: PGP signature

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to