Example #1
0
        ///
        ///	 <summary> * converts a response to a signal that can be sent individually
        ///	 *  </summary>
        ///	 * <param name="response"> the response to convert </param>
        ///	 * <returns> true if successful </returns>
        ///
        public virtual bool convertResponse(JDFResponse response, JDFQuery q)
        {
            if (response == null)
            {
                return(false);
            }
            setAttributes(response);
            VElement elements = response.getChildElementVector(null, null, null, true, 0, true);

            for (int i = 0; i < elements.Count; i++)
            {
                JDFElement element = (JDFElement)elements[i];
                copyElement(element, null);
            }
            if (q != null)
            {
                VElement v = q.getChildElementVector(null, null, null, true, 0, true);
                for (int i = 0; i < v.Count; i++)
                {
                    KElement item = v.item(i);
                    if (item is JDFSubscription)
                    {
                        continue;
                    }
                    copyElement(item, null);
                }
            }
            setType(response.getType()); // also fix xsi:type
            return(true);
        }