Package java.net

Examples of java.net.URL.toExternalForm()


                        url = new URL(uri);
                    else
                        url = new File(uri).toURI().toURL();

                    System.err.println("loading " + url.toString() + "!");
                    panel.setDocument(url.toExternalForm());

                    long el = System.currentTimeMillis() - st;
                    XRLog.general("loadDocument(" + url.toString() + ") in " + el + "ms, render may take longer");
                    HTMLTest.this.setTitle(BASE_TITLE + "-  " +
                            panel.getDocumentTitle() + "  " +
View Full Code Here


        if (uri == null) return null;
        String ret = null;
        if (_baseURL == null) {//first try to set a base URL
            try {
                URL result = new URL(uri);
                setBaseURL(result.toExternalForm());
            } catch (MalformedURLException e) {
                try {
                    setBaseURL(new File(".").toURI().toURL().toExternalForm());
                } catch (Exception e1) {
                    XRLog.exception("The default NaiveUserAgent doesn't know how to resolve the base URL for " + uri);
View Full Code Here

        try {
            url = ClasspathUrlExtender.buildURL(root, path);
        } catch (MalformedURLException e) {
            throw new JiBXException("Unable to handle include path " + path, e);
        }
        String fpath = url.toExternalForm();
        if (paths.add(fpath)) {
            try {
               
                // access the included binding as input stream
                UnmarshallingContext ictx = new UnmarshallingContext();
View Full Code Here

                        }
                    }
                } else {
                    if (basedir == null) {
                        URL url = new URL(base, name);
                        s_logger.debug("Adding schema URL from command line: " + url.toExternalForm());
                        fileset.add(new UrlResolver(name, url));
                    } else {
                        File sfile = new File(basedir, name);
                        if (sfile.exists()) {
                            s_logger.debug("Adding schema file from command line: " + sfile.getCanonicalPath());
View Full Code Here

        final String protocol = url.getProtocol();
        if ("http".equalsIgnoreCase(protocol) ||
            "https".equalsIgnoreCase(protocol) ||
            "ftp".equalsIgnoreCase(protocol))
        {
          return url.toExternalForm();
        }
      }
    }

    if (dataLocation == null)
View Full Code Here

      final ResourceManager resourceManager = report.getResourceManager();
      final URL value = resourceManager.toURL(contentBase);
      if (value != null)
      {
        repConf.setConfigProperty
            (AbstractXmlResourceFactory.CONTENTBASE_KEY, value.toExternalForm());
      }
    }

    return repConf;
  }
View Full Code Here

    final Repository documentRepository = sourceDocument.getRepository();
    if (documentRepository instanceof UrlRepository == false)
    {
      // If at least the data entity has an URL, we can always fall back
      // to an global URL..
      return dataItemUrl.toExternalForm();
    }

    try
    {
      final UrlRepository documentUrlRepo = (UrlRepository) documentRepository;
View Full Code Here

       
        String channel_title = "Vuze Subscription: " + escape( subscription.getName());
           
        pw.println( "<title>" + channel_title + "</title>" );
        pw.println( "<link>http://vuze.com</link>" );
        pw.println( "<atom:link href=\"" + escape( feed_url.toExternalForm()) + "\" rel=\"self\" type=\"application/rss+xml\" />" );
       
        pw.println( "<description>Vuze RSS Feed for subscription " + escape( subscription.getName()) + "</description>" );
       
        pw.println("<itunes:image href=\"http://www.vuze.com/img/vuze_icon_128.png\"/>");
        pw.println("<image><url>http://www.vuze.com/img/vuze_icon_128.png</url><title>" + channel_title + "</title><link>http://vuze.com</link></image>");
View Full Code Here

     
      if ( initial_url.getProtocol().equalsIgnoreCase( "file" )){
       
          // handle file://c:/ - map to file:/c:/
       
        String  str = initial_url.toExternalForm();
       
        if ( initial_url.getAuthority() != null ){
       
          str = str.replaceFirst( "://", ":/" );
        }
View Full Code Here

         
          URL cdp_link = item.getLink();
         
          if ( cdp_link != null ){
         
            result.setCDPLink(cdp_link.toExternalForm());
          }
         
          String uid = item.getUID();
         
          if ( uid != 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.