Examples of Rate


Examples of net.sf.mpxj.Rate

      header.setDefaultDurationUnits(MPDUtility.getDurationTimeUnits(row.getInt("PROJ_OPT_DUR_ENTRY_FMT")));
      //header.setDefaultDurationIsFixed();     
      header.setDefaultWorkUnits(MPDUtility.getDurationTimeUnits(row.getInt("PROJ_OPT_WORK_ENTRY_FMT")));
      header.setMinutesPerDay(row.getInteger("PROJ_OPT_MINUTES_PER_DAY"));
      header.setMinutesPerWeek(row.getInteger("PROJ_OPT_MINUTES_PER_WEEK"));
      header.setDefaultStandardRate(new Rate(row.getDouble("PROJ_OPT_DEF_STD_RATE"), TimeUnit.HOURS));
      header.setDefaultOvertimeRate(new Rate(row.getDouble("PROJ_OPT_DEF_OVT_RATE"), TimeUnit.HOURS));
      header.setUpdatingTaskStatusUpdatesResourceStatus(row.getBoolean("PROJ_OPT_TASK_UPDATES_RES"));
      header.setSplitInProgressTasks(row.getBoolean("PROJ_OPT_SPLIT_IN_PROGRESS"));
      //header.setDateOrder();
      //header.setTimeFormat();
      header.setDefaultStartTime(row.getDate("PROJ_OPT_DEF_START_TIME"));
View Full Code Here

Examples of net.sf.mpxj.Rate

         //resource.setOutlineCode8();
         //resource.setOutlineCode9();
         //resource.setOutlineCode10();
         resource.setOverAllocated(row.getBoolean("RES_IS_OVERALLOCATED"));
         resource.setOvertimeCost(row.getCurrency("RES_OVT_COST"));
         resource.setOvertimeRate(new Rate(row.getDouble("RES_OVT_RATE"), TimeUnit.HOURS));
         resource.setOvertimeRateUnits(TimeUnit.getInstance(row.getInt("RES_OVT_RATE_FMT") - 1));
         resource.setOvertimeWork(row.getDuration("RES_OVT_WORK"));
         resource.setPeakUnits(Double.valueOf(NumberUtility.getDouble(row.getDouble("RES_PEAK")) * 100));
         //resource.setPercentWorkComplete();
         resource.setPhonetics(row.getString("RES_PHONETICS"));
         resource.setRegularWork(row.getDuration("RES_REG_WORK"));
         resource.setRemainingCost(getDefaultOnNull(row.getCurrency("RES_REM_COST"), NumberUtility.DOUBLE_ZERO));
         resource.setRemainingOvertimeCost(row.getCurrency("RES_REM_OVT_COST"));
         resource.setRemainingOvertimeWork(row.getDuration("RES_REM_OVT_WORK"));
         resource.setRemainingWork(row.getDuration("RES_REM_WORK"));
         //resource.setResourceCalendar();RES_CAL_UID = null ( ) // CHECK THIS
         resource.setStandardRate(new Rate(row.getDouble("RES_STD_RATE"), TimeUnit.HOURS));
         resource.setStandardRateUnits(TimeUnit.getInstance(row.getInt("RES_STD_RATE_FMT") - 1));
         //resource.setStart();
         //resource.setStart1();
         //resource.setStart2();
         //resource.setStart3();
View Full Code Here

Examples of net.sf.mpxj.Rate

    * @param value rate value
    * @return Rate instance
    */
   public static final Rate parseRate(BigDecimal value)
   {
      Rate result = null;

      if (value != null)
      {
         result = new Rate(value, TimeUnit.HOURS);
      }

      return (result);
   }
View Full Code Here

