public class MYOSG extends Object implements SiteCatalog
| Modifier and Type | Field and Description |
|---|---|
static String |
DATE_FORMAT
The date format to be used while passing dates to the URL construction.
|
static String |
DEFAULT_GRID
The default VO to use if none is specified
|
static String |
DEFAULT_VO
The default VO to use if none is specified
|
static String |
GRID_KEY
The name of the key that determines whether we keep the tmp xml file
around or not.
|
static String |
KEEP_TMP_FILE_KEY
The name of the key that determines whether we keep the tmp xml file
around or not.
|
private boolean |
mConnected
A boolean variable tracking whether catalog is connected or not
|
private String |
mGrid
The grid for which to query MYOSG
|
private boolean |
mKeepTmpFile
A boolean variable that tracks whether to keep the temp xml file or not.
|
private LogManager |
mLogger
The Logging instance.
|
private Map<String,MYOSGSiteInfo> |
mMYOSGInfo |
private SiteStore |
mSiteStore
The SiteStore object where information about the sites is stored.
|
private String |
mVO
The vo for which to query MYOSG
|
static String |
VO_KEY
The name of the key that determines what VO to query for.
|
c_prefix, VERSIONDB_ALL_PREFIX| Constructor and Description |
|---|
MYOSG()
The default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the connection to back end file.
|
boolean |
connect(Properties props)
Establishes a connection to the file from the properties.
|
private Properties |
createConnectionURLProperties()
Creates the properties that are required to compose the HTTP URL to the
MYOSG website.
|
private static String |
getDateAfter(int days)
Returns the date after n days formatted as MM/dd/yyyy.
|
private String |
getStartDate()
Returns the start date formatted as MM/dd/yyyy.
|
int |
insert(SiteCatalogEntry entry)
Not implemented as yet.
|
boolean |
isClosed()
Returns if the connection is closed or not.
|
Set<String> |
list()
Lists the site handles for all the sites in the Site Catalog.
|
int |
load(List<String> sites)
Loads up the Site Catalog implementation with the sites whose site
handles are specified.
|
SiteCatalogEntry |
lookup(String handle)
Retrieves the
SiteCatalogEntry for a site. |
int |
remove(String handle)
Not yet implemented as yet.
|
public static final String DATE_FORMAT
public static final String DEFAULT_VO
public static final String DEFAULT_GRID
public static final String KEEP_TMP_FILE_KEY
public static final String VO_KEY
public static final String GRID_KEY
private Map<String,MYOSGSiteInfo> mMYOSGInfo
private final LogManager mLogger
private boolean mConnected
private boolean mKeepTmpFile
private final SiteStore mSiteStore
private String mVO
private String mGrid
public int insert(SiteCatalogEntry entry) throws SiteCatalogException
insert in interface SiteCatalogentry - SiteCatalogExceptionpublic Set<String> list() throws SiteCatalogException
list in interface SiteCatalogSiteCatalogException - in case of error.public int load(List<String> sites) throws SiteCatalogException
load in interface SiteCatalogsites - the list of sites to be loaded.SiteCatalogException - in case of error.public SiteCatalogEntry lookup(String handle) throws SiteCatalogException
SiteCatalogEntry for a site.lookup in interface SiteCataloghandle - the site handle / identifier.null
if no match is found.SiteCatalogException - in case of error.public int remove(String handle) throws SiteCatalogException
remove in interface SiteCataloghandle - SiteCatalogExceptionpublic void close()
public boolean connect(Properties props) throws SiteCatalogException
connect in interface Catalogprops - is the property table with sufficient settings to to connect
to the implementation.SiteCatalogExceptionprivate Properties createConnectionURLProperties()
private String getStartDate()
private static String getDateAfter(int days)
days - the days after.public boolean isClosed()
isClosed in interface CatalogCatalog.close()Copyright © 2011 The University of Southern California. All Rights Reserved.