Package org.purl.sword.base

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


  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

    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

                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

TOP

Related Classes of org.purl.sword.base.SWORDEntry

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.