/** * Turn a filename into a well-formed file: URL relative to the working directory. * * @param filename * @return String The filename as an absolute URL */ public static String resolveFileURL(String filename) throws IRIException { IRI r = globalResolver.resolve(filename); if (!r.getScheme().equalsIgnoreCase("file")) { // Pragmatic hack that copes with "c:" return resolveFileURL("./" + filename); } return r.toString(); }
private static Node createNode(String x) { try { IRI iri = resolver.resolve(x); return NodeFactory.createURI(iri.toString()); } catch (Exception ex) { ServletOps.errorBadRequest("SPARQL Update: bad IRI: " + x); return null; } }
public String getBaseIRIasString() { IRI iri = getBaseIRI(); if (iri == null) return null; return iri.toString(); }