[
https://issues.apache.org/jira/browse/JENA-2039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17281109#comment-17281109
]
Florian Kleedorfer commented on JENA-2039:
------------------------------------------
Thanks for making the point clear. I would expect it to behave exactly the way
you describe, and that's fine.
We' re using fragments and not paths so as to ensure uris are part of the same
document, in the linked data sense. We started doing that for normal http
resources and adopted the approach for messages.
Maybe we don't really have a use case for message URIs as base URIs.
> URI parsing fails
> -----------------
>
> Key: JENA-2039
> URL: https://issues.apache.org/jira/browse/JENA-2039
> Project: Apache Jena
> Issue Type: Bug
> Components: RIOT
> Reporter: Florian Kleedorfer
> Priority: Critical
>
> Depending on 3.18.0-SNAPSHOT, some of my tests started to fail recently. We
> are using URIs of the form 'wm:/abcde' - note the single slash. These URIs,
> it seems, can no longer be parsed.
> Here is a minimal example:
> {noformat}
> @prefix msg: <https://w3id.org/won/message#> .
> <wm:/jq15ga3aacsxbvl9nngw> a msg:Message .
> {noformat}
> This is the exception I get:
> {noformat}
> Exception in thread "main" org.apache.jena.riot.RiotException: [line: 3, col:
> 1 ] Bad IRI: <wm:/jq15ga3aacsxbvl9nngw> : Not an RDF IRI:
> wm:/jq15ga3aacsxbvl9nngw
> at
> org.apache.jena.riot.system.ErrorHandlerFactory$ErrorHandlerStd.error(ErrorHandlerFactory.java:146)
> at
> org.apache.jena.riot.system.ParserProfileStd.internalMakeIRI(ParserProfileStd.java:101)
> at
> org.apache.jena.riot.system.ParserProfileStd.resolveIRI(ParserProfileStd.java:81)
> at
> org.apache.jena.riot.system.ParserProfileStd.createURI(ParserProfileStd.java:162)
> at
> org.apache.jena.riot.system.ParserProfileStd.create(ParserProfileStd.java:234)
> at
> org.apache.jena.riot.lang.LangTurtleBase.tokenAsNode(LangTurtleBase.java:582)
> at
> org.apache.jena.riot.lang.LangTurtleBase.node(LangTurtleBase.java:414)
> at
> org.apache.jena.riot.lang.LangTriG.oneNamedGraphBlock2(LangTriG.java:115)
> at
> org.apache.jena.riot.lang.LangTriG.oneTopLevelElement(LangTriG.java:49)
> at
> org.apache.jena.riot.lang.LangTurtleBase.runParser(LangTurtleBase.java:79)
> at org.apache.jena.riot.lang.LangBase.parse(LangBase.java:43)
> at
> org.apache.jena.riot.RDFParserRegistry$ReaderRIOTLang.read(RDFParserRegistry.java:185)
> at org.apache.jena.riot.RDFParser.read(RDFParser.java:356)
> at org.apache.jena.riot.RDFParser.parseNotUri(RDFParser.java:346)
> at org.apache.jena.riot.RDFParser.parse(RDFParser.java:292)
> at
> org.apache.jena.riot.RDFParserBuilder.parse(RDFParserBuilder.java:539)
> at
> org.apache.jena.riot.RDFDataMgr.parseFromInputStream(RDFDataMgr.java:901)
> at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:590)
> at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:568)
> at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:559)
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)