Esempio n. 1
0
 ///
 ///	 <summary> * AddRange
 ///	 *  </summary>
 ///	 * <param name="Object"> xMin </param>
 ///	 * <param name="Object"> xMax default is both values are equal </param>
 ///
 public virtual void addRange(string xMin, string xMax)
 {
     try
     {
         JDFNameRangeList rl = new JDFNameRangeList(getRange());
         rl.Append(new JDFNameRange(xMin, xMax));
         setAttribute(AttributeName.RANGE, rl.ToString(), JDFConstants.EMPTYSTRING);
     }
     catch (FormatException)
     {
         new JDFException("JDFSpan.addRange: DataFormatExceptione while creating JDFNameRange");
     }
 }
Esempio n. 2
0
        ///
        ///          <summary> * (20) get JDFNameRangeList attribute SetNames </summary>
        ///          * <returns> JDFNameRangeList the value of the attribute, null if a the
        ///          *         attribute value is not a valid to create a JDFNameRangeList </returns>
        ///
        public virtual JDFNameRangeList getSetNames()
        {
            string           strAttrName  = "";
            JDFNameRangeList nPlaceHolder = null;

            strAttrName = getAttribute(AttributeName.SETNAMES, null, JDFConstants.EMPTYSTRING);
            try
            {
                nPlaceHolder = new JDFNameRangeList(strAttrName);
            }
            catch (FormatException)
            {
                return(null);
            }
            return(nPlaceHolder);
        }
Esempio n. 3
0
 //         ---------------------------------------------------------------------
 //        Methods for Attribute SetNames
 //        ---------------------------------------------------------------------
 ///
 ///          <summary> * (36) set attribute SetNames </summary>
 ///          * <param name="value">: the value to set the attribute to </param>
 ///
 public virtual void setSetNames(JDFNameRangeList @value)
 {
     setAttribute(AttributeName.SETNAMES, @value, null);
 }
Esempio n. 4
0
 //         ---------------------------------------------------------------------
 //        Methods for Attribute PageNames
 //        ---------------------------------------------------------------------
 ///
 ///          <summary> * (36) set attribute PageNames </summary>
 ///          * <param name="value">: the value to set the attribute to </param>
 ///
 public virtual void setPageNames(JDFNameRangeList @value)
 {
     setAttribute(AttributeName.PAGENAMES, @value, null);
 }
Esempio n. 5
0
 //         ---------------------------------------------------------------------
 //        Methods for Attribute DocNames
 //        ---------------------------------------------------------------------
 ///
 ///          <summary> * (36) set attribute DocNames </summary>
 ///          * <param name="value">: the value to set the attribute to </param>
 ///
 public virtual void setDocNames(JDFNameRangeList @value)
 {
     setAttribute(AttributeName.DOCNAMES, @value, null);
 }
Esempio n. 6
0
        ///
        ///	 <summary> * fitsListType - tests, if the defined <code>value</code> matches value of
        ///	 * ListType attribute, specified for this State
        ///	 *  </summary>
        ///	 * <param name="value">
        ///	 *            value to test
        ///	 *  </param>
        ///	 * <returns> boolean - true, if 'value' matches specified ListType </returns>
        ///
        protected internal bool fitsListType(string @value)
        {
            if (@value == null)
            {
                return(true);
            }

            EnumListType listType = getListType();

            JDFRangeList rangelist; // lists of strings are most generic

            try
            {
                rangelist = new JDFNameRangeList(@value);
            }
            catch (FormatException)
            {
                return(false);
            }
            catch (JDFException)
            {
                return(false);
            }

            if (listType == null || listType.Equals(EnumListType.SingleValue))
            { // default ListType = SingleValue
                return(@value.IndexOf(" ") == -1);
            }
            else if (listType.Equals(EnumListType.RangeList) || listType.Equals(EnumListType.Span))
            {
                return(true);
            }
            else if (listType.Equals(EnumListType.Range))
            {
                return(rangelist.Count == 1);
            }
            // not -
            // tested in
            // fitsValueList
            // in
            // fitsValueList
            else if (listType.Equals(EnumListType.List) || listType.Equals(EnumListType.CompleteList) || listType.Equals(EnumListType.CompleteOrderedList) || listType.Equals(EnumListType.ContainedList)) // tested in
            // fitsValueList
            {
                return(rangelist.isList());
            }
            else if (listType.Equals(EnumListType.OrderedList))
            {
                return(rangelist.isList() && rangelist.isOrdered());
            }
            else if (listType.Equals(EnumListType.UniqueList))
            {
                return(rangelist.isList() && rangelist.isUnique());
            }
            else if (listType.Equals(EnumListType.UniqueOrderedList))
            {
                return(rangelist.isList() && rangelist.isUniqueOrdered());
            }
            else if (listType.Equals(EnumListType.OrderedRangeList))
            {
                return(rangelist.isOrdered());
            }
            else if (listType.Equals(EnumListType.UniqueRangeList))
            {
                return(rangelist.isUnique());
            }
            else if (listType.Equals(EnumListType.UniqueOrderedRangeList))
            {
                return(rangelist.isUniqueOrdered());
            }
            else
            {
                throw new JDFException("JDFDateTimeState.fitsListType illegal ListType attribute");
            }
        }