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

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


        errors.add(error);
    }
   
 
        // DIVISION: edit-schema
    Division main = body.addInteractiveDivision("metadata-schema-edit",contextPath+"/admin/metadata-registry",Division.METHOD_POST,"primary administrative metadata-registry");
    main.setHead(T_head1.parameterize(schemaName));
    main.addPara(T_para1.parameterize(schemaNamespace));
   
   
    // DIVISION: add or updating a metadata field
    if (updateID >= 0)
      // Updating an existing field
      addUpdateFieldForm(main, schemaName, updateID,  errors);
    else
      // Add a new field
      addNewFieldForm(main, schemaName, errors);
   
   
   
    // 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);
View Full Code Here


    Request request = ObjectModelHelper.getRequest(objectModel);
    String elementValue = request.getParameter("newElement");
    String qualifierValue = request.getParameter("newQualifier");
    String noteValue = request.getParameter("newNote");
   
    Division newField = div.addDivision("edit-schema-new-field");
    newField.setHead(T_head3);
   
    List form = newField.addList("edit-schema-new-field-form",List.TYPE_FORM);
    addFieldErrors(form, errors);
   
    form.addLabel(T_name);
    Highlight item =form.addItem().addHighlight("big");
   
View Full Code Here

      qualifierValue = field.getQualifier();
    if (noteValue == null)
      noteValue = field.getScopeNote();
   
   
    Division newField = div.addDivision("edit-schema-update-field");
    newField.setHead(T_head4.parameterize(field.getFieldID()));
   
    List form = newField.addList("edit-schema-update-field-form",List.TYPE_FORM);
   

    addFieldErrors(form, errors);
   
    form.addLabel(T_name);
View Full Code Here

      ResourcePolicy policy = ResourcePolicy.find(context,Integer.valueOf(id));
      policies.add(policy);
    }
    // DIVISION: policies-confirm-delete
      Division deleted = body.addInteractiveDivision("policies-confirm-delete",contextPath+"/admin/authorize",Division.METHOD_POST,"primary administrative authorization");
      deleted.setHead(T_confirm_head);
      deleted.addPara(T_confirm_para);
     
      Table table = deleted.addTable("policies-confirm-delete",policies.size() + 1, 4);
        Row header = table.addRow(Row.ROLE_HEADER);
        header.addCell().addContent(T_head_id);
        header.addCell().addContent(T_head_action);
        header.addCell().addContent(T_head_group);
     
      for (ResourcePolicy policy : policies)
      {
        Row row = table.addRow();
        row.addCell().addContent(policy.getID());
          row.addCell().addContent(policy.getActionText());
          if (policy.getGroup() != null) row.addCell().addContent(policy.getGroup().getName());
          else row.addCell().addContent("...");
      }
      Para buttons = deleted.addPara();
      buttons.addButton("submit_confirm").setValue(T_submit_confirm);
      buttons.addButton("submit_cancel").setValue(T_submit_cancel);
     
      deleted.addHidden("administrative-continue").setValue(knot.getId());
   }
View Full Code Here

    ArrayList<Item> items = preformSearch(collection,query);
   
   
   
    // DIVISION: manage-mapper
    Division div = body.addInteractiveDivision("search-items",contextPath + "/admin/mapper", Division.METHOD_GET,"primary administrative mapper");
    div.setHead(T_head1.parameterize(query));
   
    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)
            {
                if (c.getID() == collectionID)
                {
                    canBeMapped = false;
                }
            }

            if (canBeMapped)
            {
                CheckBox select = row.addCell().addCheckBox("itemID");
                select.setLabel("Select");
                select.addOption(itemID);
            }
            else
            {
                row.addCell().addContent("");
            }

      row.addCellContent(owning);
      row.addCell().addXref(url,author);
      row.addCell().addXref(url,title);
    }
   
    actions = div.addPara();
    actions.addButton("submit_map").setValue(T_submit_map);
    actions.addButton("submit_cancel").setValue(T_submit_cancel);
   
   
   
   
    div.addHidden("administrative-continue").setValue(knot.getId());
  }
