diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/html/IRIValidatorHTML.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/html/IRIValidatorHTML.java index d8914d88d47..003b4aabc39 100644 --- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/html/IRIValidatorHTML.java +++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/html/IRIValidatorHTML.java @@ -26,7 +26,9 @@ import jakarta.servlet.ServletOutputStream; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; +import org.apache.jena.iri3986.provider.IRIProvider3986; import org.apache.jena.irix.IRIException; +import org.apache.jena.irix.IRIProvider; import org.apache.jena.irix.IRIx; public class IRIValidatorHTML @@ -60,6 +62,8 @@ public static void executeHTML(HttpServletRequest httpRequest, HttpServletRespon try { boolean first = true; + IRIProvider provider = new IRIProvider3986(); + for ( String iriStr : args ) { if ( iriStr.startsWith("<") ) { iriStr = iriStr.substring(1); @@ -70,7 +74,7 @@ public static void executeHTML(HttpServletRequest httpRequest, HttpServletRespon System.out.println(); first = false; try { - IRIx iri = IRIx.create(iriStr); + IRIx iri = provider.create(iriStr); System.out.println(iriStr + " ==> " + iri); if ( iri.isRelative() ) System.out.println("Relative IRI: " + iriStr); diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/json/IRIValidatorJSON.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/json/IRIValidatorJSON.java index d36ce85b763..6fde9c91d65 100644 --- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/json/IRIValidatorJSON.java +++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/json/IRIValidatorJSON.java @@ -28,7 +28,9 @@ import org.apache.jena.atlas.json.JsonBuilder; import org.apache.jena.atlas.json.JsonObject; import org.apache.jena.fuseki.servlets.ServletOps; +import org.apache.jena.iri3986.provider.IRIProvider3986; import org.apache.jena.irix.IRIException; +import org.apache.jena.irix.IRIProvider; import org.apache.jena.irix.IRIx; public class IRIValidatorJSON { @@ -55,13 +57,15 @@ public static JsonObject execute(ValidationAction action) { obj.key(jIRIs); obj.startArray(); + IRIProvider provider = new IRIProvider3986(); + for ( String iriStr : args ) { obj.startObject(); obj.key(jIRI).value(iriStr); List errors = new ArrayList<>(); List warnings = new ArrayList<>(); try { - IRIx iri = IRIx.create(iriStr); + IRIx iri = provider.create(iriStr); System.out.println(iriStr + " ==> " + iri); if ( iri.isRelative() ) if ( iri.isRelative() )