Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add getSite() back to FormattedURL #110

Merged
merged 1 commit into from
Aug 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 6 additions & 15 deletions src/org/spdx/htmltemplates/LicenseHTMLFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public class LicenseHTMLFile {
static final String TEMPLATE_CLASS_PATH = "resources" + "/" + "htmlTemplate";
static final String TEMPLATE_ROOT_PATH = "resources" + File.separator + "htmlTemplate";
static final String TEMPLATE_FILE_NAME = "LicenseHTMLTemplate.html";
static final boolean USE_SITE = false; // set to true to use the site name for the link of external web pages

static Comparator<CrossRef> licenseComparator = new Comparator<CrossRef>() {

Expand Down Expand Up @@ -95,26 +94,13 @@ public int compare(CrossRef o1, CrossRef o2) {
*/
public static class FormattedUrl {
String url;
/*
* license crossref information in the form of an array of strings.
* With the strings being of the form "{a:b, c:b}"
*/
String[] licenseCrossRefs;


Boolean isValid;
Boolean isLive;
Boolean isWayBackLink;
String match;
String timestamp;

public FormattedUrl(String url) {
this.url = url;
this.licenseCrossRefs = null;
}
public FormattedUrl(String url, String [] licenseCrossRefs) {
this.url = url;
this.licenseCrossRefs = licenseCrossRefs;
}
public FormattedUrl(Optional<String> url, Optional<Boolean> isValid, Optional<Boolean> isLive,
Optional<Boolean> isWayBackLink, Optional<String> match, Optional<String> timestamp) {
this.url = (url.isPresent()) ? url.get() : "N/A";
Expand All @@ -127,6 +113,11 @@ public FormattedUrl(Optional<String> url, Optional<Boolean> isValid, Optional<Bo
public String getUrl() {
return this.url;
}

public String getSite() {
return this.url;
}

public void setUrl(String url) {
this.url = url;
}
Expand Down