Package org.dspace.content

Examples of org.dspace.content.Collection


            for (Collection collection : community.getCollections()) {
                scope.addOption(collection.getHandle(), collection.getMetadata("name"));
            }
        } else if (scopeDSO instanceof Collection) {
            // The scope is a collection, display all parent collections.
            Collection collection = (Collection) scopeDSO;
            scope.addOption("/", T_all_of_dspace);
            scope.addOption(collection.getHandle(), collection.getMetadata("name"));
            scope.setOptionSelected(collection.getHandle());

            Community[] communities = collection.getCommunities()[0]
                    .getAllParents();
            for (Community community : communities) {
                scope.addOption(community.getHandle(), community.getMetadata("name"));
            }
        }
View Full Code Here


      startElement(DIM,"dim",attributes);

            // Add each field for this collection
            if (dso.getType() == Constants.COLLECTION)
            {
                Collection collection = (Collection) dso;
               
                String description = collection.getMetadata("introductory_text");
                String description_abstract = collection.getMetadata("short_description");
                String description_table = collection.getMetadata("side_bar_text");
                String identifier_uri = "http://hdl.handle.net/" + collection.getHandle();
                String provenance = collection.getMetadata("provenance_description");
                String rights = collection.getMetadata("copyright_text");
                String rights_license = collection.getMetadata("license");
                String title = collection.getMetadata("name");
               
                createField("dc","description",null,null,description);
                createField("dc","description","abstract",null,description_abstract);
                createField("dc","description","tableofcontents",null,description_table);
                createField("dc","identifier","uri",null,identifier_uri);
View Full Code Here

            return community.getLogo();
        }
        else if (dso instanceof Collection)
        {

            Collection collection = (Collection) dso;
            return collection.getLogo();
        }
        return null;
    }
View Full Code Here

                 if (item != null)
                                                 adapter = new ItemAdapter(context,item,contextPath);
               }
               else if ("collection".equals(type))
               {
                 Collection collection = Collection.find(context,id);
                 if (collection != null)
                   adapter = new ContainerAdapter(context, collection,contextPath);
               }
               else if ("community".equals(type))
               {
View Full Code Here

    }

    private List<Object> findOwningCommunities(Context context, int collId)
            throws SQLException
    {
        Collection coll = Collection.find(context, collId);

        List<Object> owningComms = new ArrayList<Object>();
        for (int i = 0; i < coll.getCommunities().length; i++)
        {
            Community community = coll.getCommunities()[i];
            findComms(community, owningComms);
        }

        return owningComms;
    }
View Full Code Here

        // our browse to a specified community or collection
        if (scope.inCollection() || scope.inCommunity())
        {
            if (scope.inCollection())
            {
                Collection col = (Collection) scope.getBrowseContainer();
                dao.setContainerTable("collection2item");
                dao.setContainerIDField("collection_id");
                dao.setContainerID(col.getID());
            }
            else if (scope.inCommunity())
            {
                Community com = (Community) scope.getBrowseContainer();
                dao.setContainerTable("communities2item");
View Full Code Here

            // our browse to a specified community or collection
            if (scope.inCollection() || scope.inCommunity())
            {
                if (scope.inCollection())
                {
                    Collection col = (Collection) scope.getBrowseContainer();
                    dao.setContainerTable("collection2item");
                    dao.setContainerIDField("collection_id");
                    dao.setContainerID(col.getID());
                }
                else if (scope.inCommunity())
                {
                    Community com = (Community) scope.getBrowseContainer();
                    dao.setContainerTable("communities2item");
View Full Code Here

                // table to be specified.
                dao.setFilterMappingTables(null, browseIndex.getMapTableName());

                if (scope.inCollection())
                {
                    Collection col = (Collection) scope.getBrowseContainer();
                    dao.setContainerTable("collection2item");
                    dao.setContainerIDField("collection_id");
                    dao.setContainerID(col.getID());
                }
                else if (scope.inCommunity())
                {
                    Community com = (Community) scope.getBrowseContainer();
                    dao.setContainerTable("communities2item");
View Full Code Here

    if (groupID >= 0)
      group = Group.find(context,groupID);
     
   
    // Find the collection or community if applicable
    Collection collection = null;
    Community community = null;
    if (group != null)
    {
      int collectionID = FlowGroupUtils.getCollectionId(group.getName());
      if (collectionID > -1)
        collection = Collection.find(context, collectionID);
      else
      {
          int communityID = FlowGroupUtils.getCommunityId(group.getName());
          if (communityID > -1)
              community = Community.find(context, communityID);
        }
    }
   
    // Get list of member groups
    String memberGroupIDsString = parameters.getParameter("memberGroupIDs",null);
    ArrayList<Integer> memberGroupIDs = new ArrayList<Integer>();
    if (memberGroupIDsString != null)
    {
      for (String id : memberGroupIDsString.split(","))
      {
        if (id.length() > 0)
          memberGroupIDs.add(Integer.valueOf(id));
      }
    }
     
    // Get list of member epeople
    String memberEPeopleIDsString = parameters.getParameter("memberEPeopleIDs",null);
    ArrayList<Integer> memberEPeopleIDs = new ArrayList<Integer>();
    if (memberEPeopleIDsString != null)
    {
      for (String id : memberEPeopleIDsString.split(","))
        if (id.length() > 0)
          memberEPeopleIDs.add(Integer.valueOf(id));
    }
   
    // Get highlight parameters
    int highlightEPersonID = parameters.getParameterAsInteger("highlightEPersonID",-1);
    int highlightGroupID = parameters.getParameterAsInteger("highlightGroupID",-1);
   
    // Get search parameters
      String query = URLDecode(parameters.getParameter("query",null));
      int page     = parameters.getParameterAsInteger("page",0);
      String type  = parameters.getParameter("type",null);
     
      // Get any errors
      String errorString = parameters.getParameter("errors",null);
    ArrayList<String> errors = new ArrayList<String>();
    if (errorString != null)
      for (String error : errorString.split(","))
        errors.add(error);
     
   
     
      //DIVISION: group-edit
      Division main = body.addInteractiveDivision("group-edit",contextPath+"/admin/groups",Division.METHOD_POST,"primary administrative groups");
      if (group == null)
        main.setHead(T_main_head_new);
      else
        main.setHead(T_main_head.parameterize(group.getName(),groupID));
  
     
      if(collection != null)
      {
        Para para = main.addPara();
        para.addContent(T_collection_para);
        para.addXref(contextPath+"/handle/"+collection.getHandle(), collection.getMetadata("name"));
      }
      else if(community != null)
        {
            Para para = main.addPara();
            para.addContent(T_community_para);
View Full Code Here

          row.addCell().addContent(memberCount == 0 ? "-" : String.valueOf(memberCount));
         
          Cell cell = row.addCell();
          if (FlowGroupUtils.getCollectionId(group.getName()) > -1)
          {
            Collection collection = Collection.find(context, FlowGroupUtils.getCollectionId(group.getName()) );
            if (collection != null)
            {
              String collectionName = collection.getMetadata("name");
             
              if (collectionName == null)
                collectionName = "";
              else if (collectionName.length() > MAX_COLLECTION_NAME)
                collectionName = collectionName.substring(0,MAX_COLLECTION_NAME-3) + "...";
             
              cell.addContent(collectionName+" ");
             
              Highlight highlight = cell.addHighlight("fade");
              highlight.addContent("[");
              highlight.addXref(contextPath+"/handle/"+collection.getHandle(), T_groups_collection_link);
              highlight.addContent("]");
            }
          }
         
         
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.