コード例 #1
0
        /* Function returs all the inputs in a ServiceProfile
         *
         * Inputs: none
         *
         * Return values: an array of inputs
         */
        private IOType[] GetInputParameters()
        {
            ArrayList lstInputs = new ArrayList();

            try
            {
                XmlNode root = m_doc.DocumentElement;

                // Create Expression Builder instance
                IIOPEXPathExprBuilder IBuilder = IOPEXPathExprBuilderFactory.CreateInstance(enuIOPEType.Input);
                // Build XPath Expression
                string strXPathExpr = DamlConstants.SERVICE_PROFILE + IBuilder.BuildExpression(enuIOPESearchBy.PARAM_DESC);

                XmlNodeList nodeList = root.SelectNodes(strXPathExpr, m_mgr);

                foreach (XmlNode descNode in nodeList)
                {
                    IOType input = GetIONodeData(descNode);

                    if (input.isValid)
                    {
                        lstInputs.Add(input);
                    }
                }
            }
            catch (Exception /*e*/)
            {
            }

            return((IOType[])lstInputs.ToArray(typeof(IOType)));
        }
コード例 #2
0
        /* Function returs all the preconditions in a ServiceProfile
         *
         * Inputs: none
         *
         * Return values: an array of preconditions
         */
        private EPType[] GetPreconditions()
        {
            ArrayList lstPreconds = new ArrayList();

            try
            {
                XmlNode root = m_doc.DocumentElement;

                // Create Expression Builder instance
                IIOPEXPathExprBuilder IBuilder = IOPEXPathExprBuilderFactory.CreateInstance(enuIOPEType.Precondition);
                // Build XPath Expression
                string strXPathExpr = DamlConstants.SERVICE_PROFILE + IBuilder.BuildExpression(enuIOPESearchBy.COND_DESC);

                XmlNodeList nodeList = root.SelectNodes(strXPathExpr, m_mgr);

                foreach (XmlNode descNode in nodeList)
                {
                    EPType precond = this.GetEPNodeData(descNode);

                    if (precond.isValid)
                    {
                        lstPreconds.Add(precond);
                    }
                }
            }
            catch (Exception /*e*/)
            {
            }

            return((EPType[])lstPreconds.ToArray(typeof(EPType)));
        }
コード例 #3
0
        /* Function returns the data of an effect based on its description
         *
         * Inputs: strDesc - description of effect to retrieve data about
         *
         * Return value: the EPType data structure of the effect
         */
        public EPType GetEffectByDescription(string strDesc)
        {
            // Create Expression Builder instance
            IIOPEXPathExprBuilder IBuilder = IOPEXPathExprBuilderFactory.CreateInstance(enuIOPEType.Effect);
            // Build XPath Expression
            string  strXPathExpr = DamlConstants.SERVICE_PROFILE + IBuilder.BuildExpression(enuIOPESearchBy.COND_DESC, strDesc);
            XmlNode root         = m_doc.DocumentElement;
            XmlNode node         = root.SelectSingleNode(strXPathExpr, m_mgr);

            EPType epData = GetEPNodeData(node);

            return(epData);
        }
コード例 #4
0
        /* Function returns the data of an effect based on a refersTo statement
         *
         * Inputs: strRef - reference of effect to retrieve data about
         *
         * Return value: the EPType data structure of the effect
         */
        public EPType GetEffectByReference(string strRef)
        {
            // Create Expression Builder instance
            IIOPEXPathExprBuilder IBuilder = IOPEXPathExprBuilderFactory.CreateInstance(enuIOPEType.Effect);
            // Build XPath Expression
            string  strXPathExpr = DamlConstants.SERVICE_PROFILE + IBuilder.BuildExpression(enuIOPESearchBy.REFERS_TO, strRef);
            XmlNode root         = m_doc.DocumentElement;
            XmlNode node         = root.SelectSingleNode(strXPathExpr, m_mgr);

            node = node.ParentNode;

            EPType epData = GetEPNodeData(node);

            return(epData);
        }
コード例 #5
0
        /* Function returns the data of a named precondition
         *
         * Inputs: strName - name of precondition to retrieve data about
         *
         * Return value: the EPType data structure of the named precondition
         */
        public EPType GetPreconditionByName(string strName)
        {
            // Create Expression Builder instance
            IIOPEXPathExprBuilder IBuilder = IOPEXPathExprBuilderFactory.CreateInstance(enuIOPEType.Precondition);
            // Build XPath Expression
            string  strXPathExpr = DamlConstants.SERVICE_PROFILE + IBuilder.BuildExpression(enuIOPESearchBy.COND_NAME, strName);
            XmlNode root         = m_doc.DocumentElement;
            XmlNode node         = root.SelectSingleNode(strXPathExpr, m_mgr);

            node = node.ParentNode;

            EPType epData = GetEPNodeData(node);

            return(epData);
        }
コード例 #6
0
        /* Function returns the data of a named output
         *
         * Inputs: strName - name of output to retrieve data about
         *
         * Return value: the IOType data structure of the named output
         */
        public IOType GetOutputByName(string strName)
        {
            // Create Expression Builder instance
            IIOPEXPathExprBuilder IBuilder = IOPEXPathExprBuilderFactory.CreateInstance(enuIOPEType.Output);
            // Build XPath Expression
            string  strXPathExpr = DamlConstants.SERVICE_PROFILE + IBuilder.BuildExpression(enuIOPESearchBy.PARAM_NAME, strName);
            XmlNode root         = m_doc.DocumentElement;
            XmlNode node         = root.SelectSingleNode(strXPathExpr, m_mgr);

            node = node.ParentNode;

            IOType ioData = GetIONodeData(node);

            return(ioData);
        }