public class GisScenario extends java.lang.Object implements Scenario, CollapseSimCompatibaleScenarioV1_1
Constructor and Description |
---|
GisScenario()
Create an empty scenario.
|
GisScenario(org.dom4j.Document doc)
Create a scenario from an XML document.
|
Modifier and Type | Method and Description |
---|---|
void |
addAmbulanceCentre(int location)
Add an ambulance centre.
|
void |
addAmbulanceTeam(int location)
Add an ambulance team.
|
void |
addCivilian(int location)
Add a civilian.
|
void |
addFire(int location)
Add a fire.
|
void |
addFireBrigade(int location)
Add a fire brigade.
|
void |
addFireStation(int location)
Add a fire station.
|
void |
addGasStation(int location)
Add a GasStation.
|
void |
addHydrant(int location)
Add a hydrant.
|
void |
addPoliceForce(int location)
Add a police force.
|
void |
addPoliceOffice(int location)
Add a police office.
|
void |
addRefuge(int location)
Add a refuge.
|
void |
apply(StandardWorldModel model,
Config config)
Apply this scenario to a world model.
|
java.util.HashMap<java.lang.Integer,java.lang.Float> |
getAftershocks() |
java.util.Collection<java.lang.Integer> |
getAmbulanceCentres()
Get the list of ambulance centre locations.
|
java.util.Collection<java.lang.Integer> |
getAmbulanceTeams()
Get the list of ambulance team locations.
|
java.util.Collection<java.lang.Integer> |
getCivilians()
Get the list of civilian locations.
|
java.util.Collection<java.lang.Integer> |
getFireBrigades()
Get the list of fire brigade locations.
|
java.util.Set<java.lang.Integer> |
getFires()
Get the set of fire locations.
|
java.util.Collection<java.lang.Integer> |
getFireStations()
Get the list of fire station locations.
|
java.util.Set<java.lang.Integer> |
getGasStations()
Get the set of GasStations locations.
|
java.util.Set<java.lang.Integer> |
getHydrants()
Get the set of hydrant locations.
|
java.util.Collection<java.lang.Integer> |
getPoliceForces()
Get the list of police force locations.
|
java.util.Collection<java.lang.Integer> |
getPoliceOffices()
Get the list of police office locations.
|
java.util.Set<java.lang.Integer> |
getRefuges()
Get the set of refuge locations.
|
void |
read(org.dom4j.Document doc)
Read scenario data from an XML document.
|
void |
removeAmbulanceCentre(int location)
Remove an ambulance centre.
|
void |
removeAmbulanceTeam(int location)
Remove an ambulance team.
|
void |
removeCivilian(int location)
Remove a civilian.
|
void |
removeFire(int location)
Remove a fire.
|
void |
removeFireBrigade(int location)
Remove a fire brigade.
|
void |
removeFireStation(int location)
Remove a fire station.
|
void |
removeGasStation(int location)
Remove a GasStation.
|
void |
removeHydrant(int location)
Remove a hydrant.
|
void |
removePoliceForce(int location)
Remove a police force.
|
void |
removePoliceOffice(int location)
Remove a police office.
|
void |
removeRefuge(int location)
Remove a refuge.
|
void |
setAmbulanceCentres(java.util.Collection<java.lang.Integer> newLocations)
Set the list of ambulance centre locations.
|
void |
setAmbulanceTeams(java.util.Collection<java.lang.Integer> newLocations)
Set the list of ambulance team locations.
|
void |
setCivilians(java.util.Collection<java.lang.Integer> newLocations)
Set the list of civilian locations.
|
void |
setFireBrigades(java.util.Collection<java.lang.Integer> newLocations)
Set the list of fire brigade locations.
|
void |
setFires(java.util.Set<java.lang.Integer> newLocations)
Set the set of fire locations.
|
void |
setFireStations(java.util.Collection<java.lang.Integer> newLocations)
Set the list of fire station locations.
|
void |
setPoliceForces(java.util.Collection<java.lang.Integer> newLocations)
Set the list of police force locations.
|
void |
setPoliceOffices(java.util.Collection<java.lang.Integer> newLocations)
Set the list of police office locations.
|
void |
setRefuges(java.util.Set<java.lang.Integer> newLocations)
Set the set of refuge locations.
|
void |
write(org.dom4j.Document doc)
Write scenario data to an XML document.
|
public GisScenario()
public GisScenario(org.dom4j.Document doc) throws ScenarioException
doc
- The document to read.ScenarioException
- If the scenario is invalid.ScenarioException
public void read(org.dom4j.Document doc) throws ScenarioException
doc
- The document to read.ScenarioException
- If the scenario is invalid.ScenarioException
public void write(org.dom4j.Document doc)
doc
- The document to write to.public void apply(StandardWorldModel model, Config config) throws ScenarioException
model
- The world model to alter.config
- The configuration.ScenarioException
- if this scenario is invalid.ScenarioException
public java.util.Set<java.lang.Integer> getFires()
public java.util.Set<java.lang.Integer> getRefuges()
public java.util.Set<java.lang.Integer> getGasStations()
public java.util.Set<java.lang.Integer> getHydrants()
public java.util.Collection<java.lang.Integer> getCivilians()
public java.util.Collection<java.lang.Integer> getFireBrigades()
public java.util.Collection<java.lang.Integer> getFireStations()
public java.util.Collection<java.lang.Integer> getPoliceForces()
public java.util.Collection<java.lang.Integer> getPoliceOffices()
public java.util.Collection<java.lang.Integer> getAmbulanceTeams()
public java.util.Collection<java.lang.Integer> getAmbulanceCentres()
public void setFires(java.util.Set<java.lang.Integer> newLocations)
newLocations
- The new set of locations.public void setRefuges(java.util.Set<java.lang.Integer> newLocations)
newLocations
- The new set of locations.public void setCivilians(java.util.Collection<java.lang.Integer> newLocations)
newLocations
- The new list of locations.public void setFireBrigades(java.util.Collection<java.lang.Integer> newLocations)
newLocations
- The new list of locations.public void setFireStations(java.util.Collection<java.lang.Integer> newLocations)
newLocations
- The new list of locations.public void setPoliceForces(java.util.Collection<java.lang.Integer> newLocations)
newLocations
- The new list of locations.public void setPoliceOffices(java.util.Collection<java.lang.Integer> newLocations)
newLocations
- The new list of locations.public void setAmbulanceTeams(java.util.Collection<java.lang.Integer> newLocations)
newLocations
- The new list of locations.public void setAmbulanceCentres(java.util.Collection<java.lang.Integer> newLocations)
newLocations
- The new list of locations.public void addFire(int location)
location
- The new fire location.public void removeFire(int location)
location
- The fire location to remove.public void addRefuge(int location)
location
- The new refuge location.public void removeRefuge(int location)
location
- The refuge location to remove.public void addHydrant(int location)
location
- The new hydrant location.public void removeHydrant(int location)
location
- The hydrant location to remove.public void removeGasStation(int location)
location
- The GasStation location to remove.public void addGasStation(int location)
location
- The new GasStation location.public void addCivilian(int location)
location
- The new civilian location.public void removeCivilian(int location)
location
- The civilian location to remove.public void addFireBrigade(int location)
location
- The new fire brigade location.public void removeFireBrigade(int location)
location
- The fire brigade location to remove.public void addFireStation(int location)
location
- The new fire station location.public void removeFireStation(int location)
location
- The fire station location to remove.public void addPoliceForce(int location)
location
- The new police force location.public void removePoliceForce(int location)
location
- The police force location to remove.public void addPoliceOffice(int location)
location
- The new police office location.public void removePoliceOffice(int location)
location
- The police office location to remove.public void addAmbulanceTeam(int location)
location
- The new ambulance team location.public void removeAmbulanceTeam(int location)
location
- The ambulance team location to remove.public void addAmbulanceCentre(int location)
location
- The new ambulance centre location.public void removeAmbulanceCentre(int location)
location
- The ambulance centre location to remove.public java.util.HashMap<java.lang.Integer,java.lang.Float> getAftershocks()
getAftershocks
in interface CollapseSimCompatibaleScenarioV1_1