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 2020/07/17 15:24:29 UTC

[GitHub] [jena] afs commented on a change in pull request #775: JENA-1937: SHACL Compact Syntax Writer

afs commented on a change in pull request #775:
URL: https://github.com/apache/jena/pull/775#discussion_r456512327



##########
File path: jena-shacl/src/main/java/org/apache/jena/shacl/lib/ShLib.java
##########
@@ -195,6 +208,25 @@ public static boolean isImmediate(Target target) {
         return targetType.equals(TargetType.targetObjectsOf) || targetType.equals(TargetType.targetSubjectsOf);
     }
 
+    static Set<String> rdfDatatypes = new HashSet<>();
+    static {
+        rdfDatatypes.add(RDF.dtLangString.getURI());
+        rdfDatatypes.add(RDF.dtRDFHTML.getURI());
+        rdfDatatypes.add(RDF.dtRDFJSON.getURI());
+        rdfDatatypes.add(RDF.dtXMLLiteral.getURI());
+    }
+
+
+
+    /** Test whether the IRI is a datatype that can be written in compact short form (no datatype=)

Review comment:
       "datatype=" intended. 
   
   A plain URI as a constraint is a shorthand for either "datatype=URI" or "class=URI" by looking inside the URI.  Teh writer attempts to reverse this conservatively. For XSD and some known datatypes, it writes the URI as an abbreviation for datatype=URI otherwise it writes class= (no attempt to abbreviate)
   
   I'll clarify the comment.
   




----------------------------------------------------------------
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