kinow commented on code in PR #2477:
URL: https://github.com/apache/jena/pull/2477#discussion_r1605465987


##########
jena-arq/src/main/java/org/apache/jena/riot/lang/rdfxml/rrx_stax_ev/ParserRDFXML_StAX_EV.java:
##########
@@ -638,9 +637,15 @@ private XMLEvent propertyElementProcess(Node subject, 
StartElement startElt, Cou
         }
 
         String parseTypeName = parseType;
-        if ( parseTypeName.equals(parseTypeLiteralAlt) ) {
-            Log.warn(SysRIOT.getLogger(), "Encountered 
rdf:parseType='literal'. Treated as rdf:parseType='literal'");
-            parseTypeName = "Literal";
+        switch( parseTypeName) {
+            case parseTypeLiteralAlt -> {
+                RDFXMLparseWarning("Encountered rdf:parseType='literal'. 
Treated as rdf:parseType='literal'", location);

Review Comment:
   Should the second part of the error message be `Treated as 
rdf:parseType='Literal'`? Just checking because `rdf:parseType='literal'` 
appears twice in the message....



##########
jena-arq/src/main/java/org/apache/jena/riot/lang/rdfxml/rrx/ParserRDFXML_SAX.java:
##########
@@ -1042,15 +1040,21 @@ private String xmlLang(Attributes attributes, Position 
position) {
         return langStr;
     }
 
-
     private ObjectParseType objectParseType(String parseTypeStr, Position 
position) {
         if ( parseTypeStr == null )
             return ObjectParseType.Plain;
         try {
             String parseTypeName = parseTypeStr;
-            if ( parseTypeName.equals("literal") ) {
-                Log.warn(SysRIOT.getLogger(), "Encountered 
rdf:parseType='literal'. Treated as rdf:parseType='literal'");
-                parseTypeName = "Literal";
+            switch(parseTypeName) {
+                case "literal" -> {
+                    RDFXMLparseWarning("Encountered rdf:parseType='literal'. 
Treated as rdf:parseType='literal'", position);
+                    parseTypeName = "Literal";
+                }
+                // CIM (Common Information Model) - see github issue 2473
+                case "Statements" -> {
+                    RDFXMLparseWarning("Encountered 
rdf:parseType='Statements'. Treated as rdf:parseType='literal'", position);
+                    parseTypeName = "Literal";

Review Comment:
   Same question as below... I think it's confusing that 
`rdf:parseType='literal'` appears so many times in the error message. I 
expected at least one more option/value.



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

To unsubscribe, e-mail: pr-unsubscr...@jena.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@jena.apache.org
For additional commands, e-mail: pr-h...@jena.apache.org

Reply via email to