@Test public void citationWithoutLastAccessed() { DatasetWithCache dataset = datasetLastAccessedAt(null); assertThat(dataset.getCitation(), Is.is("Accessed via <some:bla>.")); }
public String getCitation() { String citation = CitationUtil.citationOrDefaultFor(this, ""); return StringUtils.isBlank(citation) ? generateCitation(citation) : citation; }
DatasetWithCache implements Dataset { public String getCitation() { String citation = CitationUtil.citationOrDefaultFor(this, ""); return StringUtils.isBlank(citation) ? generateCitation(citation) : citation; } }
DatasetWithCache implements Dataset { public String getCitation() { String citation = CitationUtil.citationOrDefaultFor(this, ""); return StringUtils.isBlank(citation) ? generateCitation(citation) : citation; } DatasetWithCache(Dataset dataset, final Cache cache); }
DatasetWithCache implements Dataset { public String getCitation() { String citation = CitationUtil.citationOrDefaultFor(this, ""); return StringUtils.isBlank(citation) ? generateCitation(citation) : citation; } DatasetWithCache(Dataset dataset, final Cache cache); @Override InputStream retrieve(URI resourceName); URI getArchiveURI(); @Override String getOrDefault(String key, String defaultValue); String getNamespace(); JsonNode getConfig(); DOI getDOI(); String getCitation(); String getFormat(); URI getConfigURI(); @Override void setConfig(JsonNode config); @Override void setConfigURI(URI configURI); }
DatasetWithCache implements Dataset { public String getCitation() { String citation = CitationUtil.citationOrDefaultFor(this, ""); return StringUtils.isBlank(citation) ? generateCitation(citation) : citation; } DatasetWithCache(Dataset dataset, final Cache cache); @Override InputStream retrieve(URI resourceName); URI getArchiveURI(); @Override String getOrDefault(String key, String defaultValue); String getNamespace(); JsonNode getConfig(); DOI getDOI(); String getCitation(); String getFormat(); URI getConfigURI(); @Override void setConfig(JsonNode config); @Override void setConfigURI(URI configURI);  }