public class StrategyXMLUtils extends Object
Constructor and Description |
---|
StrategyXMLUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
getDefaultStrategiesPrefix()
Returns the default location in the resource hierarchy of the strategy xml files.
|
private static List<SeedStrategy> |
getStrategyListFromDocument(org.jdom.Document doc) |
static List<SeedStrategy> |
getStrategyListFromFile(File file)
Attempts to parse the given file as an XML file containing a well-formed
list of strategies.
|
static List<SeedStrategy> |
getStrategyListFromInputStream(InputStream stream)
Attempts to parse the given input stream as an XML file containing a well-formed
list of strategies.
|
static List<SeedStrategy> |
getStrategyListFromResource(String resourceName)
Returns a strategy list from an xml file in the default location
in the resource hierarchy given the full path to the resource of the file
(i.e.
|
static boolean |
writeStrategyListToFile(List<SeedStrategy> strategyList,
File file)
Generates an XML file representing the given strategy list.
|
static boolean |
writeStrategyListToFile(List<SeedStrategy> strategyList,
File file,
StrategyXMLMetadata meta)
Generates an XML file representing the given strategy list along with a top level comment.
|
public static String getDefaultStrategiesPrefix()
public static List<SeedStrategy> getStrategyListFromResource(String resourceName)
resourceName
- the full name of the resourcepublic static List<SeedStrategy> getStrategyListFromFile(File file)
file
- A File object corresponding to the XML file.public static List<SeedStrategy> getStrategyListFromInputStream(InputStream stream)
stream
- An InputStream object corresponding to the XML file.private static List<SeedStrategy> getStrategyListFromDocument(org.jdom.Document doc)
public static boolean writeStrategyListToFile(List<SeedStrategy> strategyList, File file)
strategyList
- file
- file object where xml will be writtenpublic static boolean writeStrategyListToFile(List<SeedStrategy> strategyList, File file, StrategyXMLMetadata meta)
strategyList
- file
- file object where xml will be writtencomment
- top-level commentCopyright © 2016 Linear Collider Detector (LCD). All rights reserved.