com.pegacat.vcf.data
Class Body

java.lang.Object
  |
  +--com.pegacat.vcf.data.VoyagerObject
        |
        +--com.pegacat.vcf.data.Body

public class Body
extends VoyagerObject

A voyager body - a world or a moon. Creation date: (22/05/2001 1:47:11 PM)


Field Summary
static int ABSOLUTE_ZERO
           
static int ASTEROID
          Size options
protected  int atmosphere
           
static java.lang.String[] ATMOSPHERENAMES
           
protected  java.lang.String atmosphereString
           
protected  int burps
           
static int CH4
          Atmospheres
static int CL2
          Atmospheres
static java.lang.String CloudCover
           
static int CO2
          Atmospheres
static int COLD
           
protected  java.lang.String description
          the actual world description - several lines of text
protected  int eco
           
protected  int empire
           
protected  java.lang.String extraInfo
          extra info - includes cloud cover and the like
static int EXTREMELY_HOT
           
static int F2
          Atmospheres
static int GAS_GIANT
          Size options
static int GIANT
          Size options
static int H2
          Atmospheres
static int HOT
           
static int LARGE
          Size options
static int LARGE_GAS_GIANT
          Size options
protected  java.lang.String liquid
          liquid - text version, see slp for numeric liquid level
protected  int liveability
           
static int MEDIUM
          Size options
static int MILD
           
protected  boolean moon
          true for moons, false for worlds!
static int NH3
          Atmospheres
protected  int orbit
          Orbits
static int OXYGEN
          Atmospheres
protected  int radiation
           
protected  boolean resource_surveyed
          true if resources are from the cargo report, so we have an reu there.
protected  WorldResource[] resources
          array of resources on the world, or null if none.
static int RING
          Size options
protected  int shp
           
protected  int size
          size is one of the constants from ASTEROID to LARGE_GAS_GIANT
static java.lang.String[] SIZENAMES
          strings corresponding to sizes
static int[] SIZEVALUES
          values for each sizename - needed to handle duplicates
protected  int slp
           
protected  java.lang.String slpType
          the slp type, i.e.
static int SMALL
          Size options
protected  int smp
           
protected  int spp
           
static int SULPHUR
          Atmospheres
protected  double surveyDate
          date of world survey
protected  boolean surveyed
          Do we have a world survey? Note some fields may be set from star survey Also a world can be surveyed even if it's star isn't!
protected  int temperature
           
protected  java.lang.String temperatureString
           
static java.lang.String[] TEMPNAMES
          strings corresponding to temperatures
static int TINY
          Size options
static int ULTRA_HOT
           
static java.lang.String UNK_STRING
          voyager unknown field flag, also used to indicate unknown strings
static int UNKNOWN
          value for all unknown integer fields
static int VACUUM
          Atmospheres
protected  int veg
          numeric veg level from a world survey
protected  java.lang.String vegString
          string veg level from a star survey - can be '-' if there is cloud cover
static int VERY_COLD
           
static int VERY_HOT
           
 
Fields inherited from class com.pegacat.vcf.data.VoyagerObject
location, name, text
 
Constructor Summary
Body(java.lang.String name, VoyagerLocation location)
          Construct from a name and a location.
 
Method Summary
 int getAtmosphere()
           
 java.lang.String getAtmosphereString()
           
 int getBurps()
           
 java.lang.String getDescription()
           
 int getEco()
           
 int getEmpire()
           
 java.lang.String getExtraInfo()
           
 java.lang.String getLiquid()
           
 int getLiveability()
           
 int getOrbit()
           
 int getRadiation()
           
 WorldResource[] getResources()
           
 int getShp()
           
 int getSize()
           
 java.lang.String getSizeString()
          get the size as a string Creation date: (22/05/2001 7:21:02 PM)
 int getSlp()
           
 java.lang.String getSlpType()
           
 int getSmp()
           
 int getSpp()
           
 double getSurveyDate()
           
 int getTemperature()
           
 java.lang.String getTemperatureString()
           
 int getVeg()
           
 java.lang.String getVegString()
           
 boolean isMoon()
           
 boolean isResource_surveyed()
           
 boolean isSurveyed()
           
 void setAtmosphere(java.lang.String newAtmosphere)
          This sets the atmosphere String to the passed newAtmosphere parameter.
 void setBurps(int newBurps)
           
 void setDescription(java.lang.String newDescription)
           
 void setEco(int newEco)
           
 void setEmpire(int newEmpire)
           
 void setExtraInfo(java.lang.String newExtraInfo)
           
 void setLiquid(java.lang.String newLiquid)
           
 void setLiveability(int newLiveability)
           
 void setMoon(boolean newMoon)
           
 void setOrbit(int newOrbit)
           
 void setRadiation(int newRadiation)
           
 void setResource_surveyed(boolean newResource_surveyed)
           
 void setResources(WorldResource[] newResources)
          Sets the resources, unless the world has already been flagged as resource_surveyed, in which case the resources are already up to date.
 void setResources(WorldResource[] newResources, boolean resource_survey_data)
          Sets the resources, and the resource surveyed flag if resource_survey_data is true.
 void setShp(int newShp)
           
 void setSize(int newSize)
           
 void setSlp(int newSlp)
           
 void setSlpType(java.lang.String newSlpType)
           
 void setSmp(int newSmp)
           
 void setSpp(int newSpp)
           
 void setSurveyDate(double newSurveyDate)
           
 void setSurveyed(boolean newSurveyed)
           
 void setTemperature(java.lang.String newTemperature)
          Set the temperature string, and attempt to match it with a known temperature in the standard temperature name array.
 void setVeg(int newVeg)
           
 void setVegString(java.lang.String newVegString)
           
 java.lang.String toString()
          Returns a String that represents the value of this object.
 
Methods inherited from class com.pegacat.vcf.data.VoyagerObject
getLocation, getName, getNamedPosition, getText, getX, getY, getZ
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNKNOWN

public static final int UNKNOWN
value for all unknown integer fields

UNK_STRING

public static final java.lang.String UNK_STRING
voyager unknown field flag, also used to indicate unknown strings

CloudCover

public static final java.lang.String CloudCover

extraInfo

protected java.lang.String extraInfo
extra info - includes cloud cover and the like

moon

protected boolean moon
true for moons, false for worlds!

surveyed

protected boolean surveyed
Do we have a world survey? Note some fields may be set from star survey Also a world can be surveyed even if it's star isn't!

surveyDate

protected double surveyDate
date of world survey

ASTEROID

public static final int ASTEROID
Size options

RING

public static final int RING
Size options

TINY

public static final int TINY
Size options

SMALL

public static final int SMALL
Size options

MEDIUM

public static final int MEDIUM
Size options

LARGE

public static final int LARGE
Size options

GIANT

public static final int GIANT
Size options

GAS_GIANT

public static final int GAS_GIANT
Size options

LARGE_GAS_GIANT

public static final int LARGE_GAS_GIANT
Size options

SIZENAMES

public static final java.lang.String[] SIZENAMES
strings corresponding to sizes

SIZEVALUES

public static final int[] SIZEVALUES
values for each sizename - needed to handle duplicates

orbit

protected int orbit
Orbits

VACUUM

public static final int VACUUM
Atmospheres

OXYGEN

public static final int OXYGEN
Atmospheres

CO2

public static final int CO2
Atmospheres

NH3

public static final int NH3
Atmospheres

CH4

public static final int CH4
Atmospheres

CL2

public static final int CL2
Atmospheres

SULPHUR

public static final int SULPHUR
Atmospheres

F2

public static final int F2
Atmospheres

H2

public static final int H2
Atmospheres

ATMOSPHERENAMES

public static final java.lang.String[] ATMOSPHERENAMES

atmosphere

protected int atmosphere

atmosphereString

protected java.lang.String atmosphereString

liquid

protected java.lang.String liquid
liquid - text version, see slp for numeric liquid level

liveability

protected int liveability

radiation

protected int radiation

shp

protected int shp

size

protected int size
size is one of the constants from ASTEROID to LARGE_GAS_GIANT

slp

protected int slp

slpType

protected java.lang.String slpType
the slp type, i.e. 'water'.

smp

protected int smp

spp

protected int spp

ULTRA_HOT

public static final int ULTRA_HOT

EXTREMELY_HOT

public static final int EXTREMELY_HOT

VERY_HOT

public static final int VERY_HOT

HOT

public static final int HOT

MILD

public static final int MILD

COLD

public static final int COLD

VERY_COLD

public static final int VERY_COLD

ABSOLUTE_ZERO

public static final int ABSOLUTE_ZERO

TEMPNAMES

public static final java.lang.String[] TEMPNAMES
strings corresponding to temperatures

temperatureString

protected java.lang.String temperatureString

