|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.griphyn.cPlanner.parser.Parser
org.griphyn.cPlanner.parser.ConfigXmlParser
public class ConfigXmlParser
This is the parsing class, used to parse the pool config file in xml format.
| Field Summary | |
|---|---|
private GridFTPServer |
gftp
|
private String |
m_key
|
private String |
m_namespace
|
PoolConfig |
m_pconfig
|
private SiteInfo |
m_pool_info
|
static String |
SCHEMA_LOCATION
The "not-so-official" location URL of the VDLx schema definition. |
static String |
SCHEMA_NAMESPACE
uri namespace |
| Fields inherited from class org.griphyn.cPlanner.parser.Parser |
|---|
DEFAULT_PARSER_NAME, mAdjFName, mLocator, mLogger, mLogMsg, mParser, mProps, mTextContent, mTextString |
| Constructor Summary | |
|---|---|
ConfigXmlParser(PegasusProperties properties)
Default Class Constructor. |
|
ConfigXmlParser(String configFileName,
PegasusProperties properties)
Class Constructor intializes the parser and turns on validation. |
|
| Method Summary | |
|---|---|
void |
endDocument()
This is called automatically when the end of the XML file is reached. |
void |
endElement(String uri,
String localName,
String qName)
An empty implementation is provided by DefaultHandler class. |
PoolConfig |
getPoolConfig()
This class returns the reference to the PooConfig object
containing information about all the pools. |
String |
getSchemaLocation()
Helps the load database to locate the VDLx XML schema, if available. |
private static void |
handleConfigTagEnd()
Handles the end of the Xml files. |
private PoolConfig |
handleConfigTagStart()
|
private static void |
handleGridFtpBandwidthTagEnd()
|
private void |
handleGridFtpBandwidthTagStart(SiteInfo pinfo,
Attributes attrs)
sk added function to handle gridftpbandwidth tag |
private void |
handleGridFtpTagEnd()
sk made changes to the following function to set GRIDFTPServer instead of setting it in fn handleGridFtpTagStart() |
private void |
handleGridFtpTagStart(SiteInfo pinfo,
Attributes attrs)
|
private static void |
handleJobManagerTagEnd()
Handles the end of the JobManager Tag |
private static void |
handleJobManagerTagStart(SiteInfo pinfo,
Attributes attrs)
This method handles the start of a jobmanager tag. |
private static void |
handleLRCTagEnd()
Handles the end of the LRC Tag |
private static void |
handleLRCTagStart(SiteInfo pinfo,
Attributes attrs)
|
private static void |
handlePoolTagEnd()
Handles the end of the pool tag. |
private SiteInfo |
handlePoolTagStart(PoolConfig pcfg,
Attributes attrs)
|
private void |
handleProfileTagEnd(SiteInfo pinfo)
Handles the end of the Profile tag. |
private void |
handleProfileTagStart(SiteInfo pinfo,
Attributes attrs)
|
private void |
handleWorkDirectoryTagEnd(SiteInfo pinfo)
This method handles the Workdirectory tg end. |
private static void |
handleWorkDirectoryTagStart(SiteInfo pinfo,
Attributes attrs)
Handles the WorkDirectory Tag Start. |
void |
startElement(String uri,
String localName,
String qName,
Attributes attrs)
An empty implementation is provided by DefaultHandler of ContentHandler. |
void |
startParser(String configxml)
Start the parser. |
| Methods inherited from class org.griphyn.cPlanner.parser.Parser |
|---|
characters, ignoreWhitespace, setDocumentLocator, setParserFeature, setSchemaLocations, testForFile |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SCHEMA_LOCATION
public static final String SCHEMA_NAMESPACE
public PoolConfig m_pconfig
private SiteInfo m_pool_info
private String m_namespace
private String m_key
private GridFTPServer gftp
| Constructor Detail |
|---|
public ConfigXmlParser(PegasusProperties properties)
properties - the PegasusProperties to be used.
public ConfigXmlParser(String configFileName,
PegasusProperties properties)
configFileName - The file which you want to parseproperties - the PegasusProperties to be used.| Method Detail |
|---|
public void startParser(String configxml)
Parser
startParser in class Parserconfigxml - the path to the XML file you want to parse.public void endDocument()
Parser
endDocument in interface ContentHandlerendDocument in class Parser
public void endElement(String uri,
String localName,
String qName)
Parser
endElement in interface ContentHandlerendElement in class Parser
public void startElement(String uri,
String localName,
String qName,
Attributes attrs)
Parser
startElement in interface ContentHandlerstartElement in class Parserpublic String getSchemaLocation()
Parser
getSchemaLocation in class Parserprivate PoolConfig handleConfigTagStart()
PoolConfig object when
it encounters start of XML.- See Also:
PoolConfig
private SiteInfo handlePoolTagStart(PoolConfig pcfg,
Attributes attrs)
throws Exception
pcfg - Takes the PoolConfig class.attrs - Takes the atrributes returned in XML.
ExceptionSiteInfo,
PoolConfig
private void handleProfileTagStart(SiteInfo pinfo,
Attributes attrs)
throws Exception
pinfo - Poolinfo object that is to be populatedattrs - Attributes for the element
Exception
private static void handleLRCTagStart(SiteInfo pinfo,
Attributes attrs)
throws Exception
pinfo - Poolinfo object that is to be populatedattrs - Attributes for the element
Exception
private void handleGridFtpTagStart(SiteInfo pinfo,
Attributes attrs)
throws Exception
pinfo - Poolinfo object that is to be populatedattrs - Attributes for the element
Exception
private void handleGridFtpBandwidthTagStart(SiteInfo pinfo,
Attributes attrs)
throws Exception
pinfo - Poolinfo object that is to be populatedattrs - Attributes for the element
Exception
private static void handleJobManagerTagStart(SiteInfo pinfo,
Attributes attrs)
throws Exception
pinfo - The PoolInfo object which will hold the jobmanager informationattrs - The attributes about the jobmanager tag returned from the XML.
ExceptionSiteInfo
private static void handleWorkDirectoryTagStart(SiteInfo pinfo,
Attributes attrs)
throws Exception
pinfo - Takes a SiteInfo object for which the work directory is.attrs - Takes the attributes returned from the XML by the parser.
ExceptionSiteInfoprivate static void handleConfigTagEnd()
private static void handlePoolTagEnd()
private void handleProfileTagEnd(SiteInfo pinfo)
throws RuntimeException
pinfo - PoolInfo object for which the
profiles are collected.
Exception
RuntimeExceptionSiteInfoprivate static void handleLRCTagEnd()
private void handleGridFtpTagEnd()
throws RuntimeException
RuntimeExceptionprivate static void handleGridFtpBandwidthTagEnd()
private static void handleJobManagerTagEnd()
private void handleWorkDirectoryTagEnd(SiteInfo pinfo)
throws RuntimeException
pinfo - Takes the PoolInfo object.
Exception
RuntimeExceptionSiteInfopublic PoolConfig getPoolConfig()
PooConfig object
containing information about all the pools.
PoolConfig object which
contains all the pools.PoolConfig
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||