org.basex.query.value.item
Class Dtm

java.lang.Object
  extended by org.basex.data.ExprInfo
      extended by org.basex.query.expr.Expr
          extended by org.basex.query.value.Value
              extended by org.basex.query.value.item.Item
                  extended by org.basex.query.value.item.ADateDur
                      extended by org.basex.query.value.item.ADate
                          extended by org.basex.query.value.item.Dtm
All Implemented Interfaces:
java.lang.Iterable<Item>

public final class Dtm
extends ADate

DateTime item (xs:dateTime).

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

Nested Class Summary
 
Nested classes/interfaces inherited from class org.basex.query.expr.Expr
Expr.Flag
 
Field Summary
 
Fields inherited from class org.basex.query.value.item.ADate
day, DAYS, DD, df, hou, min, mon, yea, YEAR, zon, ZONE
 
Fields inherited from class org.basex.query.value.item.ADateDur
BD100, BD1000, BD146097, BD1461, BD153, BD2, BD3600, BD365, BD36524, BD36525, BD366, BD4, BD5, BD60, BDMAXLONG, DAYSECONDS, sec
 
Fields inherited from class org.basex.query.value.item.Item
score, UNDEF
 
Fields inherited from class org.basex.query.value.Value
type
 
Constructor Summary
Dtm(ADate date)
          Constructor.
Dtm(byte[] date, InputInfo ii)
          Constructor.
Dtm(Dat date, Tim time, InputInfo ii)
          Constructor.
Dtm(Dtm date, Dur dur, boolean plus, InputInfo ii)
          Constructor.
Dtm(long ms, InputInfo ii)
          Constructor.
 
Method Summary
 boolean sameAs(Expr cmp)
          Compares the current and specified expression for equality.
 void timeZone(DTDur tz, boolean spec, InputInfo ii)
          Adjusts the timezone.
 
Methods inherited from class org.basex.query.value.item.ADate
calc, day, days, diff, dpm, eq, hash, hou, min, mon, prefix, sec, string, toJava, toString, tz, yea, zon, zone
 
Methods inherited from class org.basex.query.value.item.ADateDur
dateErr, toDecimal, toLong
 
Methods inherited from class org.basex.query.value.item.Item
bool, castErr, comparable, dbl, dec, description, ebv, equiv, flt, homogeneous, input, isItem, item, itemAt, iter, iterable, itr, materialize, plan, score, score, size, test, type, typeId, writeTo, xdmInfo
 
Methods inherited from class org.basex.query.value.Value
accept, cache, checkUp, compile, copy, count, data, exprSize, has, inline, isValue, iter, iterator, removable, serialize, value
 
Methods inherited from class org.basex.query.expr.Expr
addText, compEbv, copy, hasFreeVars, indexAccessible, indexEquivalent, inlineAll, isEmpty, isFunction, isVacuous, markTailCalls, optimize, uses, visitAll
 
Methods inherited from class org.basex.data.ExprInfo
addPlan, addPlan, info, planAttr, planElem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Dtm

public Dtm(ADate date)
Constructor.

Parameters:
date - date

Dtm

public Dtm(Dat date,
           Tim time,
           InputInfo ii)
    throws QueryException
Constructor.

Parameters:
date - date
time - time
ii - input info
Throws:
QueryException - query exception

Dtm

public Dtm(byte[] date,
           InputInfo ii)
    throws QueryException
Constructor.

Parameters:
date - date
ii - input info
Throws:
QueryException - query exception

Dtm

public Dtm(long ms,
           InputInfo ii)
    throws QueryException
Constructor.

Parameters:
ms - milliseconds since January 1, 1970, 00:00:00 GMT
ii - input info
Throws:
QueryException - query exception

Dtm

public Dtm(Dtm date,
           Dur dur,
           boolean plus,
           InputInfo ii)
    throws QueryException
Constructor.

Parameters:
date - date
dur - duration
plus - plus/minus flag
ii - input info
Throws:
QueryException - query exception
Method Detail

timeZone

public void timeZone(DTDur tz,
                     boolean spec,
                     InputInfo ii)
              throws QueryException
Description copied from class: ADate
Adjusts the timezone.

Specified by:
timeZone in class ADate
Parameters:
tz - timezone
spec - indicates if zone has been specified (can be null)
ii - input info
Throws:
QueryException - query exception

sameAs

public boolean sameAs(Expr cmp)
Description copied from class: Expr
Compares the current and specified expression for equality.

Overrides:
sameAs in class Expr
Parameters:
cmp - expression to be compared
Returns:
result of check