Examples of net.sf.mpxj.Rate

      if (data != null)
      {
         for (int i = 16; i + 44 <= data.length; i += 44)
         {
            Rate standardRate = new Rate(MPPUtility.getDouble(data, i), TimeUnit.HOURS);
            TimeUnit standardRateFormat = getFormat(MPPUtility.getShort(data, i + 8));
            Rate overtimeRate = new Rate(MPPUtility.getDouble(data, i + 16), TimeUnit.HOURS);
            TimeUnit overtimeRateFormat = getFormat(MPPUtility.getShort(data, i + 24));
            Double costPerUse = NumberUtility.getDouble(MPPUtility.getDouble(data, i + 32) / 100.0);
            Date endDate = MPPUtility.getTimestampFromTenths(data, i + 40);
            CostRateTableEntry entry = new CostRateTableEntry(standardRate, standardRateFormat, overtimeRate, overtimeRateFormat, costPerUse, endDate);
            result.add(entry);
         }
         Collections.sort(result);
      }
      else
      {
         //
         // MS Project economises by not actually storing the first cost rate
         // table if it doesn't need to, so we take this into account here.
         //        
         if (index == 0)
         {
           Rate standardRate = resource.getStandardRate();
           Rate overtimeRate = resource.getOvertimeRate();
           Number costPerUse = resource.getCostPerUse();
           CostRateTableEntry entry = new CostRateTableEntry(standardRate, standardRate.getUnits(), overtimeRate, overtimeRate.getUnits(), costPerUse, CostRateTableEntry.DEFAULT_ENTRY.getEndDate());
           result.add(entry);
         }
         else
         {
            result.add(CostRateTableEntry.DEFAULT_ENTRY);
View Full Code Here

Examples of net.sf.mpxj.Rate

      {
         Set<CostRateTable> tables = new HashSet<CostRateTable>();

         for (net.sf.mpxj.mspdi.schema.Project.Resources.Resource.Rates.Rate rate : rates.getRate())
         {
            Rate standardRate = DatatypeConverter.parseRate(rate.getStandardRate());
            TimeUnit standardRateFormat = DatatypeConverter.parseTimeUnit(rate.getStandardRateFormat());
            Rate overtimeRate = DatatypeConverter.parseRate(rate.getOvertimeRate());
            TimeUnit overtimeRateFormat = DatatypeConverter.parseTimeUnit(rate.getOvertimeRateFormat());
            Double costPerUse = DatatypeConverter.parseCurrency(rate.getCostPerUse());
            Date endDate = DatatypeConverter.parseDate(rate.getRatesTo());

            CostRateTableEntry entry = new CostRateTableEntry(standardRate, standardRateFormat, overtimeRate, overtimeRateFormat, costPerUse, endDate);
View Full Code Here

Examples of net.sf.mpxj.Rate

         resource.setNumber19(NumberUtility.getDouble(rscExtData.getDouble(RESOURCE_NUMBER19)));
         resource.setNumber20(NumberUtility.getDouble(rscExtData.getDouble(RESOURCE_NUMBER20)));
         //resource.setObjects(); // Calculated value
         //resource.setOverallocated(); // Calculated value
         resource.setOvertimeCost(NumberUtility.getDouble(((double) MPPUtility.getLong6(data, 138)) / 100));
         resource.setOvertimeRate(new Rate(MPPUtility.getDouble(data, 44), TimeUnit.HOURS));
         resource.setOvertimeWork(MPPUtility.getDuration(((double) MPPUtility.getLong6(data, 74)) / 100, TimeUnit.HOURS));
         resource.setPeakUnits(NumberUtility.getDouble(((double) MPPUtility.getInt(data, 110)) / 100));
         //resource.setPercentageWorkComplete(); // Calculated value
         resource.setRegularWork(MPPUtility.getDuration(((double) MPPUtility.getLong6(data, 92)) / 100, TimeUnit.HOURS));
         resource.setRemainingCost(NumberUtility.getDouble(((double) MPPUtility.getLong6(data, 132)) / 100));
         resource.setRemainingOvertimeCost(NumberUtility.getDouble(((double) MPPUtility.getLong6(data, 150)) / 100));
         resource.setRemainingWork(MPPUtility.getDuration(((double) MPPUtility.getLong6(data, 86)) / 100, TimeUnit.HOURS));
         resource.setStandardRate(new Rate(MPPUtility.getDouble(data, 36), TimeUnit.HOURS));
         resource.setStart1(rscExtData.getTimestamp(RESOURCE_START1));
         resource.setStart2(rscExtData.getTimestamp(RESOURCE_START2));
         resource.setStart3(rscExtData.getTimestamp(RESOURCE_START3));
         resource.setStart4(rscExtData.getTimestamp(RESOURCE_START4));
         resource.setStart5(rscExtData.getTimestamp(RESOURCE_START5));
View Full Code Here

Examples of net.sf.mpxj.Rate

      //ph.setDefaultDurationIsFixed();
      ph.setDefaultDurationUnits(MPPUtility.getDurationTimeUnits(props.getShort(Props.DURATION_UNITS)));
      ph.setMinutesPerDay(Integer.valueOf(props.getInt(Props.MINUTES_PER_DAY)));
      ph.setMinutesPerWeek(Integer.valueOf(props.getInt(Props.MINUTES_PER_WEEK)));
      ph.setDefaultOvertimeRate(new Rate(props.getDouble(Props.OVERTIME_RATE), TimeUnit.HOURS));
      ph.setDefaultStandardRate(new Rate(props.getDouble(Props.STANDARD_RATE), TimeUnit.HOURS));
      ph.setDefaultWorkUnits(MPPUtility.getWorkTimeUnits(props.getShort(Props.WORK_UNITS)));
      ph.setSplitInProgressTasks(props.getBoolean(Props.SPLIT_TASKS));
      ph.setUpdatingTaskStatusUpdatesResourceStatus(props.getBoolean(Props.TASK_UPDATES_RESOURCE));

      ph.setCurrencyDigits(Integer.valueOf(props.getShort(Props.CURRENCY_DIGITS)));
View Full Code Here

Examples of net.sf.mpxj.Rate

    * @return the value of the required field
    * @throws MPXJException normally thrown when parsing fails
    */
   public Rate getRate(int field) throws MPXJException
   {
      Rate result;

      if ((field < m_fields.length) && (m_fields[field].length() != 0))
      {
         try
         {
            String rate = m_fields[field];
            int index = rate.indexOf('/');
            double amount;
            TimeUnit units;

            if (index == -1)
            {
               amount = m_formats.getCurrencyFormat().parse(rate).doubleValue();
               units = TimeUnit.HOURS;
            }
            else
            {
               amount = m_formats.getCurrencyFormat().parse(rate.substring(0, index)).doubleValue();
               units = TimeUnitUtility.getInstance(rate.substring(index + 1), m_locale);
            }

            result = new Rate(amount, units);
         }

         catch (ParseException ex)
         {
            throw new MPXJException("Failed to parse rate", ex);
View Full Code Here

Examples of org.apache.kafka.common.metrics.stats.Rate

            this.requestTimeSensor = metrics.sensor("request-time");
            this.requestTimeSensor.add("request-latency-avg", "The average request latency in ms", new Avg());
            this.requestTimeSensor.add("request-latency-max", "The maximum request latency in ms", new Max());

            this.recordsPerRequestSensor = metrics.sensor("records-per-request");
            this.recordsPerRequestSensor.add("record-send-rate", "The average number of records sent per second.", new Rate());
            this.recordsPerRequestSensor.add("records-per-request-avg", "The average number of records per request.", new Avg());

            this.retrySensor = metrics.sensor("record-retries");
            this.retrySensor.add("record-retry-rate", "The average per-second number of retried record sends", new Rate());

            this.errorSensor = metrics.sensor("errors");
            this.errorSensor.add("record-error-rate", "The average per-second number of record sends that resulted in errors", new Rate());

            this.maxRecordSizeSensor = metrics.sensor("record-size-max");
            this.maxRecordSizeSensor.add("record-size-max", "The maximum record size", new Max());
            this.maxRecordSizeSensor.add("record-size-avg", "The average record size", new Avg());
View Full Code Here

Examples of org.apache.kafka.common.metrics.stats.Rate

            // then all other sensors should have been registered; and vice versa
            String topicRecordsCountName = "topic." + topic + ".records-per-batch";
            Sensor topicRecordCount = this.metrics.getSensor(topicRecordsCountName);
            if (topicRecordCount == null) {
                topicRecordCount = this.metrics.sensor(topicRecordsCountName);
                topicRecordCount.add("topic." + topic + ".record-send-rate", new Rate());

                String topicByteRateName = "topic." + topic + ".bytes";
                Sensor topicByteRate = this.metrics.sensor(topicByteRateName);
                topicByteRate.add("topic." + topic + ".byte-rate", new Rate());

                String topicCompressionRateName = "topic." + topic + ".compression-rate";
                Sensor topicCompressionRate = this.metrics.sensor(topicCompressionRateName);
                topicCompressionRate.add("topic." + topic + ".compression-rate", new Avg());

                String topicRetryName = "topic." + topic + ".record-retries";
                Sensor topicRetrySensor = this.metrics.sensor(topicRetryName);
                topicRetrySensor.add("topic." + topic + ".record-retry-rate", new Rate());

                String topicErrorName = "topic." + topic + ".record-errors";
                Sensor topicErrorSensor = this.metrics.sensor(topicErrorName);
                topicErrorSensor.add("topic." + topic + ".record-error-rate", new Rate());
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.