Package org.purl.sword.atom

Examples of org.purl.sword.atom.Link


    if (bf != null)
    {
      format = bf.getMIMEType();
    }

    Link link = new Link();
    link.setType(format);
    link.setHref(bsurl);
    link.setRel("alternate");
    entry.addLink(link);

    log.debug("Added link entity to entry for url " + bsurl);
  }
View Full Code Here


      for (int i = 0; i < bundles.length ; i++)
      {
        Bitstream[] bss = bundles[i].getBitstreams();
        for (int j = 0; j < bss.length; j++)
        {
          Link link = new Link();
          String url = urlManager.getBitstreamUrl(bss[j]);
          link.setHref(url);
          link.setRel("part");

          BitstreamFormat bsf = bss[j].getFormat();
          if (bsf != null)
          {
            link.setType(bsf.getMIMEType());
          }

          entry.addLink(link);
        }
      }

      // link to the item splash page
      Link splash = new Link();
      splash.setHref(HandleManager.getCanonicalForm(handle));
      splash.setRel("alternate");
      splash.setType("text/html");
      entry.addLink(splash);
    }
    catch (SQLException e)
    {
      throw new DSpaceSWORDException(e);
View Full Code Here

    } else {
      a.setName("unknown");
    }
    se.addAuthors(a);
   
    Link em = new Link();
    em.setRel("edit-media");
    em.setHref("http://www.myrepository.ac.uk/sdl/workflow/my deposit");
    se.addLink(em);
   
    Link e = new Link();
    e.setRel("edit");
    e.setHref("http://www.myrepository.ac.uk/sdl/workflow/my deposit.atom");
    se.addLink(e);
   
    if (deposit.getOnBehalfOf() != null) {
      Contributor c = new Contributor();
      c.setName(deposit.getOnBehalfOf());
View Full Code Here

    if (bf != null)
    {
      format = bf.getMIMEType();
    }

    Link link = new Link();
    link.setType(format);
    link.setHref(bsurl);
    link.setRel("alternate");
    entry.addLink(link);

    log.debug("Added link entity to entry for url " + bsurl);
  }
View Full Code Here

    } else {
      a.setName("unknown");
    }
    se.addAuthors(a);
   
    Link em = new Link();
    em.setRel("edit-media");
    em.setHref("http://www.myrepository.ac.uk/sdl/workflow/my deposit");
    se.addLink(em);
   
    Link e = new Link();
    e.setRel("edit");
    e.setHref("http://www.myrepository.ac.uk/sdl/workflow/my deposit.atom");
    se.addLink(e);
   
    if (deposit.getOnBehalfOf() != null) {
      Contributor c = new Contributor();
      c.setName(deposit.getOnBehalfOf());
View Full Code Here

         // process links
         Iterator<Link> links = entry.getLinks();
         StringBuffer linkBuffer = new StringBuffer();
         for( ; links.hasNext(); )
         {
            Link link = links.next();
            linkBuffer.append("href: '");
            linkBuffer.append(link.getHref());
            linkBuffer.append("', href lang: '");
            linkBuffer.append(link.getHreflang());
            linkBuffer.append("', rel: '");
            linkBuffer.append(link.getRel());
            linkBuffer.append("')<br>");
         }
         if( linkBuffer.length() == 0 )
         {
            linkBuffer.append("Not defined");
View Full Code Here

      for (int i = 0; i < bundles.length ; i++)
      {
        Bitstream[] bss = bundles[i].getBitstreams();
        for (int j = 0; j < bss.length; j++)
        {
          Link link = new Link();
          String url = urlManager.getBitstreamUrl(bss[j]);
          link.setHref(url);
          link.setRel("part");

          BitstreamFormat bsf = bss[j].getFormat();
          if (bsf != null)
          {
            link.setType(bsf.getMIMEType());
          }

          entry.addLink(link);
        }
      }

      // link to the item splash page
      Link splash = new Link();
      splash.setHref(HandleManager.getCanonicalForm(handle));
      splash.setRel("alternate");
      splash.setType("text/html");
      entry.addLink(splash);
    }
    catch (SQLException e)
    {
      throw new DSpaceSWORDException(e);
View Full Code Here

      }
     
      Iterator<Link> links = entry.getLinks();
      while( links.hasNext() )
      {
         Link link = links.next();
         System.out.println(link.toString());
      }

            Generator generator = entry.getGenerator();
            if( generator != null )
            {
View Full Code Here

TOP

Related Classes of org.purl.sword.atom.Link

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.