org.gridbus.broker.xgrl
Class XGRLReader

java.lang.Object
  extended by org.gridbus.broker.xgrl.XGRLReader

public class XGRLReader
extends java.lang.Object

This is the main class that will read any XML file. AbstractDemo is a class that was provided by the dom4j package. Saves a whole lot of trouble.

Author:
Krishna (kna@cs.mu.oz.au)

Constructor Summary
XGRLReader()
           
XGRLReader(java.lang.Object config)
           
 
Method Summary
 java.util.Hashtable getCredentials()
           
 java.util.Vector getServers()
           
 java.util.Vector getServices()
           
 java.util.Vector getStorageServers()
           
 java.lang.String getXmlSource()
           
 void parseXGRL(java.lang.String resourceDescFileName)
          Loads a document from a file specified, and parses it to a collection of jobs and requirement objects.
 void setCredentials(java.util.Hashtable credentials)
           
 void setServers(java.util.Vector servers)
           
 void setServices(java.util.Vector services)
           
 void setSourceFile(java.lang.String xmlSource)
          Sets the source file location for this substitute command.
 void setStorageServers(java.util.Vector storageServers)
           
 void setXmlSource(java.lang.String xmlSource)
           
 boolean validateXGRL()
          Validates an XGRL document
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XGRLReader

public XGRLReader()

XGRLReader

public XGRLReader(java.lang.Object config)
Parameters:
config -
Method Detail

setSourceFile

public void setSourceFile(java.lang.String xmlSource)
Sets the source file location for this substitute command.

Parameters:
xmlSource -

parseXGRL

public void parseXGRL(java.lang.String resourceDescFileName)
               throws java.net.MalformedURLException,
                      org.dom4j.DocumentException
Loads a document from a file specified, and parses it to a collection of jobs and requirement objects.

Parameters:
resourceDescFileName -
Throws:
java.net.MalformedURLException
org.dom4j.DocumentException

validateXGRL

public boolean validateXGRL()
Validates an XGRL document

Returns:
true if the document is valid

getCredentials

public java.util.Hashtable getCredentials()
Returns:
Returns the credentials.

setCredentials

public void setCredentials(java.util.Hashtable credentials)
Parameters:
credentials - The credentials to set.

getServers

public java.util.Vector getServers()
Returns:
Returns the servers.

setServers

public void setServers(java.util.Vector servers)
Parameters:
servers - The servers to set.

getServices

public java.util.Vector getServices()
Returns:
Returns the services.

setServices

public void setServices(java.util.Vector services)
Parameters:
services - The services to set.

getStorageServers

public java.util.Vector getStorageServers()
Returns:
Returns the storageServers.

setStorageServers

public void setStorageServers(java.util.Vector storageServers)
Parameters:
storageServers - The storageServers to set.

getXmlSource

public java.lang.String getXmlSource()
Returns:
Returns the xmlSource.

setXmlSource

public void setXmlSource(java.lang.String xmlSource)
Parameters:
xmlSource - The xmlSource to set.