Package org.dspace.content

Examples of org.dspace.content.Item$MetadataCache


  }
 
    public void addBody(Body body) throws SAXException, WingException,
            UIException, SQLException, IOException, AuthorizeException
    {
      Item item = submission.getItem();
    Collection collection = submission.getCollection();
    String actionURL = contextPath + "/handle/"+collection.getHandle() + "/workflow";
     
      Request request = ObjectModelHelper.getRequest(objectModel);
    String showfull = request.getParameter("showfull");
   
    // if the user selected showsimple, remove showfull.
    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


 
  public void addBody(Body body) throws SAXException, WingException,
  UIException, SQLException, IOException, AuthorizeException
  {
    // Build the url to and from creative commons
    Item item = submission.getItem();
    Collection collection = submission.getCollection();
    String actionURL = contextPath + "/handle/"+collection.getHandle() + "/submit/" + knot.getId() + ".continue";

    Request request = ObjectModelHelper.getRequest(objectModel);
    boolean https = request.isSecure();
View Full Code Here

     */
    public static HarvestedItemInfo getSingle(Context context, String handle,
            boolean collections) throws SQLException
    {
        // FIXME: Assume Handle is item
        Item i = (Item) HandleManager.resolveToObject(context, handle);

        if (i == null)
        {
            return null;
        }

        // Fill out OAI info item object
        HarvestedItemInfo itemInfo = new HarvestedItemInfo();

        itemInfo.context = context;
        itemInfo.item = i;
        itemInfo.handle = handle;
        itemInfo.withdrawn = i.isWithdrawn();
        itemInfo.datestamp = i.getLastModified();
        itemInfo.itemID = i.getID();

        // Get the sets
        if (collections)
        {
            fillCollections(context, itemInfo);
View Full Code Here

        ItemIterator it = collection.getAllItems();
        IndexBrowse ib = new IndexBrowse(context);
        int i=0;
        while (it.hasNext()) {
          i++;
          Item item = it.next();
          System.out.println("Deleting: " + item.getHandle());
          ib.itemRemoved(item);
          collection.removeItem(item);
          // commit every 50 items
          if (i%50 == 0) {
            context.commit();
View Full Code Here

  public void addBody(Body body) throws SAXException, WingException,
  UIException, SQLException, IOException, AuthorizeException
  {
    // Get any metadata that may be removed by unselecting one of these options.
    Item item = submission.getItem();
    Collection collection = submission.getCollection();
    String actionURL = contextPath + "/handle/"+collection.getHandle() + "/submit/" + knot.getId() + ".continue";

    Request request = ObjectModelHelper.getRequest(objectModel);
    String showfull = request.getParameter("showfull");
View Full Code Here

    } catch (Exception e) {
      // nothing to do
    }
    errors = new ArrayList<Message>();
    if (request.getParameter("itemID") != null) {
      Item item = null;
      try {
        item = Item.find(context, Integer.parseInt(request
            .getParameter("itemID")));
      } catch (Exception e) {
        errors.add(T_export_bad_item_id);
View Full Code Here

                       "AND eperson_group_id = ? ";
       
        DatabaseManager.updateQuery(context, query, wsItemID, groupID);
       
        // get the item and have it remove the policies for the group
        Item item = wsItem.getItem();
        item.removeGroupPolicies(group);
    }
View Full Code Here

        // If a default policy type has been requested, apply the policies using
        // the DSpace API for doing so
        if (policy != POLICY_NONE)
        {
            WorkspaceItem wsItem = WorkspaceItem.find(context, wsItemID);
            Item item = wsItem.getItem();
            Group group = Group.find(context, groupID);
           
            // "Editor" implies READ, WRITE, ADD permissions
            // "Observer" implies READ permissions
            if (policy == POLICY_EDITOR)
View Full Code Here

     *              article
     */
    public static String getItemInfo(Context context, String handle)
        throws SQLException
    {
        Item item = null;
       
        // ensure that the handle exists
        try
        {
            item = (Item) HandleManager.resolveToObject(context, handle);
        }
        catch (Exception e)
        {
            return null;
        }
       
        // if no handle that matches is found then also return null
        if (item == null)
        {
            return null;
        }
       
        // build the referece
        // FIXME: here we have blurred the line between content and presentation
        // and it should probably be un-blurred
        DCValue[] title = item.getDC("title", null, Item.ANY);
        DCValue[] author = item.getDC("contributor", "author", Item.ANY);
       
        StringBuffer authors = new StringBuffer();
        if (author.length > 0)
        {
            authors.append("(" + author[0].value);
View Full Code Here

        throws CrosswalkException,
               IOException, SQLException, AuthorizeException
    {
        if (dso.getType() != Constants.ITEM)
            throw new CrosswalkObjectNotSupported("QDCCrosswalk can only crosswalk an Item.");
        Item item = (Item)dso;
        init();

        DCValue[] dc = item.getMetadata(Item.ANY, Item.ANY, Item.ANY, Item.ANY);
        List result = new ArrayList(dc.length);
        for (int i = 0; i < dc.length; i++)
        {
            // Compose qualified DC name - schema.element[.qualifier]
            // e.g. "dc.title", "dc.subject.lcc", "lom.Classification.Keyword"
View Full Code Here

TOP

Related Classes of org.dspace.content.Item$MetadataCache

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.