public class ConfigParser
extends java.lang.Object
ConfigParser
class contains methods for parsing configuration files.Constructor and Description |
---|
ConfigParser()
Initializes a newly created
ConfigParser . |
Modifier and Type | Method and Description |
---|---|
AttributeGroup[] |
readAttributes(CommonTypes commonTypes)
Parses the configuration file with attributes - attributes.xml.
|
java.util.Map<java.lang.String,Figure> |
readConfig(ConfigData configData,
AttributeGroup[] attributeGroupList)
Parses the configuration file with layout of parameters and attribute-sets - config.xml.
|
void |
readFigures(java.util.Map<java.lang.String,Parameter> parameterList,
java.util.Map<java.lang.String,Figure> figureList)
Parses the configuration file with graphics figures - graphics.xml.
|
CommonTypes |
readTypes()
Parses the configuration file with types - types.xml.
|
public ConfigParser()
ConfigParser
. Sets up the SAX parser used for
parsing.public void readFigures(java.util.Map<java.lang.String,Parameter> parameterList, java.util.Map<java.lang.String,Figure> figureList) throws ConfigException, FileNotFoundException
parameterList
- the list of loaded parameters.figureList
- the list of loaded figures.ConfigException
- if the configuration file or its XML schema isn't well-formed.FileNotFoundException
- if the configuration file or its XML schema doesn't exist.public AttributeGroup[] readAttributes(CommonTypes commonTypes) throws ConfigException, FileNotFoundException
commonTypes
- common types of parameters.ConfigException
- if the configuration file or its XML schema isn't well-formed.FileNotFoundException
- if the configuration file or its XML schema doesn't exist.public java.util.Map<java.lang.String,Figure> readConfig(ConfigData configData, AttributeGroup[] attributeGroupList) throws ConfigException, FileNotFoundException
configData
- so far loaded data from configuration files.attributeGroupList
- the list of attribute groups.ConfigException
- if the configuration file or its XML schema isn't well-formed.FileNotFoundException
- if the configuration file or its XML schema doesn't exist.public CommonTypes readTypes() throws ConfigException, FileNotFoundException
ConfigException
- if the configuration file or its XML schema isn't well-formed.FileNotFoundException
- if the configuration file or its XML schema doesn't exist.