protected String buildLinkHeaderForType(AdapterResponse<Feed> adapterResponse, String linkType) { StringBuilder sb = new StringBuilder(); sb.append(LT); sb.append(adapterResponse.getBody().getLink(linkType).getHref()); sb.append(GT); sb.append("; rel=\""); sb.append(linkType); sb.append("\""); return sb.toString(); }
@Override protected boolean matchesSafely(Link link, Description mismatchDescription) { if (link == null) { mismatchDescription.appendText("no link"); return false; } if (!matcher.matches(link.getHref().toASCIIString())) { mismatchDescription.appendText("href "); matcher.describeMismatch(link.getHref(), mismatchDescription); return false; } return true; }
@Override protected void considerEntry(final Entry entry) { final Link presentationLink = entry.getLink("presentation"); if (presentationLink != null) { try { Desktop.getDesktop().browse( presentationLink.getHref().toURI()); } catch (final IOException e) { logger.error("Cannot open presentation"); } catch (final URISyntaxException e) { logger.error("Cannot open presentation"); } } }
public DepositDocument getDepositStatus() { parseEntry(); return new HttpDepositDocument(httpClient, entry.getAlternateLink() .getHref().toASCIIString()); }