Examples of Division


Examples of org.dspace.app.xmlui.wing.element.Division

   
    ArrayList<ResourcePolicy> bundlePolicies = new ArrayList<ResourcePolicy>();
    ArrayList<ResourcePolicy> bitstreamPolicies = new ArrayList<ResourcePolicy>();

    // DIVISION: main
    Division main = body.addInteractiveDivision("edit-item-policies",contextPath+"/admin/authorize",Division.METHOD_POST,"primary administrative authorization");
    main.setHead(T_main_head.parameterize(item.getHandle(),item.getID()));
    main.addPara().addHighlight("italic").addContent(T_main_para1);
    main.addPara().addHighlight("italic").addContent(T_main_para2);
   
      Table table = main.addTable("policies-confirm-delete",itemPolicies.size() + 3, 5);
        Row header = table.addRow(Row.ROLE_HEADER);
        header.addCell();
        header.addCell().addContent(T_head_id);
        header.addCell().addContent(T_head_action);
        header.addCell().addContent(T_head_group);
        header.addCell();

       
        // First, the item's policies are listed
        Row subheader = table.addRow(null,Row.ROLE_HEADER,"subheader");
        subheader.addCell(1, 4).addHighlight("bold").addContent(T_subhead_item);
        subheader.addCell().addHighlight("bold").addXref(baseURL + "&submit_add_item", T_add_itemPolicy_link);
       
        this.rowBuilder(baseURL, table, itemPolicies, item.getID(), Constants.ITEM, highlightID);
     
      // Next, one by one, we get the bundles
      for (Bundle bundle : bundles) {
        subheader = table.addRow(null,Row.ROLE_HEADER,"subheader");
        subheader.addCell(null, null, 1, 4, "indent").addHighlight("bold").addContent(T_subhead_bundle.parameterize(bundle.getName(),bundle.getID()));
        subheader.addCell().addHighlight("bold").addXref(baseURL + "&submit_add_bundle_" + bundle.getID(), T_add_bundlePolicy_link);

        bundlePolicies = (ArrayList<ResourcePolicy>)AuthorizeManager.getPolicies(context, bundle);
        this.rowBuilder(baseURL, table, bundlePolicies, bundle.getID(), Constants.BUNDLE, highlightID);
       
        // And eventually to the bundle's bitstreams
        bitstreams = bundle.getBitstreams();
        for (Bitstream bitstream : bitstreams) {
          subheader = table.addRow(null,Row.ROLE_HEADER,"subheader");
            subheader.addCell(null, null, 1, 4, "doubleIndent").addContent(T_subhead_bitstream.parameterize(bitstream.getName(),bitstream.getID()));
            subheader.addCell().addXref(baseURL + "&submit_add_bitstream_" + bitstream.getID(), T_add_bitstreamPolicy_link);

            bitstreamPolicies = (ArrayList<ResourcePolicy>)AuthorizeManager.getPolicies(context, bitstream);
            this.rowBuilder(baseURL, table, bitstreamPolicies, bitstream.getID(), Constants.BITSTREAM, highlightID);         
        }
      }
     
      Para buttons = main.addPara();
      buttons.addButton("submit_delete").setValue(T_submit_delete);
      buttons.addButton("submit_return").setValue(T_submit_return);
       
   
    main.addHidden("administrative-continue").setValue(knot.getId());
   }
View Full Code Here

