|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.emulator.ConfigFileParser
public class ConfigFileParser
This is the main class which parses through the XML config file. It uses the DOM APIs to extract information from the XML file. It extracts individual tags from the resulting tree structure and passes the elements to different parsers based on the element type.
NodeDefParser
,
EventDefParser
,
UserClassDefParser
Field Summary | |
---|---|
private String[][] |
args
|
private String[] |
classNames
|
private static boolean |
debug
|
private String |
defaultDSPConfigFile
|
(package private) static Document |
doc
|
(package private) static Document |
doc2
|
(package private) static Document |
docDSP
|
private DSPConfiguration |
dspConfig
|
private EmuHWConfiguration |
emuHWConfig
|
private String |
emulabInputFile
|
private ArrayList |
eventList
|
protected Logger |
log
|
private EmuNode[] |
nodes
|
private Element |
rootEventDef
|
private SignalEnvironment |
sigEnv
|
private String[] |
urls
|
private String |
userInputFile
|
private VisDefParser |
visDefParser
|
private WorldDef |
worldDef
|
Constructor Summary | |
---|---|
ConfigFileParser(String inputFile,
String pid,
String eid,
EmuHWConfiguration emuHWConfig)
Constructor. |
Method Summary | |
---|---|
int |
compare(Object o1,
Object o2)
|
private Antenna[] |
getAntennaList(EmuNode[] nodes)
|
String[][] |
getArgs()
|
String[] |
getClassNames()
Method to obtain the array of classes which the URLClassloader should load into the system at run time. |
DSPConfiguration |
getDSPConfiguration()
|
ArrayList |
getEventList()
Method to obtain the Inputstream which represents the Inputstream of the event file (script). |
EmuNode[] |
getNodes()
Method to obtain the array of EmuNode objects that were created after extracting the NodeDef tag in the config file. |
SignalEnvironment |
getSignalEnvironment()
|
String[] |
getURLs()
Method to obtain the array of URLs through which the URLClassloader can search in order to extract the definition of a class that is to be loaded at run time. |
VisDefParser |
getVisDefParser()
|
WorldDef |
getWorldDef()
Returns the WorldDef, which specifies the dimensions of the world. |
void |
parse()
This is the main function in the ConfigFileParser. |
void |
parseEvents()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
---|
equals |
Field Detail |
---|
static Document doc
static Document doc2
static Document docDSP
private static boolean debug
private String defaultDSPConfigFile
private String userInputFile
private String emulabInputFile
private EmuHWConfiguration emuHWConfig
private EmuNode[] nodes
private ArrayList eventList
private String[] urls
private String[] classNames
private WorldDef worldDef
private SignalEnvironment sigEnv
private String[][] args
private DSPConfiguration dspConfig
private VisDefParser visDefParser
private Element rootEventDef
protected Logger log
Constructor Detail |
---|
public ConfigFileParser(String inputFile, String pid, String eid, EmuHWConfiguration emuHWConfig)
inputFile
- The name of the XML experiment config file to be parsed.pid
- XXX What the heck is pid, anyway!?eid
- XXX What the heck is eid, anyway!?emuHWConfig
- The name of hardware configuration file to useMethod Detail |
---|
public WorldDef getWorldDef()
public EmuNode[] getNodes()
NodeDefParser
public SignalEnvironment getSignalEnvironment()
public ArrayList getEventList()
public String[] getURLs()
UserClassDefParser
public String[] getClassNames()
UserClassDefParser
public String[][] getArgs()
public VisDefParser getVisDefParser()
public DSPConfiguration getDSPConfiguration()
public void parse()
Document
public void parseEvents()
private Antenna[] getAntennaList(EmuNode[] nodes)
public int compare(Object o1, Object o2)
compare
in interface Comparator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |