Class SiteFactory
- java.lang.Object
-
- edu.isi.pegasus.planner.catalog.site.SiteFactory
-
public class SiteFactory extends java.lang.Object
A factory class to load the appropriate implementation of Site Catalog as specified by properties.- Version:
- $Revision$
- Author:
- Karan Vahi
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_PACKAGE_NAME
The default package where all the implementations reside.private static java.lang.String
OLD_XML3_IMPLEMENTING_CLASS_BASENAME
The name of old XML3 implementation class.private static java.lang.String
XML_IMPLEMENTING_CLASS_BASENAME
For 4.2, the orginal XML3 class was renamed XML and it supports different schemas.
-
Constructor Summary
Constructors Constructor Description SiteFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SiteCatalog
loadInstance()
Connects the interface with the transformation catalog implementation.static SiteCatalog
loadInstance(PegasusProperties properties)
Connects the interface with the site catalog implementation.private static SiteCatalog
loadInstance(java.lang.String catalogImplementor, java.util.Properties properties)
Connects the interface with the site catalog implementation.static SiteStore
loadSiteStore(java.util.Collection<java.lang.String> sites, PegasusBag bag)
-
-
-
Field Detail
-
DEFAULT_PACKAGE_NAME
public static final java.lang.String DEFAULT_PACKAGE_NAME
The default package where all the implementations reside.- See Also:
- Constant Field Values
-
OLD_XML3_IMPLEMENTING_CLASS_BASENAME
private static final java.lang.String OLD_XML3_IMPLEMENTING_CLASS_BASENAME
The name of old XML3 implementation class. It was removed for 4.2 release. We still have to load the right class in the factory.- See Also:
- Constant Field Values
-
XML_IMPLEMENTING_CLASS_BASENAME
private static final java.lang.String XML_IMPLEMENTING_CLASS_BASENAME
For 4.2, the orginal XML3 class was renamed XML and it supports different schemas.- See Also:
- Constant Field Values
-
-
Method Detail
-
loadSiteStore
public static SiteStore loadSiteStore(java.util.Collection<java.lang.String> sites, PegasusBag bag)
- Parameters:
sites
-bag
- the bag of pegasus objects- Returns:
- SiteStore object containing the information about the sites.
-
loadInstance
public static SiteCatalog loadInstance() throws SiteFactoryException
Connects the interface with the transformation catalog implementation. The choice of backend is configured through properties. This method uses default properties from the property singleton.- Returns:
- handle to the Site Catalog.
- Throws:
SiteFactoryException
- that nests any error that might occur during the instantiation- See Also:
DEFAULT_PACKAGE_NAME
-
loadInstance
public static SiteCatalog loadInstance(PegasusProperties properties) throws SiteFactoryException
Connects the interface with the site catalog implementation.- Parameters:
properties
- is an instance of properties to use.- Returns:
- handle to the Site Catalog.
- Throws:
SiteFactoryException
- that nests any error that might occur during the instantiation- See Also:
DEFAULT_PACKAGE_NAME
-
loadInstance
private static SiteCatalog loadInstance(java.lang.String catalogImplementor, java.util.Properties properties)
Connects the interface with the site catalog implementation. The choice of backend is configured through properties.- Parameters:
catalogImplementor
- the name of the class implementing catalogproperties
- the connection properties.- Returns:
- handle to the Site Catalog.
- Throws:
SiteFactoryException
- that nests any error that might occur during the instantiation- See Also:
DEFAULT_PACKAGE_NAME
-
-