Examples of org.dspace.app.xmlui.wing.element.Division

    BitstreamFormat[] formats = BitstreamFormat.findAll(context);
    String addURL = contextPath+"/admin/format-registry?administrative-continue="+knot.getId()+"&submit_add";
   
 
        // DIVISION: bitstream-format-registry
    Division main = body.addInteractiveDivision("bitstream-format-registry",contextPath+"/admin/format-registry",Division.METHOD_POST,"primary administrative format-registry");
    main.setHead(T_head);
    main.addPara(T_para1);
    main.addPara().addXref(addURL,T_new_link);
   
   
    Table table = main.addTable("bitstream-format-registry", formats.length+1, 5);

    Row header = table.addRow(Row.ROLE_HEADER);
    header.addCellContent(T_column1);
    header.addCellContent(T_column2);
    header.addCellContent(T_column3);
    header.addCellContent(T_column4);
    header.addCellContent(T_column5);
   
    for (BitstreamFormat format : formats)
    {
      String id = String.valueOf(format.getID());
      String mimeType = format.getMIMEType();
      String name = format.getShortDescription();
      int supportLevel = format.getSupportLevel();
      boolean internal = format.isInternal();
     
      boolean highlight = false;
      if (format.getID() == highlightID)
        highlight = true;

      String url = contextPath + "/admin/format-registry?administrative-continue="+knot.getId()+"&submit_edit&formatID="+id;

     
      Row row;
      if (highlight)
        row = table.addRow(null,null,"highlight");
      else
        row = table.addRow();
     
      // Select checkbox
      Cell cell = row.addCell();
      if (format.getID() > 1)
      {
        // Do not allow unknown to be removed.
        CheckBox select = cell.addCheckBox("select_format");
        select.setLabel(id);
        select.addOption(id);
      }
     
      // ID
      row.addCell().addContent(id);

      // Name
      row.addCell().addXref(url,name);
     
      // Mime type
      cell = row.addCell();
      cell.addXref(url,mimeType);
      if (internal)
      {
        cell.addContent(" ");
        cell.addContent(T_internal);
      }
     
      // support level
      switch (supportLevel)
      {
      case 0:
        row.addCell().addXref(url,T_support_0); break;
      case 1:
        row.addCell().addXref(url,T_support_1); break;
      case 2:
        row.addCell().addXref(url,T_support_2); break;
      }
    }
   
    main.addPara().addButton("submit_delete").setValue(T_submit_delete);
   
    main.addHidden("administrative-continue").setValue(knot.getId());
       
  }
View Full Code Here

Examples of org.dspace.app.xmlui.wing.element.Division

   
 
  public void addBody(Body body) throws SAXException, WingException,
  UIException, SQLException, IOException, AuthorizeException
 
    Division div = body.addInteractiveDivision("submit-removed",contextPath+"/submit", Division.METHOD_POST,"primary submission");
   
    div.setHead(T_head);
   
    div.addPara(T_info1);
   
    div.addPara().addXref(contextPath+"/submissions",T_go_submissions);
  }
View Full Code Here

Examples of org.dspace.app.xmlui.wing.element.Division

    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);
     
     
      // The top-level, all-setting, countent source radio button
      List harvestSource = main.addList("harvestSource", "form");
     
      harvestSource.addLabel(T_label_source);
      Radio source = harvestSource.addItem().addRadio("source");
      source.addOption(hc == null, "source_normal", T_source_normal);
      source.addOption(hc != null, "source_harvested", T_source_harvested);
     
      List settings = main.addList("harvestSettings", "form");
      settings.setHead(T_main_settings_head);
     
      settings.addLabel(T_label_oai_provider);
      settings.addItem(oaiProviderValue);
     
      settings.addLabel(T_label_setid);
      settings.addItem(oaiSetIdValue);

      // The big complex way of getting to our metadata
      settings.addLabel(T_label_metadata_format);
   
      String key = "harvester.oai.metadataformats." + metadataFormatValue;
      String metadataString = ConfigurationManager.getProperty(key);

      String displayName;
      if (metadataString.indexOf(',') != -1)
        displayName = metadataString.substring(metadataString.indexOf(',') + 1);
      else
        displayName = metadataFormatValue + "(" + metadataString + ")";
           
      settings.addItem(displayName);
     
      settings.addLabel(T_label_harvest_level);
      Item harvestLevel = settings.addItem();
      switch (harvestLevelValue) {
        case 1: harvestLevel.addContent(T_option_md_only); break;
        case 2: harvestLevel.addContent(T_option_md_and_ref); break;
        default: harvestLevel.addContent(T_option_md_and_bs); break;
      }
                 
        /* Results of the last harvesting cycle */
        if (harvestLevelValue > 0) {
          settings.addLabel(T_label_harvest_result);
          Item harvestResult = settings.addItem();
          if (hc.getHarvestMessage() != null) {
            harvestResult.addContent(hc.getHarvestMessage() + " on " + hc.getHarvestStartTime());
          }
          else {
            harvestResult.addContent(T_harvest_result_new);
          }
        }
       
        /* Current status */
        settings.addLabel(T_label_harvest_status);
      Item harvestStatus = settings.addItem();
        switch(harvestStatusValue) {
          case HarvestedCollection.STATUS_READY: harvestStatus.addContent(T_harvest_status_ready); break;
          case HarvestedCollection.STATUS_BUSY: harvestStatus.addContent(T_harvest_status_busy); break;
          case HarvestedCollection.STATUS_QUEUED: harvestStatus.addContent(T_harvest_status_queued); break;
          case HarvestedCollection.STATUS_OAI_ERROR: harvestStatus.addContent(T_harvest_status_oai_error); break;
          case HarvestedCollection.STATUS_UNKNOWN_ERROR: harvestStatus.addContent(T_harvest_status_unknown_error); break;
        }
           
        settings.addLabel();
      Item harvestButtons = settings.addItem();
      harvestButtons.addButton("submit_change").setValue(T_submit_change_settings);
      harvestButtons.addButton("submit_import_now").setValue(T_submit_import_now);
      harvestButtons.addButton("submit_reimport").setValue(T_submit_reimport_collection);
       
    Para buttonList = main.addPara();
      buttonList.addButton("submit_save").setValue(T_submit_save);
      buttonList.addButton("submit_return").setValue(T_submit_return);
     
      main.addHidden("administrative-continue").setValue(knot.getId());
    }
