jmri.jmrit.operations.locations
Class ScheduleItem

java.lang.Object
  extended by jmri.jmrit.operations.locations.ScheduleItem
All Implemented Interfaces:
PropertyChangeListener, EventListener

public class ScheduleItem
extends Object
implements PropertyChangeListener

Represents one schedule item of a schedule

Author:
Daniel Boudreau Copyright (C) 2009, 2010

Field Summary
protected  String _comment
           
protected  int _count
           
protected  Location _destination
           
protected  String _id
           
protected  String _load
           
protected  String _road
           
protected  int _sequenceId
           
protected  String _ship
           
protected  Track _trackDestination
           
protected  String _trainScheduleId
           
protected  String _type
           
protected  int _wait
           
static String COUNT_CHANGED_PROPERTY
           
static String DESTINATION_CHANGED_PROPERTY
           
static String DESTINATION_TRACK_CHANGED_PROPERTY
           
static String DISPOSE
           
static String LOAD_CHANGED_PROPERTY
           
static String ROAD_CHANGED_PROPERTY
           
static String TRAIN_SCHEDULE_CHANGED_PROPERTY
           
static String TYPE_CHANGED_PROPERTY
           
static String WAIT_CHANGED_PROPERTY
           
 
Constructor Summary
ScheduleItem(Element e)
          Construct this Entry from XML.
ScheduleItem(String id, String type)
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
           
 void dispose()
           
protected  void firePropertyChange(String p, Object old, Object n)
           
 String getComment()
           
 int getCount()
           
 Location getDestination()
           
 String getDestinationId()
           
 String getDestinationName()
           
 Track getDestinationTrack()
           
 String getDestinationTrackId()
           
 String getDestinationTrackName()
           
 String getId()
           
 String getLoad()
           
 String getRoad()
           
 int getSequenceId()
           
 String getShip()
           
 String getTrainScheduleId()
           
 String getType()
           
 int getWait()
           
 void propertyChange(PropertyChangeEvent e)
           
 void removePropertyChangeListener(PropertyChangeListener l)
           
 void setComment(String comment)
           
 void setCount(int count)
           
 void setDestination(Location destination)
           
 void setDestinationTrack(Track track)
           
 void setLoad(String load)
          Sets the car load requested.
 void setRoad(String road)
          Sets the requested car road name.
 void setSequenceId(int sequence)
           
 void setShip(String load)
          Sets the car load that will ship.
 void setTrainScheduleId(String id)
           
 void setType(String type)
          Sets the type of car requested.
 void setWait(int wait)
           
 Element store()
          Create an XML element to represent this Entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_id

protected String _id

_sequenceId

protected int _sequenceId

_trainScheduleId

protected String _trainScheduleId

_type

protected String _type

_road

protected String _road

_load

protected String _load

_ship

protected String _ship

_destination

protected Location _destination

_trackDestination

protected Track _trackDestination

_count

protected int _count

_wait

protected int _wait

_comment

protected String _comment

TRAIN_SCHEDULE_CHANGED_PROPERTY

public static final String TRAIN_SCHEDULE_CHANGED_PROPERTY
See Also:
Constant Field Values

COUNT_CHANGED_PROPERTY

public static final String COUNT_CHANGED_PROPERTY
See Also:
Constant Field Values

TYPE_CHANGED_PROPERTY

public static final String TYPE_CHANGED_PROPERTY
See Also:
Constant Field Values

ROAD_CHANGED_PROPERTY

public static final String ROAD_CHANGED_PROPERTY
See Also:
Constant Field Values

LOAD_CHANGED_PROPERTY

public static final String LOAD_CHANGED_PROPERTY
See Also:
Constant Field Values

DESTINATION_CHANGED_PROPERTY

public static final String DESTINATION_CHANGED_PROPERTY
See Also:
Constant Field Values

DESTINATION_TRACK_CHANGED_PROPERTY

public static final String DESTINATION_TRACK_CHANGED_PROPERTY
See Also:
Constant Field Values

WAIT_CHANGED_PROPERTY

public static final String WAIT_CHANGED_PROPERTY
See Also:
Constant Field Values

DISPOSE

public static final String DISPOSE
See Also:
Constant Field Values
Constructor Detail

ScheduleItem

public ScheduleItem(String id,
                    String type)
Parameters:
id -
type - car type to schedule

ScheduleItem

public ScheduleItem(Element e)
Construct this Entry from XML. This member has to remain synchronized with the detailed DTD in operations-config.xml

Parameters:
e - Consist XML element
Method Detail

getId

public String getId()

getType

public String getType()

setType

public void setType(String type)
Sets the type of car requested.

Parameters:
type - The car type requested.

getTrainScheduleId

public String getTrainScheduleId()

setTrainScheduleId

public void setTrainScheduleId(String id)

getRoad

public String getRoad()

setRoad

public void setRoad(String road)
Sets the requested car road name.

Parameters:
road - The car road requested.

setLoad

public void setLoad(String load)
Sets the car load requested.

Parameters:
load - The load name requested.

getLoad

public String getLoad()

setShip

public void setShip(String load)
Sets the car load that will ship.

Parameters:
load - The car load shipped.

getShip

public String getShip()

getSequenceId

public int getSequenceId()

setSequenceId

public void setSequenceId(int sequence)

getCount

public int getCount()

setCount

public void setCount(int count)

getWait

public int getWait()

setWait

public void setWait(int wait)

getDestination

public Location getDestination()

setDestination

public void setDestination(Location destination)

getDestinationName

public String getDestinationName()

getDestinationId

public String getDestinationId()

getDestinationTrack

public Track getDestinationTrack()

setDestinationTrack

public void setDestinationTrack(Track track)

getDestinationTrackName

public String getDestinationTrackName()

getDestinationTrackId

public String getDestinationTrackId()

setComment

public void setComment(String comment)

getComment

public String getComment()

dispose

public void dispose()

store

public Element store()
Create an XML element to represent this Entry. This member has to remain synchronized with the detailed DTD in operations-config.xml.

Returns:
Contents in a JDOM Element

propertyChange

public void propertyChange(PropertyChangeEvent e)
Specified by:
propertyChange in interface PropertyChangeListener

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)

firePropertyChange

protected void firePropertyChange(String p,
                                  Object old,
                                  Object n)


Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads