com.partnersoft.job.model
Class Location

java.lang.Object
  extended by com.partnersoft.job.model.JobDataComponent
      extended by com.partnersoft.job.model.Location
All Implemented Interfaces:
Coggable

public class Location
extends JobDataComponent

Author:
Paul Reavis Copyright 2004 Partner Software, Inc.

Constructor Summary
Location()
           
Location(java.lang.String name, double x, double y)
           
 
Method Summary
 java.util.ArrayList allSpans()
           
 java.util.ArrayList allSpansFrom()
           
 java.util.ArrayList allSpansTo()
           
 void generateID()
          Subclass homework.
 Alternative getAlternative()
           
 Chain getChain()
           
 GPSReading getGps()
          Gets the value of gps
 GPSReading getGPS()
          Gets the value of gps
 Job getJob()
           
 MapPosition getPosition()
          Gets the value of position
 Cog getState()
          Subclasses extend this by calling super.getState() and then adding their own state to the result.
 java.util.ArrayList getUnits()
          Gets the value of units
 double getX()
           
 double getY()
           
 double getZ()
           
 void remove()
          Removes this location from its chain.
 void setChain(Chain newChain)
           
 void setGps(GPSReading argGps)
          Sets the value of gps
 void setGPS(GPSReading argGps)
          Sets the value of gps
 void setPosition(MapPosition argPosition)
          Sets the value of position
 void setState(Cog state)
          Subclasses should extend this by calling super.setState() and then setting their own state from the input.
 void setUnits(java.util.ArrayList argUnits)
          Sets the value of units
 void setX(double newX)
           
 void setY(double newY)
           
 void setZ(double newZ)
           
 java.lang.String toString()
           
 
Methods inherited from class com.partnersoft.job.model.JobDataComponent
copy, copyStateFrom, generateGuid, generateStandardIDs, getData, getGuid, getID, getName, getType, setData, setGuid, setID, setName, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Location

public Location()

Location

public Location(java.lang.String name,
                double x,
                double y)
Method Detail

generateID

public void generateID()
Description copied from class: JobDataComponent
Subclass homework. Component should assign itself a unique integer ID (often more useful than a GUID for dealing with legacy systems or in reports and such). Generally this is by consulting an ID registry; the job actually serves this purpose for all its components.

Specified by:
generateID in class JobDataComponent

remove

public void remove()
Removes this location from its chain.

Specified by:
remove in class JobDataComponent

getState

public Cog getState()
Description copied from class: JobDataComponent
Subclasses extend this by calling super.getState() and then adding their own state to the result.

Specified by:
getState in interface Coggable
Overrides:
getState in class JobDataComponent

setState

public void setState(Cog state)
Description copied from class: JobDataComponent
Subclasses should extend this by calling super.setState() and then setting their own state from the input.

Specified by:
setState in interface Coggable
Overrides:
setState in class JobDataComponent

getJob

public Job getJob()

getAlternative

public Alternative getAlternative()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getX

public double getX()

getY

public double getY()

getZ

public double getZ()

setX

public void setX(double newX)

setY

public void setY(double newY)

setZ

public void setZ(double newZ)

allSpans

public java.util.ArrayList allSpans()

allSpansFrom

public java.util.ArrayList allSpansFrom()

allSpansTo

public java.util.ArrayList allSpansTo()

getChain

public Chain getChain()

setChain

public void setChain(Chain newChain)

getUnits

public java.util.ArrayList getUnits()
Gets the value of units

Returns:
the value of units

setUnits

public void setUnits(java.util.ArrayList argUnits)
Sets the value of units

Parameters:
argUnits - Value to assign to this.units

getGps

public GPSReading getGps()
Gets the value of gps

Returns:
the value of gps

setGps

public void setGps(GPSReading argGps)
Sets the value of gps

Parameters:
argGps - Value to assign to this.gps

getPosition

public MapPosition getPosition()
Gets the value of position

Returns:
the value of position

setPosition

public void setPosition(MapPosition argPosition)
Sets the value of position

Parameters:
argPosition - Value to assign to this.position

getGPS

public GPSReading getGPS()
Gets the value of gps

Returns:
the value of gps

setGPS

public void setGPS(GPSReading argGps)
Sets the value of gps

Parameters:
argGps - Value to assign to this.gps