edu.stanford.smi.protegex.owl.swrl.bridge.builtins.temporal
Class Instant
java.lang.Object
edu.stanford.smi.protegex.owl.swrl.bridge.builtins.temporal.Instant
public class Instant
- extends Object
Class that represents a single instant in time.
Constructor Summary |
Instant(Temporal temporal,
Date date)
|
Instant(Temporal temporal,
Date date)
|
Instant(Temporal temporal,
Date date,
int granularity)
|
Instant(Temporal temporal,
Date date,
int granularity)
|
Instant(Temporal temporal,
Instant instant)
|
Instant(Temporal temporal,
long granuleCount,
int granularity)
|
Instant(Temporal temporal,
String datetimeString)
|
Instant(Temporal temporal,
String datetimeString,
boolean roundUp)
|
Instant(Temporal temporal,
String datetimeString,
int granularity)
|
Instant(Temporal temporal,
String datetimeString,
int granularity,
boolean roundUp)
|
Instant(Temporal temporal,
Timestamp timestamp)
|
Instant(Temporal temporal,
Timestamp timestamp,
int granularity)
|
Method Summary |
void |
addGranuleCount(long granuleCount,
int granularity)
|
boolean |
adjacent(Instant i2,
int granularity)
|
boolean |
after(Instant i2,
int granularity)
|
boolean |
before(Instant i2,
int granularity)
|
List<Instant> |
coalesce(List<Instant> instants,
int granularity)
|
boolean |
contains(Instant i2,
int granularity)
|
long |
duration(Instant i2,
int granularity)
|
boolean |
during(Instant i2,
int granularity)
|
boolean |
equals(Instant i2,
int granularity)
|
boolean |
finished_by(Instant i2,
int granularity)
|
boolean |
finishes(Instant i2,
int granularity)
|
String |
getDatetimeString()
|
String |
getDatetimeString(int granularity)
|
int |
getGranularity()
|
long |
getGranuleCount()
|
long |
getGranuleCount(int granularity)
|
protected long |
getNowGranuleCount(int granularity)
|
Date |
getSQLDate()
|
Date |
getSQLDate(int granularity)
|
Date |
getUtilDate()
|
Date |
getUtilDate(int granularity)
|
boolean |
isNow()
|
boolean |
isOngoingInstant()
|
boolean |
isStartOfTime()
|
boolean |
meets(Instant i2,
int granularity)
|
boolean |
met_by(Instant i2,
int granularity)
|
boolean |
overlapped_by(Instant i2,
int granularity)
|
boolean |
overlaps(Instant i2,
int granularity)
|
void |
setGranularity(int granularity)
|
void |
setGranuleCount(long granuleCount,
int granularity)
|
boolean |
started_by(Instant i2,
int granularity)
|
boolean |
starts(Instant i2,
int granularity)
|
void |
subtractGranuleCount(long granuleCount,
int granularity)
|
String |
toString()
|
String |
toString(int granularity)
|
Instant
public Instant(Temporal temporal,
long granuleCount,
int granularity)
Instant
public Instant(Temporal temporal,
Timestamp timestamp)
throws TemporalException
- Throws:
TemporalException
Instant
public Instant(Temporal temporal,
Timestamp timestamp,
int granularity)
throws TemporalException
- Throws:
TemporalException
Instant
public Instant(Temporal temporal,
Date date)
throws TemporalException
- Throws:
TemporalException
Instant
public Instant(Temporal temporal,
Date date,
int granularity)
throws TemporalException
- Throws:
TemporalException
Instant
public Instant(Temporal temporal,
Date date)
throws TemporalException
- Throws:
TemporalException
Instant
public Instant(Temporal temporal,
Date date,
int granularity)
throws TemporalException
- Throws:
TemporalException
Instant
public Instant(Temporal temporal,
String datetimeString,
int granularity)
throws TemporalException
- Throws:
TemporalException
Instant
public Instant(Temporal temporal,
String datetimeString,
int granularity,
boolean roundUp)
throws TemporalException
- Throws:
TemporalException
Instant
public Instant(Temporal temporal,
String datetimeString)
throws TemporalException
- Throws:
TemporalException
Instant
public Instant(Temporal temporal,
String datetimeString,
boolean roundUp)
throws TemporalException
- Throws:
TemporalException
Instant
public Instant(Temporal temporal,
Instant instant)
throws TemporalException
- Throws:
TemporalException
isNow
public boolean isNow()
isOngoingInstant
public boolean isOngoingInstant()
getGranularity
public int getGranularity()
setGranularity
public void setGranularity(int granularity)
throws TemporalException
- Throws:
TemporalException
setGranuleCount
public void setGranuleCount(long granuleCount,
int granularity)
getGranuleCount
public long getGranuleCount()
throws TemporalException
- Throws:
TemporalException
getGranuleCount
public long getGranuleCount(int granularity)
throws TemporalException
- Throws:
TemporalException
getDatetimeString
public String getDatetimeString()
throws TemporalException
- Throws:
TemporalException
getDatetimeString
public String getDatetimeString(int granularity)
throws TemporalException
- Throws:
TemporalException
getUtilDate
public Date getUtilDate()
throws TemporalException
- Throws:
TemporalException
getUtilDate
public Date getUtilDate(int granularity)
throws TemporalException
- Throws:
TemporalException
getSQLDate
public Date getSQLDate()
throws TemporalException
- Throws:
TemporalException
getSQLDate
public Date getSQLDate(int granularity)
throws TemporalException
- Throws:
TemporalException
isStartOfTime
public boolean isStartOfTime()
toString
public String toString(int granularity)
throws TemporalException
- Throws:
TemporalException
toString
public String toString()
- Overrides:
toString
in class Object
addGranuleCount
public void addGranuleCount(long granuleCount,
int granularity)
throws TemporalException
- Throws:
TemporalException
subtractGranuleCount
public void subtractGranuleCount(long granuleCount,
int granularity)
throws TemporalException
- Throws:
TemporalException
duration
public long duration(Instant i2,
int granularity)
throws TemporalException
- Throws:
TemporalException
before
public boolean before(Instant i2,
int granularity)
throws TemporalException
- Throws:
TemporalException
after
public boolean after(Instant i2,
int granularity)
throws TemporalException
- Throws:
TemporalException
equals
public boolean equals(Instant i2,
int granularity)
throws TemporalException
- Throws:
TemporalException
meets
public boolean meets(Instant i2,
int granularity)
throws TemporalException
- Throws:
TemporalException
met_by
public boolean met_by(Instant i2,
int granularity)
throws TemporalException
- Throws:
TemporalException
adjacent
public boolean adjacent(Instant i2,
int granularity)
throws TemporalException
- Throws:
TemporalException
overlaps
public boolean overlaps(Instant i2,
int granularity)
throws TemporalException
- Throws:
TemporalException
overlapped_by
public boolean overlapped_by(Instant i2,
int granularity)
throws TemporalException
- Throws:
TemporalException
contains
public boolean contains(Instant i2,
int granularity)
throws TemporalException
- Throws:
TemporalException
during
public boolean during(Instant i2,
int granularity)
throws TemporalException
- Throws:
TemporalException
starts
public boolean starts(Instant i2,
int granularity)
throws TemporalException
- Throws:
TemporalException
started_by
public boolean started_by(Instant i2,
int granularity)
throws TemporalException
- Throws:
TemporalException
finishes
public boolean finishes(Instant i2,
int granularity)
throws TemporalException
- Throws:
TemporalException
finished_by
public boolean finished_by(Instant i2,
int granularity)
throws TemporalException
- Throws:
TemporalException
coalesce
public List<Instant> coalesce(List<Instant> instants,
int granularity)
throws TemporalException
- Throws:
TemporalException
getNowGranuleCount
protected long getNowGranuleCount(int granularity)
throws TemporalException
- Throws:
TemporalException
Submit a bug report or feature request
Copyright (c) 1998-2007 Stanford University.