tauZaman
v0.1

tauzaman.io
Class Input

java.lang.Object
  |
  +--tauzaman.io.Input

public class Input
extends java.lang.Object

Input class handles conversion of temporal constants to timestamps.

Status:
design complete, implementation complete

Field Summary
private  CalendricSystem activeCalendricSystem
          A handle to CalendricSystem, which is the active CalendricSystem of parent TauZamanLocalService.
private  PropertyManager activePropertyManager
          A handle to PropertyManager, which is the active PropertyManager of parent TauZamanLocalService.
private  Fields fields
           
private  FVSupportRepository fvsr
          A handle to FVSupportRepository of parent TauZamanSystem
private  boolean whitespace
           
 
Constructor Summary
Input(CalendricSystem activeCalendricSystem, PropertyManager activePropertyManager, FVSupportRepository fvsr)
          Constructs an Input object.
 
Method Summary
private  void fillInFields(java.lang.String input, java.lang.String format)
          Fetches useful information from input according to information in format.
 Granule[] parseInput(java.lang.String input, java.lang.String propertyName)
          Returns formed Granule(s) given a temporal constant and name of the Property to be used.
private  void parseInputInternal(org.w3c.dom.Element input, org.w3c.dom.Element format)
           Traverses two DOM trees (parsed from temporal constant and Property's Format) and checks whether they match.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

whitespace

private boolean whitespace

fields

private Fields fields

activeCalendricSystem

private CalendricSystem activeCalendricSystem
A handle to CalendricSystem, which is the active CalendricSystem of parent TauZamanLocalService.


activePropertyManager

private PropertyManager activePropertyManager
A handle to PropertyManager, which is the active PropertyManager of parent TauZamanLocalService. Active PropertyManager means the PropertyManager. which corresponds to active CalendricSystem.


fvsr

private FVSupportRepository fvsr
A handle to FVSupportRepository of parent TauZamanSystem

Constructor Detail

Input

public Input(CalendricSystem activeCalendricSystem,
             PropertyManager activePropertyManager,
             FVSupportRepository fvsr)
Constructs an Input object.

Parameters:
activeCalendricSystem - A handle to CalendricSystem, which is the active CalendricSystem of parent TauZamanLocalService
activePropertyManager - A handle to PropertyManager, which is the active PropertyManager of parent TauZamanLocalService
fvsr - A handle to FVSupportRepository of parent TauZamanSystem
Method Detail

parseInput

public Granule[] parseInput(java.lang.String input,
                            java.lang.String propertyName)
                     throws IOException
Returns formed Granule(s) given a temporal constant and name of the Property to be used.

Parameters:
input - String temporal constant
propertyName - String name of the Property
Returns:
an array of Granule objects
Throws:
IOException - if any abnormal condition occurs when parsing input and forming Granule(s)

parseInputInternal

private void parseInputInternal(org.w3c.dom.Element input,
                                org.w3c.dom.Element format)
                         throws IOException

Traverses two DOM trees (parsed from temporal constant and Property's Format) and checks whether they match. During this operation it also fetches useful information from temporal constant.

In this sense, this operation has two phases concurrently; first matching phase, where structure of two DOM trees are checked, and second fetching phase, where information in input DOM tree is fetched using information in format DOM tree.

Parameters:
input - root Element of DOM parsed input
format - root Element of DOM parsed format
Throws:
IOException - if any abnormal condition occurs during the matching or fetching process of input

fillInFields

private void fillInFields(java.lang.String input,
                          java.lang.String format)
                   throws IOException
Fetches useful information from input according to information in format. This is the fetching phase.

Parameters:
input - String part of (either Attr values or Text values) DOM parsed temporal constant
format - String part of (either Attr values or Text values) DOM parsed format
Throws:
IOException - if any abnormal condition occurs during fetching process of input

tauZaman
v0.1

Submit a bug or feature

tauZaman is an open-source, publicly avaliable project