Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

TXFMDocObject.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 2002-2005 The Apache Software Foundation.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 /*
00018  * XSEC
00019  *
00020  * TXFMDocObject := Class that takes an input Document object ID to start a txfm pipe
00021  *
00022  * Author(s): Berin Lautenbach
00023  *
00024  * $Id: TXFMDocObject.hpp,v 1.9 2005/02/03 13:50:12 milan Exp $
00025  *
00026  */
00027 
00028 #include <xsec/transformers/TXFMBase.hpp>
00029 #include <xsec/utils/XSECSafeBuffer.hpp>
00030 #include <xsec/framework/XSECEnv.hpp>
00031 
00032 // Xerces
00033 
00034 #include <xercesc/dom/DOM.hpp>
00035 
00042 class DSIG_EXPORT TXFMDocObject : public TXFMBase {
00043 
00044 public:
00045 
00046     TXFMDocObject(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc);
00047     ~TXFMDocObject();
00048 
00049     // Methods to set the inputs
00050 
00051     void setInput(TXFMBase *newInput);
00052     void setInput(
00053         XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, 
00054         const XMLCh * newFragmentId
00055     );
00056     void setInput(
00057         XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, 
00058         XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *newFragmentObject
00059     );
00060     void setInput(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc);
00061 
00062     // Environment - when searching for IDs we need to know about the user
00063     // environment (namely - how to handle ID attribute names)
00064 
00065     void setEnv(const XSECEnv * env);
00066 
00067     // Methods to get tranform output type and input requirement
00068 
00069     TXFMBase::ioType getInputType(void);
00070     TXFMBase::ioType getOutputType(void);
00071     TXFMBase::nodeType getNodeType(void);
00072 
00073     // Methods to get output data
00074 
00075     unsigned int readBytes(XMLByte * const toFill, const unsigned int maxToFill);
00076     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * getDocument();
00077     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMNode * getFragmentNode();
00078     virtual const XMLCh * getFragmentId();
00079     
00080 private:
00081 
00082     XMLCh   * fragmentId;               // The identifier of the object
00083     XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument 
00084             * document;                 // The DOM document we are working with
00085     XERCES_CPP_NAMESPACE_QUALIFIER DOMNode 
00086             * fragmentObject;           // The object that contains the doc fragment to use
00087     TXFMBase::nodeType type;            // The type of nodes this holds
00088 
00089     const XSECEnv * mp_env;
00090 
00091     
00092     TXFMDocObject();
00093 };
00094 

Generated on Sun Jul 3 17:37:26 2005 for XML-Security-C by  doxygen 1.4.2