Examples of DurationModel


Examples of org.fluxtream.core.mvc.models.DurationModel

        LocalDateTime localEndTime = new LocalDateTime(facet.end, DateTimeZone.forID(facet.tz));
        endMinute = localEndTime.getHourOfDay() * 60 + localEndTime.getMinuteOfHour();
        endTime = new TimeOfDayVO(endMinute, true);

        timeSleeping = new DurationModel(duration);
        timeAwake = new DurationModel(awake);
    }
View Full Code Here

Examples of org.fluxtream.core.mvc.models.DurationModel

            this.end = facet.end;
        }

        // Calculate duration from the potentially truncated times
        this.duration = new DurationModel((int)(this.end-this.start)/1000);

        // Also potentially prune the activities
        int skippedActivities=0;

        for (MovesActivity activity : facet.getActivities()) {
View Full Code Here

Examples of org.fluxtream.core.mvc.models.DurationModel

    @Override
    protected void fromFacet(final BodymediaSleepFacet facet, final TimeInterval timeInterval, final GuestSettings settings) {
        this.date = facet.date;
        this.efficiency = facet.efficiency;
        this.totalSleeping = new DurationModel(facet.totalSleeping*60);
        this.totalLying = new DurationModel(facet.totalLying*60);
//        this.sleepJson = facet.json;
    }
View Full Code Here

Examples of org.fluxtream.core.mvc.models.DurationModel

                timeTruncated=true;
            }
        }

        if (this.manual) {
            this.duration = new DurationModel(activity.duration);
        } else {
            // The args for creating a DurationModel are in seconds.
            // The units of start and end are milliseconds, so divide by 1000 to
            // calculate the duration in seconds to pass to the Duration Model.
            this.duration = new DurationModel((int)((truncEndMilli-truncStartMilli)/1000));

            // Note that the distance isn't going to be accurate here if we've done truncation
            // In that case, skip distance and steps for now
            if (activity.distance>0 && !timeTruncated) {
                if (settings.distanceMeasureUnit==GuestSettings.DistanceMeasureUnit.SI)
View Full Code Here

Examples of org.fluxtream.core.mvc.models.DurationModel

    public String personNumber;
    public String callType;
 
  @Override
  public void fromFacet(CallLogEntryFacet phoneCall, TimeInterval timeInterval, GuestSettings settings) {
        this.talkingTime = new DurationModel(Math.round(phoneCall.seconds));

        this.personName = phoneCall.personName;
        this.personNumber = phoneCall.personNumber;
        this.callType = phoneCall.callType.toString();
View Full Code Here

Examples of org.fluxtream.core.mvc.models.DurationModel

    @Override
    protected void fromFacet(final RunKeeperFitnessActivityFacet facet, final TimeInterval timeInterval, final GuestSettings settings) {
        this.totalCalories = facet.totalCalories;
        this.averageHeartRate = (facet.averageHeartRate!=null && facet.averageHeartRate>0)?facet.averageHeartRate:null;
        this.total_distance = facet.total_distance;
        this.duration = new DurationModel(facet.duration);
        this.total_climb = facet.total_climb;
        this.activityType = facet.type;
    }
View Full Code Here

Examples of org.fluxtream.core.mvc.models.DurationModel

  public DurationModel minutesAwake;
  public DurationModel minutesToFallAsleep;

  @Override
  public void fromFacet(FitbitSleepFacet facet, TimeInterval timeInterval, GuestSettings settings) {
    minutesAsleep = new DurationModel(facet.minutesAsleep*60);
    minutesAwake = new DurationModel(facet.minutesAwake*60);
    minutesToFallAsleep = new DurationModel(facet.minutesToFallAsleep*60);
        if (facet.isEmpty)
            this.isEmpty = true;
        date = facet.date;
  }
View Full Code Here

Examples of org.fluxtream.core.mvc.models.DurationModel

    transient DateTimeFormatter zeoTimeFormat = DateTimeFormat.forPattern("yyyyMMddHHmm");

    @Override
  public void fromFacet(ZeoSleepStatsFacet facet, TimeInterval timeInterval, GuestSettings settings) {
        date = facet.date;
    minutesAsleep = new DurationModel(facet.totalZ*60);
    minutesAwake = new DurationModel((int) ((double)facet.totalZ*60d/100d*(double)facet.timeInWakePercentage));
    minutesToFallAsleep = new DurationModel(facet.timeToZ*60);
    zq = facet.zq;
    morningFeel = facet.morningFeel;
    sleepGraph = facet.sleepGraph;
        s = zeoTimeFormat.withZone(DateTimeZone.forTimeZone(timeInterval.getMainTimeZone())).print(facet.start);
        e = zeoTimeFormat.withZone(DateTimeZone.forTimeZone(timeInterval.getMainTimeZone())).print(facet.end);
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.