Package java.io

Examples of java.io.File.toURI()


      // Build the local path
      File path = new File(deployURL.getFile());
      String archive = path.getName();
      File deployFile = new File(uploadDir, archive);

      VirtualFile root = VFS.getChild(deployFile.toURI());
      Deployment deployment = mainDeployer.getDeployment(getDeploymentName(root));

      /* TODO: that is a hack */
      if (deployment == null)
      {
View Full Code Here


      String archive = path.getName();
      File deployFile = new File(uploadDir, archive);
      if (deployFile.exists() == false)
         throw new IOException("deployURL(" + url + ") has no local archive");

      VirtualFile root = VFS.getChild(deployFile.toURI());
      Deployment deployment = deploymentFactory.createVFSDeployment(getDeploymentName(root), root);
      mainDeployer.addDeployment(deployment);
      DeploymentContext context = null;
      try
      {
View Full Code Here

      String archive = path.getName();
      File deployFile = new File(uploadDir, archive);
      if (deployFile.exists() == false)
         throw new IOException("deployURL(" + url + ") has no local archive");

      VirtualFile root = VFS.getChild(deployFile.toURI());
      mainDeployer.removeDeployment(getDeploymentName(root));
      mainDeployer.process();
      moduleID.setRunning(false);
   }
View Full Code Here

      }
      if (tempOut != null) {
        tempOut.close();
      }
    }
    return new TemporaryURLContent(tempFile.toURI().toURL());
  }
}
View Full Code Here

 
  @Test public void testNil() throws Exception {
    gloze = new Gloze(SILENT);
    File src = new File("samples/nil/nil.xml");
    Gloze.initSchema(null, new File(src.getParent()+"/nil.xsd").toURL(),gloze.schemaMap);
    runTest(src, src.toURI());
  }

  @Test public void testMixed() throws Exception {
    gloze = new Gloze(SILENT);
    File src = new File("samples/mixed/mix.xml");
View Full Code Here

  @Test public void testMixed() throws Exception {
    gloze = new Gloze(SILENT);
    File src = new File("samples/mixed/mix.xml");
    Gloze.initSchema(null, new File(src.getParent()+"/mix.xsd").toURL(),gloze.schemaMap);
    runTest(src, src.toURI());
  }

  private void runTest(File src, URI uri) {
    try {
      // load the target XML and initialise gloze with its schema
View Full Code Here

      try {
        dir = f_currdir.getCanonicalPath() + File.separator +"plugins" + File.separator;
        LogBuffer.println("failing over to "+dir);
        files = PluginManager.getPluginManager().readdir(dir);
        if (files != null) {
          setCodeBase(f_currdir.toURI().toURL());
        }
      } catch (IOException e1) {
        // this might happen when the dir is bad.
        e1.printStackTrace();
      }
View Full Code Here

    File src = new File("samples/po/po.xml");
    Gloze.initSchema(
        new URI("http://tempuri.org/po.xsd"),
        new File(src.getParent()+"/po.xsd").toURL(),
        gloze.schemaMap);
    runTest(src, src.toURI());
  }

  @Test public void testNamespaces() throws Exception {
    gloze = new Gloze(SILENT);
    File src = new File("samples/namespaces/po1.xml");
View Full Code Here

    File src = new File("samples/namespaces/po1.xml");
    Gloze.initSchema(
        new URI("http://www.example.com/PO1"),
        new File(src.getParent()+"/po1.xsd").toURL(),
        gloze.schemaMap);
    runTest(src, src.toURI());
  }

  @Test public void testIPO() throws Exception {
    gloze = new Gloze(SILENT);
    File src = new File("samples/ipo/ipo.xml");
View Full Code Here

    File src = new File("samples/ipo/ipo.xml");
    Gloze.initSchema(
        new URI("http://www.example.com/IPO"),
        new File(src.getParent()+"/ipo.xsd").toURL(),
        gloze.schemaMap);
    runTest(src, src.toURI());
  }

  @Test public void testRedefine() throws Exception {
    gloze = new Gloze(SILENT);
    File src = new File("samples/redefine/ipo.xml");
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.