Class XMLContextBuilder
java.lang.Object
repast.simphony.dataLoader.engine.XMLContextBuilder
- All Implemented Interfaces:
ContextBuilder
ContextBuilder that loads context from a xml serialized file.
- Author:
- Nick Collier
-
Constructor Summary
ConstructorDescriptionXMLContextBuilder
(File xmlFile) Creates an XMLContext builder that will load the specified fileXMLContextBuilder
(File xmlFile, List<com.thoughtworks.xstream.converters.Converter> converters) Creates an XMLContext builder that will load from the named file.XMLContextBuilder
(String fileName) Creates an XMLContext builder that will load from the named file.XMLContextBuilder
(String fileName, List<com.thoughtworks.xstream.converters.Converter> converters) Creates an XMLContext builder that will load from the named file. -
Method Summary
Modifier and TypeMethodDescriptionBuilds and returns a context.Gets the serialized xml file from which this builder loads a context.
-
Constructor Details
-
XMLContextBuilder
Creates an XMLContext builder that will load from the named file.- Parameters:
fileName
- the name of the file to load from
-
XMLContextBuilder
public XMLContextBuilder(String fileName, List<com.thoughtworks.xstream.converters.Converter> converters) Creates an XMLContext builder that will load from the named file.- Parameters:
fileName
- the name of the file to load fromconverters
- a list of XStream Converters to register and use in the XML conversion.
-
XMLContextBuilder
public XMLContextBuilder(File xmlFile, List<com.thoughtworks.xstream.converters.Converter> converters) Creates an XMLContext builder that will load from the named file.- Parameters:
xmlFile
- the file to load fromconverters
- a list of XStream Converters to register and use in the XML conversion.
-
XMLContextBuilder
Creates an XMLContext builder that will load the specified file- Parameters:
xmlFile
- the file to load from
-
-
Method Details
-
build
Builds and returns a context. Building a context consists of filling it with agents, adding projects and so forth. The returned context does not necessarily have to be the passed in context.- Specified by:
build
in interfaceContextBuilder
- Parameters:
context
- a default context- Returns:
- the built context.
-
getXMLFile
Gets the serialized xml file from which this builder loads a context.- Returns:
- the serialized xml file from which this builder loads a context.
-