Examples of URI


Examples of com.google.code.apis.rest.client.Util.Uri

   *
   * @return the package name
   */
  private String getPackageBasedName() {
    String packageName = application.getResources().getBase();
    Uri packageNameUrl = new Uri(packageName);
    packageName = packageNameUrl.getAuthority();
    packageName = packageName.replaceAll("http(s)?://(www)?", "");
    packageName = packageName.replaceAll("[/]", "");
    String[] packageNameComponents = packageName.split("\\.");
    packageName = "";
    for (int i = 0; i < packageNameComponents.length; i++) {
View Full Code Here

Examples of com.iggroup.oss.restdoclet.doclet.type.Uri

                     deprecatedMatch = true;
                     break;
                  }
               }
            }
            method.getUris().add(new Uri(baseUri + uri, deprecated));
         }

         if (deprecatedURIs != null && !deprecatedMatch) {
            LOG.warn("Deprecated URI tag on method " + methodDoc.name()
               + " does not match any service URIs.");
View Full Code Here

Examples of com.sun.org.apache.xerces.internal.util.URI

            Attr attrNode = (Attr)attributes.getNamedItemNS("http://www.w3.org/XML/1998/namespace", "base");
            if (attrNode != null) {
                String uri =  attrNode.getNodeValue();
                if (uri.length() != 0 ) {// attribute value is always empty string
                    try {
                        uri = new URI(uri).toString();
                    }
                    catch (com.sun.org.apache.xerces.internal.util.URI.MalformedURIException e) {
                        // This may be a relative URI.

                        // Start from the base URI of the parent, or if this node has no parent, the owner node.
                        NodeImpl parentOrOwner = (parentNode() != null) ? parentNode() : ownerNode;

                        // Make any parentURI into a URI object to use with the URI(URI, String) constructor.
                        String parentBaseURI = (parentOrOwner != null) ? parentOrOwner.getBaseURI() : null;

                        if (parentBaseURI != null) {
                            try {
                                uri = new URI(new URI(parentBaseURI), uri).toString();
                            }
                            catch (com.sun.org.apache.xerces.internal.util.URI.MalformedURIException ex){
                                // This should never happen: parent should have checked the URI and returned null if invalid.
                                return null;
                            }
                            return uri;
                        }
                        // REVISIT: what should happen in this case?
                        return null;
                    }
                    return uri;
                }
            }
        }

        //2.the base URI of the element's parent element within the document or external entity,
        //if one exists
        String parentElementBaseURI = (this.parentNode() != null) ? this.parentNode().getBaseURI() : null ;
        //base URI of parent element is not null
        if(parentElementBaseURI != null){
            try {
                //return valid absolute base URI
               return new URI(parentElementBaseURI).toString();
            }
            catch (com.sun.org.apache.xerces.internal.util.URI.MalformedURIException e){
                // REVISIT: what should happen in this case?
                return null;
            }
        }
        //3. the base URI of the document entity or external entity containing the element

        String baseURI = (this.ownerNode != null) ? this.ownerNode.getBaseURI() : null ;

        if(baseURI != null){
            try {
                //return valid absolute base URI
               return new URI(baseURI).toString();
            }
            catch (com.sun.org.apache.xerces.internal.util.URI.MalformedURIException e){
                // REVISIT: what should happen in this case?
                return null;
            }
View Full Code Here

Examples of com.sun.org.apache.xml.internal.utils.URI

      // cv.setValue(base64EncodedEncryptedOctets.getBytes());
      cv.setValue(base64EncodedEncryptedOctets);

      if (contentMode) {
        _ed.setType(
          new URI(EncryptionConstants.TYPE_CONTENT).toString());
      } else {
        _ed.setType(
          new URI(EncryptionConstants.TYPE_ELEMENT).toString());
      }
      EncryptionMethod method =
        _factory.newEncryptionMethod(new URI(_algorithm).toString());
      _ed.setEncryptionMethod(method);
    } catch (URI.MalformedURIException mfue) {
      throw new XMLEncryptionException("empty", mfue);
    }
        return (_ed);
View Full Code Here

Examples of com.sun.xml.wss.impl.misc.URI

      XMLSignatureInput result = new XMLSignatureInput(resultSet);

      result.setMIMEType("text/xml");

      try {
         URI uriNew = new URI(new URI(BaseURI), uri.getNodeValue());
         result.setSourceURI(uriNew.toString());
      } catch (URI.MalformedURIException ex) {
         result.setSourceURI(BaseURI);        
      }

      return result;
View Full Code Here

Examples of java.net.URI

      URL url = Thread.currentThread().getContextClassLoader().getResource(CoreConstants.SYSTEM_VDB);
      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

    }

    @Override
    public int hashCode() {
        int hashCode = getItemKind();
        final URI schemaUri = getSchemaURI();
        if(schemaUri != null) {
            hashCode = 31 * hashCode + schemaUri.hashCode();
        }
        //if getBaseType() is supported for the item kind
        try {
            hashCode = 31 * hashCode + getBaseType();
        } catch (XQException e) {
View Full Code Here

Examples of java.net.URI

                break;
              }
            }
            else {
              try {
                URI uri = new URI(name);
                addPluginFile(new File(uri), files);
              } catch (URISyntaxException e) { // ignore
              }
              if (!files.isEmpty()) {
                break;
View Full Code Here

Examples of java.net.URI

            }
            return col;
        } else {
            final Collator col;
            try {
                URI baseuri = statEnv.getBaseURI();
                final URI targetUri;
                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

            }
        }
    }

    private URI getBaseUri() {
        final URI baseuri;
        if(_baseUri != null) {
            baseuri = ResourceUtils.buildURI(_baseUri);
        } else {
            if(_queryFile != null) {
                baseuri = _queryFile.toURI();
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.