@Override synchronized public IRI resolve(String uriStr) { return other.resolve(uriStr); }
/** * Turn a filename into a well-formed file: URL relative to the working * directory. * * @param filename * @return String The filename as an absolute URL */ static public 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(); }
@Override protected String resolveQuotedIRI(String iriStr, int line, int column) { iriStr = stripQuotes(iriStr); iriStr = unescapeIRI(iriStr); try { // Used to be errors (pre Jena 2.12.0) // .resolve(iriStr) IRIResolver resolver = getPrologue().getResolver(); IRI iri = resolver.resolve(iriStr) ; // IRI iri = resolver.resolveSilent(iriStr) ; // if ( true ) // CheckerIRI.iriViolations(iri, profile.getErrorHandler(), line, column) ; // iriStr = iri.toString() ; } catch (JenaURIException ex) { throw new RiotParseException(ex.getMessage(), line, column) ; } // IRI unwise characters are allowed sometimes but these are really, really // unwise (inserted by \ u escaping to by pass syntax). if ( iriStr.contains("<") || iriStr.contains(">") ) throw new RiotParseException("Illegal character '<' or '>' in IRI: '"+iriStr+"'", line, column); return getPrologue().getResolver().resolveToString(iriStr); } //
@Override synchronized public IRI resolve(String uriStr) { return other.resolve(uriStr) ; }
/** * Turn a filename into a well-formed file: URL relative to the working * directory. * * @param filename * @return String The filename as an absolute URL */ static public 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() ; }
/** * Resolve an IRI against whatever is the base for this process (likely to * be based on the current working directory of this process at the time of * initialization of this class). */ public static IRI resolveIRI(String uriStr) { return exceptions(globalResolver.resolve(uriStr)) ; }
/** * Resolve an IRI against whatever is the base for this process (likely to * be based on the current working directory of this process at the time of * initialization of this class). */ public static IRI resolveIRI(String uriStr) { return exceptions(globalResolver.resolve(uriStr)); }
/** Resolving relative IRIs, return a string */ public String resolveToString(String uriStr) { return resolve(uriStr).toString(); }
@Override public IRI makeIRI(String uriStr, long line, long col) { return prologue.getResolver().resolve(uriStr) ; }
/** Resolving relative IRIs, return a string */ public String resolveToString(String uriStr) { return resolve(uriStr).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 ; } } }
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 ; } } }