com.partnersoft.job.model
Class Span

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

public class Span
extends JobDataComponent

Author:
Paul Reavis Copyright 2004 Partner Software, Inc.

Constructor Summary
Span()
           
Span(Location from, Location to)
           
 
Method Summary
 java.util.ArrayList allSpans()
           
 java.util.ArrayList allSpansFrom()
           
 java.util.ArrayList allSpansTo()
           
 void generateID()
          Subclass homework.
 Alternative getAlternative()
           
 double getAngle()
          Gets the value of angle
 Point getCenter()
           
 Chain getChain()
           
 double getDeflectionAngle()
          Gets the value of deflectionAngle
 Location getFrom()
          Gets the value of from
 java.lang.String getFromGuid()
           
 Job getJob()
           
 double getLength()
          Gets the value of length
 java.lang.String getMeasurementMethod()
          Gets the value of measurementMethod
 Cog getState()
          Subclasses extend this by calling super.getState() and then adding their own state to the result.
 Location getTo()
          Gets the value of to
 java.lang.String getToGuid()
           
 java.util.ArrayList getUnits()
          Gets the value of units
 double getX1()
           
 double getX2()
           
 double getY1()
           
 double getY2()
           
 double getZ1()
           
 double getZ2()
           
 void remove()
          Removes this span from its chain.
 void setAngle(double argAngle)
          Sets the value of angle
 void setChain(Chain newChain)
           
 void setDeflectionAngle(double argDeflectionAngle)
          Sets the value of deflectionAngle
 void setFrom(Location argFrom)
          Sets the value of from
 void setLength(double argLength)
          Sets the value of length
 void setMeasurementMethod(java.lang.String argMeasurementMethod)
          Sets the value of measurementMethod
 void setState(Cog state)
          Subclasses should extend this by calling super.setState() and then setting their own state from the input.
 void setTo(Location argTo)
          Sets the value of to
 void setUnits(java.util.ArrayList argUnits)
          Sets the value of units
 
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, toString, wait, wait, wait
 

Constructor Detail

Span

public Span()

Span

public Span(Location from,
            Location to)
Method Detail

getJob

public Job getJob()

getAlternative

public Alternative getAlternative()

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

getX1

public double getX1()

getY1

public double getY1()

getZ1

public double getZ1()

getX2

public double getX2()

getY2

public double getY2()

getZ2

public double getZ2()

getFromGuid

public java.lang.String getFromGuid()

getToGuid

public java.lang.String getToGuid()

getCenter

public Point getCenter()

allSpans

public java.util.ArrayList allSpans()

allSpansFrom

public java.util.ArrayList allSpansFrom()

allSpansTo

public java.util.ArrayList allSpansTo()

remove

public void remove()
Removes this span 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

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

getDeflectionAngle

public double getDeflectionAngle()
Gets the value of deflectionAngle

Returns:
the value of deflectionAngle

setDeflectionAngle

public void setDeflectionAngle(double argDeflectionAngle)
Sets the value of deflectionAngle

Parameters:
argDeflectionAngle - Value to assign to this.deflectionAngle

getAngle

public double getAngle()
Gets the value of angle

Returns:
the value of angle

setAngle

public void setAngle(double argAngle)
Sets the value of angle

Parameters:
argAngle - Value to assign to this.angle

getLength

public double getLength()
Gets the value of length

Returns:
the value of length

setLength

public void setLength(double argLength)
Sets the value of length

Parameters:
argLength - Value to assign to this.length

getMeasurementMethod

public java.lang.String getMeasurementMethod()
Gets the value of measurementMethod

Returns:
the value of measurementMethod

setMeasurementMethod

public void setMeasurementMethod(java.lang.String argMeasurementMethod)
Sets the value of measurementMethod

Parameters:
argMeasurementMethod - Value to assign to this.measurementMethod

getFrom

public Location getFrom()
Gets the value of from

Returns:
the value of from

setFrom

public void setFrom(Location argFrom)
Sets the value of from

Parameters:
argFrom - Value to assign to this.from

getTo

public Location getTo()
Gets the value of to

Returns:
the value of to

setTo

public void setTo(Location argTo)
Sets the value of to

Parameters:
argTo - Value to assign to this.to