Package java.net

Examples of java.net.URI$Parser


        return value.compareTo(trgUri);
    }

    public static AnyURIValue valueOf(String uriLiteral) {
        final String escaped = XMLUtils.escapeUri(uriLiteral, true);
        final URI uri = URI.create(escaped);
        return new AnyURIValue(uriLiteral, uri);
    }
View Full Code Here


        if(uriItem.isEmpty()) {
            return BooleanValue.FALSE;
        }
        String uriStr = uriItem.stringValue();
        // If $uri is not a valid xs:anyURI, an error is raised [err:FODC0005].
        final URI docuri;
        try {
            final String unescaped = XMLUtils.unescapeXML(uriStr);
            docuri = new URI(unescaped);
        } catch (URISyntaxException e) {
            throw new DynamicError("err:FODC0005", "Invalid uri: " + uriStr, e);
        }
        if(dynEnv.getDocumentManager().isDocumentAvailable(docuri)) {
            return BooleanValue.TRUE;
View Full Code Here

        }

        XQEngineClient client = new XQEngineClient(endpoint);
        QueryRequest request = new QueryRequest(query, RETURN_TYPE);
        StaticContext statEnv = dynEnv.getStaticContext();
        URI baseUri = statEnv.getBaseURI();
        if(baseUri == null) {
            baseUri = statEnv.getSystemBaseURI();
        }
        request.setBaseUri(baseUri);
        prepareVariablesToShip(request, argv, dynEnv);
View Full Code Here

*
*/
public class ProxyUtils {

  public boolean isNonProxyHost(String strURI) {
    URI uri = null;
    try {
      uri = new URI(strURI);
    } catch (URISyntaxException use) { // this should actually not happen,
                      // but just
      // in case.
      return false;
    }
View Full Code Here

     
      String str = classUrl.getFile(); // strips "jar:", of if starting with "file:" the "file:" which we don't want
      if (!str.startsWith("file:")) str = classUrl.toString();
      log.fine("Looking up CLASSPATH directory with write access for '" + str + "'");
      try {
         File f = new File(new URI(str));
         // org.xmlBlaster.util.classloader.StandaloneClassLoaderFactory
         if (f.getAbsolutePath().endsWith("org/xmlBlaster/util/classloader/StandaloneClassLoaderFactory.class"))
            f = f.getParentFile().getParentFile().getParentFile().getParentFile().getParentFile();
         return directoryForWrite(f.getAbsolutePath());
      } catch (Throwable e) { // IllegalArgumentException or URISyntaxException
View Full Code Here

    this.selfBuilder.setTitle( titleAtt.getValue() );

    String uriString = externalRefAtt.getValue();
    try
    {
      this.selfBuilder.setExternalReference( new URI( uriString ));
    }
    catch ( URISyntaxException e )
    {
      String msg = "External reference metadata element with bad URI syntax [" + uriString + "].";
      ThreddsXmlParserIssue issue = StaxThreddsXmlParserUtils.createIssueForException( msg, this.reader, e );
View Full Code Here

    assertTrue(result.endsWith("/Organization%20Science/HipKro03%20-%20Hello.pdf"));
   
    // Should not contain a backslash:
    assertEquals(-1, result.indexOf('\\'));
   
    assertTrue(new File(new URI(result)).exists());
   
    /*
     * And one that is not to be found
     */
    result = pdf.format("Organization Science/Does not exist.pdf");
View Full Code Here

   
    if (path.startsWith("http:")) {
      this.path = path;

      try {
        new URI(path); // check syntax .. URISyntaxException if its not good
        name = getName(path);
      } catch (URISyntaxException e) {
            String tmpMsg = "Bad URI syntax for path <" + path + ">: " + e.getMessage();
            log.debug( "CrawlableDatasetDods(): " + tmpMsg);
            throw new IllegalArgumentException( tmpMsg);
View Full Code Here

   */
  public URI getUri()
  {
    try
    {
      return new URI( this.path);
    }
    catch ( URISyntaxException e )
    {
      return null;
    }
View Full Code Here

              + ">, skip.");
          continue;
        }
 
        try {
          new URI(curDsUrlString); // syntax check
        } catch (URISyntaxException e) {
          log.error("listDatasets(): Skipping dataset  <"
              + curDsUrlString + "> due to URISyntaxException: "
              + e.getMessage());
          continue;
View Full Code Here

TOP

Related Classes of java.net.URI$Parser

Copyright © 2018 www.massapicom. 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.