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

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


                + "/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

            }

            search.setSimplePagination(resultCount,firstIndex,lastIndex,prevURL, nextURL);
        }

        Table table = search.addTable("eperson-search-table", epeople.length + 1, 1);
        Row header = table.addRow(Row.ROLE_HEADER);
        header.addCell().addContent(T_search_column1);
        header.addCell().addContent(T_search_column2);
        header.addCell().addContent(T_search_column3);
        header.addCell().addContent(T_search_column4);

        CheckBox selectEPerson;
        for (EPerson person : epeople)
        {
            String epersonID = String.valueOf(person.getID());
            String fullName = person.getFullName();
            String email = person.getEmail();
            String url = baseURL+"&submit_edit&epersonID="+epersonID;
            java.util.List<String> deleteConstraints = person.getDeleteConstraints();

            Row row;
            if (person.getID() == highlightID)
            {
                // This is a highlighted eperson
                row = table.addRow(null, null, "highlight");
            }
            else
            {
                row = table.addRow();
            }

            selectEPerson = row.addCell().addCheckBox("select_eperson");
            selectEPerson.setLabel(epersonID);
            selectEPerson.addOption(epersonID);
            if (deleteConstraints != null && deleteConstraints.size() > 0)
            {
                selectEPerson.setDisabled();
            }

            row.addCellContent(epersonID);
            row.addCell().addXref(url, fullName);
            row.addCell().addXref(url, email);
        }

        if (epeople.length <= 0)
        {
            Cell cell = table.addRow().addCell(1, 4);
            cell.addHighlight("italic").addContent(T_no_results);
        }
        else
        {
            search.addPara().addButton("submit_delete").setValue(T_submit_delete);
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();
     
      StringBuilder fieldName = new StringBuilder()
                                        .append(schemaName)
                                        .append(".")
                                        .append(fieldEelement);

      if (fieldQualifier != null && fieldQualifier.length() > 0)
            {
        fieldName.append(".").append(fieldQualifier);
            }
       
      String fieldScopeNote = field.getScopeNote();
       
        Row row = table.addRow();
        row.addCell().addContent(fieldID);
          row.addCell().addContent(fieldName.toString());
          row.addCell().addContent(fieldScopeNote);
      }
      Para buttons = deleted.addPara();
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 perform them on.
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 = "unknown";
      Metadatum[] dcAuthors = item.getDC("contributor",Item.ANY,Item.ANY);
      if (dcAuthors != null && dcAuthors.length >= 1)
            {
                author = dcAuthors[0].value;
            }
     
      String title = "untitled";
      Metadatum[] 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

   
    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 = "unknown";
      if (owningCollection != null)
        owning = owningCollection.getMetadata("name");
      String author = "unknown";
      Metadatum[] dcCreators = item.getDC("creator",Item.ANY,Item.ANY);
      if (dcCreators != null && dcCreators.length >= 1)
            {
                author = dcCreators[0].value;
            } else {
              // Do a fallback look for contributors
        Metadatum[] dcContributors = item.getDC("contributor",Item.ANY,Item.ANY);
        if (dcContributors != null && dcContributors.length >= 1)
              {
                  author = dcContributors[0].value;
              }
      }
     
      String title = "untitled";
      Metadatum[] 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

        // Part B:
        //  If the user has already uploaded files provide a list for the user.
        if (bitstreams.length > 0 || disableFileEditing)
        {
            Table summary = div.addTable("submit-upload-summary",(bitstreams.length * 2) + 2,7);
            summary.setHead(T_head2);

            Row header = summary.addRow(Row.ROLE_HEADER);
            header.addCellContent(T_column0); // primary bitstream
            header.addCellContent(T_column1); // select checkbox
            header.addCellContent(T_column2); // file name
            header.addCellContent(T_column3); // size
            header.addCellContent(T_column4); // description
            header.addCellContent(T_column5); // format
            header.addCellContent(T_column6); // edit button

            for (Bitstream bitstream : bitstreams)
            {
                int id = bitstream.getID();
                String name = bitstream.getName();
                String url = makeBitstreamLink(item, bitstream);
                long bytes = bitstream.getSize();
                String desc = bitstream.getDescription();
                String algorithm = bitstream.getChecksumAlgorithm();
                String checksum = bitstream.getChecksum();


                Row row = summary.addRow();

                // Add radio-button to select this as the primary bitstream
                Radio primary = row.addCell().addRadio("primary_bitstream_id");
                primary.addOption(String.valueOf(id));

                // If this bitstream is already marked as the primary bitstream
                // mark it as such.
                if(bundles[0].getPrimaryBitstreamID() == id) {
                    primary.setOptionSelected(String.valueOf(id));
                }

                if (!disableFileEditing)
                {
                    // Workflow users can not remove files.
                    CheckBox remove = row.addCell().addCheckBox("remove");
                    remove.setLabel("remove");
                    remove.addOption(id);
                }
                else
                {
                    row.addCell();
                }

                row.addCell().addXref(url,name);
                row.addCellContent(bytes + " bytes");
                if (desc == null || desc.length() == 0)
                {
                    row.addCellContent(T_unknown_name);
                }
                else
                {
                    row.addCellContent(desc);
                }

                BitstreamFormat format = bitstream.getFormat();
                if (format == null)
                {
                    row.addCellContent(T_unknown_format);
                }
                else
                {
                    int support = format.getSupportLevel();
                    Cell cell = row.addCell();
                    cell.addContent(format.getMIMEType());
                    cell.addContent(" ");
                    switch (support)
                    {
                        case 1:
                            cell.addContent(T_supported);
                            break;
                        case 2:
                            cell.addContent(T_known);
                            break;
                        case 3:
                            cell.addContent(T_unsupported);
                            break;
                    }
                }

                Button edit = row.addCell().addButton("submit_edit_"+id);
                edit.setValue(T_submit_edit);

                Row checksumRow = summary.addRow();
                checksumRow.addCell();
                Cell checksumCell = checksumRow.addCell(null, null, 0, 6, null);
                checksumCell.addHighlight("bold").addContent(T_checksum);
                checksumCell.addContent(" ");
                checksumCell.addContent(algorithm + ":" + checksum);
            }

            if (!disableFileEditing)
            {
                // Workflow users can not remove files.
                Row actionRow = summary.addRow();
                actionRow.addCell();
                Button removeSeleceted = actionRow.addCell(null, null, 0, 6, null).addButton("submit_remove_selected");
                removeSeleceted.setValue(T_submit_remove);
            }

View Full Code Here

            scope.setLabel(T_search_scope);
            scope.setHelp(T_search_scope_help);
            buildScopeList(scope);
        }
       
        Table queryTable = query.addTable("search-query", 4, 3);
        Row header = queryTable.addRow(Row.ROLE_HEADER);
        header.addCellContent(T_conjunction);
        header.addCellContent(T_search_type);
        header.addCellContent(T_search_for);
       
        for (int i = 1; i <= FIELD_DISPLAY_COUNT; i++)
        {
            Row row = queryTable.addRow(Row.ROLE_DATA);
            buildConjunctionField(i, row.addCell());
            buildTypeField(i, row.addCell());
            buildQueryField(i, row.addCell());
        }
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.