Examples of SwordEntry


Examples of org.purl.sword.base.SWORDEntry

  /**
   * Reset all the internal variables of the class to their original values
   */
  public void reset()
  {
    this.entry = new SWORDEntry();
    this.item = null;
    this.bitstream = null;
    this.result = null;
    this.deposit = null;
  }
View Full Code Here

Examples of org.purl.sword.base.SWORDEntry

  public SWORDEntry getSWORDEntry(DepositResult result, Deposit deposit)
    throws DSpaceSWORDException
  {
    this.reset();

    this.entry = new SWORDEntry();
    this.item = result.getItem();
    this.bitstream = result.getBitstream();
    this.result = result;
    this.deposit = deposit;
View Full Code Here

Examples of org.purl.sword.base.SWORDEntry

    if( response != null)
    {
      log.debug("message is: " + response.marshall());
     
      // iterate over the data and output it
      SWORDEntry entry = response.getEntry();
     

      System.out.println("Id: " + entry.getId());
      Title title = entry.getTitle();
      if( title != null )
      {
        System.out.print("Title: " + title.getContent() + " type: " );
        if( title.getType() != null )
        {
          System.out.println(title.getType().toString());
        }
        else
        {
          System.out.println("Not specified.");
        }
      }

      // process the authors
      Iterator<Author> authors = entry.getAuthors();
      while( authors.hasNext() )
      {
         Author author = authors.next();
         System.out.println("Author - " + author.toString() );
      }
     
      Iterator<String> categories = entry.getCategories();
      while( categories.hasNext() )
      {
         System.out.println("Category: " + categories.next());
      }
     
      Iterator<Contributor> contributors = entry.getContributors();
      while( contributors.hasNext() )
      {
         Contributor contributor = contributors.next();
         System.out.println("Contributor - " + contributor.toString());
      }
     
      Iterator<Link> links = entry.getLinks();
      while( links.hasNext() )
      {
         Link link = links.next();
         System.out.println(link.toString());
      }

            Generator generator = entry.getGenerator();
            if( generator != null )
            {
                System.out.println("Generator - " + generator.toString());
            }
            else
            {
                System.out.println("There is no generator");
            }

            System.out.println( "Published: " + entry.getPublished());
     
      Content content = entry.getContent();
      if( content != null )
      {
         System.out.println(content.toString());
      }
      else
      {
         System.out.println("There is no content element.");
      }
     
      Rights right = entry.getRights();
      if( right != null )
         {
        
            System.out.println(right.toString());
         }
         else
         {
            System.out.println("There is no right element.");
         }
     
       Summary summary = entry.getSummary();
     if( summary != null )
         {
           
            System.out.println(summary.toString());
         }
         else
         {
            System.out.println("There is no summary element.");
         }
     
      System.out.println("Update: " + entry.getUpdated() );
      System.out.println("Published: " + entry.getPublished());
      System.out.println("Verbose Description: " + entry.getVerboseDescription());
      System.out.println("Treatment: " + entry.getTreatment());
      System.out.println("Packaging: " + entry.getPackaging());

      if( entry.isNoOpSet() )
      {
        System.out.println("NoOp: " + entry.isNoOp());
      }
    }
    else
    {
      System.out.println("No valid Entry document was received from the server");
View Full Code Here

Examples of org.purl.sword.base.SWORDEntry

                request.setAttribute("xmlValidate", validateXml); // for passing to validation

        xml = xml.replaceAll("<", "&lt;");
        xml = xml.replaceAll(">", "&gt;");
        request.setAttribute("xml", xml);
        SWORDEntry se = resp.getEntry();
        request.setAttribute("id", se.getId());
        request.setAttribute("authors", se.getAuthors());
        request.setAttribute("contributors", se.getContributors());
        request.setAttribute("title", se.getTitle().getContent());
        request.setAttribute("updated", se.getUpdated());
        request.setAttribute("categories", se.getCategories());
        request.setAttribute("treatment", se.getTreatment());
        request.setAttribute("summary", se.getSummary().getContent());
        request.setAttribute("generator", se.getGenerator().getContent());
        request.setAttribute("userAgent", se.getUserAgent());
        request.setAttribute("packaging", se.getPackaging());
        request.setAttribute("links", se.getLinks());
        request.setAttribute("location", resp.getLocation());
       
        // Set the ServiceDocument and associated values
        request.getRequestDispatcher("deposit.jsp").forward(request, response);
        return;
View Full Code Here

Examples of org.swordapp.server.SwordEntry

  private void addMetadataToItem(Deposit deposit, Item item)
      throws DSpaceSwordException
  {
    // now, go through and get the metadata from the EntryPart and put it in DSpace
    SwordEntry se = deposit.getSwordEntry();

    // first do the standard atom terms (which may get overridden later)
    String title = se.getTitle();
    String summary = se.getSummary();
    if (title != null)
    {
      String titleField = this.dcMap.get("title");
      if (titleField != null)
      {
        Metadatum dcv = this.makeDCValue(titleField, title);
                this.addUniqueMetadata(dcv, item);
      }
    }
    if (summary != null)
    {
      String abstractField = this.dcMap.get("abstract");
      if (abstractField != null)
      {
        Metadatum dcv = this.makeDCValue(abstractField, summary);
                this.addUniqueMetadata(dcv, item);
      }
    }

    Map<String, List<String>> dc = se.getDublinCore();
    for (String term : dc.keySet())
    {
      String dsTerm = this.dcMap.get(term);
      if (dsTerm == null)
      {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.