org.mars_sim.msp.simulation.structure
Class ResupplyConfig

java.lang.Object
  extended by org.mars_sim.msp.simulation.structure.ResupplyConfig
All Implemented Interfaces:
java.io.Serializable

public class ResupplyConfig
extends java.lang.Object
implements java.io.Serializable

Provides configuration information about settlement resupply missions. Uses a DOM document to get the information.

See Also:
Serialized Form

Constructor Summary
ResupplyConfig(org.w3c.dom.Document resupplyDoc, PartPackageConfig partPackageConfig)
          Constructor
 
Method Summary
 int getNumberOfResupplyImmigrants(java.lang.String resupplyName)
          Gets the number of immigrants in a resupply mission.
 java.util.List<java.lang.String> getResupplyBuildingTypes(java.lang.String resupplyName)
          Gets a list of building types in the resupply mission.
 java.util.Map<java.lang.String,java.lang.Integer> getResupplyEquipment(java.lang.String resupplyName)
          Gets the equipment types in a resupply mission.
 java.util.Map<Part,java.lang.Integer> getResupplyParts(java.lang.String resupplyName)
          Gets a map of parts and their number in a resupply mission.
 java.util.Map<AmountResource,java.lang.Double> getResupplyResources(java.lang.String resupplyName)
          Gets a map of resources and their amounts in a resupply mission.
 java.util.List<java.lang.String> getResupplyVehicleTypes(java.lang.String resupplyName)
          Gets a list of vehicle types in the resupply mission.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResupplyConfig

public ResupplyConfig(org.w3c.dom.Document resupplyDoc,
                      PartPackageConfig partPackageConfig)
               throws java.lang.Exception
Constructor

Parameters:
resupplyDoc - DOM document for resupply configuration.
partPackageConfig - the part package configuration.
Throws:
java.lang.Exception - if error parsing XML.
Method Detail

getResupplyBuildingTypes

public java.util.List<java.lang.String> getResupplyBuildingTypes(java.lang.String resupplyName)
Gets a list of building types in the resupply mission.

Parameters:
resupplyName - name of the resupply mission.
Returns:
list of building types as strings.

getResupplyVehicleTypes

public java.util.List<java.lang.String> getResupplyVehicleTypes(java.lang.String resupplyName)
                                                         throws java.lang.Exception
Gets a list of vehicle types in the resupply mission.

Parameters:
resupplyName - name of the resupply mission.
Returns:
list of vehicle types as strings.
Throws:
java.lang.Exception

getResupplyEquipment

public java.util.Map<java.lang.String,java.lang.Integer> getResupplyEquipment(java.lang.String resupplyName)
Gets the equipment types in a resupply mission.

Parameters:
resupplyName - the name of the resupply mission.
Returns:
map of equipment types and number.

getNumberOfResupplyImmigrants

public int getNumberOfResupplyImmigrants(java.lang.String resupplyName)
Gets the number of immigrants in a resupply mission.

Parameters:
resupplyName - name of the resupply mission.
Returns:
number of immigrants

getResupplyParts

public java.util.Map<Part,java.lang.Integer> getResupplyParts(java.lang.String resupplyName)
Gets a map of parts and their number in a resupply mission.

Parameters:
resupplyName - the name of the resupply mission.
Returns:
map of parts and their numbers.

getResupplyResources

public java.util.Map<AmountResource,java.lang.Double> getResupplyResources(java.lang.String resupplyName)
Gets a map of resources and their amounts in a resupply mission.

Parameters:
resupplyName - the name of the resupply mission.
Returns:
map of resources and their amounts (Double).