|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mars_sim.msp.simulation.vehicle.VehicleConfig
public class VehicleConfig
Provides configuration information about vehicle units. Uses a DOM document to get the information.
Constructor Summary | |
---|---|
VehicleConfig(org.w3c.dom.Document vehicleDoc)
Constructor |
Method Summary | |
---|---|
java.util.Collection<Part> |
getAttachableParts(java.lang.String vehicleType)
Gets all of the parts that can be attached to a vehicle. |
double |
getBaseSpeed(java.lang.String vehicleType)
Gets the vehicle's base speed. |
double |
getCargoCapacity(java.lang.String vehicleType,
java.lang.String resource)
Gets the vehicle's capacity for a resource. |
int |
getCrewSize(java.lang.String vehicleType)
Gets the vehicle's maximum crew size. |
double |
getEmptyMass(java.lang.String vehicleType)
Gets the vehicle's mass when empty. |
double |
getFuelEfficiency(java.lang.String vehicleType)
Gets the vehicle's fuel efficiency. |
int |
getLabTechLevel(java.lang.String vehicleType)
Gets the vehicle's lab tech level. |
java.util.List<java.lang.String> |
getLabTechSpecialities(java.lang.String vehicleType)
Gets a list of the vehicle's lab tech specialities. |
int |
getPartAttachmentSlotNumber(java.lang.String vehicleType)
Gets the number of part attachment slots for a vehicle. |
java.util.List<java.lang.String> |
getRoverNameList()
Gets a list of rover names. |
int |
getSickbayBeds(java.lang.String vehicleType)
Gets the vehicle's sickbay bed number. |
int |
getSickbayTechLevel(java.lang.String vehicleType)
Gets the vehicle's sickbay tech level. |
double |
getTotalCapacity(java.lang.String vehicleType)
Gets the vehicle's total cargo capacity. |
java.util.Set<java.lang.String> |
getVehicleTypes()
Returns a set of all vehicle types. |
boolean |
hasLab(java.lang.String vehicleType)
Checks if the vehicle has a lab. |
boolean |
hasPartAttachments(java.lang.String vehicleType)
Checks if a vehicle type has the ability to attach parts. |
boolean |
hasSickbay(java.lang.String vehicleType)
Checks if the vehicle has a sickbay. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VehicleConfig(org.w3c.dom.Document vehicleDoc)
vehicleDoc
- DOM document with vehicle configuration.Method Detail |
---|
public java.util.Set<java.lang.String> getVehicleTypes() throws java.lang.Exception
java.lang.Exception
- if error retrieving vehicle types.public double getFuelEfficiency(java.lang.String vehicleType) throws java.lang.Exception
vehicleType
- the vehicle type
java.lang.Exception
- if vehicle type could not be found or XML parsing error.public double getBaseSpeed(java.lang.String vehicleType) throws java.lang.Exception
vehicleType
- the vehicle type
java.lang.Exception
- if vehicle type could not be found or XML parsing error.public double getEmptyMass(java.lang.String vehicleType) throws java.lang.Exception
vehicleType
- the vehicle type
java.lang.Exception
- if vehicle type could not be found or XML parsing error.public int getCrewSize(java.lang.String vehicleType) throws java.lang.Exception
vehicleType
- the vehicle type
java.lang.Exception
- if vehicle type could not be found or XML parsing error.public double getTotalCapacity(java.lang.String vehicleType) throws java.lang.Exception
vehicleType
- the vehicle type
java.lang.Exception
- if vehicle type could not be found or XML parsing error.public double getCargoCapacity(java.lang.String vehicleType, java.lang.String resource) throws java.lang.Exception
vehicleType
- the vehicle typeresource
- the resource
java.lang.Exception
- if vehicle type could not be found or XML parsing error.public boolean hasSickbay(java.lang.String vehicleType) throws java.lang.Exception
vehicleType
- the vehicle type
java.lang.Exception
- if vehicle type could not be found or XML parsing error.public int getSickbayTechLevel(java.lang.String vehicleType) throws java.lang.Exception
vehicleType
- the vehicle type
java.lang.Exception
- if vehicle type could not be found or XML parsing error.public int getSickbayBeds(java.lang.String vehicleType) throws java.lang.Exception
vehicleType
- the vehicle type
java.lang.Exception
- if vehicle type could not be found or XML parsing error.public boolean hasLab(java.lang.String vehicleType) throws java.lang.Exception
vehicleType
- the vehicle type
java.lang.Exception
- if vehicle type could not be found or XML parsing error.public int getLabTechLevel(java.lang.String vehicleType) throws java.lang.Exception
vehicleType
- the vehicle type
java.lang.Exception
- if vehicle type could not be found or XML parsing error.public java.util.List<java.lang.String> getLabTechSpecialities(java.lang.String vehicleType) throws java.lang.Exception
vehicleType
- the vehicle type
java.lang.Exception
- if vehicle type could not be found or XML parsing error.public boolean hasPartAttachments(java.lang.String vehicleType) throws java.lang.Exception
vehicleType
- the vehicle type
java.lang.Exception
- if vehicle type could not be found or XML parsing error.public int getPartAttachmentSlotNumber(java.lang.String vehicleType) throws java.lang.Exception
vehicleType
- the vehicle type.
java.lang.Exception
- if vehicle type could not be found or XML parsing error.public java.util.Collection<Part> getAttachableParts(java.lang.String vehicleType) throws java.lang.Exception
vehicleType
- the vehicle type
java.lang.Exception
- if vehicle type could not be found or XML parsing error.public java.util.List<java.lang.String> getRoverNameList() throws java.lang.Exception
java.lang.Exception
- if XML parsing error.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |