Methods
|
|
|
|
__getMetadata
|
__getMetadata (
self,
siteId,
metadataType,
)
__getMetadata is a private helper function called to get metadata files via the web.
Inputs: siteId - integer identifying Madrigal site.
metadataType - constant defined by getMetadata cgi script
Returns: The desired metadata file as a string, or None if not successful
Affects: None.
Exceptions: None.
|
|
__init__
|
__init__ ( self, madDB=None )
__init__ initializes OpenMadrigal by setting or creating a MadrigalDB object.
Inputs: Existing MadrigalDB object, by default = None.
Returns: void
Affects: Initializes all the class member variables.
Exceptions: None.
|
|
getAllRevisionNumbers
|
getAllRevisionNumbers ( self, fullPath )
getAllRevisionNumbers a list of all revision numbers for a given file in Subversion in
order from latest to earliest.
Inputs: fullPath - full path to the Madrigal file in Subversion relative to trunk
(example: madroot/metadata/siteTab.txt )
Returns: a list of all revision numbers for a given file in Subversion in
order from latest to earliest. Empty list if file not found
Affects: Nothing
Exceptions: None
|
|
getCvsVersion
|
getCvsVersion (
self,
fullPath,
revision,
)
getCvsVersion returns the Subversion version of the file given by fullPath and revision.
CVS is no longer the Madrigal repository. Equivalent to getSubversionVersion.
Inputs:
fullPath - full path to the Madrigal file in Subversion
(example: madroot/metadata/siteTab.txt )
revision - revision string (example 1445 )
Returns: the Subversion version of the file given by fullPath and revision,
or None if not found
Affects: Nothing
Exceptions: None
|
|
getDataMetadata
|
getDataMetadata ( self, siteId )
getDataMetadata returns the dataTab.txt file from siteId as a string.
This file is deprecated with Madrigal 2.5 and may not exist.
Inputs: None
Returns: the dataTab.txt file from siteId as a string, or None if not found
Affects: Nothing
Exceptions: None
|
|
getExpMetadata
|
getExpMetadata ( self, siteId )
getExpMetadata returns the expTab.txt file from siteId as a string.
Inputs: None
Returns: the expTab.txt file from siteId as a string, or None if not found
Affects: Nothing
Exceptions: None
|
|
getFileMetadata
|
getFileMetadata ( self, siteId )
getFileMetadata returns the fileTab.txt file from siteId as a string.
Inputs: None
Returns: the fileTab.txt file from siteId as a string, or None if not found
Affects: Nothing
Exceptions: None
|
|
getInstMetadata
|
getInstMetadata ( self, siteId )
getInstMetadata returns the instTab.txt file from siteId as a string.
Inputs: None
Returns: the instTab.txt file from siteId as a string, or None if not found
Affects: Nothing
Exceptions: None
|
|
getInstTypeMetadata
|
getInstTypeMetadata ( self, siteId )
getInstTypeMetadata returns the instType.txt file from siteId as a string.
Inputs: None
Returns: the instType.txt file from siteId as a string, or None if not found
Affects: Nothing
Exceptions: None
|
|
getLatestCvsVersion
|
getLatestCvsVersion ( self, fullPath )
getLatestCvsVersion returns the latest Subversion version of the file given by fullPath as a string.
CVS is no longer the Madrigal repository. Equivalent to getLatestSubversionVersion.
Inputs: fullPath - full path to the Madrigal file in Subversion relative to trunk
(example: madroot/metadata/siteTab.txt )
Returns: the latest Subversion version of the file given by fullPath as a string,
or None if not found
Affects: Nothing
Exceptions: None
|
|
getLatestSubversionVersion
|
getLatestSubversionVersion ( self, fullPath )
getLatestSubversionVersion returns the latest Subversion version of the file given by fullPath as a string.
Inputs: fullPath - full path to the Madrigal file in Subversion relative to trunk
(example: madroot/metadata/siteTab.txt )
Returns: the latest Subversion version of the file given by fullPath as a string,
or None if not found
Affects: Nothing
Exceptions: None
Simply calls equivalent method getLatestCvsVersion
|
|
getMadCatMetadata
|
getMadCatMetadata ( self, siteId )
getMadCatMetadata returns the madCatTab.txt file from siteId as a string.
Inputs: None
Returns: the madCatTab.txt file from siteId as a string, or None if not found
Affects: Nothing
Exceptions: None
|
|
getMetadataFromOpenMadrigal
|
getMetadataFromOpenMadrigal ( self, filename )
getMetadataFromOpenMadrigal returns a metadata file from OpenMadrigal server
as a string
Inputs:
filename - metadata file to download, relative to metadata
Returns: File contents as a string
Affects: Nothing
|
|
getParcodsMetadata
|
getParcodsMetadata ( self, siteId )
getParcodsMetadata returns the parcods.tab file from siteId as a string.
Inputs: None
Returns: the parcods.tab file from siteId as a string, or None if not found
Affects: Nothing
Exceptions: None
|
|
getSiteMetadata
|
getSiteMetadata ( self, siteId )
getSiteMetadata returns the siteTab.txt file from siteId as a string.
Inputs: None
Returns: the siteTab.txt file from siteId as a string, or None if not found
Affects: Nothing
Exceptions: None
|
|
getSubversionVersion
|
getSubversionVersion (
self,
fullPath,
revision,
)
getSubversionVersion returns the Subversion version of the file given by fullPath and revision.
Inputs:
fullPath - full path to the Madrigal file in Subversion
(example: madroot/metadata/siteTab.txt )
revision - revision string (example 1445 )
Returns: the Subversion version of the file given by fullPath and revision,
or None if not found
Affects: Nothing
Exceptions: None
Simply calls equivalent method getCvsVersion
|
|
getTypeMetadata
|
getTypeMetadata ( self, siteId )
getTypeMetadata returns the typeTab.txt file from siteId as a string.
Inputs: None
Returns: the typeTab.txt file from siteId as a string, or None if not found
Affects: Nothing
Exceptions: None
|