You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@jena.apache.org by GitBox <gi...@apache.org> on 2021/01/01 14:02:08 UTC
[GitHub] [jena] afs opened a new pull request #894: JENA-2017: Syntax for SPARQL*
afs opened a new pull request #894:
URL: https://github.com/apache/jena/pull/894
Includes various "tidy up" commits accumulated while this branch was open.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org
[GitHub] [jena] afs commented on a change in pull request #894: JENA-2017: Annotation syntax for SPARQL*
Posted by GitBox <gi...@apache.org>.
afs commented on a change in pull request #894:
URL: https://github.com/apache/jena/pull/894#discussion_r550911177
##########
File path: jena-arq/src/main/java/org/apache/jena/riot/RDFParserBuilder.java
##########
@@ -612,10 +612,17 @@ public RDFParser build() {
if ( errorHandler$ == null )
errorHandler$ = ErrorHandlerFactory.getDefaultErrorHandler();
- if ( path != null && baseUri == null )
- baseUri = IRILib.filenameToIRI(path.toString());
- if ( path == null && baseUri == null && uri != null )
- baseUri = uri;
+ if ( path != null ) {
+ if ( baseUri == null )
+ baseUri = IRILib.filenameToIRI(path.toString());
+ } else {
+ if ( baseUri == null && uri != null ) {
+ if ( resolver != null )
+ baseUri = resolver.resolveToString(uri);
+ else
+ baseUri = IRIResolver.resolveString(uri);
+ }
+ }
Review comment:
Yes, much better!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org
[GitHub] [jena] kinow commented on a change in pull request #894: JENA-2017: Annotation syntax for SPARQL*
Posted by GitBox <gi...@apache.org>.
kinow commented on a change in pull request #894:
URL: https://github.com/apache/jena/pull/894#discussion_r550824479
##########
File path: jena-arq/src/main/java/org/apache/jena/riot/RDFParserBuilder.java
##########
@@ -612,10 +612,17 @@ public RDFParser build() {
if ( errorHandler$ == null )
errorHandler$ = ErrorHandlerFactory.getDefaultErrorHandler();
- if ( path != null && baseUri == null )
- baseUri = IRILib.filenameToIRI(path.toString());
- if ( path == null && baseUri == null && uri != null )
- baseUri = uri;
+ if ( path != null ) {
+ if ( baseUri == null )
+ baseUri = IRILib.filenameToIRI(path.toString());
+ } else {
+ if ( baseUri == null && uri != null ) {
+ if ( resolver != null )
+ baseUri = resolver.resolveToString(uri);
+ else
+ baseUri = IRIResolver.resolveString(uri);
+ }
+ }
Review comment:
Or maybe
```java
if ( baseUri == null ) {
if ( path != null ) {
baseUri = IRILib.filenameToIRI(path.toString());
} else if ( uri != null ) {
baseUri = resolver != null ? resolver.resolveToString(uri) : IRIResolver.resolveString(uri);
}
}
```
I think it should eval the same way, but moving the common condition `baseUri == null` out?
##########
File path: jena-arq/src/main/java/org/apache/jena/riot/web/HttpNames.java
##########
@@ -63,21 +63,22 @@
public static final String paramDefaultGraphURI = "default-graph-uri" ;
public static final String paramNamedGraphURI = "named-graph-uri" ;
public static final String paramTarget = "target" ;
-
-
+
+
public static final String paramStyleSheet = "stylesheet" ;
public static final String paramAccept = "accept" ;
- public static final String paramOutput1 = "output" ; // See Yahoo! developer: http://developer.yahoo.net/common/json.html
- public static final String paramOutput2 = "format" ; // Alternative name
+ public static final String paramOutput1 = "output" ; // See Yahoo! developer: http://developer.yahoo.net/common/json.html
Review comment:
For later maybe; this link is 404. Int he wayback machine several 302 entries. The 302'd page was 404. Last good crawled page for the original link I found is from 2006: http://web.archive.org/web/20060324091551/http://developer.yahoo.com/common/json.html
##########
File path: jena-arq/src/test/java/org/apache/jena/arq/junit/sparql/tests/QuerySyntaxTest.java
##########
@@ -30,17 +30,20 @@
public class QuerySyntaxTest implements Runnable {
final boolean expectLegalSyntax;
+ // Rwquired syntax, null for by file extension.
Review comment:
s/Rwquired/Required
##########
File path: jena-arq/src/main/java/org/apache/jena/sparql/lang/ParserBase.java
##########
@@ -399,7 +400,16 @@ protected Node createBNode(String label, int line, int column) {
// label = unescapeCodePoint(label, line, column) ;
return activeLabelMap.asNode(label) ;
}
-
+
+ protected Node preConditionAnnotation(Node s, Node p, Path path, Node o, int line, int column) {
+ if ( p != null )
+ return p;
+ if ( path instanceof P_Link )
+ return ((P_Link)path).getNode();
+ throwParseException("Only a simple paths allowed with annotation syntax", line, column) ;
Review comment:
s/simple paths/simple path?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org
[GitHub] [jena] afs merged pull request #894: JENA-2017: Annotation syntax for SPARQL*
Posted by GitBox <gi...@apache.org>.
afs merged pull request #894:
URL: https://github.com/apache/jena/pull/894
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org
[GitHub] [jena] afs commented on a change in pull request #894: JENA-2017: Annotation syntax for SPARQL*
Posted by GitBox <gi...@apache.org>.
afs commented on a change in pull request #894:
URL: https://github.com/apache/jena/pull/894#discussion_r550911488
##########
File path: jena-arq/src/main/java/org/apache/jena/riot/web/HttpNames.java
##########
@@ -63,21 +63,22 @@
public static final String paramDefaultGraphURI = "default-graph-uri" ;
public static final String paramNamedGraphURI = "named-graph-uri" ;
public static final String paramTarget = "target" ;
-
-
+
+
public static final String paramStyleSheet = "stylesheet" ;
public static final String paramAccept = "accept" ;
- public static final String paramOutput1 = "output" ; // See Yahoo! developer: http://developer.yahoo.net/common/json.html
- public static final String paramOutput2 = "format" ; // Alternative name
+ public static final String paramOutput1 = "output" ; // See Yahoo! developer: http://developer.yahoo.net/common/json.html
Review comment:
Good find. Reading the link, not sure the comment adds much - "output" is for any syntax nowadays. Removed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org
[GitHub] [jena] afs commented on pull request #894: JENA-2017: Annotation syntax for SPARQL*
Posted by GitBox <gi...@apache.org>.
afs commented on pull request #894:
URL: https://github.com/apache/jena/pull/894#issuecomment-753321959
Detail on https://issues.apache.org/jira/browse/JENA-2017 .
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org