Class XMLSignatureInput

    • Constructor Detail

      • XMLSignatureInput

        protected XMLSignatureInput()
        Construct a XMLSignatureInput
      • XMLSignatureInput

        protected XMLSignatureInput​(Node rootNode)
        Construct a XMLSignatureInput from a subtree rooted by rootNode. This method included the node and all its descendants in the output.
        Parameters:
        rootNode -
      • XMLSignatureInput

        protected XMLSignatureInput​(Set<Node> nodeSet)
        Construct a XMLSignatureInput from a Set of Nodes.
        Parameters:
        nodeSet -
    • Method Detail

      • hasUnprocessedInput

        public abstract boolean hasUnprocessedInput()
        Returns:
        true if this instance still can provide the unprocessed input which was specified as the parameter of XMLSignatureInput
      • convertToNode

        protected abstract Node convertToNode()
                                       throws org.apache.xml.security.parser.XMLParserException,
                                              IOException
        Returns:
        data given in constructor converted to a Node or null if such conversion is not supported by this XMLSignatureInput
        Throws:
        org.apache.xml.security.parser.XMLParserException
        IOException
      • getInputNodeSet

        public Set<Node> getInputNodeSet()
        Get the Input NodeSet.
        Returns:
        the Input NodeSet.
      • getNodeSet

        public Set<Node> getNodeSet()
                             throws org.apache.xml.security.parser.XMLParserException,
                                    IOException
        Returns the node set from input which was specified as the parameter of XMLSignatureInput constructor

        Can call the convertToNode() to parse the Node from the input data. The internal state will change then.

        Returns:
        the node set
        Throws:
        org.apache.xml.security.parser.XMLParserException
        IOException
      • getSubNode

        public Node getSubNode()
        Gets the node of this XMLSignatureInput
        Returns:
        The excludeNode set.
      • addNodeFilter

        public void addNodeFilter​(NodeFilter filter)
                           throws org.apache.xml.security.parser.XMLParserException,
                                  IOException
        Parameters:
        filter -
        Throws:
        org.apache.xml.security.parser.XMLParserException
        IOException
      • getNodeFilters

        public final List<NodeFilter> getNodeFilters()
        Returns:
        the node filters
      • setNodeSet

        public final void setNodeSet​(boolean nodeSet)
        Parameters:
        nodeSet -
      • isNodeSet

        public boolean isNodeSet()
        Returns:
        true if the XMLSignatureInput(Set) was used or the node set was parsed from an input coming from another constructor.
      • isElement

        public boolean isElement()
        Determines if the object has been set up with an Element
        Returns:
        true if the object has been set up with an Element
      • getPreCalculatedDigest

        public String getPreCalculatedDigest()
        Returns:
        String given through constructor. Null by default, see extensions of this class.
      • getExcludeNode

        public Node getExcludeNode()
        Returns:
        the exclude node of this XMLSignatureInput
      • setExcludeNode

        public void setExcludeNode​(Node excludeNode)
        Sets the exclude node of this XMLSignatureInput
        Parameters:
        excludeNode - The excludeNode to set.
      • isExcludeComments

        public boolean isExcludeComments()
        Returns:
        Returns the excludeComments.
      • setExcludeComments

        public void setExcludeComments​(boolean excludeComments)
        Parameters:
        excludeComments - The excludeComments to set.
      • getSourceURI

        public String getSourceURI()
        Returns:
        Source URI
      • setSourceURI

        public void setSourceURI​(String sourceURI)
        Parameters:
        sourceURI -
      • getMIMEType

        public String getMIMEType()
        Some Transforms may require explicit MIME type, charset (IANA registered "character set"), or other such information concerning the data they are receiving from an earlier Transform or the source data, although no Transform algorithm specified in this document needs such explicit information.

        Such data characteristics are provided as parameters to the Transform algorithm and should be described in the specification for the algorithm.

        Returns:
        mimeType
      • setMIMEType

        public void setMIMEType​(String mimeType)
        Some Transforms may require explicit MIME type, charset (IANA registered "character set"), or other such information concerning the data they are receiving from an earlier Transform or the source data, although no Transform algorithm specified in this document needs such explicit information.

        Such data characteristics are provided as parameters to the Transform algorithm and should be described in the specification for the algorithm.

        Parameters:
        mimeType -
      • isNeedsToBeExpanded

        public boolean isNeedsToBeExpanded()
        Returns:
        true if the structure needs to be expanded.
      • setNeedsToBeExpanded

        public void setNeedsToBeExpanded​(boolean needsToBeExpanded)
        Set if the structure needs to be expanded.
        Parameters:
        needsToBeExpanded - true if so.
      • isSecureValidation

        public boolean isSecureValidation()
        Returns:
        true by default, enabled validation in r/w operations
      • setSecureValidation

        public void setSecureValidation​(boolean secureValidation)
        Set to false to disable validation in r/w operations.
        Parameters:
        secureValidation - default is true.
      • setOutputStream

        public void setOutputStream​(OutputStream outputStream)
        Parameters:
        outputStream - this stream will be ignored in write(OutputStream) method
      • toString

        public String toString()
        Creates a short description of this instance.
        Overrides:
        toString in class Object