Package edu.isi.pegasus.planner.parser
Class SiteCatalogXMLParserFactory
- java.lang.Object
-
- edu.isi.pegasus.planner.parser.SiteCatalogXMLParserFactory
-
public class SiteCatalogXMLParserFactory extends java.lang.ObjectA factory class to load the appropriate Site Catalog Parser implementations based on version in the site catalog element of the XML document- Version:
- $Revision$
- Author:
- Karan Vahi
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_PARSER_PACKAGE_NAMEPackage to prefix "just" class names with.static java.lang.StringDEFAULT_SC_PARSER_CLASSThe default Site Catalog Parserstatic java.lang.StringSC_PARSER3_CLASSThe SC Parser classnameprivate static longSC_VERSION_2_0_0static longSC_VERSION_3_0_0static longSC_VERSION_4_0_0
-
Constructor Summary
Constructors Constructor Description SiteCatalogXMLParserFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.MapgetMetadata(PegasusBag bag, java.lang.String file)Returns the metadata stored in the root adag element in the DAXprivate static SiteCatalogXMLParserloadSiteCatalogParser(java.lang.String classname, PegasusBag bag, java.util.List<java.lang.String> sites)Loads the appropriate Site Catalog Parser looking at the dax schema that is specified by the user.static SiteCatalogXMLParserloadSiteCatalogXMLParser(PegasusBag bag, java.lang.String file, java.util.List<java.lang.String> sites)Loads the appropriate DAXParser looking at the dax schema that is specified by the user.
-
-
-
Field Detail
-
DEFAULT_PARSER_PACKAGE_NAME
public static final java.lang.String DEFAULT_PARSER_PACKAGE_NAME
Package to prefix "just" class names with.- See Also:
- Constant Field Values
-
SC_VERSION_2_0_0
private static final long SC_VERSION_2_0_0
-
SC_VERSION_3_0_0
public static final long SC_VERSION_3_0_0
-
SC_VERSION_4_0_0
public static final long SC_VERSION_4_0_0
-
DEFAULT_SC_PARSER_CLASS
public static final java.lang.String DEFAULT_SC_PARSER_CLASS
The default Site Catalog Parser- See Also:
- Constant Field Values
-
SC_PARSER3_CLASS
public static final java.lang.String SC_PARSER3_CLASS
The SC Parser classname- See Also:
- Constant Field Values
-
-
Method Detail
-
loadSiteCatalogXMLParser
public static SiteCatalogXMLParser loadSiteCatalogXMLParser(PegasusBag bag, java.lang.String file, java.util.List<java.lang.String> sites) throws SiteCatalogXMLParserFactoryException
Loads the appropriate DAXParser looking at the dax schema that is specified by the user.- Parameters:
bag- bag of Pegasus intialization objectsfile- the site catalog filesites- the list of sites that need to be parsed. * means all- Returns:
- the SiteCatalogXMLParser class that is loaded.
- Throws:
SiteCatalogXMLParserFactoryException- that nests any error that might occur during the instantiation- See Also:
#DEFAULT_CALLBACK_PACKAGE_NAME
-
loadSiteCatalogParser
private static final SiteCatalogXMLParser loadSiteCatalogParser(java.lang.String classname, PegasusBag bag, java.util.List<java.lang.String> sites)
Loads the appropriate Site Catalog Parser looking at the dax schema that is specified by the user.- Parameters:
classname- the classname of the parser class that needs to be loadedbag- bag of Pegasus intialization objectssites- the list of sites that need to be parsed. * means all- Returns:
- the DAXParser loaded.
- Throws:
SiteCatalogXMLParserFactoryException- that nests any error that might occur during the instantiation- See Also:
#DEFAULT_CALLBACK_PACKAGE_NAME
-
getMetadata
public static java.util.Map getMetadata(PegasusBag bag, java.lang.String file)
Returns the metadata stored in the root adag element in the DAX- Parameters:
bag- the bag of initialization objectsfile- the site catalog file.- Returns:
- Map containing the metadata, else an empty map
-
-