|
tauZaman v0.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--tauzaman.calendar.Calendar
Calendar class represents a Calendar, which defines the time values
of interest to user, usually over a specific segment of the physical time-line.
Calendar keeps Granularity/additional FieldName(s) information and
provides Calendar dependent functions for time-stamp/temporal constant conversions.
Calendars can be formed given Calendar specification files' URL
s, which are fetched as String and formed by CalendricSystem
from Calendric System specification files. For example;
URLurl = newURL("http://www.eecs.wsu.edu/burgun/calendars/Gregorian/GregV1.cal"); Calendar calendar = new Calendar(url);
Also Calendars are kept in a database called CalendarRepository.
CalendarRepository,
CalendricSystem,
ClassLoaderMethodCaller| Constructor Summary | |
Calendar(java.net.URL url)
Constructs a Calendar object from a given Calendar Specification url in a Calendric System Specification file. |
|
| Method Summary | |
boolean |
equals(java.lang.Object obj)
Returns true if URL of this Calendar is equal to
given Calendar. |
Granule |
fieldsToGranule(Fields fields)
Forms and returns a Granule, which contains a Granularity,
given Fields object, which is formed by Input by parsing
a temporal constant input string. |
Granularity[] |
getGranularities()
Returns Granularities of this
Calendar. |
Granularity |
getGranularityByLocalName(java.lang.String localName)
Returns Granularity of this Calendar given its local name. |
Mapping[] |
getMappings()
Returns Mappings of this
Calendar. |
Granularity |
getUnderlyingGranularity()
Returns underlying Granularity of this
Calendar. |
java.net.URL |
getUrl()
Returns the URL, which is also Primary Key in CalendarRepository, of this Calendar. |
boolean |
granuleToFields(Granule granule,
Fields fields)
Forms and returns a Fields, which is unpacked version of a
timestamp parsed into each Field. |
java.lang.String |
toString()
Returns string representation of this Calendar. |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Calendar(java.net.URL url)
throws CalendarFormationException
url - URL of Calendar Specification file.
CalendarFormationException - If any problem
happens while parsing the file; Any problem related to xml parsing,
any bad information fetched from parsed file, such as, a bad URL or
a URL that causes problems with dynamic loading.| Method Detail |
public Granularity getGranularityByLocalName(java.lang.String localName)
Granularity of this Calendar given its local name.
localName - String local name of a Granularity
Granularity of this Calendar
given its local name. Returns null if no such Granularity exists.public java.net.URL getUrl()
CalendarRepository, of this Calendar.
Calendarpublic boolean equals(java.lang.Object obj)
Calendar is equal to
given Calendar.
equals in class java.lang.ObjectCalendar equals to
given Calendar
public Granule fieldsToGranule(Fields fields)
throws CalendarServiceException
Forms and returns a Granule, which contains a Granularity,
given Fields object, which is formed by Input by parsing
a temporal constant input string. This is a regular Calendar
function, which means every Calendar is required to implement it.
This method calls actual implementation, which is loaded dynamically from given URL in Calendar Specification file.
fields - temporal constant input string, which is parsed into its Fields
Granule formed given Fields object
CalendarServiceException - if any problem occurs when performing
this dynamically loaded method, this also includes problems with dynamic loading
exceptions.Fields,
Field,
Granule,
Property
public boolean granuleToFields(Granule granule,
Fields fields)
throws CalendarServiceException
Forms and returns a Fields, which is unpacked version of a
timestamp parsed into each Field. This is a regular
Calendar function, which means every Calendar
is required to implement it.
This method calls actual implementation, which is loaded dynamically from given URL in Calendar Specification file.
CalendarServiceException - if any problem occurs when performing
this dynamically loaded method, this also includes problems with dynamic loading
exceptions.Fields,
Field,
Granule,
Propertypublic Granularity[] getGranularities()
Granularities of this
Calendar.
Granularitiespublic Mapping[] getMappings()
Mappings of this
Calendar.
Mappingspublic Granularity getUnderlyingGranularity()
Granularity of this
Calendar.
Granularitypublic java.lang.String toString()
Calendar.
toString in class java.lang.Object
|
tauZaman v0.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||