Examples of toURL()


Examples of java.io.File.toURL()

  protected void execute(Store store, UpdateAssertCommandArguments arguments) {
    File uploadFile = arguments.getUploadFile();
    Model model = ModelFactory.createDefaultModel();
    String fileURLString;
    try {
      fileURLString = uploadFile.toURL().toString();
    } catch (MalformedURLException e1) {
      throw new RuntimeException(e1);
    }
    String lang = "RDF/XML";
    if (fileURLString.endsWith(".nt")) {
View Full Code Here

Examples of java.io.File.toURL()

          "graph");
      Graph graph = cache.get(modelFile);
      if (graph == null) {
        Model model = ModelFactory.createDefaultModel();
        try {
          URL modelFileUrl = modelFile.toURL();
          if (log.isDebugEnabled()) {
            log.debug("reading: " + modelFileUrl.toString());
          }
          InputStream modelFileInputStream = modelFileUrl
              .openStream();
View Full Code Here

Examples of java.io.File.toURL()

      } catch (ParseException e) {
        throw new RuntimeException(e);
      }
      Model model = ModelFactory.createDefaultModel();
      try {
        model.read(file.toURL().toString());
      } catch (MalformedURLException e) {
        throw new RuntimeException(e);
      }
      FCAGraph graph = new FCAGraphImpl(model);
      assertions.add(new Assertion(new SourceImpl(sourceString), graph,
View Full Code Here

Examples of java.io.File.toURL()

  protected void execute(Store store, UpdateAssertCommandArguments arguments) {
    File uploadFile = arguments.getUploadFile();
    Model model = ModelFactory.createDefaultModel();
    String fileURLString;
    try {
      fileURLString = uploadFile.toURL().toString();
    } catch (MalformedURLException e1) {
      throw new RuntimeException(e1);
    }
    String lang = "RDF/XML";
    if (fileURLString.endsWith(".nt")) {
View Full Code Here

Examples of java.io.File.toURL()

     */
    public ComponentClassLoader(File componentDir) throws MalformedURLException, SecurityException {
        final List list = new ArrayList();
        File classesDir = new File(componentDir, "classes");
        if (classesDir.exists()) {
            list.add(classesDir.toURL());
        }
        File libDir = new File(componentDir, "lib");
        File[] jars = libDir.listFiles(new FilenameFilter() {
            public boolean accept(File dir, String name) {
                return name.endsWith(".jar") || name.endsWith(".zip");
View Full Code Here

Examples of java.io.File.toURL()

      return in;
    }
    final File f = new File(name);
    if (f.canRead())
    {
      return f.toURL();
    }
    return null;
  }

  /**
 
View Full Code Here

Examples of java.io.File.toURL()

    final File out = new File(outFile);
    final OutputStream base = new FileOutputStream(out);
    final Writer w = new BufferedWriter(new OutputStreamWriter(base, encoding));
    try
    {
      convertReport(reportURL, out.toURL(), w, encoding);
    }
    finally
    {
      w.close();
    }
View Full Code Here

Examples of java.io.File.toURL()

    final File localFile = new File("jlfgr-1_0.jar");
    if (localFile.exists() && localFile.canRead() && localFile.isFile())
    {
      try
      {
        return localFile.toURL();
      }
      catch (MalformedURLException e)
      {
        logger.warn("Unable to form local file URL. Is there no local filesystem?");
      }
View Full Code Here

Examples of java.io.File.toURL()

    {
      if (classpathFile.exists() && classpathFile.canRead() && classpathFile.isFile())
      {
        try
        {
          return classpathFile.toURL();
        }
        catch (MalformedURLException e)
        {
          logger.warn("Unable to form local file URL. Is there no local filesystem?");
        }
View Full Code Here

Examples of java.io.File.toURL()

      if (o instanceof File)
      {
        final File f = (File) o;
        if (f.canRead())
        {
          return f.toURL();
        }
      }
      else if (o instanceof String)
      {
        if (getBaseURL() == null)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.