Package org.dspace.app.xmlui.wing.element

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


   
    Para actions = div.addPara();
    actions.addButton("submit_map").setValue(T_submit_map);
    actions.addButton("submit_cancel").setValue(T_submit_cancel);
   
    Table table = div.addTable("search-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;
     
      String title = "untitled";
      DCValue[] dcTitles = item.getDC("title",null,Item.ANY);
      if (dcTitles != null && dcTitles.length >= 1)
        title = dcTitles[0].value;

      String url = contextPath+"/handle/"+item.getHandle();
     
      Row row = table.addRow();

            boolean canBeMapped = true;
            Collection[] collections = item.getCollections();
            for (Collection c : collections)
            {
View Full Code Here


   
    // DIVISION: existing fields
    Division existingFields = main.addDivision("metadata-schema-edit-existing-fields");
    existingFields.setHead(T_head2);
   
    Table table = existingFields.addTable("metadata-schema-edit-existing-fields", fields.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);
   
    for (MetadataField field : fields)
    {
      String id = String.valueOf(field.getFieldID());
      String fieldElement = field.getElement();
      String fieldQualifier = field.getQualifier();
     
      String fieldName = schemaName +"."+ fieldElement;
      if (fieldQualifier != null && fieldQualifier.length() > 0)
        fieldName += "."+fieldQualifier;
       
      boolean highlight = false;
      if (field.getFieldID() == highlightID)
        highlight = true;
     
      String fieldScopeNote = field.getScopeNote();
     
      String url = contextPath + "/admin/metadata-registry?administrative-continue="+knot.getId()+"&submit_edit&fieldID="+id;
     
      Row row;
      if (highlight)
        row = table.addRow(null,null,"highlight");
      else
        row = table.addRow();
     
      CheckBox select = row.addCell().addCheckBox("select_field");
      select.setLabel(id);
      select.addOption(id);
     
      row.addCell().addContent(id);
      row.addCell().addXref(url,fieldName);
      row.addCell().addContent(fieldScopeNote);
    }
   
    if (fields.length == 0)
    {
      // No fields, let the user know.
      table.addRow().addCell(1,4).addHighlight("italic").addContent(T_empty);
      main.addPara().addButton("submit_return").setValue(T_submit_return);
    }
    else
    {
      // Only show the actions if there are fields available to preform them on.
View Full Code Here

            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

         
          div.setSimplePagination(totalResults,firstIndex,lastIndex,prevURL, nextURL);
    }
   
   
    Table table = div.addTable("policy-edit-search-group",groups.length + 1, 1);
        
        Row header = table.addRow(Row.ROLE_HEADER);
       
        // Add the header row
      header = table.addRow(Row.ROLE_HEADER);
        header.addCell().addContent(T_groups_column1);
        header.addCell().addContent(T_groups_column2);
        header.addCell().addContent(T_groups_column3);
        header.addCell().addContent(T_groups_column4);
       
        // The rows of search results
        for (Group group : groups)
        {
          String groupID = String.valueOf(group.getID());
          String name = group.getName();
          url = contextPath+"/admin/groups?administrative-continue="+knot.getId()+"&submit_edit_group&group_id="+groupID;
         
        Row row = table.addRow();
          row.addCell().addContent(groupID);
          row.addCell().addXref(url,name);
         
          // Iterate other other polices of our parent resource to see if any match the currently selected group
          String otherAuthorizations = new String();
          int groupsMatched = 0;
          for (ResourcePolicy otherPolicy : otherPolicies) {
            if (otherPolicy.getGroup() == group) {
              otherAuthorizations += otherPolicy.getActionText() + ", ";
              groupsMatched++;
            }
          }
         
          if (groupsMatched > 0) {
            row.addCell().addContent(otherAuthorizations.substring(0,otherAuthorizations.lastIndexOf(", ")));
          }
          else
            row.addCell().addContent("-");
         
          if (group != sourceGroup)
          row.addCell().addButton("submit_group_id_"+groupID).setValue(T_set_group);
        else
          row.addCell().addContent(T_current_group);
         
        }
        if (groups.length <= 0) {
      table.addRow().addCell(1, 4).addContent(T_no_results);
    }
  }
View Full Code Here

        // DIVISION: metadata-registry-main
    Division main = body.addInteractiveDivision("metadata-registry-main",contextPath+"/admin/metadata-registry",Division.METHOD_POST,"primary administrative metadata-registry ");
    main.setHead(T_head1);
    main.addPara(T_para1);
   
    Table table = main.addTable("metadata-registry-main-table", schemas.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);
   
    for (MetadataSchema schema : schemas)
    {
      int schemaID     = schema.getSchemaID();
      String namespace = schema.getNamespace();
      String name      = schema.getName();
      String url = contextPath + "/admin/metadata-registry?administrative-continue="+knot.getId()+"&submit_edit&schemaID="+schemaID;
     
      Row row = table.addRow();
      if (schemaID > 1)
      {
        // If the schema is not in the required DC schema allow the user to delete it. 
        CheckBox select = row.addCell().addCheckBox("select_schema");
        select.setLabel(String.valueOf(schemaID));
View Full Code Here

    // DIVISION: epeople-confirm-delete
      Division deleted = body.addInteractiveDivision("epeople-confirm-delete",contextPath+"/admin/epeople",Division.METHOD_POST,"primary administrative eperson");
      deleted.setHead(T_confirm_head);
      deleted.addPara(T_confirm_para);
     
      Table table = deleted.addTable("epeople-confirm-delete",epeople.size() + 1, 1);
        Row header = table.addRow(Row.ROLE_HEADER);
        header.addCell().addContent(T_head_id);
        header.addCell().addContent(T_head_name);
        header.addCell().addContent(T_head_email);
     
      for (EPerson eperson : epeople)
      {
        Row row = table.addRow();
        row.addCell().addContent(eperson.getID());
          row.addCell().addContent(eperson.getFullName());
          row.addCell().addContent(eperson.getEmail());
      }
      Para buttons = deleted.addPara();
View Full Code Here

    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);         
View Full Code Here

    // 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)
      {
View Full Code Here

      deleted.addPara(T_para1);
      Para warning = deleted.addPara();
      warning.addHighlight("bold").addContent(T_warning);
      warning.addContent(T_para2);
     
      Table table = deleted.addTable("field-confirm-delete",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)
      {
        if (field == null)
          continue;
       
        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);
      }
      Para buttons = deleted.addPara();
View Full Code Here

      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;
     
      String title = "untitled";
      DCValue[] dcTitles = item.getDC("title",null,Item.ANY);
      if (dcTitles != null && dcTitles.length >= 1)
        title = dcTitles[0].value;

      String url = contextPath+"/handle/"+item.getHandle();
     
      Row row = table.addRow();
     
      CheckBox select = row.addCell().addCheckBox("itemID");
      select.setLabel("Select");
      select.addOption(itemID);
     
View Full Code Here

TOP

Related Classes of org.dspace.app.xmlui.wing.element.Table

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.