Example #1
0
        ///
        ///	 <summary> * gets the subscription query for a given messagetype or creates one if not yet there note that newly created query
        ///	 * do not contain a subscription
        ///	 *  </summary>
        ///	 * <param name="queryType"> </param>
        ///	 * <returns> the appropriate query </returns>
        ///
        public virtual JDFQuery getCreateJMFQuery(EnumType queryType)
        {
            JDFQuery q = null;
            VElement v = getChildElementVector(ElementName.JMF, null);

            if (v != null)
            {
                int siz = v.Count;
                for (int i = 0; i < siz; i++)
                {
                    JDFJMF jmf = (JDFJMF)v[i];
                    q = (JDFQuery)jmf.getMessageElement(EnumFamily.Query, queryType, 0);
                    if (q != null)
                    {
                        break;
                    }
                }
            }

            if (q == null)
            {
                q = appendJMF().appendQuery(queryType);
            }

            return(q);
        }
Example #2
0
        ///
        ///	 <summary> * convert all responses that match the query q to signals
        ///	 *  </summary>
        ///	 * <returns> the newly created JMF with multiple responses </returns>
        ///
        public virtual void convertResponses(JDFQuery q)
        {
            EnumType t   = q == null ? null : q.getEnumType();
            VElement v   = getMessageVector(EnumFamily.Response, t);
            string   qID = q == null ? null : q.getID();

            for (int i = 0; i < v.Count; i++)
            {
                JDFResponse r = (JDFResponse)v[i];
                if (qID == null || qID.Equals(r.getrefID()))
                {
                    JDFSignal s = appendSignal();
                    moveElement(s, r); // retain ordering
                    s.convertResponse(r, q);
                    r.deleteNode();
                }
            }
        }
Example #3
0
        ///
        ///	 <summary> * Set attribute Type
        ///	 *  </summary>
        ///	 * <param name="value"> the value to set the attribute to </param>
        ///
        public virtual void setType(EnumType @value)
        {
            string typeName = @value == null ? null : @value.getName();

            setType(typeName);
        }
Example #4
0
 ///
 ///	 <summary> * Typesafe enumerated attribute Type
 ///	 *  </summary>
 ///	 * <returns> EnumType: the enumeration value of the attribute </returns>
 ///
 public virtual EnumType getEnumType()
 {
     return(EnumType.getEnum(getAttribute(AttributeName.TYPE, null, null)));
 }