View Full Code Here

        if(queryResults == null)
            return;// queryResults;

        // Build the collection viewer division.
        Division home = body.addDivision("collection-home", "primary repository collection");

        Division lastSubmittedDiv = home
                .addDivision("collection-recent-submission", "secondary recent-submission");

        lastSubmittedDiv.setHead(T_head_recent_submissions);

        ReferenceSet lastSubmitted = lastSubmittedDiv.addReferenceSet(
                "collection-last-submitted", ReferenceSet.TYPE_SUMMARY_LIST,
                null, "recent-submissions");

        for (SolrDocument doc : queryResults.getResults()) {
            lastSubmitted.addReference(
View Full Code Here

        Community[] subCommunities = community.getSubcommunities();
        Collection[] collections = community.getCollections();


        // Build the community viewer division.
        Division home = body.addDivision("community-home", "primary repository community");
        String name = community.getMetadata("name");
        if (name == null || name.length() == 0)
          home.setHead(T_untitled);
        else
          home.setHead(name);

       
        // Add main reference:
        {
          Division viewer = home.addDivision("community-view","secondary");
         
            ReferenceSet referenceSet = viewer.addReferenceSet("community-view",
                    ReferenceSet.TYPE_DETAIL_VIEW);
            Reference communityInclude = referenceSet.addReference(community);

            // If the community has any children communities also refrence them.
            if (subCommunities != null && subCommunities.length > 0)
View Full Code Here

            performSearch(null);
        } catch (SearchServiceException e) {
            log.error(e.getMessage(), e);
        }

        Division home = body.addDivision("site-home", "primary repository");

        Division lastSubmittedDiv = home
                .addDivision("site-recent-submission", "secondary recent-submission");

        lastSubmittedDiv.setHead(T_head_recent_submissions);

        ReferenceSet lastSubmitted = lastSubmittedDiv.addReferenceSet(
                "site-last-submitted", ReferenceSet.TYPE_SUMMARY_LIST,
                null, "recent-submissions");

        if (queryResults != null)  {
            for (SolrDocument doc : queryResults.getResults()) {
View Full Code Here

        // Set up the major variables
        Community community = (Community) dso;

        // Build the community viewer division.
        Division home = body.addDivision("community-home", "primary repository community");
        String name = community.getMetadata("name");
        if (name == null || name.length() == 0)
          home.setHead(T_untitled);
        else
          home.setHead(name);

        // The search / browse box.

        {
            Division search = home.addDivision("community-search-browse",
                    "secondary search-browse");

            // Search query
            Division query = search.addInteractiveDivision("community-search",
                    contextPath + "/handle/" + community.getHandle() + "/search",
                    Division.METHOD_POST, "secondary search");

            Para para = query.addPara("search-query", null);
            para.addContent(T_full_text_search);
            para.addContent(" ");
            para.addText("query");
            para.addContent(" ");
            para.addButton("submit").setValue(T_go);
View Full Code Here

        if (!(dso instanceof Item))
            return;
        Item item = (Item) dso;

        // Build the item viewer division.
        Division division = body.addDivision("item-view","primary");
        String title = getItemTitle(item);
        if (title != null)
            division.setHead(title);
        else
            division.setHead(item.getHandle());

        /*
        Para showfullPara = division.addPara(null, "item-view-toggle item-view-toggle-top");

        if (showFullItem(objectModel))
        {
            String link = contextPath + "/handle/" + item.getHandle();
            showfullPara.addXref(link).addContent(T_show_simple);
        }
        else
        {
            String link = contextPath + "/handle/" + item.getHandle()
                    + "?show=full";
            showfullPara.addXref(link).addContent(T_show_full);
        }*/

       
        ReferenceSet referenceSet;
//        if (showFullItem(objectModel))
//        {
            referenceSet = division.addReferenceSet("collection-viewer",
                    ReferenceSet.TYPE_DETAIL_VIEW);
//        }
//        else
//        {
//            referenceSet = division.addReferenceSet("collection-viewer",
View Full Code Here

TOP

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

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.