|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mars_sim.msp.simulation.structure.SettlementConfig
public class SettlementConfig
Provides configuration information about settlements. Uses a DOM document to get the information.
Field Summary | |
---|---|
static java.lang.String |
RANDOM
|
Constructor Summary | |
---|---|
SettlementConfig(org.w3c.dom.Document settlementDoc,
PartPackageConfig partPackageConfig)
Constructor |
Method Summary | |
---|---|
java.lang.String |
getInitialSettlementLatitude(int index)
Gets the latitude of an initial settlement, or 'random' if the longitude is to be randomly determined. |
java.lang.String |
getInitialSettlementLongitude(int index)
Gets the longitude of an initial settlement, or 'random' if the longitude is to be randomly determined. |
java.lang.String |
getInitialSettlementName(int index)
Gets the name of an initial settlement or 'random' if the name is to chosen randomly from the settlement name list. |
java.lang.String |
getInitialSettlementTemplate(int index)
Gets the template used by an initial settlement. |
int |
getNumberOfInitialSettlements()
Gets the number of initial settlements. |
int |
getNumberOfTemplateResupplies(java.lang.String templateName)
Gets the number of resupplies for a settlement template. |
java.util.List<java.lang.String> |
getSettlementNameList()
Gets a list of possible settlement names. |
java.util.List<java.lang.String> |
getTemplateBuildingTypes(java.lang.String templateName)
Gets the building types in a settlement template. |
java.util.Map<java.lang.String,java.lang.Integer> |
getTemplateEquipment(java.lang.String templateName)
Gets the equipment types in a settlement template. |
java.util.Map<Part,java.lang.Integer> |
getTemplateParts(java.lang.String templateName)
Gets the part types in a settlement template. |
java.util.Map<AmountResource,java.lang.Double> |
getTemplateResources(java.lang.String templateName)
Gets the resource types in a settlement template. |
double |
getTemplateResupplyArrivalTime(java.lang.String templateName,
int index)
Gets the arrival time of a settlement resupply for a particular settlement template. |
java.lang.String |
getTemplateResupplyName(java.lang.String templateName,
int index)
Gets the name of a settlement resupply for a particular settlement template. |
java.util.List<java.lang.String> |
getTemplateVehicleTypes(java.lang.String templateName)
Gets the vehicle types in a settlement template. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String RANDOM
Constructor Detail |
---|
public SettlementConfig(org.w3c.dom.Document settlementDoc, PartPackageConfig partPackageConfig) throws java.lang.Exception
settlementDoc
- DOM document with settlement configuration.partPackageConfig
- the part package configuration.
java.lang.Exception
- if error reading XML document.Method Detail |
---|
public java.util.List<java.lang.String> getTemplateBuildingTypes(java.lang.String templateName)
templateName
- the name of the settlement template.
public java.util.List<java.lang.String> getTemplateVehicleTypes(java.lang.String templateName)
templateName
- the name of the settlement template.
public java.util.Map<java.lang.String,java.lang.Integer> getTemplateEquipment(java.lang.String templateName)
templateName
- the name of the settlement template.
public java.util.Map<AmountResource,java.lang.Double> getTemplateResources(java.lang.String templateName)
templateName
- the name of the settlement template.
public java.util.Map<Part,java.lang.Integer> getTemplateParts(java.lang.String templateName)
templateName
- the name of the settlement template.
public int getNumberOfTemplateResupplies(java.lang.String templateName)
templateName
- the name of the settlement template.
public java.lang.String getTemplateResupplyName(java.lang.String templateName, int index)
templateName
- the name of the settlement template.index
- the index of the resupply mission.
public double getTemplateResupplyArrivalTime(java.lang.String templateName, int index)
templateName
- the name of the settlement template.index
- then index of the resupply mission.
public int getNumberOfInitialSettlements()
public java.lang.String getInitialSettlementName(int index)
index
- the index of the initial settlement.
public java.lang.String getInitialSettlementTemplate(int index)
index
- the index of the initial settlement.
public java.lang.String getInitialSettlementLongitude(int index)
index
- the index of the initial settlement.
public java.lang.String getInitialSettlementLatitude(int index)
index
- the index of the initial settlement.
public java.util.List<java.lang.String> getSettlementNameList() throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |