Re: [Dspace-tech] Direct access to bitstream
On Tue, Nov 20, 2012 at 4:31 PM, Mark Ehle marke...@gmail.com wrote: I am playing with IIPImage server on our dspace server to explore the possibility of serving high-resolution files quickly. IIPImage needs direct access to the files. Forgive me if this has been asked before, but I would like to know how to locate the bitstreams on the filesystem so that they may be copied. Hi Mark, what kind of identification do you have of the bitstream for which you're trying to locate the file? bitstream_id? Regards, ~~helix84 -- Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech
Re: [Dspace-tech] Direct access to bitstream
If you have bitstream_id (e.g. 123123 in this example), here's how to do it : SELECT 'cp /dspace/assetstore/' || substr(bitstream.internal_id, 1, 2) || '/' || substr(bitstream.internal_id, 3, 2) || '/' || substr(bitstream.internal_id, 5, 2) || '/' || bitstream.internal_id || ' ' || bitstream.nameFROM bitstream,bundle2bitstreamWHERE bitstream.bitstream_id = 123123 Regards, ~~helix84 Compulsory reading: DSpace Mailing List Etiquette https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech
Re: [Dspace-tech] Direct access to bitstream
~~helix84, Ah - thanks. Now I get the whole /dspace/assetstore/14/85/80 thing. It's location is in the bitstream name, too. As I don't know squat about postgres (I'm a MySQL guy) in your SQL are you actually running the copy command, or just spelling it out? I run it and I get 5 lines of the same thing. What I will probably have is the filename itself, so what I wind up with is: SELECT 'cp /dspace/assetstore/' || substr(bitstream.internal_id, 1, 2) || '/' || substr(bitstream.internal_id, 3, 2) || '/' || substr(bitstream.internal_id, 5, 2) || '/' || bitstream.internal_id || ' /var/www/' || bitstream.name FROM bitstream,bundle2bitstream WHERE bitstream.source = '(filename)' LIMIT 1 This gives me something to play with. Now all I have to do is get php to talk to postgres and I can have some fun. Thanks very much! Mark On Tue, Nov 20, 2012 at 10:43 AM, helix84 heli...@centrum.sk wrote: If you have bitstream_id (e.g. 123123 in this example), here's how to do it : SELECT 'cp /dspace/assetstore/' || substr(bitstream.internal_id, 1, 2) || '/' || substr(bitstream.internal_id, 3, 2) || '/' || substr(bitstream.internal_id, 5, 2) || '/' || bitstream.internal_id || ' ' || bitstream.nameFROM bitstream,bundle2bitstreamWHERE bitstream.bitstream_id = 123123 Regards, ~~helix84 Compulsory reading: DSpace Mailing List Etiquette https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech
Re: [Dspace-tech] Direct access to bitstream
On Tue, Nov 20, 2012 at 5:12 PM, Mark Ehle marke...@gmail.com wrote: Ah - thanks. Now I get the whole /dspace/assetstore/14/85/80 thing. It's location is in the bitstream name, too. Yep, easy, but hard to notice :) As I don't know squat about postgres (I'm a MySQL guy) in your SQL are you actually running the copy command, or just spelling it out? I run it and I get 5 lines of the same thing. What I will probably have is the filename itself, so what I wind up with is: SELECT 'cp /dspace/assetstore/' || substr(bitstream.internal_id, 1, 2) || '/' || substr(bitstream.internal_id, 3, 2) || '/' || substr(bitstream.internal_id, 5, 2) || '/' || bitstream.internal_id || ' /var/www/' || bitstream.name FROM bitstream,bundle2bitstream WHERE bitstream.source = '(filename)' LIMIT 1 Nevermind that, I was editing another example without much looking at it. Also remove || ' /var/www/' || bitstream.name and ,bundle2bitstream. About the 5 lines... The immediate problem is that filename is stored in bitstream.name, not bitstream.source. The major problem here is that file name is not unique bitstream identification. Can't you just use the bitstream_id (easy)? Or item handle + bitstream sequence_id (requires a few natural joins)? This gives me something to play with. Now all I have to do is get php to talk to postgres and I can have some fun. That should be easy. On Debian, you would just install the php5-pgsql package. Here's the command reference: http://php.net/manual/en/book.pgsql.php While you're at it, also install Adminer: http://www.adminer.org/ It's like phpMyAdmin, only smaller (a single file) and supports multiple database backends. Regards, ~~helix84 Compulsory reading: DSpace Mailing List Etiquette https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech