Package org.dspace.content

Examples of org.dspace.content.Collection


     */
    private static WorkspaceItem returnToWorkspace(Context c, WorkflowItem wfi)
            throws SQLException, IOException, AuthorizeException
    {
        Item myitem = wfi.getItem();
        Collection mycollection = wfi.getCollection();

        // FIXME: How should this interact with the workflow system?
        // FIXME: Remove license
        // FIXME: Provenance statement?
        // Create the new workspace item row
        TableRow row = DatabaseManager.create(c, "workspaceitem");
        row.setColumn("item_id", myitem.getID());
        row.setColumn("collection_id", mycollection.getID());
        DatabaseManager.update(c, row);

        int wsi_id = row.getIntColumn("workspace_item_id");
        WorkspaceItem wi = WorkspaceItem.find(c, wsi_id);
        wi.setMultipleFiles(wfi.hasMultipleFiles());
View Full Code Here


                // Get the submitter's name
                String submitter = getSubmitterName(wi);

                // Get the collection
                Collection coll = wi.getCollection();

                String message = "";

                for (int i = 0; i < epa.length; i++)
                {
                    Locale supportedLocale = I18nUtil.getEPersonLocale(epa[i]);
                    Email email = ConfigurationManager.getEmail(I18nUtil.getEmailFilename(supportedLocale, "submit_task"));
                    email.addArgument(title);
                    email.addArgument(coll.getMetadata("name"));
                    email.addArgument(submitter);

                    ResourceBundle messages = ResourceBundle.getBundle("Messages", supportedLocale);
                    switch (wi.getState())
                    {
View Full Code Here

        {
            // Get the item title
            String title = getItemTitle(wi);

            // Get the collection
            Collection coll = wi.getCollection();

            // Get rejector's name
            String rejector = getEPersonName(e);
            Locale supportedLocale = I18nUtil.getEPersonLocale(e);
            Email email = ConfigurationManager.getEmail(I18nUtil.getEmailFilename(supportedLocale,"submit_reject"));

            email.addRecipient(getSubmitterEPerson(wi).getEmail());
            email.addArgument(title);
            email.addArgument(coll.getMetadata("name"));
            email.addArgument(rejector);
            email.addArgument(reason);
            email.addArgument(getMyDSpaceLink());

            email.send();
View Full Code Here

           ccLicenseStep.addBody(body);
           return;
        }
       
        // Get the full text for the actuial licese
    Collection collection = submission.getCollection();
    String actionURL = contextPath + "/handle/"+collection.getHandle() + "/submit/" + knot.getId() + ".continue";
    String licenseText = LicenseUtils.getLicenseText(context
                .getCurrentLocale(), collection, submission.getItem(),
                submission.getSubmitter());
   
    Division div = body.addInteractiveDivision("submit-license",actionURL, Division.METHOD_POST,"primary submission");
View Full Code Here

 
 
  public void addBody(Body body) throws WingException, SQLException, AuthorizeException
  {
    int collectionID = parameters.getParameterAsInteger("collectionID", -1);
    Collection thisCollection = Collection.find(context, collectionID);
    HarvestedCollection hc = HarvestedCollection.find(context, collectionID);
    Request request = ObjectModelHelper.getRequest(objectModel);
       
    String baseURL = contextPath + "/admin/collection?administrative-continue=" + knot.getId();
   
    String oaiProviderValue = hc.getOaiSource();
    String oaiSetIdValue = hc.getOaiSetId();
    String metadataFormatValue = hc.getHarvestMetadataConfig();
    int harvestLevelValue = hc.getHarvestType();
    int harvestStatusValue = hc.getHarvestStatus();
             
    // DIVISION: main
      Division main = body.addInteractiveDivision("collection-harvesting-edit",contextPath+"/admin/collection",Division.METHOD_MULTIPART,"primary administrative collection");
      main.setHead(T_main_head.parameterize(thisCollection.getMetadata("name")));  
     
      List options = main.addList("options",List.TYPE_SIMPLE,"horizontal");
      options.addItem().addXref(baseURL+"&submit_metadata",T_options_metadata);
      options.addItem().addXref(baseURL+"&submit_roles",T_options_roles);
      options.addItem().addHighlight("bold").addXref(baseURL+"&submit_harvesting",T_options_harvest);
View Full Code Here

       
  public void addBody(Body body) throws SAXException, WingException,
  UIException, SQLException, IOException, AuthorizeException
  {
    // Get actionable URL
    Collection collection = submission.getCollection();
    String actionURL = contextPath + "/handle/"+collection.getHandle() + "/submit/" + knot.getId() + ".continue";

        SubmissionConfig subConfig = submissionInfo.getSubmissionConfig();
       
        //Part A:
        // Build the main Review Form!
View Full Code Here

 
  public void addBody(Body body) throws SAXException, WingException, SQLException
  {
    // Get our parameters and state;
    int collectionID = parameters.getParameterAsInteger("collectionID",-1);
    Collection collection = Collection.find(context,collectionID);
   
    ArrayList<Item> items = getMappedItems(collection);
   
    // DIVISION: browse-items
    Division div = body.addInteractiveDivision("browse-items",contextPath + "/admin/mapper", Division.METHOD_GET,"primary administrative mapper");
    div.setHead(T_head1);
   
    if (AuthorizeManager.authorizeActionBoolean(context, collection, Constants.REMOVE))
    {
      Para actions = div.addPara();
      actions.addButton("submit_unmap").setValue(T_submit_unmap);
      actions.addButton("submit_return").setValue(T_submit_return);
    }
    else
    {
      Para actions = div.addPara();
      Button button = actions.addButton("submit_unmap");
      button.setValue(T_submit_unmap);
      button.setDisabled();
      actions.addButton("submit_return").setValue(T_submit_return);
     
      div.addPara().addHighlight("fade").addContent(T_no_remove);
    }
   
    Table table = div.addTable("browse-items-table",1,1);
   
    Row header = table.addRow(Row.ROLE_HEADER);
    header.addCellContent(T_column1);
    header.addCellContent(T_column2);
    header.addCellContent(T_column3);
    header.addCellContent(T_column4);
   
    for (Item item : items)
    {
      String itemID = String.valueOf(item.getID());
      Collection owningCollection = item.getOwningCollection();
      String owning = owningCollection.getMetadata("name");
      String author = "unkown";
      DCValue[] dcAuthors = item.getDC("contributor",Item.ANY,Item.ANY);
      if (dcAuthors != null && dcAuthors.length >= 1)
        author = dcAuthors[0].value;
     
View Full Code Here

                            }
                            Community topParent = parents[parents.length - 2];
                            curCommCollSelectedName = "m" + topParent.getID();
                        } else {
                            // Supposing Constants.COLLECTION
                            Collection lsel = Collection.find(context, curCommCollSelectedID);
                            Community firstParent = lsel.getCommunities()[0];
                            Community[] parents = firstParent.getAllParents();
                            if (parents.length == 0) {
                                //log.error("Something is wrong: this should not happen.");
                                //firstParent is a top community.
                                curCommCollSelectedName = "m" + firstParent.getID();
View Full Code Here

            SQLException, IOException, AuthorizeException {

        DSpaceObject dso = HandleUtil.obtainHandle(objectModel);

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

        performSearch(collection);

        if(queryResults == null)
            return;// queryResults;
View Full Code Here

     */
    public SourceValidity getValidity()
    {
      if (this.validity == null)
      {
            Collection collection = null;
          try
          {
              DSpaceObject dso = HandleUtil.obtainHandle(objectModel);
 
              if (dso == null)
                  return null;
 
              if (!(dso instanceof Collection))
                  return null;
 
              collection = (Collection) dso;
 
              DSpaceValidity validity = new DSpaceValidity();
             
              // Add the actual collection;
              validity.add(collection);
             
              this.validity = validity.complete();
          }
          catch (Exception e)
          {
              // Just ignore all errors and return an invalid cache.
          }

            log.info(LogManager.getHeader(context, "view_collection", "collection_id=" + (collection == null ? "" : collection.getID())));

      }
      return this.validity;
    }
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.