Examples of HelperNodeList


Examples of org.apache.xml.security.utils.HelperNodeList

                + ") <= count(" + "\n"
                + " ancestor-or-self::prof:Object" + "\n"
                + ") " + "\n";

            xc.setXPath(xpath);
            HelperNodeList nl = new HelperNodeList();
            nl.appendChild(doc.createTextNode("\n"));
            nl.appendChild(xc.getElement());
            nl.appendChild(doc.createTextNode("\n"));

            transforms.addTransform(Transforms.TRANSFORM_XPATH, nl);
            transforms.addTransform(Transforms.TRANSFORM_C14N_WITH_COMMENTS);
            sig.addDocument("", transforms, Constants.ALGO_ID_DIGEST_SHA1);
        }
View Full Code Here

Examples of org.apache.xml.security.utils.HelperNodeList

     * @param doc
     * @param params
     * @return the nodelist with the data
     */
    public static NodeList newInstances(Document doc, String[][] params) {
        HelperNodeList nl = new HelperNodeList();

        XMLUtils.addReturnToElement(doc, nl);

        for (int i = 0; i < params.length; i++) {
            String type = params[i][0];
            String xpath = params[i][1];

            if (!(type.equals(XPath2FilterContainer._ATT_FILTER_VALUE_INTERSECT)
                || type.equals(XPath2FilterContainer._ATT_FILTER_VALUE_SUBTRACT)
                || type.equals(XPath2FilterContainer._ATT_FILTER_VALUE_UNION))) {
                throw new IllegalArgumentException("The type(" + i + ")=\"" + type
                                                   + "\" is illegal");
            }

            XPath2FilterContainer c = new XPath2FilterContainer(doc, xpath, type);

            nl.appendChild(c.getElement());
            XMLUtils.addReturnToElement(doc, nl);
        }

        return nl;
    }
View Full Code Here

Examples of org.apache.xml.security.utils.HelperNodeList

     * @throws InvalidTransformException
     */
    public Transform(Document doc, String algorithmURI, Element contextChild)
        throws InvalidTransformException {
        super(doc);
        HelperNodeList contextNodes = null;
       
        if (contextChild != null) {
            contextNodes = new HelperNodeList();
   
            XMLUtils.addReturnToElement(doc, contextNodes);
            contextNodes.appendChild(contextChild);
            XMLUtils.addReturnToElement(doc, contextNodes);
        }

        transformSpi = initializeTransform(algorithmURI, contextNodes);
    }
View Full Code Here

Examples of org.apache.xml.security.utils.HelperNodeList

    */
   public static final Transform getInstance(
           Document doc, String algorithmURI, Element contextChild)
              throws InvalidTransformException {

      HelperNodeList contextNodes = new HelperNodeList();

      contextNodes.appendChild(doc.createTextNode("\n"));
      contextNodes.appendChild(contextChild);
      contextNodes.appendChild(doc.createTextNode("\n"));

      return Transform.getInstance(doc, algorithmURI, contextNodes);
   }
View Full Code Here

Examples of org.apache.xml.security.utils.HelperNodeList

    * @param params
    *
    */
   public static NodeList newInstances(Document doc, String[][] params) {

      HelperNodeList nl = new HelperNodeList();

      nl.appendChild(doc.createTextNode("\n"));

      for (int i = 0; i < params.length; i++) {
         String type = params[i][0];
         String xpath = params[i][1];

         if (!(type.equals(XPath2FilterContainer
                 ._ATT_FILTER_VALUE_INTERSECT) || type
                    .equals(XPath2FilterContainer
                    ._ATT_FILTER_VALUE_SUBTRACT) || type
                       .equals(XPath2FilterContainer
                          ._ATT_FILTER_VALUE_UNION))) {
            throw new IllegalArgumentException("The type(" + i + ")=\"" + type
                                               + "\" is illegal");
         }

         XPath2FilterContainer c = new XPath2FilterContainer(doc, xpath, type);

         nl.appendChild(c.getElement());
         nl.appendChild(doc.createTextNode("\n"));
      }

      return nl;
   }
View Full Code Here

Examples of org.apache.xml.security.utils.HelperNodeList

           throws XMLSecurityException {

      super(element, BaseURI);

      NodeList children = this._constructionElement.getChildNodes();
      HelperNodeList nodes = new HelperNodeList();

      for (int i = 0; i < children.getLength(); i++) {
         if (children.item(i).getNodeType() == Node.ELEMENT_NODE) {
            nodes.appendChild(children.item(i));
         }
      }

      if (nodes.getLength() == 0) {
         Object exArgs[] = { "Elements", Constants._TAG_X509DATA };

         throw new XMLSecurityException("xml.WrongContent", exArgs);
      }

      for (int i = 0; i < nodes.getLength(); i++) {
         Element currentElem = (Element) nodes.item(i);
         String localname = currentElem.getLocalName();

         if (currentElem.getNamespaceURI().equals(Constants.SignatureSpecNS)) {
            if (localname.equals(Constants._TAG_X509ISSUERSERIAL)) {
               XMLX509IssuerSerial is = new XMLX509IssuerSerial(currentElem,
View Full Code Here

Examples of org.apache.xml.security.utils.HelperNodeList

         if (true) {
            _filterTypes.add(FUnion);

            // Set root = new HashSet(); root.add(inputDoc);
            HelperNodeList root = new HelperNodeList();

            root.appendChild(inputDoc);
            _filterNodes.add(root);
         }

         for (int i = 0; i < noOfSteps; i++) {
            Element xpathElement =
View Full Code Here

Examples of org.apache.xml.security.utils.HelperNodeList

         if (true) {
            _filterTypes.add(FUnion);

            // Set root = new HashSet(); root.add(inputDoc);
            HelperNodeList root = new HelperNodeList();

            root.appendChild(inputDoc);
            _filterNodes.add(root);
         }

         for (int i = 0; i < noOfSteps; i++) {
            Element xpathElement =XMLUtils.selectNode(
View Full Code Here

Examples of org.apache.xml.security.utils.HelperNodeList

    */
   public static final Transform getInstance(
           Document doc, String algorithmURI, Element contextChild)
              throws InvalidTransformException {

      HelperNodeList contextNodes = new HelperNodeList();

      contextNodes.appendChild(doc.createTextNode("\n"));
      contextNodes.appendChild(contextChild);
      contextNodes.appendChild(doc.createTextNode("\n"));

      return Transform.getInstance(doc, algorithmURI, contextNodes);
   }
View Full Code Here

Examples of org.apache.xml.security.utils.HelperNodeList

    * @param params
    * @return
    */
   public static NodeList newInstances(Document doc, String[][] params) {

      HelperNodeList nl = new HelperNodeList();

      nl.appendChild(doc.createTextNode("\n"));

      for (int i = 0; i < params.length; i++) {
         String type = params[i][0];
         String xpath = params[i][1];

         if (!(type.equals(XPath2FilterContainer
                 ._ATT_FILTER_VALUE_INTERSECT) || type
                    .equals(XPath2FilterContainer
                    ._ATT_FILTER_VALUE_SUBTRACT) || type
                       .equals(XPath2FilterContainer
                          ._ATT_FILTER_VALUE_UNION))) {
            throw new IllegalArgumentException("The type(" + i + ")=\"" + type
                                               + "\" is illegal");
         }

         XPath2FilterContainer c = new XPath2FilterContainer(doc, xpath, type);

         nl.appendChild(c.getElement());
         nl.appendChild(doc.createTextNode("\n"));
      }

      return nl;
   }
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.