gov.bnl.star.offline.scheduler.request
Class RequestTypeHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by gov.bnl.star.offline.scheduler.request.RequestTypeHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class RequestTypeHandler
extends org.xml.sax.helpers.DefaultHandler

Reads a STAR scheduler job request to determine its format and version.

Version:
$Revision: 1.2 $ $Date: 2006/11/21 00:41:31 $
Author:
paulh

Field Summary
static java.lang.String JDLRootElement
           
static java.lang.String RDLRootElement
           
 
Constructor Summary
RequestTypeHandler()
          Parses an XML file to determine its format and version.
 
Method Summary
 int getRequestType()
          Get the request type
 void startElement(java.lang.String namespaceURI, java.lang.String sName, java.lang.String qName, org.xml.sax.Attributes attrs)
          Parsing method.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, 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

JDLRootElement

public static final java.lang.String JDLRootElement
See Also:
Constant Field Values

RDLRootElement

public static final java.lang.String RDLRootElement
See Also:
Constant Field Values
Constructor Detail

RequestTypeHandler

public RequestTypeHandler()
Parses an XML file to determine its format and version. Looks for JDL 0.4 or RDL 0.5

Method Detail

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String sName,
                         java.lang.String qName,
                         org.xml.sax.Attributes attrs)
                  throws RequestTypeException
Parsing method. If JDLRootElement is found, type is JDL If RDLRootElement element is found, type is RDL After type is set, throw RequestTypeException to stop parse

Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Throws:
RequestTypeException

getRequestType

public int getRequestType()
Get the request type



Copyright © 2002-2004 STAR collaboration - Brookhaven National Laboratory. All Rights Reserved.