Class JourneySat.Travel

Object
   |
   +--JourneySat.Travel

class JourneySat.Travel


This class manages the information about a travel and the status of the navigation in the journal. A travel is sequence of days (JourneySat.Day); each day contains a sequence of places (JourneySat.Place) and each place holds a sequence of contents (JourneySat.Content). The status of the travel is represented by a current day, a current place and a current content. It can be accessed using the getCurrentDay, getCurrentDayIndex, getCurrentPlace, getCurrentPlaceIndex, getCurrentContent and getCurrentContentIndex methods. The contents in a place can also be accessed with getContentArray.
Defined in travel.js


Field Summary
 Object loader
          
 
Constructor Summary
JourneySat.Travel ()
           
 
Method Summary
 void asynchronousMode(<boolean> mode)
           Sets the synchronization mode for the XMLHttpRequest that loads the XML from the remote server.
 boolean changeDay(<JourneySat.Date> newDate)
           Changes the date of the current day.
 void deleteContent()
           Removes the current content from the travel.
 void deleteDay()
           Removes the current day from the travel sequence.
 void deletePlace()
           Removes the current place from the travel.
 void firstDay()
           Moves to the first day of the travel and updates.
 void firstPlace()
           Moves to the first place of the travel.
 JourneySat.Content[] getContentArray()
           Returns the contents of the current place as an array.
 JourneySat.Content getCurrentContent()
           Returns the current content.
 int getCurrentContentIndex()
           Returns the position of the current content in the sequence of the contents inside the current place.
 JourneySat.Day getCurrentDay()
           Returns the current day.
 int getCurrentDayIndex()
           Returns the position of the current day in the sequence of travel days.
 JourneySat.Place getCurrentPlace()
           Returns the current place.
 int getCurrentPlaceIndex()
           Returns the position of the current place in the sequence of travel days.
 GPoint getCurrentPoint()
           Returns the GPoint object corresponding to the coordinates of the current place
 JourneySat.Date getEndDate()
           Returns the end date of the travel as a JourneySat.Date object
 int getNumberOfContents()
           Returns the number of contents in the travel
 int getNumberOfDays()
           Returns the number of days in the travel
 int getNumberOfPlaces()
           Returns the number of places in the travel
 XMLHttpRequest getRequest()
           Returns the request object used to retrieve the XML from the server
 JourneySat.Date getStartDate()
           Returns the start date of the travel as a JourneySat.Date object
 String getTravelDates()
           Returns the date range of the travel as a string in the format yyyy/mm/dd - yyyy/mm/dd
 String getTravelDescription()
           Returns the description of the travel
 String getTravelTitle()
           Returns the travel title
 int getZoomLevel()
           Returns the default zoom level for the travel.
 void goToDay(<int> n)
           Moves to the n-th day in the travel.
 void goToPlace(<int> n)
           Moves to the n-th place in the travel.
 Object insertContent()
          
 boolean insertDay(newDay)
           Adds a new day to the travel.
 boolean insertPlace()
           Adds a new place to the travel.
 boolean isAsynchronous()
           Returnes the synchronization mode
 void lastDay()
           Moves to the last day of the travel.
 void lastPlace()
           Moves to the last place and to the last day of the travel.
 void load()
           Loads the XML file and creates the internal data structure that represents the travel.
 void log(<String> msg)
           Logs a message.
 void moveDownContent()
           Swaps the current content with the one that follows it in a place.
 boolean moveDownDay()
           Swaps the current day with the one that follows it in the travel sequence.
 void moveDownPlace()
           Swaps the current place with the one that follows it in a day.
 void moveUpContent()
           Swaps the current content with the one that precedes it in a place.
 boolean moveUpDay()
           Swaps the current day with the one that precedes it in the travel sequence.
 void moveUpPlace()
           Swaps the current place with the one that precedes it in a day.
 void nextContent()
           Moves the current content to the one that follows it in the same place.
 void nextDay()
           Moves to the next day of the travel.
 void nextPlace()
           Moves the current place to the next place in the travel and update the current day if needed
 void onload()
           Handler function, called when Loader completes loading the XML file.
 void prevContent()
           Moves the current content to the one that precedes it in the same place.
 void prevDay()
           Moves to the previous day of the travel.
 void prevPlace()
           Moves the current place to the previous place in the travel and also update the current day if needed.
 void setDataFile(<String> dataFile)
           Specifies the URL of the XML data file.
 void setEndDate(<JourneySat.Date> date)
           Sets the end date of the travel
 void setNumberOfContents(<int> contents)
           Sets the number of contents
 void setNumberOfDays(<int> days)
           Sets the number of days
 void setNumberOfPlaces(<int> places)
           Sets the number of places
 void setStartDate(<JourneySat.Date> date)
           Sets the start date of the travel
 void setTravelDescription(<String> descr)
           Sets the description of the travel
 void setTravelTitle(<String> title)
           Sets the travel title
 void setZoomLevel(<int> zoomLevel)
           Sets the default zoom level for the travel.
 String toString()
           Returns a XML representation of the places array.
<static> String getFormattedDate(<int> sY, <int> sM, <int> sD, <String> sep)
           Prepares a formatted representation of a date in the format yyyymmdd.

Field Detail

loader

Object loader

Constructor Detail

JourneySat.Travel

JourneySat.Travel()

Method Detail

asynchronousMode

void asynchronousMode(<boolean> mode)

changeDay

boolean changeDay(<JourneySat.Date> newDate)

deleteContent

void deleteContent()

deleteDay

void deleteDay()

deletePlace

void deletePlace()

firstDay

void firstDay()

firstPlace

void firstPlace()

getContentArray

JourneySat.Content[] getContentArray()

getCurrentContent

JourneySat.Content getCurrentContent()

getCurrentContentIndex

int getCurrentContentIndex()

getCurrentDay

JourneySat.Day getCurrentDay()

getCurrentDayIndex

int getCurrentDayIndex()

getCurrentPlace

JourneySat.Place getCurrentPlace()

getCurrentPlaceIndex

int getCurrentPlaceIndex()

getCurrentPoint

GPoint getCurrentPoint()

getEndDate

JourneySat.Date getEndDate()

getNumberOfContents

int getNumberOfContents()

getNumberOfDays

int getNumberOfDays()

getNumberOfPlaces

int getNumberOfPlaces()

getRequest

XMLHttpRequest getRequest()

getStartDate

JourneySat.Date getStartDate()

getTravelDates

String getTravelDates()

getTravelDescription

String getTravelDescription()

getTravelTitle

String getTravelTitle()

getZoomLevel

int getZoomLevel()

goToDay

void goToDay(<int> n)

goToPlace

void goToPlace(<int> n)

insertContent

Object insertContent()

insertDay

boolean insertDay(newDay)

insertPlace

boolean insertPlace()

isAsynchronous

boolean isAsynchronous()

lastDay

void lastDay()

lastPlace

void lastPlace()

load

void load()

log

void log(<String> msg)

moveDownContent

void moveDownContent()

moveDownDay

boolean moveDownDay()

moveDownPlace

void moveDownPlace()

moveUpContent

void moveUpContent()

moveUpDay

boolean moveUpDay()

moveUpPlace

void moveUpPlace()

nextContent

void nextContent()

nextDay

void nextDay()

nextPlace

void nextPlace()

onload

void onload()

prevContent

void prevContent()

prevDay

void prevDay()

prevPlace

void prevPlace()

setDataFile

void setDataFile(<String> dataFile)

setEndDate

void setEndDate(<JourneySat.Date> date)

setNumberOfContents

void setNumberOfContents(<int> contents)

setNumberOfDays

void setNumberOfDays(<int> days)

setNumberOfPlaces

void setNumberOfPlaces(<int> places)

setStartDate

void setStartDate(<JourneySat.Date> date)

setTravelDescription

void setTravelDescription(<String> descr)

setTravelTitle

void setTravelTitle(<String> title)

setZoomLevel

void setZoomLevel(<int> zoomLevel)

toString

String toString()

getFormattedDate

<static> String getFormattedDate(<int> sY, <int> sM, <int> sD, <String> sep)


Documentation generated by JSDoc on Thu Oct 20 14:28:29 2005