View Full Code Here

Examples of org.dspace.app.xmlui.wing.element.Division

      fields.add(field);
    }
   
    // DIVISION: metadata-field-move
      Division moved = body.addInteractiveDivision("metadata-field-move",contextPath+"/admin/metadata-registry",Division.METHOD_POST,"primary administrative metadata-registry");
      moved.setHead(T_head1);
      moved.addPara(T_para1);
     
      Table table = moved.addTable("metadata-field-move",fields.size() + 1, 3);
        Row header = table.addRow(Row.ROLE_HEADER);
        header.addCell().addContent(T_column1);
        header.addCell().addContent(T_column2);
        header.addCell().addContent(T_column3);
     
      for (MetadataField field : fields)
      {
        String fieldID = String.valueOf(field.getFieldID());
      String fieldEelement = field.getElement();
      String fieldQualifier = field.getQualifier();
     
      MetadataSchema schema = MetadataSchema.find(context, field.getSchemaID());
      String schemaName = schema.getName();
     
      String fieldName = schemaName +"."+ fieldEelement;
      if (fieldQualifier != null && fieldQualifier.length() > 0)
        fieldName += "."+fieldQualifier;
       
      String fieldScopeNote = field.getScopeNote();
       
        Row row = table.addRow();
        row.addCell().addContent(fieldID);
          row.addCell().addContent(fieldName);
          row.addCell().addContent(fieldScopeNote);
      }

      Row row = table.addRow();
      Cell cell = row.addCell(1,3);
      cell.addContent(T_para2);
      Select toSchema = cell.addSelect("to_schema");
      for (MetadataSchema schema : schemas)
      {
        toSchema.addOption(schema.getSchemaID(), schema.getNamespace());
      }
     
      Para buttons = moved.addPara();
      buttons.addButton("submit_move").setValue(T_submit_move);
      buttons.addButton("submit_cancel").setValue(T_submit_cancel);
     
     
     
      moved.addHidden("administrative-continue").setValue(knot.getId());
    }
View Full Code Here

Examples of org.dspace.app.xmlui.wing.element.Division

   
   
   
   
    // DIVISION: manage-mapper
    Division div = body.addInteractiveDivision("manage-mapper",contextPath + "/admin/mapper", Division.METHOD_GET,"primary administrative mapper");
    div.setHead(T_head1);
   
    div.addPara(T_para1.parameterize(collection.getMetadata("name")));
   
    div.addPara(T_para2);
   
   
    // LIST: Author search form
    List form = div.addList("mapper-form")
   
    form.addLabel(T_stat_label);
    form.addItem(T_stat_info.parameterize(count_import,count_native+count_import));
   
    form.addLabel(T_search_label);
    org.dspace.app.xmlui.wing.element.Item queryItem = form.addItem();
    Text query = queryItem.addText("query");
    Button button = queryItem.addButton("submit_author");
    button.setValue(T_submit_search);
    if (!AuthorizeManager.authorizeActionBoolean(context, collection, Constants.ADD))
    {
      query.setDisabled();
      button.setDisabled();
      queryItem.addHighlight("fade").addContent(T_no_add);
    }
   
    // PARA: actions
    Para actions = div.addPara();
    actions.addButton("submit_browse").setValue(T_submit_browse);
    actions.addButton("submit_return").setValue(T_submit_return);
   
   
    div.addHidden("administrative-continue").setValue(knot.getId());
  }
