No Original

select * from item
where
not exists (
      select 1
      from item2bundle i2b
      inner join bundle b
      on
    i2b.bundle_id = b.bundle_id
    and b.name = 'ORIGINAL'
        and i.item_id = i2b.item_id
      inner join bundle2bitstream b2b
      on
        b2b.bundle_id = b.bundle_id
      inner join bitstream bit
      on
        bit.bitstream_id = b2b.bitstream_id
    )

No Bitstream at all (includes license)

select * from item i
where
    not exists (
      select 1
      from item2bundle i2b
      inner join bundle2bitstream b2b
      on
        b2b.bundle_id = i2b.bundle_id
      inner join bitstream bit
      on
        bit.bitstream_id = b2b.bitstream_id
      where i.item_id = i2b.item_id
    )

I have compiled some other useful queries into the following code.  There
may be some other SQL fragments you will find useful.
https://github.com/Georgetown-University-Libraries/batch-tools/blob/master/web/query/selfQueryCommon.php#L77-L97

Terry


On Thu, Jan 22, 2015 at 2:48 AM, Layale Bassil <[email protected]> wrote:

> Thank you so much Terry,
>
>
>
> I will have a look at this tool. But I need to know if there is any way I
> can have a list of all items imported to dspace that do not have any
> bitsream (0 added files). A reporting tool? A query to run on the database?
>
>
>
> Your help is very much appreciated.
>
> Regards.
>
>
>
>
>
> *From:* Terry Brady [mailto:[email protected]]
> *Sent:* Thursday, January 22, 2015 8:15 AM
> *To:* Layale Bassil
> *Cc:* [email protected]
> *Subject:* Re: [Dspace-tech] Authorization of DSpace items...
>
>
>
> In XMLUI, there is a tool that will let you apply bulk changes to
> permissions.
>
>
>
> Administrative -> Authorizations -> Advanced Authorizations Tool
>
>
>
> I have only used it a couple of times, but it was very handy when I used
> it.
>
>
>
> On Wed, Jan 21, 2015 at 7:41 AM, Layale Bassil <[email protected]> wrote:
>
> Hello All,
>
>
>
> As far as I know, authorizations in DSpace are usually set for a
> community, or collection, or even at the item level.  If we setup the
> authorization for a collection, then we load data, all items inherit that
> setup before loading, and we cannot globally change the authorization for
> those items.
>
>
>
> Currently, on the DSpace instance I am working on (version 4.2), all item
> bitstreams are not accessible by users; however, I need to change the
> authorization of those bitstreams to be (Anonymous) according to the
> publication date.
>
>
>
> How can this be done? Is there any add-on that can help me changing the
> access authorization of an item bitstream? Or any script to do so on a set
> of items instead of going at each item?
>
>
>
> Your help is very much appreciated.
>
> Regards.
>
>
>
>
>
> ------------------------------------------------------------------------------
> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
> GigeNET is offering a free month of service with a new server in Ashburn.
> Choose from 2 high performing configs, both with 100TB of bandwidth.
> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
> http://p.sf.net/sfu/gigenet
> _______________________________________________
> DSpace-tech mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
> List Etiquette:
> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
>
>
>
>
>
> --
>
> Terry Brady
>
> Applications Programmer Analyst
>
> Georgetown University Library Information Technology
>
> https://www.library.georgetown.edu/lit/code
>
> 425-298-5498
>



-- 
Terry Brady
Applications Programmer Analyst
Georgetown University Library Information Technology
https://www.library.georgetown.edu/lit/code
425-298-5498
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to