concept.structure
Class Conference

public class Conference

Title: Conference -class

Description: Conference -class that acts as the top of the class hierarchy storing ConferenceDays and conference-specific attributes

Copyright: Copyright (c) 2006
CONCEPT-lisenssi Tekijänoikeus (c) 2006, Pekka Kuuva, Tatu Repo, Pasi Saari, Anna Seppänen. Kaikki oikeudet pidätetään. Tämän ohjelmiston levittäminen ja käyttö lähdekoodina ja binäärinä, muutettuna tai muuttamattomana, on sallittu edellyttäen, että seuraavat ehdot täytetään: 1. OHJELMISTON LEVITTÄMINEN Lähdekoodikopioissa, dokumentaatiossa ja muussa ohjelmiston mukana tulevassa aineistossa on oltava tämä lisenssi kokonaisuudessaan. 1.2. VIENTIRAJOITUKSET Ohjelmistoa tai sen osia ei saa viedä Amerikan Yhdysvaltoihin ilman tekijöiden erillistä suostumusta. 2. OHJELMISTON KÄYTTÖ (EULA) 2.1 KÄYTTÖEHDOT Ohjelmiston käyttäjän tulee joskus suorittaa vähintään yksi seuraavista toimista: a) Tarjota omalla kustannuksellaan olut tasokkaassa ravintolassa, pubissa tai muussa vastaavassa anniskelua harjoittavassa liikkeessä kullekin tekijöistä, sekä ilmoittaa tästä tarjouksesta. b) Tarjota tekijöille omalla kustannuksellaan pääsy tapahtumaan, jonka yhteydessä sovellusta on käytetty, ja ilmoittaa tästä tarjouksesta tekijöille. Ilmoittamisella tarkoitetaan vähintään viikkoa ennen tarjouk- sen täytäntöönpanoa tekijöille lähetettyä sähköpostia, jossa ilmoitetaan ohjelmiston käyttäjän nimi ja yhteystiedot sekä tarjous ja sen ajankohta. Jos käyttöehdot eivät ole täyttyneet, ohjelmistoa ei saa käyttää. 2.1. TAKUU Tekijänoikeuden haltijat ja ohjelmiston kehittäjät tarjoavat tämän ohjelmiston "sellaisena kuin se on". Sovellukselle ei myönnetä minkäänlaista takuuta kaupallisesti hyväksyttävästä laadusta eikä sen taata soveltuvan mihinkään tarkoitukseen. 2.2. VASTUUNRAJOITUS Tekijänoikeuden haltija ja ohjelmiston kehittäjät eivät ole missään tilanteessa vastuussa suorista, epäsuorista, yleisistä, erityisistä, satunnaisista tai seurauksellisista vahingoista (sisältäen, muttei tyhjentävästi, korvaavan tuotteen tai palvelun hankinnan, käyttömahdollisuuden, tiedon tai voittojen menetykset, tai liiketoiminnan keskeytymisen), jotka aiheutuvat miten tahansa ja millä tahansa vahingonkorvausoikeudellisella perusteella mukaanlukien sopimusvastuu, ankara vastuu ja sopimuksen ulkoinen vastuu (huolimattomuus tai muu), vaikka kyseisten vahinkojen mahdollisuudesta olisi kerrottu.

Version:
1.0
Author:
TR
Method Detail

onWhichDayIsThis

public int onWhichDayIsThis(long time)
This method finds out with which of the days in this conference the given time corresponds. This method can return negative values or values that would indicate the days after the conference.
Parameters:
time - long given time
Returns:
int the supposed index of the corresponding day

parseAndCreateDays

public boolean parseAndCreateDays(java.lang.String dayfrom,
                                  java.lang.String dayto)
this badboy tries hard to get actual dates out of the strings it receives as parameters and then create a corresponding amount of ConferenceDay instances under this particular conference
Parameters:
dayfrom - String The start of the conference.
dayto - String The end of the conference.
Returns:
boolean Returns whether the operation was successful.

setGrades

public void setGrades(int aMin,
                      int aMax,
                      int rMin,
                      int rMax,
                      int min,
                      int max)
This very functional method takes a try at setting all the grade limits of this conference at once
Parameters:
aMin - int given minimum accepted
aMax - int given maximum accepted
rMin - int given minimum rejected
rMax - int given maximum rejected
min - int given minimum
max - int given maximum

countDays

public int countDays(long start,
                     long end)
This method counts the days from the starttime and endtime of the conference
Parameters:
start - long starttime
end - long endtime
Returns:
int returns the number of days

createDays

public boolean createDays(long start,
                          long end)
creates as many days as the difference between the conference start and end
Parameters:
start - long the starttime
end - long the endtime
Returns:
boolean Returns whether the operation was successful.

addBlockType

public boolean addBlockType(concept.structure.BlockType type)
Adds a blocktype to the conference.
Parameters:
type - BlockType The given blocktype
Returns:
boolean Returns whether the operation was successful.

getBlockTypeById

public concept.structure.BlockType getBlockTypeById(int id)
Returns a blocktype matching the given id
Parameters:
id - int the given id
Returns:
BlockType the found blocktype or null

getTypeById

public concept.structure.Type getTypeById(int id)
Returns the type matching the given id.
Parameters:
id - int The given id.
Returns:
Type Returns the found type or null.

getTopicById

public concept.structure.Topic getTopicById(int id)
Returns the topic matching the given id.
Parameters:
id - int the given id.
Returns:
Topic The found topic or null.

getSessionsByDay

public java.util.Vector getSessionsByDay(int index)
Returns sessions scheduled to the day at the given index.
Parameters:
index - int The given index.
Returns:
Vector Returns the sessions scheduled on the given day.

getDayByTime

public concept.structure.ConferenceDay getDayByTime(long start)
Returns the day corresponding the given time.
Parameters:
start - long The given time.
Returns:
ConferenceDay The corresponding day.

getChairmenByTopic

public java.util.Vector getChairmenByTopic(concept.structure.Topic topic)
Returns the charimen associated with the given topic
Parameters:
topic - Topic The given topic
Returns:
Vector The chairmen found.

getMainPresentationContainer

public concept.structure.Presentations getMainPresentationContainer()
Returns a container with all the presentations
Returns:
Presentations Returns a container with all the presentations

getMainPresenterContainer

public concept.structure.Presenters getMainPresenterContainer()
Returns a container with all the presenters
Returns:
Presenters Returns a container with all the presenters

getMainSessionContainer

public concept.structure.Sessions getMainSessionContainer()
Returns a container with all the sessions
Returns:
Sessions Returns a container with all the sessions

getMainHallContainer

public concept.structure.Halls getMainHallContainer()
Returns a container with all the halls
Returns:
Halls Returns a container with all the halls

getAllHalls

public java.util.Vector getAllHalls()
Returns the vector containing all the halls.
Returns:
Vector Returns the vector containing all the halls.

addDay

public boolean addDay(concept.structure.ConferenceDay day)
Adds a given day into the conference.
Parameters:
day - ConferenceDay The given day
Returns:
boolean Returns whether the operation was successful.

addDayFromDB

public boolean addDayFromDB(concept.structure.ConferenceDay day)
Adds a given day to the conference without invoking the isChanged-flag.
Parameters:
day - ConferenceDay The given day.
Returns:
boolean Returns whether the operation was successful.

removeDayAt

public boolean removeDayAt(int index)
Removes the day at the given index.
Parameters:
index - int The given index.
Returns:
boolean Returns whether the operation was successful.

removeDay

public boolean removeDay(concept.structure.ConferenceDay day)
Removes the given day.
Parameters:
day - ConferenceDay The given day.
Returns:
boolean