Class ConfigurationXMLParser
java.lang.Object
fr.ens.biologie.genomique.aozan.aozan3.recipe.ConfigurationXMLParser
This class define a XML parser for configuration.
- Since:
- 3.0
- Author:
- Laurent Jourdren
-
Constructor Summary
ConstructorsConstructorDescriptionConfigurationXMLParser(String rootTagName, String sectionName, Configuration parentConfiguration, fr.ens.biologie.genomique.kenetre.log.GenericLogger logger) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected PathgetIncludePath(Element element, String source) Get the path of a file to include.protected fr.ens.biologie.genomique.kenetre.log.GenericLoggerGet the logger.protected StringGet the root tag nameparse(InputStream is) Parse XML as an input stream.parse(InputStream is, String source) Parse XML as an input stream.Parse XML as an input stream.protected ConfigurationParse a run step XML tag.
-
Constructor Details
-
ConfigurationXMLParser
public ConfigurationXMLParser(String rootTagName, String sectionName, Configuration parentConfiguration, fr.ens.biologie.genomique.kenetre.log.GenericLogger logger) Constructor.- Parameters:
rootTagName- root tag namesectionName- name of the section in the recipe fileparentConfiguration- parent configurationlogger- logger to use
-
-
Method Details
-
parse
Parse a run step XML tag.- Parameters:
nList- node listsource- XML source description- Returns:
- a list with step objects
- Throws:
Aozan3Exception- if an error occurs while parsing the XML
-
getLogger
protected fr.ens.biologie.genomique.kenetre.log.GenericLogger getLogger()Get the logger.- Returns:
- the logger
-
getRootTagName
Get the root tag name- Returns:
- the root tag name
-
parse
Parse XML as an input stream.- Parameters:
path- file path- Returns:
- a list of Step
- Throws:
Aozan3Exception- if an error occurs while parsing the file
-
parse
Parse XML as an input stream.- Parameters:
is- input stream- Returns:
- a Recipe object
- Throws:
Aozan3Exception- if an error occurs while parsing the file
-
parse
Parse XML as an input stream.- Parameters:
is- input streamsource- XML source description- Returns:
- a Recipe object
- Throws:
Aozan3Exception- if an error occurs while parsing the file
-
getIncludePath
Get the path of a file to include.- Parameters:
element- element to parse- Returns:
- a Path object if the element to include exists or null
- Throws:
Aozan3Exception- if other attribute than include exists for the tag
-