-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
What happened?
What has happened
I wanted to try out the FAIR signposting example outlined in the compass library which includes linksmith for weblink parsing with an example Zenodo record.
When trying to parse the record with the following code snippet:
HttpClient httpClient = HttpClient.newHttpClient();
URI uri = URI.create("https://zenodo.org/records/17179862");
HttpRequest request = HttpRequest.newBuilder()
.uri(uri)
.GET()
.build();
HttpResponse<String> response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());
HttpHeaders header = response.headers();
String rawHeader = header.toString();
// Raw header of an HTTP response with link attribute;
WebLinkProcessor webLinkProcessor = new WebLinkProcessor.Builder().build();
ValidationResult result = webLinkProcessor.process(rawHeader);
Linksmiths WeblinkProcessor.process() validation method returns the following error:
Exception in thread "main" life.qbic.linksmith.spi.WebLinkParser$StructureException: Expected LT but found IDENT('java.net.http.HttpHeaders@c7873be7') at position 0
at life.qbic.linksmith.internal.parsing.SimpleWebLinkParser.expectCurrent(SimpleWebLinkParser.java:240)
I checked the zenodo documentation and found out that they enabled FAIR Signposting 2 which i can also see in the Header section if i curl the record curl -I https://zenodo.org/records/17179862
Can you help me?
link: ; rel="author" , ; rel="author" , ; rel="author" , ; rel="cite-as" , ; rel="describedby" ; type="application/dcat+xml" , ; rel="describedby" ; type="application/json" , ; rel="describedby" ; type="application/ld+json" , ; rel="describedby" ; type="application/ld+json;profile="https://datapackage.org/profiles/2.0/datapackage.json"" , ; rel="describedby" ; type="application/marcxml+xml" , ; rel="describedby" ; type="application/vnd.citationstyles.csl+json" , ; rel="describedby" ; type="application/vnd.datacite.datacite+json" , ; rel="describedby" ; type="application/vnd.datacite.datacite+xml" , ; rel="describedby" ; type="application/vnd.geo+json" , ; rel="describedby" ; type="application/vnd.inveniordm.v1+json" , ; rel="describedby" ; type="application/vnd.inveniordm.v1.full+csv" , ; rel="describedby" ; type="application/vnd.inveniordm.v1.simple+csv" , ; rel="describedby" ; type="application/x-bibtex" , ; rel="describedby" ; type="application/x-dc+xml" , ; rel="describedby" ; type="text/x-bibliography" , ; rel="item" ; type="application/pdf" , ; rel="item" ; type="application/octet-stream" , ; rel="item" ; type="application/octet-stream" , ; rel="license" , ; rel="type" , ; rel="type" , ; rel="linkset" ; type="application/linkset+json"
What browsers are you seeing the problem on?
Firefox
Relevant log output
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working