public void addOptions(Options options) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException { List test = options.addList("XMLTest"); test.setHead("XML Test"); test.addItemXref(contextPath + "/xmltest/structural","Structural"); test.addItemXref(contextPath + "/xmltest/HTML","HTML"); List form = test.addList("FormTest"); form.setHead("Forms"); form.addItemXref(contextPath + "/xmltest/form/basic","Basic"); form.addItemXref(contextPath + "/xmltest/form/inline","In line"); form.addItemXref(contextPath + "/xmltest/form/advanced","Advanced"); } }
/** * Add a new sublist to this list. * * @param name * (Required) a local identifier used to differentiate the * element from its siblings. * @param type * (May be null) determines the list type. If this is blank the * list type is inferred from the context and use. * @return A new sub list. */ public List addList(String name, String type) throws WingException { List list = new List(context, name, type, null); contents.add(list); return list; }
/** * Add an item element that contains only translated content. * * @param key * (Required) Key to the i18n catalogue to translate the content * into the language preferred by the user. */ public void addItem(Message key) throws WingException { require(key, "The 'key' parameter is required for list items."); Item item = this.addItem(null, null); item.addContent(key); }
public void addBody(Body body) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException { Collection collection = submission.getCollection(); String actionURL = contextPath + "/handle/"+collection.getHandle() + "/submit/" + knot.getId() + ".continue"; Division div = body.addInteractiveDivision("submit-save-or-cancel",actionURL, Division.METHOD_POST,"primary submission"); div.setHead(T_submission_head); addSubmissionProgressList(div); List saveOrCancel = div.addList("submit-review", List.TYPE_FORM); saveOrCancel.setHead(T_head); saveOrCancel.addItem(T_info1); org.dspace.app.xmlui.wing.element.Item actions = saveOrCancel.addItem(); actions.addButton("submit_back").setValue(T_submit_back); actions.addButton("submit_save").setValue(T_submit_save); actions.addButton("submit_remove").setValue(T_submit_remove); } }
form.addLabel(T_error); form.addItem(T_error_duplicate_field); form.addLabel(T_error); form.addItem(T_error_element_empty); form.addLabel(T_error); form.addItem(T_error_element_badchar); form.addLabel(T_error); form.addItem(T_error_element_tolong); form.addLabel(T_error); form.addItem(T_error_qualifier_tolong); form.addLabel(T_error); form.addItem(T_error_qualifier_badchar);
dspace.setHead(T_DSPACE_HEAD); dspace.addLabel(T_DSPACE_VERSION); dspace.addItem(Util.getSourceVersion()); dspace.addLabel(T_DSPACE_DIR); dspace.addItem(ConfigurationManager.getProperty("dspace.dir")); dspace.addLabel(T_DSPACE_URL); dspace.addItem(ConfigurationManager.getProperty("dspace.url")); dspace.addLabel(T_DSPACE_HOST_NAME); dspace.addItem(ConfigurationManager.getProperty("dspace.hostname")); dspace.addLabel(T_DSPACE_NAME); dspace.addItem(ConfigurationManager.getProperty("dspace.name")); dspace.addLabel(T_DB_NAME); dspace.addItem(ConfigurationManager.getProperty("db.name")); dspace.addLabel(T_DB_URL); dspace.addItem(ConfigurationManager.getProperty("db.url")); dspace.addLabel(T_DB_DRIVER); dspace.addItem(ConfigurationManager.getProperty("db.driver")); dspace.addLabel(T_DB_MAX_CONN); dspace.addItem(ConfigurationManager.getProperty("db.maxconnections"));
/** * Add an empty unnamed item. * * @return a new Item */ public Item addItem() throws WingException { return addItem(null,null); }
browse.setHead(T_FILTER_HEAD); List filterValsList = browse.addList(field.getIndexFieldName()); filterValsList.setHead(message("xmlui.ArtifactBrowser.AdvancedSearch.type_" + field.getIndexFieldName())); filterValsList.addItem(Math.random() + "", "selected").addContent(displayedValue + " (" + value.getCount() + ")"); } else { String paramsQuery = retrieveParameters(request); filterValsList.addItem().addXref( contextPath + (dso == null ? "" : "/handle/" + dso.getHandle()) +
List context = options.addList("context"); List admin = options.addList("administrative"); account.setHead(T_my_account); account.addItem().addXref(contextPath+"/admin/export", T_account_export); context.setHead(T_context_head); context.addItem().addXref(contextPath+"/admin/item?itemID="+item.getID(), T_context_edit_item); if (AuthorizeManager.isAdmin(this.context, dso)) context.addItem().addXref(contextPath+"/admin/export?itemID="+item.getID(), T_context_export_item ); context.addItem().addXref(contextPath+ "/csv/handle/"+dso.getHandle(),T_context_export_metadata ); context.setHead(T_context_head); context.addItemXref(contextPath+"/admin/collection?collectionID=" + collection.getID(), T_context_edit_collection); context.addItemXref(contextPath+"/admin/mapper?collectionID="+collection.getID(), T_context_item_mapper); if (AuthorizeManager.isAdmin(this.context, dso)) context.addItem().addXref(contextPath+"/admin/export?collectionID="+collection.getID(), T_context_export_collection ); context.addItem().addXref(contextPath+ "/csv/handle/"+dso.getHandle(),T_context_export_metadata ); context.setHead(T_context_head); context.addItemXref(contextPath+"/admin/community?communityID=" + community.getID(), T_context_edit_community); if (AuthorizeManager.isAdmin(this.context, dso)) context.addItem().addXref(contextPath + "/admin/export?communityID=" + community.getID(), T_context_export_community); context.addItem().addXref(contextPath+ "/csv/handle/"+dso.getHandle(),T_context_export_metadata );
parentList.addItem().addHighlight("bold").addXref(baseURL + "&submit_edit&community_id=" + currentCommunity.getID(), currentCommunity.getMetadata("name")); containerSubList = parentList.addList("subList" + currentCommunity.getID()); if (name == null || name.length() == 0) containerSubList.addItemXref(baseURL + "&submit_edit&collection_id=" + subCols.getID(), T_untitled); containerSubList.addItemXref(baseURL + "&submit_edit&collection_id=" + subCols.getID(), name); containerSubList = parentList.addList("subList" + currentCommunity.getID());
/** * Add additional navigation options. This is to allow selection of a monthly report * * @param options * @throws SAXException * @throws WingException * @throws UIException * @throws SQLException * @throws IOException * @throws AuthorizeException */ public void addOptions(Options options) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException { Date[] monthlyDates = StatisticsLoader.getMonthlyAnalysisDates(); if (monthlyDates != null && monthlyDates.length > 0) { List statList = options.addList("statsreports"); statList.setHead(T_choose_report); HashMap<String, String> params = new HashMap<String, String>(); for (Date date : monthlyDates) { params.put("date", sdfLink.format(date)); statList.addItemXref(super.generateURL("statistics", params), sdfDisplay.format(date)); } } }
actionsList.addLabel(T_actions_item_lookup); Item actionItem = actionsList.addItem(); Text queryField = actionItem.addText("identifier"); if (query != null) actionsList.addLabel(T_actions_advanced); actionsList.addItemXref(baseURL+"&submit_wildcard", T_actions_advanced_link);
options.addItem().addHighlight("bold").addXref(baseURL+"&submit_status",T_option_status); options.addItem().addXref(baseURL+"&submit_bitstreams",T_option_bitstreams); options.addItem().addXref(baseURL+"&submit_metadata",T_option_metadata); options.addItem().addXref(baseURL + "&view_item", T_option_view); options.addItem().addXref(baseURL + "&submit_curate", T_option_curate); itemInfo.addLabel(T_label_id); itemInfo.addItem(String.valueOf(item.getID())); itemInfo.addLabel(T_label_handle); itemInfo.addItem(item.getHandle()==null?"None":item.getHandle()); itemInfo.addLabel(T_label_modified); itemInfo.addItem(item.getLastModified().toString()); itemInfo.addLabel(T_label_in); List subList = itemInfo.addList("collections", List.TYPE_SIMPLE); Collection[] collections = item.getCollections(); for(Collection collection : collections) { subList.addItem(collection.getMetadata("name")); itemInfo.addLabel(T_label_page); if(item.getHandle()==null){ itemInfo.addItem(T_na); itemInfo.addItem().addXref(ConfigurationManager.getProperty("dspace.url") + "/handle/" + item.getHandle(),ConfigurationManager.getProperty("dspace.url") + "/handle/" + item.getHandle()); itemInfo.addLabel(T_label_auth);
if (item.canEdit()) context.addItem().addXref(contextPath+"/admin/item?itemID="+item.getID(), T_context_edit_item); options++; context.addItemXref(contextPath+"/admin/collection?collectionID=" + collection.getID(), T_context_edit_collection); context.addItemXref(contextPath+"/admin/mapper?collectionID="+collection.getID(), T_context_item_mapper); options++; context.addItemXref(contextPath+"/admin/community?communityID=" + community.getID(), T_context_edit_community); options++; context.addItemXref(contextPath+"/admin/collection?createNew&communityID=" + community.getID(), T_context_create_collection); context.addItemXref(contextPath+"/admin/community?createNew&communityID=" + community.getID(), T_context_create_subcommunity); options++; context.addItemXref(contextPath+"/admin/community?createNew", T_context_create_community); options++;
public void addOptions(Options options) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException { /* Create skeleton menu structure to ensure consistent order between aspects, * even if they are never used */ List admin = options.addList("administrative"); //Check if a system administrator boolean isSystemAdmin = AuthorizeManager.isAdmin(this.context); // System Administrator options! if (isSystemAdmin) { admin.addItemXref(contextPath+ "/admin/xmlworkflowoverview", T_xmlworkflow_overview); } }
/** * Set the head element which is the label associated with this list. This * method should be called before any other elements have been added to the * list. * * @param characters * (Required) Untranslated character data to be included as the * list's head. */ public void setHead(String characters) throws WingException { Head head = setHead(); head.addContent(characters); }
/** * Add a new sublist to this list. * * @param name * (Required) a local identifier used to differentiate the * element from its siblings. * @return A new sub list. */ public List addList(String name) throws WingException { return addList(name, null, null); }
startElement(contentHandler, namespaces, E_LIST, attributes); endElement(contentHandler, namespaces, E_LIST);