You may not realize that you can use the ItemImporter, see https://wiki.duraspace.org/display/DSDOC5x/Importing+and+Exporting+Items+via+Simple+Archive+Format
If this is a one-of you may want to have a look at the jruby integration by Brown, Jacob [mailto:j.h.br...@tcu.edu<mailto:j.h.br...@tcu.edu>] https://github.com/kardeiz/dscriptor. If you really need to write your own code - model it after the installItem method in InstalItem <https://github.com/DSpace/DSpace/blob/dspace-5_x/dspace-api/src/main/java/org/dspace/content/InstallItem.java#L58-L78> Monika ________________ Monika Mevenkamp phone: 609-258-4161 Princeton University, Princeton, NJ 08544 On May 29, 2015, at 12:30 PM, Maatari <okouy...@yahoo.fr<mailto:okouy...@yahoo.fr>> wrote: Hi, I would like to somewhat submist an item programatically. What would be the steps for it ? In the simplest scenario, i would like to create a context object and then add an item and then commit it. However i am not sure how the context object should be created. New context object would obtain the database connection in its init method ? how is that possible ? Best, M -- View this message in context: http://dspace.2283337.n4.nabble.com/What-is-the-proper-way-to-create-a-dspace-context-object-tp4678123.html Sent from the DSpace - Tech mailing list archive at Nabble.com<http://Nabble.com>. ------------------------------------------------------------------------------ _______________________________________________ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net<mailto:DSpace-tech@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
------------------------------------------------------------------------------
_______________________________________________ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette