Class SiteCatalogXMLParserFactory


  • public class SiteCatalogXMLParserFactory
    extends java.lang.Object
    A 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 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
    • Constructor Detail

      • SiteCatalogXMLParserFactory

        public SiteCatalogXMLParserFactory()
    • 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 objects
        file - the site catalog file
        sites - 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 loaded
        bag - bag of Pegasus intialization objects
        sites - 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 objects
        file - the site catalog file.
        Returns:
        Map containing the metadata, else an empty map