예제 #1
0
        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)
            {
                m_EvtLog.WriteEntry(e.Message, EventLogEntryType.Error);
            }

            return((IOType[])lstInputs.ToArray(typeof(IOType)));
        }
예제 #2
0
        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)
            {
                m_EvtLog.WriteEntry(e.Message, EventLogEntryType.Error);
            }

            return((EPType[])lstPreconds.ToArray(typeof(EPType)));
        }
예제 #3
0
        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
        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
        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
        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);
        }