org.apache.tapestry.parse
Class SpecificationDigester

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.apache.commons.digester.Digester
          extended by org.apache.tapestry.parse.SpecificationDigester
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class SpecificationDigester
extends org.apache.commons.digester.Digester

Extension of Digester with additional rules, hooks and methods needed when parsing Tapestry specifications.

Since:
3.0
Version:
$Id: SpecificationDigester.java 243791 2004-02-19 17:38:13Z hlship $
Author:
Howard Lewis Ship

Field Summary
 
Fields inherited from class org.apache.commons.digester.Digester
bodyText, bodyTexts, classLoader, configured, entityResolver, entityValidator, errorHandler, factory, JAXP_SCHEMA_LANGUAGE, locator, log, match, namespaceAware, namespaces, params, parser, publicId, reader, root, rules, saxLog, schemaLanguage, schemaLocation, stack, useContextClassLoader, validating, W3C_XML_SCHEMA
 
Constructor Summary
SpecificationDigester()
           
 
Method Summary
 void addBody(String pattern, String propertyName)
           
 void addConnectChild(String pattern, String methodName, String attributeName)
           
 void addDocumentRule(IDocumentRule rule)
           
 void addInitializeProperty(String pattern, String propertyName, Object value)
           
 void addSetBooleanProperty(String pattern, String attributeName, String propertyName)
           
 void addSetConvertedProperty(String pattern, Map map, String attributeName, String propertyName)
           
 void addSetExtendedProperty(String pattern, String attributeName, String propertyName, boolean required)
           
 void addSetLimitedProperties(String pattern, String[] attributeNames, String[] propertyNames)
           
 void addSetLimitedProperties(String pattern, String attributeName, String propertyName)
           
 void addValidate(String pattern, String attributeName, String valuePattern, String errorKey)
           
 void endDocument()
           
 void error(org.xml.sax.SAXParseException exception)
          Invokes fatalError(SAXParseException).
 void fatalError(org.xml.sax.SAXParseException exception)
          Simply re-throws the exception.
 ILocation getLocationTag()
           
 org.xml.sax.Locator getLocator()
          Returns the Locator for the Digester.
 RegexpMatcher getMatcher()
           
 IResourceLocation getResourceLocation()
           
 void setResourceLocation(IResourceLocation resourceLocation)
           
 void startDocument()
           
 void startElement(String namespaceURI, String localName, String qName, org.xml.sax.Attributes attributes)
           
 void warning(org.xml.sax.SAXParseException exception)
          Invokes fatalError(SAXParseException).
 
Methods inherited from class org.apache.commons.digester.Digester
addBeanPropertySetter, addBeanPropertySetter, addCallMethod, addCallMethod, addCallMethod, addCallMethod, addCallParam, addCallParam, addCallParam, addCallParam, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addObjectCreate, addObjectCreate, addObjectCreate, addObjectCreate, addRule, addRuleSet, addSetNext, addSetNext, addSetProperties, addSetProperties, addSetProperties, addSetProperty, addSetRoot, addSetRoot, addSetTop, addSetTop, characters, clear, configure, createSAXException, createSAXException, createSAXException, endElement, endPrefixMapping, findNamespaceURI, getClassLoader, getCount, getCurrentElementName, getDebug, getDocumentLocator, getEntityResolver, getErrorHandler, getFactory, getFeature, getLogger, getMatch, getNamespaceAware, getParser, getProperty, getPublicId, getReader, getRoot, getRuleNamespaceURI, getRules, getSchema, getSchemaLanguage, getUseContextClassLoader, getValidating, getXMLReader, ignorableWhitespace, log, log, notationDecl, parse, parse, parse, parse, parse, peek, peek, pop, processingInstruction, push, register, resolveEntity, setClassLoader, setDebug, setDocumentLocator, setEntityResolver, setErrorHandler, setFeature, setLogger, setNamespaceAware, setProperty, setPublicId, setRuleNamespaceURI, setRules, setSchema, setSchemaLanguage, setUseContextClassLoader, setValidating, skippedEntity, startPrefixMapping, unparsedEntityDecl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpecificationDigester

public SpecificationDigester()
Method Detail

addDocumentRule

public void addDocumentRule(IDocumentRule rule)

addSetBooleanProperty

public void addSetBooleanProperty(String pattern,
                                  String attributeName,
                                  String propertyName)

addSetExtendedProperty

public void addSetExtendedProperty(String pattern,
                                   String attributeName,
                                   String propertyName,
                                   boolean required)

addValidate

public void addValidate(String pattern,
                        String attributeName,
                        String valuePattern,
                        String errorKey)

addSetConvertedProperty

public void addSetConvertedProperty(String pattern,
                                    Map map,
                                    String attributeName,
                                    String propertyName)

addConnectChild

public void addConnectChild(String pattern,
                            String methodName,
                            String attributeName)

addInitializeProperty

public void addInitializeProperty(String pattern,
                                  String propertyName,
                                  Object value)

addSetLimitedProperties

public void addSetLimitedProperties(String pattern,
                                    String attributeName,
                                    String propertyName)

addSetLimitedProperties

public void addSetLimitedProperties(String pattern,
                                    String[] attributeNames,
                                    String[] propertyNames)

addBody

public void addBody(String pattern,
                    String propertyName)

getLocator

public org.xml.sax.Locator getLocator()
Returns the Locator for the Digester. This object is provided by the underlying SAX parser to identify where in the document the parse is currently located; this information can be used to build a ILocation.


getLocationTag

public ILocation getLocationTag()

getResourceLocation

public IResourceLocation getResourceLocation()

setResourceLocation

public void setResourceLocation(IResourceLocation resourceLocation)

getMatcher

public RegexpMatcher getMatcher()

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
Specified by:
endDocument in interface org.xml.sax.ContentHandler
Overrides:
endDocument in class org.apache.commons.digester.Digester
Throws:
org.xml.sax.SAXException

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Specified by:
startDocument in interface org.xml.sax.ContentHandler
Overrides:
startDocument in class org.apache.commons.digester.Digester
Throws:
org.xml.sax.SAXException

startElement

public void startElement(String namespaceURI,
                         String localName,
                         String qName,
                         org.xml.sax.Attributes attributes)
                  throws org.xml.sax.SAXException
Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.apache.commons.digester.Digester
Throws:
org.xml.sax.SAXException

error

public void error(org.xml.sax.SAXParseException exception)
           throws org.xml.sax.SAXException
Invokes fatalError(SAXParseException).

Specified by:
error in interface org.xml.sax.ErrorHandler
Overrides:
error in class org.apache.commons.digester.Digester
Throws:
org.xml.sax.SAXException

fatalError

public void fatalError(org.xml.sax.SAXParseException exception)
                throws org.xml.sax.SAXException
Simply re-throws the exception. All exceptions when parsing documents are fatal.

Specified by:
fatalError in interface org.xml.sax.ErrorHandler
Overrides:
fatalError in class org.apache.commons.digester.Digester
Throws:
org.xml.sax.SAXException

warning

public void warning(org.xml.sax.SAXParseException exception)
             throws org.xml.sax.SAXException
Invokes fatalError(SAXParseException).

Specified by:
warning in interface org.xml.sax.ErrorHandler
Overrides:
warning in class org.apache.commons.digester.Digester
Throws:
org.xml.sax.SAXException