public abstract class XSTransformer
extends java.lang.Object
getInstance(XSAlgorithmIdentifier) or getInstance(String).| Modifier and Type | Field and Description |
|---|---|
protected XSAlgorithmIdentifier |
transform
The
XSAlgorithmIdentifier instance used to instantiate this XSTransformer. |
| Modifier | Constructor and Description |
|---|---|
protected |
XSTransformer()
Creates a new
XSTransformer instance. |
protected |
XSTransformer(XSAlgorithmIdentifier trans)
Creates a new
XSTransformer instance, and checks that the given XSAlgorithmIdentifier is a XML-DSIG Transform element. |
| Modifier and Type | Method and Description |
|---|---|
static XMLContainer |
applyTransforms(XMLContainer source, java.util.Vector transformList)
Applies the specified transforms to the Node in the given DOMSource, and returns a
javax.xml.transform.Result with the results. |
abstract java.lang.String |
getAlgorithmURI()
Returns the URI string identifying the Transform algorithm.
|
static XSTransformer |
getInstance(java.lang.String uri)
Returns an instance of the
Transformer subclass identified by the given algorithm URI. |
static XSTransformer |
getInstance(XSAlgorithmIdentifier trans)
Returns an instance of the
Transformer subclass identified by the given XSAlgorithmIdentifier's Algorithm attribute. |
XSAlgorithmIdentifier |
getTransform()
Returns the
XSAlgorithmIdentifier containing the Transform element used to instantiate this XSTransformer. |
abstract XMLContainer |
transform(XMLContainer source)
Applies the transform to the given
XMLContainer and returns the result in a new XMLContainer. |
protected XSAlgorithmIdentifier transform
XSAlgorithmIdentifier instance used to instantiate this XSTransformer.protected XSTransformer()
XSTransformer instance.protected XSTransformer(XSAlgorithmIdentifier trans) throws java.lang.IllegalArgumentException
XSTransformer instance, and checks that the given XSAlgorithmIdentifier is a XML-DSIG Transform element. Subclasses should invoke this constructor as needed.trans - A XSAlgorithmIdentifier with local tag name "Transform".java.lang.IllegalArgumentException - If the given XSAlgorithmIdentifier is not a XML-DSIG Transform.public XSAlgorithmIdentifier getTransform()
XSAlgorithmIdentifier containing the Transform element used to instantiate this XSTransformer.XSAlgorithmIdentifier, or null if none has been set.public abstract XMLContainer transform(XMLContainer source) throws TransformationException
XMLContainer and returns the result in a new XMLContainer.
Implementing subclasses are responsible for ensuring that the given XMLContainer contains the input required, and for any needed conversions if it does not.
source - A XMLContainer on which the transform will operate.XMLContainer containing the transform result.TransformationException - if an error occurs during the transformation process.public abstract java.lang.String getAlgorithmURI()
public static XSTransformer getInstance(XSAlgorithmIdentifier trans) throws AlgorithmIdentifierException, java.lang.IllegalArgumentException
Transformer subclass identified by the given XSAlgorithmIdentifier's Algorithm attribute.trans - A XSAlgorithmIdentifier object containing the algorithm identifying the desired transformation, and any parameters required by the algorithm. If any parameters are specified in the XSAlgorithmIdentifier structure, the algorithm's target implementation class must have an accessible constructor taking a XSAlgorithmIdentifier as its only argument.AlgorithmIdentifierException - If a XSTransformer cannot be instantiated for the given algorithm.java.lang.IllegalArgumentException - If the given XSAlgorithmIdentifier is not a XML-DSIG Transform or it contains more than one parameter.public static XSTransformer getInstance(java.lang.String uri) throws AlgorithmIdentifierException
Transformer subclass identified by the given algorithm URI.uri - A URI identifying the desired transform algorithm.AlgorithmIdentifierException - If a XSTransformer cannot be instantiated for the given algorithm.public static XMLContainer applyTransforms(XMLContainer source, java.util.Vector transformList) throws TransformationException
javax.xml.transform.Result with the results.source - The XMLContainer to which the Transforms will be applied.transformList - An Vector containing the ordered list of Transforms to be applied.XMLContainer containing the final result of the Transforms.TransformationException - If a problem occurs while executing the Transforms.