|
tauZaman v0.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--tauzaman.calendricsystem.CalendricSystem
CalendricSystem class represents a Calendric System, which contains
Calendars' Epochs and provides an entrance point to
all Epoch and Calendar services.
Calendar,
PropertyManager| Field Summary | |
private java.util.Hashtable |
calendarNamesToCalendars
Keeps Calendar names as its keys and
Calendar |
private Calendar[] |
calendars
List of handle(s) of Calendar(s) that this calendric system contains, in
the order of default input order, which is defined in Calendar Specification
file. |
private java.util.Hashtable |
calendarUrlsToCalendarNames
Keeps Calendar urls as its keys and
Calendar |
private CalendarRepository |
cr
a handle to unique CalendarRepository of, CalendricSystemRepository,
indirectly this TauZamanSystem |
(package private) Granularity |
defaultGranularity
Default Granularity of this CalendricSystem. |
private GranularityLattice |
lattice
jkm |
private Mapping[] |
mappings
Granularity mappings belong to this CalendricSystem. |
(package private) java.lang.String |
token
Default regular expression for useful information in inputs. |
private java.net.URL |
url
Url of the this CalendricSystem, which is enforced to be unique in
database |
| Constructor Summary | |
CalendricSystem(CalendarRepository cr,
java.net.URL url)
Constructs a CalendricSystem object;
Forms a CalendricSystem by parsing url. |
|
| Method Summary | |
Granule |
castDeterminantInstant(Granule granule,
Granularity toGranularity)
|
void |
clearCaches()
|
private void |
formCalendricSystem()
Initializes this CalendricSystem's states by
parsing file that its url points. |
private Granularity |
formGranularity(java.lang.String localName,
java.lang.String calendarName)
Returns a Granularity produced from global identity of mapping elements. |
Calendar[] |
getAllCalendars()
Returns all Calendars in this CalendricSystem. |
Calendar |
getCalendar(java.lang.String calendarName)
|
Granularity |
getDefaultGranularity()
Returns default Granularity of this CalendricSystem. |
java.lang.String |
getDefaultRegex()
Returns default regular expression for this CalendricSystem |
GranularityLattice |
getGranularityLattice()
|
Mapping[] |
getMappings()
Returns Mappings of this
CalendricSystem. |
Calendar[] |
getOrderedCalendars(Property overrideInputOrderProperty)
Returns an array of ordered list of Calendars for converting
a temporal data type to corresponding output string. |
java.net.URL |
getUrl()
Returns url of this CalendricSystem's specification file. |
boolean |
isCoarser(Granularity g1,
Granularity g2)
|
boolean |
isEquivalent(Granularity g1,
Granularity g2)
|
boolean |
isFiner(Granularity g1,
Granularity g2)
|
boolean |
isIncomparable(Granularity g1,
Granularity g2)
|
java.lang.String |
toString()
Returns url of this CalendricSystem. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private java.net.URL url
CalendricSystem, which is enforced to be unique in
database
private Calendar[] calendars
Calendar(s) that this calendric system contains, in
the order of default input order, which is defined in Calendar Specification
file.
Calendarprivate java.util.Hashtable calendarNamesToCalendars
Calendar names as its keys and
Calendars as values.
private java.util.Hashtable calendarUrlsToCalendarNames
Calendar urls as its keys and
Calendar names as values.
private Mapping[] mappings
CalendricSystem.
java.lang.String token
Granularity defaultGranularity
Granularity of this CalendricSystem.
private CalendarRepository cr
CalendarRepository of, CalendricSystemRepository,
indirectly this TauZamanSystem
private GranularityLattice lattice
| Constructor Detail |
public CalendricSystem(CalendarRepository cr,
java.net.URL url)
throws CalendricSystemFormationException
CalendricSystem object;
Forms a CalendricSystem by parsing url.
cr - CalendarRepository, which this CalendricSystem
will use to load Calendars
CalendricSystemFormationException - if any error occurs while forming
CalendricSystem from given URL| Method Detail |
public java.net.URL getUrl()
CalendricSystem's specification file.
CalendricSystempublic Calendar[] getAllCalendars()
Calendars in this CalendricSystem.
Calendarspublic java.lang.String getDefaultRegex()
CalendricSystem
private void formCalendricSystem()
throws CalendricSystemFormationException
CalendricSystem's states by
parsing file that its url points.
CalendricSystemFormationException - if any error occurs while forming
CalendricSystem from given URLpublic Mapping[] getMappings()
Mappings of this
CalendricSystem.
Mappings
private Granularity formGranularity(java.lang.String localName,
java.lang.String calendarName)
throws CalendricSystemFormationException
Granularity produced from global identity of mapping elements. It also
checks validity of mapping names.
localName - String name of Granularity given as in CalendricSystem spec filecalendarName - String name of Calendar given as in CalendricSystem spec file
Granularity
CalendricSystemFormationException - if any abnormal condition occurs when forming
Granularitypublic Granularity getDefaultGranularity()
Granularity of this CalendricSystem.
Granularity, which is the default Granularity
public Calendar[] getOrderedCalendars(Property overrideInputOrderProperty)
throws CalendricSystemServiceException
Calendars for converting
a temporal data type to corresponding output string.
overrideInputOrderProperty - Property that will be used
when forming an ordered input calendar list
Calendars
CalendricSystemServiceException - if any problem occurs when forming
an ordered Calendar listpublic java.lang.String toString()
CalendricSystem.
toString in class java.lang.Objectpublic GranularityLattice getGranularityLattice()
public Calendar getCalendar(java.lang.String calendarName)
public Granule castDeterminantInstant(Granule granule,
Granularity toGranularity)
throws CalendricSystemServiceException
CalendricSystemServiceException
public boolean isCoarser(Granularity g1,
Granularity g2)
throws CalendricSystemServiceException
CalendricSystemServiceException
public boolean isEquivalent(Granularity g1,
Granularity g2)
throws CalendricSystemServiceException
CalendricSystemServiceException
public boolean isFiner(Granularity g1,
Granularity g2)
throws CalendricSystemServiceException
CalendricSystemServiceException
public boolean isIncomparable(Granularity g1,
Granularity g2)
throws CalendricSystemServiceException
CalendricSystemServiceExceptionpublic void clearCaches()
|
tauZaman v0.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||