Package org.dspace.content

Examples of org.dspace.content.Collection


        else
        {
            Bitstream logo = null;
            if (dso.getType() == Constants.COLLECTION)
            {
                Collection col = (Collection)dso;
                defaultTitle = col.getMetadata("name");
                feed.setDescription(col.getMetadata("short_description"));
                logo = col.getLogo();
            }
            else if (dso.getType() == Constants.COMMUNITY)
            {
                Community comm = (Community)dso;
                defaultTitle = comm.getMetadata("name");
View Full Code Here


      runHarvest();     
    }
   
    private void runHarvest()
    {
      Collection dso = null;
      try {
        dso = Collection.find(context, hc.getCollectionId());
        OAIHarvester harvester = new OAIHarvester(context, dso, hc);
        harvester.runHarvest();
      } catch (Exception ex) {
View Full Code Here

            String collectionOrCommunityName = null;
            int id;
            id = FlowGroupUtils.getCollectionId(groupName);
            if (id > -1)
            {
                Collection collection = Collection.find(context, id);
                if (collection != null)
                {
                    collectionOrCommunityName = collection.getMetadata("name");
                    collectionOrCommunity = collection;
                }
            }
            else
            {
View Full Code Here

                }

                // Show new owning collection
                if (change.getNewOwningCollection() != null)
                {
                    Collection c = change.getNewOwningCollection();
                    if (c != null)
                    {
                        String cHandle = c.getHandle();
                        String cName = c.getName();
                        Row colrow = mdchanges.addRow("addition",Row.ROLE_DATA,"metadata-addition");
                        colrow.addCellContent(T_collection_newowner);
                        colrow.addCellContent(cHandle + " (" + cName + ")");
                    }
                }

                // Show old owning collection
                if (change.getOldOwningCollection() != null)
                {
                    Collection c = change.getOldOwningCollection();
                    if (c != null)
                    {
                        String cHandle = c.getHandle();
                        String cName = c.getName();
                        Row colrow = mdchanges.addRow("deletion",Row.ROLE_DATA,"metadata-deletion");
                        colrow.addCellContent(T_collection_oldowner);
                        colrow.addCellContent(cHandle + " (" + cName + ")");
                    }
                }

                // Show new mapped collections
                for (Collection c : newCollections)
                {
                    String cHandle = c.getHandle();
                    String cName = c.getName();
                    Row colrow = mdchanges.addRow("addition",Row.ROLE_DATA,"metadata-addition");
                    colrow.addCellContent(T_collection_mapped);
                    colrow.addCellContent(cHandle + " (" + cName + ")");
                }

                // Show old mapped collections
                for (Collection c : oldCollections)
                {
                    String cHandle = c.getHandle();
                    String cName = c.getName();
                    Row colrow = mdchanges.addRow("deletion",Row.ROLE_DATA,"metadata-deletion");
                    colrow.addCellContent(T_collection_unmapped);
                    colrow.addCellContent(cHandle + " (" + cName + ")");
                }
View Full Code Here

                        }

                        // Show new owning collection
                        if (change.getNewOwningCollection() != null)
                        {
                            Collection c = change.getNewOwningCollection();
                            if (c != null)
                            {
                                String cHandle = c.getHandle();
                                String cName = c.getName();
                                Row colrow = mdchanges.addRow("addition",Row.ROLE_DATA,"metadata-addition");
                                colrow.addCellContent(T_collection_newowner);
                                colrow.addCellContent(cHandle + " (" + cName + ")");
                            }
                        }

                        // Show old owning collection
                        if (change.getOldOwningCollection() != null)
                        {
                            Collection c = change.getOldOwningCollection();
                            if (c != null)
                            {
                                String cHandle = c.getHandle();
                                String cName = c.getName();
                                Row colrow = mdchanges.addRow("deletion",Row.ROLE_DATA,"metadata-deletion");
                                colrow.addCellContent(T_collection_oldowner);
                                colrow.addCellContent(cHandle + " (" + cName + ")");
                            }
                        }

                        // Show new mapped collections
                        for (Collection c : newCollections)
                        {
                            String cHandle = c.getHandle();
                            String cName = c.getName();
                            Row colrow = mdchanges.addRow("addition",Row.ROLE_DATA,"metadata-addition");
                            colrow.addCellContent(T_collection_mapped);
                            colrow.addCellContent(cHandle + " (" + cName + ")");
                        }

                        // Show old mapped collections
                        for (Collection c : oldCollections)
                        {
                            String cHandle = c.getHandle();
                            String cName = c.getName();
                            Row colrow = mdchanges.addRow("deletion",Row.ROLE_DATA,"metadata-deletion");
                            colrow.addCellContent(T_collection_unmapped);
                            colrow.addCellContent(cHandle + " (" + cName + ")");
                        }
View Full Code Here

        for (Community element : subs)
        {
            result.add(new DAVCommunity(this.context, this.request, this.response,
                    makeChildPath(element), element));
        }
        Collection colls[] = this.community.getCollections();
        for (Collection element : colls)
        {
            result.add(new DAVCollection(this.context, this.request, this.response,
                    makeChildPath(element), element));
        }
View Full Code Here

     */
    @Override
    protected int mkcolInternal(String name) throws DAVStatusException,
            SQLException, AuthorizeException, IOException
    {
        Collection newColl = this.community.createCollection();
        newColl.setMetadata("name", name);
        newColl.update();
        return HttpServletResponse.SC_OK;
    }
View Full Code Here

                value = hrefToEPerson(ep);
            }
        }
        else if (elementsEqualIsh(property, owning_collectionProperty))
        {
            Collection owner = this.item.getOwningCollection();
            if (owner != null)
            {
                value = canonicalizeHandle(owner.getHandle());
            }
        }
        else if (elementsEqualIsh(property, getlastmodifiedProperty))
        {
            value = DAV.HttpDateFormat.format(this.item.getLastModified());
View Full Code Here

        // access check
        AuthorizeManager.authorizeAction(context, item, Constants.READ);

        // make sure item doesn't belong to this collection
        Collection destColl = ((DAVCollection) destination).getCollection();

        log.debug("COPY from=" + item.toString() + " (" + item.getHandle()
                + "), to=" + destColl.toString() + " (" + destColl.getHandle()
                + ")");

        // check if it's already a member
        Collection refs[] = item.getCollections();
        for (Collection element : refs)
        {
            if (destColl.equals(element))
            {
                log.debug("COPY - item @ " + item.getHandle()
View Full Code Here

        Context context = null;
        try {
            context = new Context();
            refreshParams(context);

            Collection comm = Collection.find(context, Integer.parseInt(id));
            return comm != null ? true : false;
        } catch (SQLException ex) {
            throw new EntityException("Internal server error", "SQL error", 500);
        } finally {
            removeConn(context);
View Full Code Here

TOP

Related Classes of org.dspace.content.Collection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.