On Wed, Jun 12, 2019 at 07:13:51PM -0700, Jun Won Jung wrote:
> Hello all,
>
> We need some statistics from DSpace 5.x .
> The statistics should include type of each item, whether the item(or some
> of it's attachments) is embargoed.
>
> To solve it we made a simple Java application using
> 'org.dspace.core.Context' & 'org.dspace.conent.Item'.
>
> Firstly, I tried to extract the number of attached files in each item with
> the following code
> ------------------------------------------------------------------------
> ItemIterator items = Item.findAll(context);
> ...
> while (items.hasNext()) {
> Item item = items.next();
>
> if (item.isArchived() && !item.isWithdrawn()) {
>
> Bitstream[] bitstreams = null;
> if((item.getBundles() != null) && (item.getBundles().length > 0) ){
> ArrayList<Bundle> allBundles = new
> ArrayList<Bundle>(Arrays.asList(item.getBundles()));
> Bundle currentBundle = allBundles.get( item.getBundles().length - 1 );
> // <- Is this the lastest Bundle of Item ?
> bitstreams = currentBundle.getBitstreams();
> }
> ------------------------------------------------------------------------
> There is no method for Item object like 'getCurrentBundle()' or
> 'getLatestBundle(()'.
> Is it right that last elements of 'item.getBundles()' is the current item's
> bundle?I do not understand "latest bundle." Bitstreams are contained in Bundles according to what use DSpace makes of them. For example, Bitstreams in the ORIGINAL Bundle are the files submitted to create the item. Other bundles contain derivatives of the submitted files, the license selected by the submitter, etc. -- Mark H. Wood Lead Technology Analyst University Library Indiana University - Purdue University Indianapolis 755 W. Michigan Street Indianapolis, IN 46202 317-274-0749 www.ulib.iupui.edu -- All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/ --- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/20190618133932.GB15530%40IUPUI.Edu.
signature.asc
Description: PGP signature