View Full Code Here

Examples of org.dspace.app.xmlui.wing.element.Division

      showfull = null;
   
   
        // Generate a from asking the user two questions: multiple
        // titles & published before.
      Division div = body.addInteractiveDivision("perform-task", actionURL, Division.METHOD_POST, "primary workflow");
        div.setHead(T_workflow_head);
     
     
        if (showfull == null)
        {
          ReferenceSet referenceSet = div.addReferenceSet("narf",ReferenceSet.TYPE_SUMMARY_VIEW);
          referenceSet.addReference(item);
          div.addPara().addButton("showfull").setValue(T_showfull);
        }
        else
        {
            ReferenceSet referenceSet = div.addReferenceSet("narf",ReferenceSet.TYPE_DETAIL_VIEW);
            referenceSet.addReference(item);
            div.addPara().addButton("showsimple").setValue(T_showsimple);
           
            div.addHidden("showfull").setValue("true");
        }
     
      
        //FIXME: set the correct table size.
        Table table = div.addTable("workflow-actions", 1, 1);
        table.setHead(T_info1);
       
        // Header
        Row row;

        if (state == WFSTATE_STEP1POOL ||
          state == WFSTATE_STEP2POOL ||
          state == WFSTATE_STEP3POOL)
        {
          // Take task
          row = table.addRow();
          row.addCellContent(T_take_help);
          row.addCell().addButton("submit_take_task").setValue(T_take_submit);
      
          // Leave task
          row = table.addRow();
          row.addCellContent(T_leave_help);
          row.addCell().addButton("submit_leave").setValue(T_leave_submit);
        }
       
        if (state == WFSTATE_STEP1 ||
          state == WFSTATE_STEP2)
        {
          // Approve task
          row = table.addRow();
          row.addCellContent(T_approve_help);
          row.addCell().addButton("submit_approve").setValue(T_approve_submit);
        }
       
        if (state == WFSTATE_STEP3)
        {
          // Commit to archive
          row = table.addRow();
          row.addCellContent(T_commit_help);
          row.addCell().addButton("submit_approve").setValue(T_commit_submit);
        }
       
        if (state == WFSTATE_STEP1 ||
          state == WFSTATE_STEP2)
        {
          // Reject item
          row = table.addRow();
          row.addCellContent(T_reject_help);
          row.addCell().addButton("submit_reject").setValue(T_reject_submit);
        }
       
        if (state == WFSTATE_STEP2 ||
          state == WFSTATE_STEP3 )
        {
          // Edit metadata
          row = table.addRow();
          row.addCellContent(T_edit_help);
          row.addCell().addButton("submit_edit").setValue(T_edit_submit);
        }
       
        if (state == WFSTATE_STEP1 ||
            state == WFSTATE_STEP2 ||
            state == WFSTATE_STEP3 )
        {
          // Return to pool
          row = table.addRow();
          row.addCellContent(T_return_help);
          row.addCell().addButton("submit_return").setValue(T_return_submit);
        }
       
       
        // Everyone can just cancel
        row = table.addRow();
        row.addCell(0, 2).addButton("submit_leave").setValue(T_cancel_submit);
       
        div.addHidden("submission-continue").setValue(knot.getId());
    }
View Full Code Here

