Esempio n. 1
0
        public bool equals(Object obj
                           )
        {
            try
            {
                if (obj == null)
                {
                    return(false);
                }
                if (GetType() != obj.GetType())
                {
                    return(false);
                }

                /**
                 * cast needs to be removed
                 */
                JEVisAttributeType other = (JEVisAttributeType)obj;
                if ((this.GetName() == null) ? (other.GetName() != null) : !this.GetName().Equals(other.GetName()))
                {
                    return(false);
                }
                return(this.GetJEVisClass() == other.GetJEVisClass() || (this.GetJEVisClass() != null && this.GetJEVisClass().Equals(other.GetJEVisClass())));
            }
            catch (Exception ex)
            {
                return(false);
            }
        }
Esempio n. 2
0
        //    public List<JEVisAttribute> getAttributesWS() {
        //        return this.ds.getAttributes(getID());
        //    }


        public JEVisAttribute GetAttribute(JEVisAttributeType jevisType)
        {
            //TODO not optimal, getAttribute() will not cached if we call all this in a loop we do N Webserive calls
            foreach (JEVisAttribute att in GetAttributes())
            {
                if (att.GetName().Equals(jevisType.GetName()))
                {
                    return(att);
                }
            }
            return(null);
        }
Esempio n. 3
0
 public int CompareTo(JEVisAttributeType o
                      )
 {
     try
     {
         return(GetName().CompareTo(o.GetName()));
     }
     catch (Exception ex)
     {
         return(0);
     }
 }