Package org.dspace.content

Examples of org.dspace.content.Collection


    {
        DSpaceObject dso = HandleUtil.obtainHandle(objectModel);
        if (!(dso instanceof Collection))
            return;

        Collection collection = (Collection) dso;

        // Set the page title
        String name = collection.getMetadata("name");
        if (name == null || name.length() == 0)
          pageMeta.addMetadata("title").addContent(T_untitled);
        else
          pageMeta.addMetadata("title").addContent(name);

        pageMeta.addTrailLink(contextPath + "/",T_dspace_home);
        HandleUtil.buildHandleTrail(collection,pageMeta,contextPath);
       
        // Add RSS links if available
        String formats = ConfigurationManager.getProperty("webui.feed.formats");
    if ( formats != null )
    {
      for (String format : formats.split(","))
      {
        // Remove the protocol number, i.e. just list 'rss' or' atom'
        String[] parts = format.split("_");
        if (parts.length < 1)
          continue;
       
        String feedFormat = parts[0].trim()+"+xml";
         
        String feedURL = contextPath+"/feed/"+format.trim()+"/"+collection.getHandle();
        pageMeta.addMetadata("feed", feedFormat).addContent(feedURL);
      }
    }
    }
View Full Code Here


        DSpaceObject dso = HandleUtil.obtainHandle(objectModel);
        if (!(dso instanceof Collection))
            return;

        // Set up the major variables
        Collection collection = (Collection) dso;
       

        // Build the collection viewer division.
        Division home = body.addDivision("collection-home", "primary repository collection");
        String name = collection.getMetadata("name");
        if (name == null || name.length() == 0)
          home.setHead(T_untitled);
        else
          home.setHead(name);
View Full Code Here

         *
         * With no parameters, this servlet prepares for display of the Select
         * Collection JSP.
         */
        String collectionID = request.getParameter("collection");
        Collection col = null;

        if (collectionID != null)
        {
            col = Collection.find(context, Integer.parseInt(collectionID));
        }
View Full Code Here

            this.add(community.getLogo());

        }
        else if (dso instanceof Collection)
        {
            Collection collection = (Collection) dso;
           
            validityKey.append("Collection:");
            validityKey.append(collection.getHandle());
            validityKey.append(collection.getMetadata("introductory_text"));
            validityKey.append(collection.getMetadata("short_description"));
            validityKey.append(collection.getMetadata("side_bar_text"));
            validityKey.append(collection.getMetadata("provenance_description"));
            validityKey.append(collection.getMetadata("copyright_text"));
            validityKey.append(collection.getMetadata("license"));
            validityKey.append(collection.getMetadata("name"));
           
            // Add the logo also;
            this.add(collection.getLogo());
           
        }
        else if (dso instanceof Item)
        {
            Item item = (Item) dso;
View Full Code Here

               itemmd.add(dso.getID());
               exporter = new MetadataExport(context, new ItemIterator(context, itemmd),true);
            }
            else if(dso.getType() == Constants.COLLECTION)
            {
               Collection collection = (Collection)dso;
               ItemIterator toExport = collection.getAllItems();
               exporter = new MetadataExport(context, toExport,true);
            }
            else if(dso.getType() == Constants.COMMUNITY)
            {
               exporter = new MetadataExport(context, (Community)dso, false);
View Full Code Here

     */
    public SourceValidity getValidity()
    {
      if (this.validity == null)
      {
            Collection collection = null;
          try
          {
              DSpaceObject dso = HandleUtil.obtainHandle(objectModel);

              if (dso == null)
View Full Code Here

    {
        DSpaceObject dso = HandleUtil.obtainHandle(objectModel);
        if (!(dso instanceof Collection))
            return;

        Collection collection = (Collection) dso;

        // Set the page title
        String name = collection.getMetadata("name");
        if (name == null || name.length() == 0)
          pageMeta.addMetadata("title").addContent(T_untitled);
        else
          pageMeta.addMetadata("title").addContent(name);

        pageMeta.addTrailLink(contextPath + "/",T_dspace_home);
        HandleUtil.buildHandleTrail(collection,pageMeta,contextPath);

        // Add RSS links if available
        String formats = ConfigurationManager.getProperty("webui.feed.formats");
    if ( formats != null )
    {
      for (String format : formats.split(","))
      {
        // Remove the protocol number, i.e. just list 'rss' or' atom'
        String[] parts = format.split("_");
        if (parts.length < 1)
          continue;

        String feedFormat = parts[0].trim()+"+xml";

        String feedURL = contextPath+"/feed/"+format.trim()+"/"+collection.getHandle();
        pageMeta.addMetadata("feed", feedFormat).addContent(feedURL);
      }
    }
    }
View Full Code Here

        DSpaceObject dso = HandleUtil.obtainHandle(objectModel);
        if (!(dso instanceof Collection))
            return;

        // Set up the major variables
        Collection collection = (Collection) dso;

        // Build the collection viewer division.
        Division home = body.addDivision("collection-home", "primary repository collection");
        String name = collection.getMetadata("name");
        if (name == null || name.length() == 0)
          home.setHead(T_untitled);
        else
          home.setHead(name);

        // The search / browse box.
        {
            Division search = home.addDivision("collection-search-browse",
                    "secondary search-browse");

            // Search query
            Division query = search.addInteractiveDivision("collection-search",
                    contextPath + "/handle/" + collection.getHandle() + "/search",
                    Division.METHOD_POST, "secondary search");

            Para para = query.addPara("search-query", null);
            para.addContent(T_full_text_search);
            para.addContent(" ");
View Full Code Here

        }
       
        if (dso instanceof Item)
        {
            Item item = (Item) dso;
            Collection collection = item.getOwningCollection();
            dso = collection;
        }

        if (dso instanceof Collection)
        {
            Collection collection = (Collection) dso;
            stack.push(collection);
            Community[] communities = collection.getCommunities();

            dso = communities[0];
        }

        if (dso instanceof Community)
        {
            Community community = (Community) dso;
            stack.push(community);

            for (Community parent : community.getAllParents())
            {
                stack.push(parent);
            }
        }

        while (!stack.empty())
        {
            DSpaceObject pop = stack.pop();
           
            if (pop instanceof Collection)
            {
              Collection collection = (Collection) pop;
              String name = collection.getMetadata("name");
              if (name == null || name.length() == 0)
                pageMeta.addTrailLink(contextPath + "/handle/" + pop.getHandle(), new Message("default","xmlui.general.untitled") );
              else
                pageMeta.addTrailLink(contextPath + "/handle/" + pop.getHandle(), name);
            }
View Full Code Here

        if (searchScope instanceof Community) {
            Community community = (Community) searchScope;
            String communityName = community.getMetadata("name");
            results.setHead(T_head1_community.parameterize(communityName));
        } else if (searchScope instanceof Collection) {
            Collection collection = (Collection) searchScope;
            String collectionName = collection.getMetadata("name");
            results.setHead(T_head1_collection.parameterize(collectionName));
        } else {
            results.setHead(T_head1_none);
        }
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.