Ejemplo n.º 1
0
        /**
         * Writes out the data validation
         *
         * @exception IOException
         * @param outputFile the output file
         */
        public void write(File outputFile)
        {
            if (validitySettings.Count > MAX_NO_OF_VALIDITY_SETTINGS)
            {
                //logger.warn("Maximum number of data validations exceeded - truncating...");
                ArrayList oldValiditySettings = validitySettings;
                validitySettings = new ArrayList(MAX_NO_OF_VALIDITY_SETTINGS);
                for (int count = 0; count < MAX_NO_OF_VALIDITY_SETTINGS; count++)
                {
                    validitySettings[count] = oldValiditySettings[count];
                }
                Assert.verify(validitySettings.Count <= MAX_NO_OF_VALIDITY_SETTINGS);
            }

            if (validityList == null)
            {
                DValParser dvp = new DValParser(comboBoxObjectId, validitySettings.Count);
                validityList = new DataValidityListRecord(dvp);
            }

            if (!validityList.hasDVRecords())
            {
                return;
            }

            outputFile.write(validityList);

            foreach (DataValiditySettingsRecord dvsr in validitySettings)
            {
                outputFile.write(dvsr);
            }
        }
Ejemplo n.º 2
0
        /**
         * Called when a writable DV record is added to a copied validity list
         */
        public void dvAdded()
        {
            if (dvalParser == null)
            {
                dvalParser = new DValParser(data);
            }

            dvalParser.dvAdded();
        }
Ejemplo n.º 3
0
 /**
  * Constructor called when generating a data validity list from the API
  */
 public DataValidityListRecord(DValParser dval)
     : base(Type.DVAL)
 {
     dvalParser = dval;
 }
Ejemplo n.º 4
0
        /**
         * Writes out the data validation
         *
         * @exception IOException
         * @param outputFile the output file
         */
        public void write(File outputFile)
        {
            if (validitySettings.Count > MAX_NO_OF_VALIDITY_SETTINGS)
                {
                //logger.warn("Maximum number of data validations exceeded - truncating...");
                ArrayList oldValiditySettings = validitySettings;
                validitySettings = new ArrayList(MAX_NO_OF_VALIDITY_SETTINGS);
                for (int count = 0; count < MAX_NO_OF_VALIDITY_SETTINGS; count++)
                    validitySettings[count] = oldValiditySettings[count];
                Assert.verify(validitySettings.Count <= MAX_NO_OF_VALIDITY_SETTINGS);
                }

            if (validityList == null)
                {
                DValParser dvp = new DValParser(comboBoxObjectId,validitySettings.Count);
                validityList = new DataValidityListRecord(dvp);
                }

            if (!validityList.hasDVRecords())
                {
                return;
                }

            outputFile.write(validityList);

            foreach (DataValiditySettingsRecord dvsr in validitySettings)
                outputFile.write(dvsr);
        }
 /**
  * Constructor called when generating a data validity list from the API
  */
 public DataValidityListRecord(DValParser dval)
     : base(Type.DVAL)
 {
     dvalParser = dval;
 }
        /**
         * Called when a remove row or column results in one of DV records being
         * removed
         */
        public void dvRemoved()
        {
            if (dvalParser == null)
                {
                dvalParser = new DValParser(data);
                }

            dvalParser.dvRemoved();
        }