Example #1
0
        public IOType GetInputByReference(string strRef)
        {
            // Create Expression Builder instance
            IIOPEXPathExprBuilder IBuilder = IOPEXPathExprBuilderFactory.CreateInstance(enuIOPEType.Input);
            // 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;

            IOType ioData = GetIONodeData(node);

            return(ioData);
        }
Example #2
0
        private IOType GetIONodeData(XmlNode descNode)
        {
            IOType ioData = new IOType();

            ioData.ParameterDesc = descNode.Attributes[DAMLConstants.RDF_ID].Value;

            // Get Param name
            XmlNode nameNode = descNode.SelectSingleNode(DAMLConstants.PROFILE_PARAM_NAME, m_mgr);

            ioData.ParameterName = nameNode.InnerText;

            // Get Param RestrictedTo
            XmlNode restrictNode = descNode.SelectSingleNode(DAMLConstants.PROFILE_RESTRICTED_TO, m_mgr);

            ioData.RestrictedTo = restrictNode.Attributes[DAMLConstants.RDF_RESOURCE].Value;

            // Get Param RefersTo
            XmlNode referNode = descNode.SelectSingleNode(DAMLConstants.PROFILE_REFERS_TO, m_mgr);

            ioData.RefersTo = referNode.Attributes[DAMLConstants.RDF_RESOURCE].Value;

            return(ioData);
        }