Exemplo n.º 1
0
 /**
  * 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();
 }
Exemplo n.º 2
0
 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;
   }
 }
Exemplo n.º 3
0
 public String getBaseIRIasString() {
   IRI iri = getBaseIRI();
   if (iri == null) return null;
   return iri.toString();
 }