Java Code Examples for com.sun.org.apache.xml.internal.security.utils.XMLUtils#getSet()

The following examples show how to use com.sun.org.apache.xml.internal.security.utils.XMLUtils#getSet() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ApacheNodeSetData.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
private Set<Node> getNodeSet(List<NodeFilter> nodeFilters) {
    if (xi.isNeedsToBeExpanded()) {
        XMLUtils.circumventBug2650
            (XMLUtils.getOwnerDocument(xi.getSubNode()));
    }

    Set<Node> inputSet = new LinkedHashSet<Node>();
    XMLUtils.getSet(xi.getSubNode(), inputSet,
                    null, !xi.isExcludeComments());
    Set<Node> nodeSet = new LinkedHashSet<Node>();
    for (Node currentNode : inputSet) {
        Iterator<NodeFilter> it = nodeFilters.iterator();
        boolean skipNode = false;
        while (it.hasNext() && !skipNode) {
            NodeFilter nf = it.next();
            if (nf.isNodeInclude(currentNode) != 1) {
                skipNode = true;
            }
        }
        if (!skipNode) {
            nodeSet.add(currentNode);
        }
    }
    return nodeSet;
}
 
Example 2
Source File: XMLSignatureInput.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns the node set from input which was specified as the parameter of
 * {@link XMLSignatureInput} constructor
 * @param circumvent
 *
 * @return the node set
 * @throws SAXException
 * @throws IOException
 * @throws ParserConfigurationException
 * @throws CanonicalizationException
 */
public Set<Node> getNodeSet(boolean circumvent) throws ParserConfigurationException,
    IOException, SAXException, CanonicalizationException {
    if (inputNodeSet != null) {
        return inputNodeSet;
    }
    if (inputOctetStreamProxy == null && subNode != null) {
        if (circumvent) {
            XMLUtils.circumventBug2650(XMLUtils.getOwnerDocument(subNode));
        }
        inputNodeSet = new LinkedHashSet<Node>();
        XMLUtils.getSet(subNode, inputNodeSet, excludeNode, excludeComments);
        return inputNodeSet;
    } else if (isOctetStream()) {
        convertToNodes();
        Set<Node> result = new LinkedHashSet<Node>();
        XMLUtils.getSet(subNode, result, null, false);
        return result;
    }

    throw new RuntimeException("getNodeSet() called but no input data present");
}
 
Example 3
Source File: ApacheNodeSetData.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private Set<Node> getNodeSet(List<NodeFilter> nodeFilters) {
    if (xi.isNeedsToBeExpanded()) {
        XMLUtils.circumventBug2650
            (XMLUtils.getOwnerDocument(xi.getSubNode()));
    }

    Set<Node> inputSet = new LinkedHashSet<Node>();
    XMLUtils.getSet(xi.getSubNode(), inputSet,
                    null, !xi.isExcludeComments());
    Set<Node> nodeSet = new LinkedHashSet<Node>();
    for (Node currentNode : inputSet) {
        Iterator<NodeFilter> it = nodeFilters.iterator();
        boolean skipNode = false;
        while (it.hasNext() && !skipNode) {
            NodeFilter nf = it.next();
            if (nf.isNodeInclude(currentNode) != 1) {
                skipNode = true;
            }
        }
        if (!skipNode) {
            nodeSet.add(currentNode);
        }
    }
    return nodeSet;
}
 
Example 4
Source File: ApacheNodeSetData.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
private Set<Node> getNodeSet(List<NodeFilter> nodeFilters) {
    if (xi.isNeedsToBeExpanded()) {
        XMLUtils.circumventBug2650
            (XMLUtils.getOwnerDocument(xi.getSubNode()));
    }

    Set<Node> inputSet = new LinkedHashSet<Node>();
    XMLUtils.getSet(xi.getSubNode(), inputSet,
                    null, !xi.isExcludeComments());
    Set<Node> nodeSet = new LinkedHashSet<Node>();
    for (Node currentNode : inputSet) {
        Iterator<NodeFilter> it = nodeFilters.iterator();
        boolean skipNode = false;
        while (it.hasNext() && !skipNode) {
            NodeFilter nf = it.next();
            if (nf.isNodeInclude(currentNode) != 1) {
                skipNode = true;
            }
        }
        if (!skipNode) {
            nodeSet.add(currentNode);
        }
    }
    return nodeSet;
}
 
