Examples of toURL()


Examples of java.io.File.toURL()

        }

        URL wsdlURL;
        File wsdlFile = new File(args[0]);
        if (wsdlFile.exists()) {
            wsdlURL = wsdlFile.toURL();
        } else {
            wsdlURL = new URL(args[0]);
        }

        MessageFactory factory = MessageFactory.newInstance();
View Full Code Here

Examples of java.io.File.toURL()

        File jbiXml = new File(metaInf, "jbi.xml");
        try {
            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
            factory.setNamespaceAware(true);
            DocumentBuilder builder = factory.newDocumentBuilder();
            Document doc = builder.parse(jbiXml.toURL().toString());
           
            Element providesEl = (Element)findNode(doc.getDocumentElement(), "provides");
            endpointName = providesEl.getAttribute("endpoint-name");
        } catch (Exception ex) {
            LOG.log(Level.SEVERE, "error parsing " + jbiXml, ex);
View Full Code Here

Examples of java.io.File.toURL()

       
        private Collection<Class<?>> find(Matcher matcher) throws MalformedURLException {
            List<Class<?>> classes = new ArrayList<Class<?>>();
           
            File root = new File(rootPath);
            URL[] urls = {root.toURL()};
            URLClassLoader loader = new URLClassLoader(urls, parent);
           
            find(root, loader, classes, matcher);
            return classes;
        }
View Full Code Here

Examples of java.io.File.toURL()

        }

        URL wsdlURL;
        File wsdlFile = new File(args[0]);
        if (wsdlFile.exists()) {
            wsdlURL = wsdlFile.toURL();
        } else {
            wsdlURL = new URL(args[0]);
        }

        System.out.println(wsdlURL);
View Full Code Here

Examples of java.net.URI.toURL()

      if (url == null) {
        throw new TeiidRuntimeException(RuntimeMetadataPlugin.Util.getString("system_vdb_not_found")); //$NON-NLS-1$
      }
      // uri conversion is only to remove the spaces in URL, note this only with above kind situation 
      URI uri = new URI(url.getProtocol(), url.getPath(), null);
      this.vdbRepository.setSystemStore(new IndexMetadataFactory(uri.toURL()).getMetadataStore(null));
    } catch (URISyntaxException e) {
      throw new TeiidRuntimeException(e, RuntimePlugin.Util.getString("system_vdb_load_error")); //$NON-NLS-1$
    } catch (IOException e) {
      throw new TeiidRuntimeException(e, RuntimePlugin.Util.getString("system_vdb_load_error")); //$NON-NLS-1$
    }
View Full Code Here

Examples of java.net.URI.toURL()

        tempCacheString = tempCacheString.substring(7);
        tempCacheString = "file:///" + tempCacheString;
      }
      URI tempURI = new URI(tempCacheString);
//      System.err.println(" -- " + tempURI.toString());
      CACHE_URL = tempURI.toURL();
    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    if (!cacheDir.exists()) {
View Full Code Here

Examples of java.net.URI.toURL()

                if(baseuri == null) {
                    targetUri = URI.create(uri);
                } else {
                    targetUri = baseuri.resolve(uri);
                }
                URL targetUrl = targetUri.toURL();
                InputStream is = targetUrl.openStream();
                String rules = IOUtils.toString(is);
                col = new RuleBasedCollator(rules);
            } catch (Exception e) {
                return null;
View Full Code Here

Examples of java.net.URI.toURL()

    private static Reader readQuery(String viewloc, StaticContext staticEnv) throws XQueryException {
        URI resolved = ResolveUri.resolveURI(viewloc, staticEnv);
        final URL queryUrl;
        try {
            queryUrl = resolved.toURL();
        } catch (MalformedURLException e) {
            throw new DynamicError("Invalid URL form: " + viewloc);
        }
        final InputStream is;
        try {
View Full Code Here

Examples of java.net.URI.toURL()

    }

    // Create the CatalogGen with the config doc InputStream
    try
    {
      me = new CatalogGen( configDocIs, configDocUri.toURL());
    }
    catch ( MalformedURLException e )
    {
      String tmpMsg = "MalformedURLException thrown creating URL w/ resource URI <" + configDocUri.toString() + ">: " + e.getMessage();
      log.debug( "expandConfigDoc(): " + tmpMsg, e);
View Full Code Here

Examples of java.net.URL.toURL()

                        String s = shp.getCanonicalPath();
                        int pos1 = s.lastIndexOf('.');
                        String name = s.substring(0, pos1);
                        File shx = new File(s.substring(0, pos1) + ".shx");
                        File dbf = new File(s.substring(0, pos1) + ".dbf");
                        EsriLayer layer = new EsriLayer(name, dbf.toURL(), shp.toURL(), shx.toURL());
                        _layerHandler.addLayer(layer);
                    } catch (Exception exception) {
                        System.out.println(exception);
                    }
                }
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.