Package javax.xml.crypto.dsig.spec

Examples of javax.xml.crypto.dsig.spec.XPathType


            } else {
                throw new IllegalStateException(String.format("XPATH %s has a filter %s not supported", xpathAndFilter.getXpath(),
                        xpathAndFilter.getFilter()));
            }

            XPathType xpathtype = namespaceMap == null ? new XPathType(xpathAndFilter.getXpath(), xpathFilter) : new XPathType(
                    xpathAndFilter.getXpath(), xpathFilter, namespaceMap);
            list.add(xpathtype);
        }
        return list;
    }
View Full Code Here


            String prefix = attr.getPrefix();
            if (prefix != null && prefix.equals("xmlns")) {
                  namespaceMap.put(attr.getLocalName(), attr.getValue());
                  }
                }
          list.add(new XPathType(xPath, filter, namespaceMap));
      } else {
          list.add(new XPathType(xPath, filter));
      }

      curXPathElem = DOMUtils.getNextSiblingElement(curXPathElem);
  }
        this.params = new XPathFilter2ParameterSpec(list);
View Full Code Here

        String prefix = DOMUtils.getNSPrefix(context, Transform.XPATH2);
  String qname = (prefix == null || prefix.length() == 0)
           ? "xmlns" : "xmlns:" + prefix;
  List list = xp.getXPathList();
  for (int i = 0, size = list.size(); i < size; i++) {
            XPathType xpathType = (XPathType) list.get(i);
            Element elem = DOMUtils.createElement
                (ownerDoc, "XPath", Transform.XPATH2, prefix);
            elem.appendChild
    (ownerDoc.createTextNode(xpathType.getExpression()));
      DOMUtils.setAttribute
    (elem, "Filter", xpathType.getFilter().toString());
            elem.setAttributeNS("http://www.w3.org/2000/xmlns/", qname,
          Transform.XPATH2);

            // add namespace attributes, if necessary
            Iterator it = xpathType.getNamespaceMap().entrySet().iterator();
            while (it.hasNext()) {
                Map.Entry entry = (Map.Entry) it.next();
                elem.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:"
                    + (String) entry.getKey(), (String) entry.getValue());
            }
View Full Code Here

      (XPathFilter2ParameterSpec) getParameterSpec();
        String prefix = DOMUtils.getNSPrefix(context, Transform.XPATH2);
  String qname = (prefix == null) ? "xmlns" : "xmlns:" + prefix;
  List list = xp.getXPathList();
  for (int i = 0, size = list.size(); i < size; i++) {
            XPathType xpathType = (XPathType) list.get(i);
            Element elem = DOMUtils.createElement
                (ownerDoc, "XPath", Transform.XPATH2, prefix);
            elem.appendChild
    (ownerDoc.createTextNode(xpathType.getExpression()));
      DOMUtils.setAttribute
    (elem, "Filter", xpathType.getFilter().toString());
            elem.setAttributeNS("http://www.w3.org/2000/xmlns/", qname,
          Transform.XPATH2);

            // add namespace attributes, if necessary
            Iterator it = xpathType.getNamespaceMap().entrySet().iterator();
            while (it.hasNext()) {
                Map.Entry entry = (Map.Entry) it.next();
                elem.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:"
                    + (String) entry.getKey(), (String) entry.getValue());
            }
View Full Code Here

            } else {
                throw new IllegalStateException(String.format("XPATH %s has a filter %s not supported", xpathAndFilter.getXpath(),
                        xpathAndFilter.getFilter()));
            }

            XPathType xpathtype = namespaceMap == null ? new XPathType(xpathAndFilter.getXpath(), xpathFilter) : new XPathType(
                    xpathAndFilter.getXpath(), xpathFilter, namespaceMap);
            list.add(xpathtype);
        }
        return list;
    }
View Full Code Here

            String prefix = attr.getPrefix();
            if (prefix != null && prefix.equals("xmlns")) {
                  namespaceMap.put(attr.getLocalName(), attr.getValue());
                  }
                }
          list.add(new XPathType(xPath, filter, namespaceMap));
      } else {
          list.add(new XPathType(xPath, filter));
      }

      curXPathElem = DOMUtils.getNextSiblingElement(curXPathElem);
  }
        this.params = new XPathFilter2ParameterSpec(list);
View Full Code Here

      (XPathFilter2ParameterSpec) getParameterSpec();
        String prefix = DOMUtils.getNSPrefix(context, Transform.XPATH2);
  String qname = (prefix == null) ? "xmlns" : "xmlns:" + prefix;
  List list = xp.getXPathList();
  for (int i = 0, size = list.size(); i < size; i++) {
            XPathType xpathType = (XPathType) list.get(i);
            Element elem = DOMUtils.createElement
                (ownerDoc, "XPath", Transform.XPATH2, prefix);
            elem.appendChild
    (ownerDoc.createTextNode(xpathType.getExpression()));
      DOMUtils.setAttribute
    (elem, "Filter", xpathType.getFilter().toString());
            elem.setAttributeNS("http://www.w3.org/2000/xmlns/", qname,
          Transform.XPATH2);

            // add namespace attributes, if necessary
            Iterator it = xpathType.getNamespaceMap().entrySet().iterator();
            while (it.hasNext()) {
                Map.Entry entry = (Map.Entry) it.next();
                elem.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:"
                    + (String) entry.getKey(), (String) entry.getValue());
            }
View Full Code Here

      TransformParameterSpec params = null;
      if (algo.equals(Transform.XPATH)) {
    params = new XPathFilterParameterSpec("xPath");
      } else if (algo.equals(Transform.XPATH2)) {
    params = new XPathFilter2ParameterSpec
        (Collections.singletonList(new XPathType
      ("xPath2", XPathType.Filter.INTERSECT)));
      } else if (algo.equals(Transform.XSLT)) {
    params = new XSLTTransformParameterSpec(new XSLTStructure());
      }
      try {
View Full Code Here

      TransformParameterSpec params = null;
      if (algo.equals(Transform.XPATH)) {
    params = new XPathFilterParameterSpec("xPath");
      } else if (algo.equals(Transform.XPATH2)) {
    params = new XPathFilter2ParameterSpec
        (Collections.singletonList(new XPathType
      ("xPath2", XPathType.Filter.INTERSECT)));
      } else if (algo.equals(Transform.XSLT)) {
    params = new XSLTTransformParameterSpec(new XSLTStructure());
      }
      tm = factory.newTransform(algo, params);
View Full Code Here

      TransformParameterSpec params = null;
      if (algo.equals(Transform.XPATH)) {
    params = new XPathFilterParameterSpec("xPath");
      } else if (algo.equals(Transform.XPATH2)) {
    params = new XPathFilter2ParameterSpec
        (Collections.singletonList(new XPathType
      ("xPath2", XPathType.Filter.INTERSECT)));
      } else if (algo.equals(Transform.XSLT)) {
    params = new XSLTTransformParameterSpec(new XSLTStructure());
      }
      try {
View Full Code Here

TOP

Related Classes of javax.xml.crypto.dsig.spec.XPathType

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.