Package org.apache.xml.utils

Examples of org.apache.xml.utils.URI


            /**
             * @param algorithm
             */
            public AgreementMethodImpl(String algorithm) {
                agreementMethodInformation = new LinkedList();
                URI tmpAlgorithm = null;
                try {
                    tmpAlgorithm = new URI(algorithm);
                } catch (URI.MalformedURIException fmue) {
                    //complain?
                }
                algorithmURI = tmpAlgorithm.toString();
            }
View Full Code Here


      XMLSignatureInput result = new XMLSignatureInput(resultSet, cXPathAPI);

      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

            System.getProperties().put("http.proxyHost", proxyHost);
            System.getProperties().put("http.proxyPort", proxyPort);
         }

         // make network request
         URI uriNew = new URI(new URI(BaseURI), uri.getNodeValue());

         // if the URI contains a fragment, ignore it
         URI uriNewNoFrag = new URI(uriNew);

         uriNewNoFrag.setFragment(null);

         URL url = new URL(uriNewNoFrag.toString());
         URLConnection urlConnection = url.openConnection();

         {

            // set proxy pass
View Full Code Here

      if (uriNodeValue.equals("") || uriNodeValue.startsWith("#")) {
         return false;
      }

      try {
         URI uriNew = new URI(new URI(BaseURI), uri.getNodeValue());

         if (uriNew.getScheme().equals("http")) {
            cat.debug("I state that I can resolve " + uriNew.toString());

            return true;
         }

         cat.debug("I state that I can't resolve " + uriNew.toString());
      } catch (URI.MalformedURIException ex) {}

      return false;
   }
View Full Code Here

    */
   public XMLSignatureInput engineResolve(Attr uri, String BaseURI)
           throws ResourceResolverException {

      try {
         URI uriNew = new URI(new URI(BaseURI), uri.getNodeValue());

         // if the URI contains a fragment, ignore it
         URI uriNewNoFrag = new URI(uriNew);

         uriNewNoFrag.setFragment(null);

         String fileName =
            ResolverLocalFilesystem
               .translateUriToFilename(uriNewNoFrag.toString());
         FileInputStream inputStream = new FileInputStream(fileName);
         XMLSignatureInput result = new XMLSignatureInput(inputStream);

         result.setSourceURI(uriNew.toString());

View Full Code Here

      if (uriNodeValue.equals("") || uriNodeValue.startsWith("#")) {
         return false;
      }

      try {
         URI uriNew = new URI(new URI(BaseURI), uri.getNodeValue());

         cat.debug("I was asked whether I can resolve " + uriNew.toString());

         if (uriNew.getScheme().equals("file")) {
            cat.debug("I state that I can resolve " + uriNew.toString());

            return true;
         }
      } catch (Exception e) {}
View Full Code Here

      // cat.debug("We return a nodeset with " + resultNodes.getLength() + " nodes");
      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

        Set resultSet = dereferenceSameDocumentURI(selectedElem);
        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);
        }
        if (tlog.isDebugEnabled()) {
            t1 = System.currentTimeMillis();
View Full Code Here

      CipherData cd = _ed.getCipherData();
      CipherValue cv = cd.getCipherValue();
      // cv.setValue(base64EncodedEncryptedOctets.getBytes());
      cv.setValue(base64EncodedEncryptedOctets);

      _ed.setType(new URI(type).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

    CipherValue cv = _ek.getCipherData().getCipherValue();
    cv.setValue(base64EncodedEncryptedOctets);

        try {
            EncryptionMethod method = _factory.newEncryptionMethod(
                new URI(_algorithm).toString());
            _ek.setEncryptionMethod(method);
        } catch (URI.MalformedURIException mfue) {
            throw new XMLEncryptionException("empty", mfue);
        }
    return _ek;
View Full Code Here

TOP

Related Classes of org.apache.xml.utils.URI

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.