Examples of TimeUnit


Examples of net.sourceforge.ganttproject.time.TimeUnit

    protected TimeUnit getTopUnit() {
        return getTopUnit(myStartDate);
    }

    private TimeUnit getTopUnit(Date startDate) {
        TimeUnit result = myTopUnit;
        if (myTopUnit instanceof TimeUnitFunctionOfDate) {
            if (startDate == null) {
                throw new RuntimeException("No date is set");
            } else {
                result = ((TimeUnitFunctionOfDate) myTopUnit)
View Full Code Here

Examples of net.sourceforge.ganttproject.time.TimeUnit

        // }
        return date;
    }

    private LineHeader calculateLines(LineHeader lastHeader) {
        TimeUnit curUnit = lastHeader == null ? myTopUnit : lastHeader.myUnit
                .getDirectAtomUnit();
        LineHeader curHeader = createHeader(curUnit);
        fillLine(lastHeader, curHeader);
        if (lastHeader != null) {
            lastHeader.append(curHeader);
View Full Code Here

Examples of net.sourceforge.ganttproject.time.TimeUnit

    }

    private int getUnitCount(LineHeader higherHeader, LineHeader header,
            LineItem higherItem) {
        TimeUnit higherUnit = higherHeader.myUnit instanceof TimeUnitFunctionOfDate ? ((TimeUnitFunctionOfDate) higherHeader.myUnit)
                .createTimeUnit(higherItem.myStartDate)
                : higherHeader.myUnit;
        TimeUnit lowerUnit = header.myUnit;
        int result = higherUnit.getAtomCount(lowerUnit);
        return result;
    }
View Full Code Here

Examples of net.sourceforge.ganttproject.time.TimeUnit

    /**
     *
     */
    public GPTimeUnitStack(GanttLanguage i18n) {
        TimeUnit atom = ourGraph.createAtomTimeUnit("atom");
        DAY = ourGraph.createDateFrameableTimeUnit("day", atom, 1,
                new FramerImpl(Calendar.DATE));
        DAY.setTextFormatter(new DayTextFormatter());
        MONTH = ourGraph.createTimeUnitFunctionOfDate("month", DAY,
                new FramerImpl(Calendar.MONTH));
View Full Code Here

Examples of org.apache.falcon.entity.v0.Frequency.TimeUnit

            String coordName = EntityUtil.getWorkflowName(Tag.RETENTION, feed).toString();
            retentionApp.setName(coordName);
            retentionApp.setEnd(SchemaHelper.formatDateUTC(feedCluster.getValidity().getEnd()));
            retentionApp.setStart(SchemaHelper.formatDateUTC(new Date()));
            retentionApp.setTimezone(feed.getTimezone().getID());
            TimeUnit timeUnit = feed.getFrequency().getTimeUnit();
            if (timeUnit == TimeUnit.hours || timeUnit == TimeUnit.minutes) {
                retentionApp.setFrequency("${coord:hours(6)}");
            } else {
                retentionApp.setFrequency("${coord:days(1)}");
            }
View Full Code Here

Examples of org.apache.ivory.entity.v0.Frequency.TimeUnit

        String coordName = EntityUtil.getWorkflowName(Tag.RETENTION, feed).toString();
        retentionApp.setName(coordName);
        retentionApp.setEnd(SchemaHelper.formatDateUTC(feedCluster.getValidity().getEnd()));
        retentionApp.setStart(SchemaHelper.formatDateUTC(new Date()));
        retentionApp.setTimezone(feed.getTimezone().getID());
        TimeUnit timeUnit = feed.getFrequency().getTimeUnit();
        if (timeUnit == TimeUnit.hours || timeUnit == TimeUnit.minutes) {
            retentionApp.setFrequency("${coord:hours(6)}");
        } else {
            retentionApp.setFrequency("${coord:days(1)}");
        }
View Full Code Here

Examples of org.apache.oozie.coord.TimeUnit

        Element eJob = XmlUtils.parseXml(jobXml);
        // TODO: always UTC?
        TimeZone appTz = DateUtils.getTimeZone(jobBean.getTimeZone());
        // TimeZone appTz = DateUtils.getTimeZone("UTC");
        int frequency = jobBean.getFrequency();
        TimeUnit freqTU = TimeUnit.valueOf(eJob.getAttributeValue("freq_timeunit"));
        TimeUnit endOfFlag = TimeUnit.valueOf(eJob.getAttributeValue("end_of_duration"));
        Calendar start = Calendar.getInstance(appTz);
        start.setTime(startTime);
        DateUtils.moveToEnd(start, endOfFlag);
        Calendar end = Calendar.getInstance(appTz);
        end.setTime(endTime);
View Full Code Here

Examples of org.eigenbase.sql.SqlIntervalQualifier.TimeUnit

            makeNullLiteral(toType.getSqlTypeName())));
  }

  private RexNode makeCastIntervalToExact(RelDataType toType, RexNode exp) {
    IntervalSqlType intervalType = (IntervalSqlType) exp.getType();
    TimeUnit endUnit = intervalType.getIntervalQualifier().getEndUnit();
    if (endUnit == null) {
      endUnit = intervalType.getIntervalQualifier().getStartUnit();
    }
    int scale = 0;
    if (endUnit == TimeUnit.SECOND) {
View Full Code Here

Examples of org.eigenbase.sql.SqlIntervalQualifier.TimeUnit

    return ensureType(toType, value, false);
  }

  private RexNode makeCastExactToInterval(RelDataType toType, RexNode exp) {
    IntervalSqlType intervalType = (IntervalSqlType) toType;
    TimeUnit endUnit = intervalType.getIntervalQualifier().getEndUnit();
    if (endUnit == null) {
      endUnit = intervalType.getIntervalQualifier().getStartUnit();
    }
    int scale = 0;
    if (endUnit == TimeUnit.SECOND) {
View Full Code Here

Examples of org.fluxtream.core.TimeUnit

        }
    }

    public void replaceState(final String state) {
        final String[] stateParts = state.split("/");
        final TimeUnit timeUnit = TimeUnit.fromValue(stateParts[0].equals("date") ? "day" : stateParts[0]);

        final int year, month, week;

        switch (timeUnit) {
            case DAY:
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.