/**
  * Creates an <code>XSLTTransformParameterSpec</code> with the specified
  * stylesheet.
  *
  * @param stylesheet the XSLT stylesheet to be used
  * @throws NullPointerException if <code>stylesheet</code> is
  *    <code>null</code>
  */
 public XSLTTransformParameterSpec(XMLStructure stylesheet)
 {
     if (stylesheet == null) {
     throw new java.lang.NullPointerException();
     }
     this.stylesheet = stylesheet;
 }
 /*
  * Creates an <code>XSLTTransformParameterSpec</code> with the specified
  * stylesheet.
  *
  * @param stylesheet the XSLT stylesheet to be used
  * @throws NullPointerException if <code>stylesheet</code> is
  *    <code>null</code>
  */
 public XSLTTransformParameterSpec(XMLStructure stylesheet)
 {
     if (stylesheet == null)
     {
         throw new java.lang.NullPointerException();
     }
     this.stylesheet = stylesheet;
 }
        public void marshalParams(XMLStructure parent, XMLCryptoContext context)
        {
            //LOG.Log(POILogger.DEBUG, "marshallParams(parent,context)");
            DOMStructure domParent  = (DOMStructure)parent;
            Element      parentNode = (Element)domParent.Node;
            // parentNode.AttributeNS=(/*setter*/XML_NS, "xmlns:mdssi", XML_DIGSIG_NS);
            Document doc = parentNode.OwnerDocument;

            foreach (String sourceId in sourceIds)
            {
                RelationshipReferenceDocument relRef          = RelationshipReferenceDocument.Factory.NewInstance();
                relRef.AddNewRelationshipReference().SourceId = (/*setter*/ sourceId);
                Node n = relRef.RelationshipReference.DomNode;
                n = doc.ImportNode(n, true);
                parentNode.AppendChild(n);
            }
        }
        public void Init(XMLStructure parent, XMLCryptoContext context)
        {
            LOG.Log(POILogger.DEBUG, "Init(parent,context)");
            LOG.Log(POILogger.DEBUG, "parent java type: " + parent.Class.Name);
            DOMStructure domParent  = (DOMStructure)parent;
            Node         parentNode = domParent.Node;

            try {
                TransformDocument transDoc = TransformDocument.Factory.Parse(parentNode);
                XmlObject[]       xoList   = transDoc.Transform.SelectChildren(RelationshipReferenceDocument.type.DocumentElementName);
                if (xoList.Length == 0)
                {
                    //LOG.Log(POILogger.WARN, "no RelationshipReference/@SourceId parameters present");
                }
                foreach (XmlObject xo in xoList)
                {
                    String sourceId = ((CTRelationshipReference)xo).SourceId;
                    LOG.Log(POILogger.DEBUG, "sourceId: ", sourceId);
                    this.sourceIds.Add(sourceId);
                }
            } catch (XmlException e) {
                throw new InvalidAlgorithmParameterException(e);
            }
        }
Example #5
0
 /**
  * Unmarshals a new <code>KeyInfo</code> instance from a
  * mechanism-specific <code>XMLStructure</code> (ex: {@link DOMStructure})
  * instance.
  *
  * @param xmlStructure a mechanism-specific XML structure from which to
  *   unmarshal the keyinfo from
  * @return the <code>KeyInfo</code>
  * @throws NullPointerException if <code>xmlStructure</code> is
  *   <code>null</code>
  * @throws ClassCastException if the type of <code>xmlStructure</code> is
  *   inappropriate for this factory
  * @throws MarshalException if an unrecoverable exception occurs during
  *   unmarshalling
  */
 public abstract KeyInfo unmarshalKeyInfo(XMLStructure xmlStructure);
Example #6
0
 /**
  * Marshals the algorithm-specific parameters. If there are no parameters
  * to be marshalled, this method returns without throwing an exception.
  *
  * @param parent a mechanism-specific structure containing the parent
  *    node that the marshalled parameters should be appended to
  * @param context the <code>XMLCryptoContext</code> containing
  *    additional context (may be <code>null</code> if not applicable)
  * @throws ClassCastException if the type of <code>parent</code> or
  *    <code>context</code> is not compatible with this
  *    <code>TransformService</code>
  * @throws NullPointerException if <code>parent</code> is <code>null</code>
  * @throws MarshalException if the parameters cannot be marshalled
  */
 public abstract void marshalParams(XMLStructure parent, XMLCryptoContext context);
