Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.dma.ihm.controller.data.io
Class ScenarioXML  view ScenarioXML download ScenarioXML.java

java.lang.Object
  extended byorg.dma.ihm.controller.data.io.ScenarioXML

public class ScenarioXML
extends java.lang.Object

Exports / Imports scenario and databases to/from xml files.


Field Summary
private  ScenarioFile scenarioFile
          Scenario file name
 
Constructor Summary
ScenarioXML(ScenarioFile scenarioFile)
          Constructor to set the filenames of the scenarios
 
Method Summary
static ScenarioFile getScenarioFile(java.io.File scenarioFile)
          Returns a "parsed" scenario from a filename
static void xmlExportPlayers(java.io.File dbName, org.dma.ihm.game.player.Player[] players)
          Exports the players to a XML database
static void xmlExportScenario(ScenarioFile scenarioFile, org.dma.ihm.game.league.LeagueOwner[] leagueOwners)
          Exports the scenario to a XML database
static void xmlExportTeams(java.io.File dbName, org.dma.ihm.game.team.Team[] teams)
          Exports the teams to a XML database
 java.util.Vector xmlImportPlayers()
          Imports players from db
 org.dma.ihm.game.league.LeagueOwner[] xmlImportScenario(org.dma.ihm.game.team.Team[] teams, org.dma.ihm.game.player.Player[] players)
          Imports a scenario from a xml file
 org.dma.ihm.game.team.Team[] xmlImportTeams(org.dma.ihm.game.player.Player[] players)
          Imports teams from db
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scenarioFile

private ScenarioFile scenarioFile
Scenario file name

Constructor Detail

ScenarioXML

public ScenarioXML(ScenarioFile scenarioFile)
Constructor to set the filenames of the scenarios

Method Detail

getScenarioFile

public static ScenarioFile getScenarioFile(java.io.File scenarioFile)
Returns a "parsed" scenario from a filename


xmlImportScenario

public org.dma.ihm.game.league.LeagueOwner[] xmlImportScenario(org.dma.ihm.game.team.Team[] teams,
                                                               org.dma.ihm.game.player.Player[] players)
Imports a scenario from a xml file


xmlExportScenario

public static void xmlExportScenario(ScenarioFile scenarioFile,
                                     org.dma.ihm.game.league.LeagueOwner[] leagueOwners)
Exports the scenario to a XML database


xmlImportPlayers

public java.util.Vector xmlImportPlayers()
Imports players from db


xmlExportPlayers

public static void xmlExportPlayers(java.io.File dbName,
                                    org.dma.ihm.game.player.Player[] players)
Exports the players to a XML database


xmlImportTeams

public org.dma.ihm.game.team.Team[] xmlImportTeams(org.dma.ihm.game.player.Player[] players)
Imports teams from db


xmlExportTeams

public static void xmlExportTeams(java.io.File dbName,
                                  org.dma.ihm.game.team.Team[] teams)
Exports the teams to a XML database