Examples of org.dspace.app.xmlui.wing.element.Division

   
       
 
       
        // DIVISION: edit-bitstream-format
    Division main = body.addInteractiveDivision("edit-bitstream-format",contextPath+"/admin/format-registry",Division.METHOD_POST,"primary administrative format-registry");
    if (formatID == -1)
      main.setHead(T_head1);
    else
      main.setHead(T_head2.parameterize(nameValue));
    main.addPara(T_para1);
 
    List form = main.addList("edit-bitstream-format",List.TYPE_FORM);
   
    Text name = form.addItem().addText("short_description");
    name.setRequired();
    name.setLabel(T_name);
    name.setHelp(T_name_help);
    name.setValue(nameValue);
    name.setSize(35);
    if (errors.contains("short_description"))
      name.addError(T_name_error);
   
    Text mimeType = form.addItem().addText("mimetype");
    mimeType.setLabel(T_mimetype);
    mimeType.setHelp(T_mimetype_help);
    mimeType.setValue(mimetypeValue);
    mimeType.setSize(35);
   
    // Do not allow anyone to change the name of the unknown format.
    if (format != null && format.getID() == 1)
      name.setDisabled();

    TextArea description = form.addItem().addTextArea("description");
    description.setLabel(T_description);
    description.setValue(descriptionValue);
    description.setSize(3, 35);
   
    Select supportLevel = form.addItem().addSelect("support_level");
    supportLevel.setLabel(T_support);
    supportLevel.setHelp(T_support_help);
    supportLevel.addOption(0,T_support_0);
    supportLevel.addOption(1,T_support_1);
    supportLevel.addOption(2,T_support_2);
    supportLevel.setOptionSelected(supportLevelValue);
   
    CheckBox internal = form.addItem().addCheckBox("internal");
    internal.setLabel(T_internal);
    internal.setHelp(T_internal_help);
    internal.addOption((internalValue != null),"true");
   
    Text extensions = form.addItem().addText("extensions");
    extensions.setLabel(T_extensions);
    extensions.setHelp(T_extensions_help);
    extensions.enableAddOperation();
    extensions.enableDeleteOperation();
    for (String extensionValue : extensionValues)
    {
      extensions.addInstance().setValue(extensionValue);
    }
   
    Item actions = form.addItem();
    actions.addButton("submit_save").setValue(T_submit_save);
    actions.addButton("submit_cancel").setValue(T_submit_cancel);
   
   
    main.addHidden("administrative-continue").setValue(knot.getId());
       
   }
View Full Code Here

Examples of org.dspace.app.xmlui.wing.element.Division

    public void addBody(Body body) throws SAXException, WingException,
            UIException, SQLException, IOException, AuthorizeException
    {
        if (this.bodyEmpty)
        {
            Division notFound = body.addDivision("page-not-found","primary");
           
            notFound.setHead(T_head);
           
            notFound.addPara(T_para1);
           
            notFound.addPara().addXref(contextPath + "/",T_go_home);

      HttpServletResponse response = (HttpServletResponse)objectModel
    .get(HttpEnvironment.HTTP_RESPONSE_OBJECT);
      response.setStatus(HttpServletResponse.SC_NOT_FOUND);
        }
View Full Code Here

Examples of org.dspace.app.xmlui.wing.element.Division

    if (showfull != null && request.getParameter("showsimple") != null)
      showfull = null;
   
   

      Division div = body.addInteractiveDivision("reject-task", actionURL, Division.METHOD_POST, "primary workflow");
        div.setHead(T_workflow_head);
     
     
        if (showfull == null)
        {
          ReferenceSet referenceSet = div.addReferenceSet("narf",ReferenceSet.TYPE_SUMMARY_VIEW);
          referenceSet.addReference(item);
          div.addPara().addButton("showfull").setValue(T_showfull);
        }
        else
        {
            ReferenceSet referenceSet = div.addReferenceSet("narf",ReferenceSet.TYPE_DETAIL_VIEW);
            referenceSet.addReference(item);
            div.addPara().addButton("showsimple").setValue(T_showsimple);
           
            div.addHidden("showfull").setValue("true");
        }
       

        List form = div.addList("reject-workflow",List.TYPE_FORM);
       
        form.addItem(T_info1);
       
        TextArea reason = form.addItem().addTextArea("reason");
        reason.setLabel(T_reason);
        reason.setRequired();
        reason.setSize(15, 50);
        if (this.errorFields.contains("reason"))
          reason.addError(T_reason_required);
     
        org.dspace.app.xmlui.wing.element.Item actions = form.addItem();
        actions.addButton("submit_reject").setValue(T_submit_reject);
        actions.addButton("submit_cancel").setValue(T_submit_cancel);
       
        div.addHidden("submission-continue").setValue(knot.getId());

        log.info(LogManager.getHeader(context, "get_reject_reason",
                "workflow_id=" + submission.getID() + ",item_id="
                        + item.getID()));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.