temperature

protected int temperature

veg

protected int veg
numeric veg level from a world survey

vegString

protected java.lang.String vegString
string veg level from a star survey - can be '-' if there is cloud cover

burps

protected int burps

description

protected java.lang.String description
the actual world description - several lines of text

eco

protected int eco

empire

protected int empire

resource_surveyed

protected boolean resource_surveyed
true if resources are from the cargo report, so we have an reu there.

resources

protected WorldResource[] resources
array of resources on the world, or null if none.
Constructor Detail

Body

public Body(java.lang.String name,
            VoyagerLocation location)
Construct from a name and a location.
Parameters:
name - the world/moon name, i.e. 123b1
location - the location, generally constructed from the name.
Method Detail

getOrbit

public int getOrbit()

isSurveyed

public boolean isSurveyed()

setOrbit

public void setOrbit(int newOrbit)

setSurveyed

public void setSurveyed(boolean newSurveyed)

toString

public java.lang.String toString()
Returns a String that represents the value of this object. not yet implemented properly
Overrides:
toString in class java.lang.Object
Returns:
a string representation of the body

getAtmosphereString

public java.lang.String getAtmosphereString()

getAtmosphere

public int getAtmosphere()

getLiquid

public java.lang.String getLiquid()

getLiveability

public int getLiveability()

getRadiation

public int getRadiation()

getShp

public int getShp()

getSize

public int getSize()

getSizeString

public java.lang.String getSizeString()
get the size as a string Creation date: (22/05/2001 7:21:02 PM)
Returns:
the size, or UNK_STRING if unknown

getSlp

public int getSlp()

getSmp

public int getSmp()

getSpp

public int getSpp()

getTemperatureString

public java.lang.String getTemperatureString()

getTemperature

public int getTemperature()

getVeg

public int getVeg()

getVegString

public java.lang.String getVegString()

setAtmosphere

public void setAtmosphere(java.lang.String newAtmosphere)
This sets the atmosphere String to the passed newAtmosphere parameter. It also attempt to match this with one of the standard atmosphere names in the atmosphere array.

setLiquid

public void setLiquid(java.lang.String newLiquid)

setLiveability

public void setLiveability(int newLiveability)

setRadiation

public void setRadiation(int newRadiation)

setShp

public void setShp(int newShp)

setSize

public void setSize(int newSize)

setSlp

public void setSlp(int newSlp)

setSmp

public void setSmp(int newSmp)

setSpp

public void setSpp(int newSpp)

setTemperature

public void setTemperature(java.lang.String newTemperature)
Set the temperature string, and attempt to match it with a known temperature in the standard temperature name array.

setVeg

public void setVeg(int newVeg)

setVegString

public void setVegString(java.lang.String newVegString)

getSurveyDate

public double getSurveyDate()

setSurveyDate

public void setSurveyDate(double newSurveyDate)

getExtraInfo

public java.lang.String getExtraInfo()

isMoon

public boolean isMoon()

setExtraInfo

public void setExtraInfo(java.lang.String newExtraInfo)

setMoon

public void setMoon(boolean newMoon)

getBurps

public int getBurps()

getDescription

public java.lang.String getDescription()

getEco

public int getEco()

getEmpire

public int getEmpire()

getResources

public WorldResource[] getResources()

getSlpType

public java.lang.String getSlpType()

isResource_surveyed

public boolean isResource_surveyed()

setBurps

public void setBurps(int newBurps)

setDescription

public void setDescription(java.lang.String newDescription)

setEco

public void setEco(int newEco)

setEmpire

public void setEmpire(int newEmpire)

setResource_surveyed

public void setResource_surveyed(boolean newResource_surveyed)

setResources

public void setResources(WorldResource[] newResources)
Sets the resources, unless the world has already been flagged as resource_surveyed, in which case the resources are already up to date. Creation date: (7/06/2001 3:42:59 PM)
Parameters:
newResources - com.pegacat.vcf.data.WorldResource[]

setResources

public void setResources(WorldResource[] newResources,
                         boolean resource_survey_data)
Sets the resources, and the resource surveyed flag if resource_survey_data is true. generally called with this parameter true, to indicate resources from the cargo report. Creation date: (7/06/2001 3:42:59 PM)
Parameters:
newResources - com.pegacat.vcf.data.WorldResource[]
resource_survey_data - true if this data is from the cargo report.

setSlpType

public void setSlpType(java.lang.String newSlpType)