Example 5
Source File: ApacheNodeSetData.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
private Set<Node> getNodeSet(List<NodeFilter> nodeFilters) {
    if (xi.isNeedsToBeExpanded()) {
        XMLUtils.circumventBug2650
            (XMLUtils.getOwnerDocument(xi.getSubNode()));
    }

    Set<Node> inputSet = new LinkedHashSet<Node>();
    XMLUtils.getSet(xi.getSubNode(), inputSet,
                    null, !xi.isExcludeComments());
    Set<Node> nodeSet = new LinkedHashSet<Node>();
    for (Node currentNode : inputSet) {
        Iterator<NodeFilter> it = nodeFilters.iterator();
        boolean skipNode = false;
        while (it.hasNext() && !skipNode) {
            NodeFilter nf = it.next();
            if (nf.isNodeInclude(currentNode) != 1) {
                skipNode = true;
            }
        }
        if (!skipNode) {
            nodeSet.add(currentNode);
        }
    }
    return nodeSet;
}
 
Example 6
Source File: XMLSignatureInput.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns the node set from input which was specified as the parameter of
 * {@link XMLSignatureInput} constructor
 * @param circumvent
 *
 * @return the node set
 * @throws SAXException
 * @throws IOException
 * @throws ParserConfigurationException
 * @throws CanonicalizationException
 */
public Set<Node> getNodeSet(boolean circumvent) throws ParserConfigurationException,
    IOException, SAXException, CanonicalizationException {
    if (inputNodeSet != null) {
        return inputNodeSet;
    }
    if (inputOctetStreamProxy == null && subNode != null) {
        if (circumvent) {
            XMLUtils.circumventBug2650(XMLUtils.getOwnerDocument(subNode));
        }
        inputNodeSet = new LinkedHashSet<Node>();
        XMLUtils.getSet(subNode, inputNodeSet, excludeNode, excludeComments);
        return inputNodeSet;
    } else if (isOctetStream()) {
        convertToNodes();
        Set<Node> result = new LinkedHashSet<Node>();
        XMLUtils.getSet(subNode, result, null, false);
        return result;
    }

    throw new RuntimeException("getNodeSet() called but no input data present");
}
 
Example 7
Source File: XMLSignatureInput.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns the node set from input which was specified as the parameter of
 * {@link XMLSignatureInput} constructor
 * @param circumvent
 *
 * @return the node set
 * @throws SAXException
 * @throws IOException
 * @throws ParserConfigurationException
 * @throws CanonicalizationException
 */
public Set<Node> getNodeSet(boolean circumvent) throws ParserConfigurationException,
    IOException, SAXException, CanonicalizationException {
    if (inputNodeSet != null) {
        return inputNodeSet;
    }
    if (inputOctetStreamProxy == null && subNode != null) {
        if (circumvent) {
            XMLUtils.circumventBug2650(XMLUtils.getOwnerDocument(subNode));
        }
        inputNodeSet = new LinkedHashSet<Node>();
        XMLUtils.getSet(subNode, inputNodeSet, excludeNode, excludeComments);
        return inputNodeSet;
    } else if (isOctetStream()) {
        convertToNodes();
        Set<Node> result = new LinkedHashSet<Node>();
        XMLUtils.getSet(subNode, result, null, false);
        return result;
    }

    throw new RuntimeException("getNodeSet() called but no input data present");
}
 
Example 8
Source File: XMLSignatureInput.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns the node set from input which was specified as the parameter of
 * {@link XMLSignatureInput} constructor
 * @param circumvent
 *
 * @return the node set
 * @throws SAXException
 * @throws IOException
 * @throws ParserConfigurationException
 * @throws CanonicalizationException
 */
public Set<Node> getNodeSet(boolean circumvent) throws ParserConfigurationException,
    IOException, SAXException, CanonicalizationException {
    if (inputNodeSet != null) {
        return inputNodeSet;
    }
    if (inputOctetStreamProxy == null && subNode != null) {
        if (circumvent) {
            XMLUtils.circumventBug2650(XMLUtils.getOwnerDocument(subNode));
        }
        inputNodeSet = new LinkedHashSet<Node>();
        XMLUtils.getSet(subNode, inputNodeSet, excludeNode, excludeComments);
        return inputNodeSet;
    } else if (isOctetStream()) {
        convertToNodes();
        Set<Node> result = new LinkedHashSet<Node>();
        XMLUtils.getSet(subNode, result, null, false);
        return result;
    }

    throw new RuntimeException("getNodeSet() called but no input data present");
}
 
Example 9
Source File: ApacheNodeSetData.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private Set<Node> getNodeSet(List<NodeFilter> nodeFilters) {
    if (xi.isNeedsToBeExpanded()) {
        XMLUtils.circumventBug2650
            (XMLUtils.getOwnerDocument(xi.getSubNode()));
    }

    Set<Node> inputSet = new LinkedHashSet<Node>();
    XMLUtils.getSet(xi.getSubNode(), inputSet,
                    null, !xi.isExcludeComments());
    Set<Node> nodeSet = new LinkedHashSet<Node>();
    for (Node currentNode : inputSet) {
        Iterator<NodeFilter> it = nodeFilters.iterator();
        boolean skipNode = false;
        while (it.hasNext() && !skipNode) {
            NodeFilter nf = it.next();
            if (nf.isNodeInclude(currentNode) != 1) {
                skipNode = true;
            }
        }
        if (!skipNode) {
            nodeSet.add(currentNode);
        }
    }
    return nodeSet;
}
 
Example 10
Source File: XMLSignatureInput.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns the node set from input which was specified as the parameter of
 * {@link XMLSignatureInput} constructor
 * @param circumvent
 *
 * @return the node set
 * @throws SAXException
 * @throws IOException
 * @throws ParserConfigurationException
 * @throws CanonicalizationException
 */
public Set<Node> getNodeSet(boolean circumvent) throws ParserConfigurationException,
    IOException, SAXException, CanonicalizationException {
    if (inputNodeSet != null) {
        return inputNodeSet;
    }
    if (inputOctetStreamProxy == null && subNode != null) {
        if (circumvent) {
            XMLUtils.circumventBug2650(XMLUtils.getOwnerDocument(subNode));
        }
        inputNodeSet = new LinkedHashSet<Node>();
        XMLUtils.getSet(subNode, inputNodeSet, excludeNode, excludeComments);
        return inputNodeSet;
    } else if (isOctetStream()) {
        convertToNodes();
        Set<Node> result = new LinkedHashSet<Node>();
        XMLUtils.getSet(subNode, result, null, false);
        return result;
    }

    throw new RuntimeException("getNodeSet() called but no input data present");
}
 
Example 11
Source File: XMLSignatureInput.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * Returns the node set from input which was specified as the parameter of
 * {@link XMLSignatureInput} constructor
 * @param circumvent
 *
 * @return the node set
 * @throws SAXException
 * @throws IOException
 * @throws ParserConfigurationException
 * @throws CanonicalizationException
 */
public Set<Node> getNodeSet(boolean circumvent) throws ParserConfigurationException,
    IOException, SAXException, CanonicalizationException {
    if (inputNodeSet != null) {
        return inputNodeSet;
    }
    if (inputOctetStreamProxy == null && subNode != null) {
        if (circumvent) {
            XMLUtils.circumventBug2650(XMLUtils.getOwnerDocument(subNode));
        }
        inputNodeSet = new LinkedHashSet<Node>();
        XMLUtils.getSet(subNode, inputNodeSet, excludeNode, excludeComments);
        return inputNodeSet;
    } else if (isOctetStream()) {
        convertToNodes();
        Set<Node> result = new LinkedHashSet<Node>();
        XMLUtils.getSet(subNode, result, null, false);
        return result;
    }

    throw new RuntimeException("getNodeSet() called but no input data present");
}
 
Example 12
Source File: XMLSignatureInput.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns the node set from input which was specified as the parameter of
 * {@link XMLSignatureInput} constructor
 * @param circumvent
 *
 * @return the node set
 * @throws SAXException
 * @throws IOException
 * @throws ParserConfigurationException
 * @throws CanonicalizationException
 */
public Set<Node> getNodeSet(boolean circumvent) throws ParserConfigurationException,
    IOException, SAXException, CanonicalizationException {
    if (inputNodeSet != null) {
        return inputNodeSet;
    }
    if (inputOctetStreamProxy == null && subNode != null) {
        if (circumvent) {
            XMLUtils.circumventBug2650(XMLUtils.getOwnerDocument(subNode));
        }
        inputNodeSet = new LinkedHashSet<Node>();
        XMLUtils.getSet(subNode, inputNodeSet, excludeNode, excludeComments);
        return inputNodeSet;
    } else if (isOctetStream()) {
        convertToNodes();
        Set<Node> result = new LinkedHashSet<Node>();
        XMLUtils.getSet(subNode, result, null, false);
        return result;
    }

    throw new RuntimeException("getNodeSet() called but no input data present");
}
 
