Logo Search packages:      
Sourcecode: pcalendar version File versions  Download package

Classes | Public Member Functions | Static Public Member Functions | Static Protected Attributes | Private Member Functions | Private Attributes | Static Private Attributes

net::sf::linuxorg::pcal::engine::Engine Class Reference

Collaboration diagram for net::sf::linuxorg::pcal::engine::Engine:
Collaboration graph

List of all members.


class  PasswordRequiredException

Public Member Functions

void addBBT (final Date date, int i)
void addBirthDate (final Date date)
void addOvulationDate (final Date date)
void addPregnancyDate (final Date date)
void addPregnancyInterruptDate (final Date date)
void addStartDate (final Date date)
void changeBBTScale (final boolean toCelsiusScale)
void deleteSypmthomValue (int sympthomIndex, int deletedValueIndex)
boolean existsDateNote (final Date date)
void exportToFile (final File file) throws IOException
HashMap< Date, DateIntsContainergetAllDateIntegers ()
int getAvgLength ()
int getBBT (final Date date)
BBTSympthomsSetDefinition getBBTSympthoms ()
int getCalMethodAccuracy ()
DateIntsContainer getDateIntegers (final Date date)
String getDateNote (final Date date)
PCalDayInfo getDayInfo (final Date date)
EnginePreferences getDefaultPreferences ()
final EnginePreferences getEnginePreferences ()
final Date getLastMenstruationDate ()
int getMaxLength ()
int getMinLength ()
final Set< Date > getNoteDates ()
int getPeriodsCount ()
final Vector< PCalPeriodInfogetPeriodsStats ()
Date getPredictedBirthDay (Date date, int pregnancyDayNumber)
final File getWorkFile ()
boolean importFromFile (final File file) throws IOException, ParseException
void insertSypmthomValue (int sympthomIndex, int newValueIndex)
boolean isFileBBTCelsiusScale ()
boolean isModified ()
void loadFromFile (final File file, char[] password) throws SAXException, IOException, ParserConfigurationException, PasswordRequiredException
void newFile ()
void removeBBT (final Date date)
void removeDateIntegers (final Date date)
void removeDateNote (final Date date)
void removeDateRecord (final Date date)
void saveToFile (final File file) throws ParserConfigurationException, IOException
void saveToFile (final File file, final char[] password) throws ParserConfigurationException, IOException
void setDateInteger (final Date date, final int index, Integer value)
void setDateIntegers (final Date date, DateIntsContainer record)
void setDateNote (final Date date, final String note)
void setEnginePreferences (EnginePreferences enginePreferences)
void swapSympthoms (int sympthomIndex1, int sympthomIndex2)
void swapSympthomValues (int sympthomIndex, int valueIndex1, int valueIndex2)

Static Public Member Functions

static int convertTemperatureScale (final boolean toCelsiusScale, final int source)
static int dateDiff (java.util.Date earlier, java.util.Date later)

Static Protected Attributes

static final Integer PCAL_TYPE_BIRTH = 3
static final Integer PCAL_TYPE_MENS = 1
static final Integer PCAL_TYPE_OVULATION = 5
static final Integer PCAL_TYPE_PREGNANCY = 2
static final Integer PCAL_TYPE_PREGNANCY_INT = 4

Private Member Functions

void applyDateIntDelta (int sympthomIndex, int startingValue, int delta)
Boolean checkForFutureOvulation (Date date)
void clear ()
PCalDayInfo getDayInfoEstimated (final Date date, Date last_date)
PCalDayInfo getDayInfoRecorded (final Date date)
int getDocumentType (Document doc)
Date getMensPeriodEndDate (final Date periodStartDate)
Date getMensPeriodOvulationDate (final Date periodStartDate)
PCalDayInfo getOvulationDayInfo (final Date date)
Date getPeriodStartDate (final Date date, final boolean checkMensLength)
void loadFromFileDates (final Document doc) throws SAXException
void loadFromFileDateValues (final Document doc) throws SAXException
void loadFromFileProperties (Document doc) throws SAXException
void parseLoadedFileProperties (Properties fileProperties)
void recalculate ()
void saveToFileDates (Document doc, Element parent_element)
void saveToFileDateValues (Document doc, Element parent_element)
void saveToFileFileProperties (Document doc, Element parent_element) throws IOException
void setWorkFile (File f)

Private Attributes

int avgLength = 0
 regular periods count
HashMap< Date, Integer > bBTList = new HashMap<Date, Integer>()
 the notes container
int calMethodAccuracy = 3
HashMap< Date, DateIntsContainerdateIntValues = new HashMap<Date, DateIntsContainer>()
HashMap< Date, Integer > dateTypes = new HashMap<Date, Integer>()
 the calendar events index
HashMap< Integer, String > dateTypeToTagMap = new HashMap<Integer, String>()
HashMap< Integer, String > dateValueTypeToTagMap = new HashMap<Integer, String>()
 map the date type code to the tag name
EnginePreferences enginePreferences = new EnginePreferences()
boolean fileBBTCelsiusScale = true
 the BBT records list
int maxLength = 0
int maxOvulationDayNum = 0
int minLength = 0
int minOvulationDayNum = 0
boolean modified = false
 map the date-value type code to the tag name
HashMap< Date, String > notesContainer = new HashMap<Date, String>()
 the types of the calendar events listed in start_dates
int periodsCount = 0
 true if any changes were done since last save or load the statistics data
int recordedOvulations = 0
TreeSet< Date > startDates = new TreeSet<Date>()
BBTSympthomsSetDefinition sympthomsDefinition = new BBTSympthomsSetDefinition()
 the date-value container for the integer values
File workFile = null
 0 - high, 1 - moderate, 2 - low, 3 - no data
SecretKey workFileKey = null

Static Private Attributes

static final String BBT_SYMPTHOM = "BBT_SYMPTHOM"
static final String BBT_VALUE = "BBT_VALUE"
static final String CELSIUS_SCALE = "CELSIUS_SCALE"
static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy/MM/dd")
static final int DEFAULT_BAD_FEEL_DAYS_AFTER = 0
static final int DEFAULT_BAD_FEEL_DAYS_BEFORE = 0
static final int DEFAULT_BUFFER_DAYS = 0
static final int DEFAULT_REGULAR_MAX_LENGTH = 35
static final int DEFAULT_REGULAR_MIN_LENGTH = 24
static final String FALSE = "False"
static final String FILE_PROPERTIES_TAG = "FileProperties"
static final int FILE_TYPE_ENCRYPTED = 1
static final int FILE_TYPE_PLAIN = 0
static final int FILE_TYPE_UNKNOWN = -1
static final String FILE_VERSION = "2.0"
static final int MAX_PREGNANCY_DAYS = 308
static final Integer PCAL_TYPE_BBT = 2
static final Integer PCAL_TYPE_DATE_INTS = 3
static final Integer PCAL_TYPE_NOTES = 1
static final int PERIOD_FERTILE_DAYS_COUNT = 6
static final int REGULAR_PREGNANCY_DAYS = 280
static final int RELIABLE_LENGTH_DIFF = 2
static final int RELIABLE_MAX_AVG_LENGTH = 33
static final int RELIABLE_MIN_AVG_LENGTH = 25
static final int RELIABLE_PERIODS_COUNT = 5
static final String TRUE = "True"
static final int UNRELIABLE_LENGTH_DIFF = 3
static final int UNRELIABLE_MAX_AVG_LENGTH = 35
static final int UNRELIABLE_MIN_AVG_LENGTH = 24

Detailed Description

Mar'yan Rachynskyy

Definition at line 69 of file Engine.java.

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index