Hi David, Thanks for your response. I tried to post again in the Islandora Google Groups but I kept getting an error.
I need the filename because I have an external app that needs to download a file from Islandora repository based on the object's filename. It has no clue about the file's Fedora Commons PID. It only has the object's unique filename. So, I need to provide a way for it to map the filename with the Fedora PID. Maybe there is a better way to do this. Thanks. Diwakar Timilsina Systems Analyst, UITS University of Arkansas, Fayetteville Email: diwa...@uark.edu Phone: 479.575.6160 -----Original Message----- From: David Wilcox [mailto:vresupp...@upei.ca] Sent: Wednesday, January 18, 2012 9:38 AM To: Support and info exchange list for Fedora users. Subject: Re: [fcrepo-user] Resource Index Query: How to get filenames and PIDs of objects within collection? Hi Diwakar, I posted an answer to this question on the Islandora list, but I'll repeat it here in case anyone is curious: If you know the DSID of the Datastream you want to retrieve (for example, the original file you uploaded) you can construct the URL is this way: http://your.site/fedora/repository/PID/DSID So if I want to link to the image stored in the OBJ Datastream of islandora:70 I would construct the URL like this: http://your.site/fedora/repository/islandora:70/OBJ So you don't actually need to generate a list of filenames (as long as the DSID is the same for each object in your list). Hope this helps! David On Wed, Jan 18, 2012 at 11:08 AM, Diwakar Timilsina <diwa...@uark.edu> wrote: > Hi, > > I need to find the PIDs and filenames of Objects within a collection. > With the following query, I can get the PIDs but I am not sure how to > get the filenames of the objects. > > > > When I try to search for label, it's returning the title of the object > instead of the actual filename: > > > > > > QUERY: > > select $object $filename > > from <#ri> > > where $object > <info:fedora/fedora-system:def/relations-external#isMemberOfCollection > > > > <info:fedora/islandora:castimagescollection> > > and $object <fedora-model:label> $filename > > > > > > > > RESULT: > > "object","filename" > > info:fedora/islandora:70,Folder 1 > > info:fedora/islandora:224,Cast image 9 > > info:fedora/islandora:298,Cast image 10 > > info:fedora/islandora:311,Cast image 11 > > > > > > I appreciate your feedback. > > > > > > Diwakar Timilsina > > Systems Analyst, UITS > > University of Arkansas, Fayetteville > > Email: diwa...@uark.edu > > Phone: 479.575.6160 > > > > > ---------------------------------------------------------------------- > -------- Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft > developers is just $99.99! Visual Studio, SharePoint, SQL - plus > HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you > subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > Fedora-commons-users mailing list > Fedora-commons-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/fedora-commons-users > -- David Wilcox, BA, MLIS Islandora Training/Support Coordinator Robertson Library University of Prince Edward Island dwil...@upei.ca Skype Name: david.wilcox82 902.620.5167 ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Fedora-commons-users mailing list Fedora-commons-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fedora-commons-users ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Fedora-commons-users mailing list Fedora-commons-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fedora-commons-users