pt.digitalis.maven.ormgenerator
Class ServiceHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by pt.digitalis.maven.ormgenerator.ServiceHandler
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler

public class ServiceHandler
extends DefaultHandler

This class should handler the data in the configuration xml and put it

Author:
António Silva asilva@digitalis.pt

Constructor Summary
ServiceHandler(String basePackage)
          Default constructor
 
Method Summary
 void endElement(String uri, String localName, String qName)
          Receive notification of the end of an element and should save the information that is recorded in the data object to the main object.
 ServiceCfg getServiceCfg()
          The Service Configuration built by this class based on the xml this should only be obtained after running parser
 void startElement(String uri, String localName, String qName, Attributes attributes)
          Receive notification of the start of an element and starts the transformation of xml tags to the data objects.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, 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
 

Constructor Detail

ServiceHandler

public ServiceHandler(String basePackage)
Default constructor

Parameters:
basePackage -
Method Detail

endElement

public void endElement(String uri,
                       String localName,
                       String qName)
                throws SAXException
Receive notification of the end of an element and should save the information that is recorded in the data object to the main object.

Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class DefaultHandler
Parameters:
uri - The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
localName - The local name (without prefix), or the empty string if Namespace processing is not being performed.
qName - The qualified name (with prefix), or the empty string if qualified names are not available.
Throws:
SAXException - Any SAX exception, possibly wrapping another exception.
See Also:
ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)

getServiceCfg

public ServiceCfg getServiceCfg()
The Service Configuration built by this class based on the xml this should only be obtained after running parser

Returns:
the serviceCfg

startElement

public void startElement(String uri,
                         String localName,
                         String qName,
                         Attributes attributes)
                  throws SAXException
Receive notification of the start of an element and starts the transformation of xml tags to the data objects.

Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class DefaultHandler
Parameters:
uri - The NameSpace URI, or the empty string if the element has no NameSpace URI or if NameSpace processing is not being performed.
localName - The local name (without prefix), or the empty string if NameSpace processing is not being performed.
qName - The qualified name (with prefix), or the empty string if qualified names are not available.
attributes - The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object.
Throws:
SAXException - Any SAX exception, possibly wrapping another exception.
See Also:
ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)


Copyright © 2007-2010 Digitalis Informática Lda. All Rights Reserved.