Example #7
0
 /**
  * Initializes this <code>TransformService</code> with the specified
  * parameters and document context.
  *
  * @param parent a mechanism-specific structure containing the parent
  *    structure
  * @param context the <code>XMLCryptoContext</code> containing
  *    additional context (may be <code>null</code> if not applicable)
  * @throws ClassCastException if the type of <code>parent</code> or
  *    <code>context</code> is not compatible with this
  *    <code>TransformService</code>
  * @throws NullPointerException if <code>parent</code> is <code>null</code>
  * @throws InvalidAlgorithmParameterException if the specified parameters
  *   are invalid for this algorithm
  */
 public abstract void init(XMLStructure parent, XMLCryptoContext context);
Example #8
0
 /*
  * Unmarshals a new <code>KeyInfo</code> instance from a
  * mechanism-specific <code>XMLStructure</code> (ex: {@link DOMStructure})
  * instance.
  *
  * @param xmlStructure a mechanism-specific XML structure from which to
  *   unmarshal the keyinfo from
  * @return the <code>KeyInfo</code>
  * @throws NullPointerException if <code>xmlStructure</code> is
  *   <code>null</code>
  * @throws ClassCastException if the type of <code>xmlStructure</code> is
  *   inappropriate for this factory
  * @throws MarshalException if an unrecoverable exception occurs during
  *   unmarshalling
  */
 public abstract KeyInfo unmarshalKeyInfo(XMLStructure xmlStructure)
 ;// throws MarshalException;
Example #9
0
            (XMLValidateContext context);//throws MarshalException;

        /**
         * Unmarshals a new <code>XMLSignature</code> instance from a
         * mechanism-specific <code>XMLStructure</code> instance.
         * This method is useful if you only want to unmarshal (and not
         * validate) an <code>XMLSignature</code>.
         *
         * @param xmlStructure a mechanism-specific XML structure from which to
         *    unmarshal the signature from
         * @return the <code>XMLSignature</code>
         * @throws NullPointerException if <code>xmlStructure</code> is
         *    <code>null</code>
         * @throws ClassCastException if the type of <code>xmlStructure</code> is
         *    inappropriate for this factory
         * @throws MarshalException if an unrecoverable exception occurs
         *    during unmarshalling
         */
        public abstract XMLSignature unmarshalXMLSignature
            (XMLStructure xmlStructure);//throws MarshalException;
Example #10
0
            String algorithm, C14NMethodParameterSpec paramsJ);//

        //throws NoSuchAlgorithmException, InvalidAlgorithmParameterException;

        /**
         * Creates a <code>CanonicalizationMethod</code> for the specified
         * algorithm URI and parameters. The parameters are specified as a
         * mechanism-specific <code>XMLStructure</code> (ex: {@link DOMStructure}).
         * This method is useful when the parameters are in XML form or there is
         * no standard class for specifying the parameters.
         *
         * @param algorithm the URI identifying the canonicalization algorithm
         * @param params a mechanism-specific XML structure from which to
         *   unmarshal the parameters from (may be <code>null</code> if
         *   not required or optional)
         * @return the <code>CanonicalizationMethod</code>
         * @throws ClassCastException if the type of <code>params</code> is
         *   inappropriate for this <code>XMLSignatureFactory</code>
         * @throws InvalidAlgorithmParameterException if the specified parameters
         *    are inappropriate for the requested algorithm
         * @throws NoSuchAlgorithmException if an implementation of the
         *    specified algorithm cannot be found
         * @throws NullPointerException if <code>algorithm</code> is
         *    <code>null</code>
         */
        public abstract CanonicalizationMethod newCanonicalizationMethod(
            String algorithm, XMLStructure paramsJ);
Example #11
0
                                               TransformParameterSpec paramsJ);//throws NoSuchAlgorithmException,

        //InvalidAlgorithmParameterException;

        /**
         * Creates a <code>Transform</code> for the specified algorithm URI
         * and parameters. The parameters are specified as a mechanism-specific
         * <code>XMLStructure</code> (ex: {@link DOMStructure}). This method is
         * useful when the parameters are in XML form or there is no standard
         * class for specifying the parameters.
         *
         * @param algorithm the URI identifying the transform algorithm
         * @param params a mechanism-specific XML structure from which to
         *   unmarshal the parameters from (may be <code>null</code> if
         *   not required or optional)
         * @return the <code>Transform</code>
         * @throws ClassCastException if the type of <code>params</code> is
         *   inappropriate for this <code>XMLSignatureFactory</code>
         * @throws InvalidAlgorithmParameterException if the specified parameters
         *    are inappropriate for the requested algorithm
         * @throws NoSuchAlgorithmException if an implementation of the
         *    specified algorithm cannot be found
         * @throws NullPointerException if <code>algorithm</code> is
         *    <code>null</code>
         */
        public abstract Transform newTransform(String algorithm,
                                               XMLStructure paramsJ);//throws NoSuchAlgorithmException,
Example #12
0
        ;//throws MarshalException;

        /**
         * Initializes this <code>TransformService</code> with the specified
         * parameters and document context.
         *
         * @param parent a mechanism-specific structure containing the parent
         *    structure
         * @param context the <code>XMLCryptoContext</code> containing
         *    additional context (may be <code>null</code> if not applicable)
         * @throws ClassCastException if the type of <code>parent</code> or
         *    <code>context</code> is not compatible with this
         *    <code>TransformService</code>
         * @throws NullPointerException if <code>parent</code> is <code>null</code>
         * @throws InvalidAlgorithmParameterException if the specified parameters
         *   are invalid for this algorithm
         */
        public abstract void init(XMLStructure parent, XMLCryptoContext context)
        ;//throws InvalidAlgorithmParameterException;
Example #13
0
        ;//throws InvalidAlgorithmParameterException;

        /**
         * Marshals the algorithm-specific parameters. If there are no parameters
         * to be marshalled, this method returns without throwing an exception.
         *
         * @param parent a mechanism-specific structure containing the parent
         *    node that the marshalled parameters should be appended to
         * @param context the <code>XMLCryptoContext</code> containing
         *    additional context (may be <code>null</code> if not applicable)
         * @throws ClassCastException if the type of <code>parent</code> or
         *    <code>context</code> is not compatible with this
         *    <code>TransformService</code>
         * @throws NullPointerException if <code>parent</code> is <code>null</code>
         * @throws MarshalException if the parameters cannot be marshalled
         */
        public abstract void marshalParams
            (XMLStructure parent, XMLCryptoContext context)
        ;//throws MarshalException;
Example #14
0
 /**
  * Unmarshals a new <code>XMLSignature</code> instance from a
  * mechanism-specific <code>XMLStructure</code> instance.
  * This method is useful if you only want to unmarshal (and not
  * validate) an <code>XMLSignature</code>.
  *
  * @param xmlStructure a mechanism-specific XML structure from which to
  *    unmarshal the signature from
  * @return the <code>XMLSignature</code>
  * @throws NullPointerException if <code>xmlStructure</code> is
  *    <code>null</code>
  * @throws ClassCastException if the type of <code>xmlStructure</code> is
  *    inappropriate for this factory
  * @throws MarshalException if an unrecoverable exception occurs
  *    during unmarshalling
  */
 public abstract XMLSignature unmarshalXMLSignature(XMLStructure xmlStructure);
Example #15
0
 //InvalidAlgorithmParameterException;
 /**
  * Creates a <code>Transform</code> for the specified algorithm URI
  * and parameters. The parameters are specified as a mechanism-specific
  * <code>XMLStructure</code> (ex: {@link DOMStructure}). This method is
  * useful when the parameters are in XML form or there is no standard
  * class for specifying the parameters.
  *
  * @param algorithm the URI identifying the transform algorithm
  * @param params a mechanism-specific XML structure from which to
  *   unmarshal the parameters from (may be <code>null</code> if
  *   not required or optional)
  * @return the <code>Transform</code>
  * @throws ClassCastException if the type of <code>params</code> is
  *   inappropriate for this <code>XMLSignatureFactory</code>
  * @throws InvalidAlgorithmParameterException if the specified parameters
  *    are inappropriate for the requested algorithm
  * @throws NoSuchAlgorithmException if an implementation of the
  *    specified algorithm cannot be found
  * @throws NullPointerException if <code>algorithm</code> is
  *    <code>null</code>
  */
 public abstract Transform newTransform(String algorithm, 
 XMLStructure paramsJ);
Example #16
0
 //throws NoSuchAlgorithmException, InvalidAlgorithmParameterException;
 /**
  * Creates a <code>CanonicalizationMethod</code> for the specified
  * algorithm URI and parameters. The parameters are specified as a
  * mechanism-specific <code>XMLStructure</code> (ex: {@link DOMStructure}).
  * This method is useful when the parameters are in XML form or there is
  * no standard class for specifying the parameters.
  *
  * @param algorithm the URI identifying the canonicalization algorithm
  * @param params a mechanism-specific XML structure from which to
  *   unmarshal the parameters from (may be <code>null</code> if
  *   not required or optional)
  * @return the <code>CanonicalizationMethod</code>
  * @throws ClassCastException if the type of <code>params</code> is
  *   inappropriate for this <code>XMLSignatureFactory</code>
  * @throws InvalidAlgorithmParameterException if the specified parameters
  *    are inappropriate for the requested algorithm
  * @throws NoSuchAlgorithmException if an implementation of the
  *    specified algorithm cannot be found
  * @throws NullPointerException if <code>algorithm</code> is
  *    <code>null</code>
  */
 public abstract CanonicalizationMethod newCanonicalizationMethod(
 String algorithm, XMLStructure paramsJ);