Example 13
Source File: XMLSignatureInput.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns the node set from input which was specified as the parameter of
 * {@link XMLSignatureInput} constructor
 * @param circumvent
 *
 * @return the node set
 * @throws SAXException
 * @throws IOException
 * @throws ParserConfigurationException
 * @throws CanonicalizationException
 */
public Set<Node> getNodeSet(boolean circumvent) throws ParserConfigurationException,
    IOException, SAXException, CanonicalizationException {
    if (inputNodeSet != null) {
        return inputNodeSet;
    }
    if (inputOctetStreamProxy == null && subNode != null) {
        if (circumvent) {
            XMLUtils.circumventBug2650(XMLUtils.getOwnerDocument(subNode));
        }
        inputNodeSet = new LinkedHashSet<Node>();
        XMLUtils.getSet(subNode, inputNodeSet, excludeNode, excludeComments);
        return inputNodeSet;
    } else if (isOctetStream()) {
        convertToNodes();
        Set<Node> result = new LinkedHashSet<Node>();
        XMLUtils.getSet(subNode, result, null, false);
        return result;
    }

    throw new RuntimeException("getNodeSet() called but no input data present");
}
 
Example 14
Source File: XMLSignatureInput.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * Returns the node set from input which was specified as the parameter of
 * {@link XMLSignatureInput} constructor
 * @param circumvent
 *
 * @return the node set
 * @throws SAXException
 * @throws IOException
 * @throws ParserConfigurationException
 * @throws CanonicalizationException
 */
public Set<Node> getNodeSet(boolean circumvent) throws ParserConfigurationException,
    IOException, SAXException, CanonicalizationException {
    if (inputNodeSet != null) {
        return inputNodeSet;
    }
    if (inputOctetStreamProxy == null && subNode != null) {
        if (circumvent) {
            XMLUtils.circumventBug2650(XMLUtils.getOwnerDocument(subNode));
        }
        inputNodeSet = new LinkedHashSet<Node>();
        XMLUtils.getSet(subNode, inputNodeSet, excludeNode, excludeComments);
        return inputNodeSet;
    } else if (isOctetStream()) {
        convertToNodes();
        Set<Node> result = new LinkedHashSet<Node>();
        XMLUtils.getSet(subNode, result, null, false);
        return result;
    }

    throw new RuntimeException("getNodeSet() called but no input data present");
}
 
Example 15
Source File: XMLSignatureInput.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns the node set from input which was specified as the parameter of
 * {@link XMLSignatureInput} constructor
 * @param circumvent
 *
 * @return the node set
 * @throws SAXException
 * @throws IOException
 * @throws ParserConfigurationException
 * @throws CanonicalizationException
 */
public Set<Node> getNodeSet(boolean circumvent) throws ParserConfigurationException,
    IOException, SAXException, CanonicalizationException {
    if (inputNodeSet != null) {
        return inputNodeSet;
    }
    if (inputOctetStreamProxy == null && subNode != null) {
        if (circumvent) {
            XMLUtils.circumventBug2650(XMLUtils.getOwnerDocument(subNode));
        }
        inputNodeSet = new LinkedHashSet<Node>();
        XMLUtils.getSet(subNode, inputNodeSet, excludeNode, excludeComments);
        return inputNodeSet;
    } else if (isOctetStream()) {
        convertToNodes();
        Set<Node> result = new LinkedHashSet<Node>();
        XMLUtils.getSet(subNode, result, null, false);
        return result;
    }

    throw new RuntimeException("getNodeSet() called but no input data present");
}
 
Example 16
Source File: ApacheNodeSetData.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
private Set<Node> getNodeSet(List<NodeFilter> nodeFilters) {
    if (xi.isNeedsToBeExpanded()) {
        XMLUtils.circumventBug2650
            (XMLUtils.getOwnerDocument(xi.getSubNode()));
    }

    Set<Node> inputSet = new LinkedHashSet<Node>();
    XMLUtils.getSet(xi.getSubNode(), inputSet,
                    null, !xi.isExcludeComments());
    Set<Node> nodeSet = new LinkedHashSet<Node>();
    for (Node currentNode : inputSet) {
        Iterator<NodeFilter> it = nodeFilters.iterator();
        boolean skipNode = false;
        while (it.hasNext() && !skipNode) {
            NodeFilter nf = it.next();
            if (nf.isNodeInclude(currentNode) != 1) {
                skipNode = true;
            }
        }
        if (!skipNode) {
            nodeSet.add(currentNode);
        }
    }
    return nodeSet;
}
 
