Hello Andrea, Thank you so much for your help. I forgot to reply to this thread but now after upgrading to 6.0, here's how I've done it: I had to change the following:
https://github.com/DSpace/DSpace/blob/dspace-6_x/dspace-api/src/main/java/org/dspace/app/mediafilter/MediaFilterServiceImpl.java Which is exactly what you said (filterItem function) but different file for 6.0. I just added: *172 List<Bundle> myBundles = itemService.getBundles(myItem, "ORIGINAL");* *++173 myBundles.addAll(itemService.getBundles(myItem, "ISSUEDPDF"));* *174 boolean done = false;* Rebuilt DSpace and it's working, it's performing the filter-media routine on my own custom bundle *ISSUEDPDF*. This should be abstracted and optimized. How about adding a "filterMediaItemBundleList" comma separated value list in *dspace.cfg (or local.cfg)* and use it in this method? I hope it also serves as help to others in the future. Thanks, Pedro Amorim quinta-feira, 2 de Junho de 2016 às 01:34:11 UTC, Andrea Schweer escreveu: > > Hi Pedro, > > On 30/05/16 21:47, Pedro Amorim wrote: > > I tried importing into a METS package with some digital objects mapped > > to ORIGINAL, others to METADATA and yet another group to "ISSUEPDF". > > > > I was expecting an error of some sort complaining of no such bundle, > > but it successfully imported and the item shows the bundle "ISSUEPDF" > > with the respective objects. > > The DSpace data model does not enforce bundle names at all; with METS > import, you're free to specify whichever bundle names you like. > > > This helps me because my goal is to have the objects for each item > > organised with my own custom bundles so that later the REST API can > > expose them with such organisation. > > > > My question is: > > Is this good practice? Or should I expect some unexpected behaviours > > down the road? > > I see no problems with this approach. Just be aware that some areas of > DSpace by default expose only the ORIGINAL bundle (eg item pages). > > > I tested the REST API and it's working fine. Still need to test if > > DSpace is extracting the text from these custom bundles but I think > > that's it. > > Text from these bundles isn't extracted. But you could easily customise > the media filter manager class to include additional bundles besides the > ORIGINAL one. Look at the "filterItem" method (DSpace 5.x code here: > > https://github.com/DSpace/DSpace/blob/dspace-5_x/dspace-api/src/main/java/org/dspace/app/mediafilter/MediaFilterManager.java#L488) > > > > If you have questions about this, it's probably best if you ask over on > the DSpace developers list. > > cheers, > Andrea > > -- > Dr Andrea Schweer > Lead Software Developer, ITS Information Systems > The University of Waikato, Hamilton, New Zealand > +64-7-837 9120 > > -- You received this message because you are subscribed to the Google Groups "DSpace Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/dspace-community. For more options, visit https://groups.google.com/d/optout.