Example 17
Source File: XMLSignatureInput.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns the node set from input which was specified as the parameter of
 * {@link XMLSignatureInput} constructor
 * @param circumvent
 *
 * @return the node set
 * @throws SAXException
 * @throws IOException
 * @throws ParserConfigurationException
 * @throws CanonicalizationException
 */
public Set<Node> getNodeSet(boolean circumvent) throws ParserConfigurationException,
    IOException, SAXException, CanonicalizationException {
    if (inputNodeSet != null) {
        return inputNodeSet;
    }
    if (inputOctetStreamProxy == null && subNode != null) {
        if (circumvent) {
            XMLUtils.circumventBug2650(XMLUtils.getOwnerDocument(subNode));
        }
        inputNodeSet = new LinkedHashSet<Node>();
        XMLUtils.getSet(subNode, inputNodeSet, excludeNode, excludeComments);
        return inputNodeSet;
    } else if (isOctetStream()) {
        convertToNodes();
        Set<Node> result = new LinkedHashSet<Node>();
        XMLUtils.getSet(subNode, result, null, false);
        return result;
    }

    throw new RuntimeException("getNodeSet() called but no input data present");
}
 
Example 18
Source File: ApacheNodeSetData.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
private Set<Node> getNodeSet(List<NodeFilter> nodeFilters) {
    if (xi.isNeedsToBeExpanded()) {
        XMLUtils.circumventBug2650
            (XMLUtils.getOwnerDocument(xi.getSubNode()));
    }

    Set<Node> inputSet = new LinkedHashSet<Node>();
    XMLUtils.getSet(xi.getSubNode(), inputSet,
                    null, !xi.isExcludeComments());
    Set<Node> nodeSet = new LinkedHashSet<Node>();
    for (Node currentNode : inputSet) {
        Iterator<NodeFilter> it = nodeFilters.iterator();
        boolean skipNode = false;
        while (it.hasNext() && !skipNode) {
            NodeFilter nf = it.next();
            if (nf.isNodeInclude(currentNode) != 1) {
                skipNode = true;
            }
        }
        if (!skipNode) {
            nodeSet.add(currentNode);
        }
    }
    return nodeSet;
}
 
Example 19
Source File: XMLSignatureInput.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns the node set from input which was specified as the parameter of
 * {@link XMLSignatureInput} constructor
 * @param circumvent
 *
 * @return the node set
 * @throws SAXException
 * @throws IOException
 * @throws ParserConfigurationException
 * @throws CanonicalizationException
 */
public Set<Node> getNodeSet(boolean circumvent) throws ParserConfigurationException,
    IOException, SAXException, CanonicalizationException {
    if (inputNodeSet != null) {
        return inputNodeSet;
    }
    if (inputOctetStreamProxy == null && subNode != null) {
        if (circumvent) {
            XMLUtils.circumventBug2650(XMLUtils.getOwnerDocument(subNode));
        }
        inputNodeSet = new LinkedHashSet<Node>();
        XMLUtils.getSet(subNode, inputNodeSet, excludeNode, excludeComments);
        return inputNodeSet;
    } else if (isOctetStream()) {
        convertToNodes();
        Set<Node> result = new LinkedHashSet<Node>();
        XMLUtils.getSet(subNode, result, null, false);
        return result;
    }

    throw new RuntimeException("getNodeSet() called but no input data present");
}
 
Example 20
Source File: ApacheNodeSetData.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
private Set<Node> getNodeSet(List<NodeFilter> nodeFilters) {
    if (xi.isNeedsToBeExpanded()) {
        XMLUtils.circumventBug2650
            (XMLUtils.getOwnerDocument(xi.getSubNode()));
    }

    Set<Node> inputSet = new LinkedHashSet<Node>();
    XMLUtils.getSet(xi.getSubNode(), inputSet,
                    null, !xi.isExcludeComments());
    Set<Node> nodeSet = new LinkedHashSet<Node>();
    for (Node currentNode : inputSet) {
        Iterator<NodeFilter> it = nodeFilters.iterator();
        boolean skipNode = false;
        while (it.hasNext() && !skipNode) {
            NodeFilter nf = it.next();
            if (nf.isNodeInclude(currentNode) != 1) {
                skipNode = true;
            }
        }
        if (!skipNode) {
            nodeSet.add(currentNode);
        }
    }
    return nodeSet;
}