org.apache.commons.betwixt.digester
Class XMLBeanInfoDigester

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.apache.commons.digester.Digester
          extended by org.apache.commons.betwixt.digester.XMLBeanInfoDigester
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
Direct Known Subclasses:
MultiMappingBeanInfoDigester

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

XMLBeanInfoDigester is a digester of XML files containing XMLBeanInfo definitions for a JavaBean.

Version:
$Revision: 438373 $
Author:
James Strachan

Field Summary
 
Fields inherited from class org.apache.commons.digester.Digester
bodyText, bodyTexts, classLoader, configured, entityResolver, entityValidator, errorHandler, factory, JAXP_SCHEMA_LANGUAGE, locator, match, matches, namespaceAware, namespaces, params, parser, publicId, reader, root, rules, saxLog, schemaLanguage, schemaLocation, stack, substitutor, useContextClassLoader, validating, W3C_XML_SCHEMA
 
Constructor Summary
XMLBeanInfoDigester()
          Construct a new XMLBeanInfoDigester with default properties.
XMLBeanInfoDigester(javax.xml.parsers.SAXParser parser)
          Construct a new XMLBeanInfoDigester, allowing a SAXParser to be passed in.
XMLBeanInfoDigester(org.xml.sax.XMLReader reader)
          Construct a new XMLBeanInfoDigester, allowing an XMLReader to be passed in.
 
Method Summary
protected  void configure()
          Reset configure for new digestion
 java.lang.Class getBeanClass()
          Gets the class of the bean whose .betwixt file is being processed
 java.util.Set getProcessedPropertyNameSet()
          Gets the property names already processed
 XMLIntrospector getXMLIntrospector()
          Gets the XMLIntrospector that's using this digester.
 boolean isAttributesForPrimitives()
          Should attributes (or elements) be used for primitive types?
 void setAttributesForPrimitives(boolean attributesForPrimitives)
          Set whether attributes (or elements) should be used for primitive types.
 void setBeanClass(java.lang.Class beanClass)
          Sets the beans class for this XML descriptor
 void setXMLIntrospector(XMLIntrospector introspector)
          Sets the introspector that is using me
 
Methods inherited from class org.apache.commons.digester.Digester
addBeanPropertySetter, addBeanPropertySetter, addCallMethod, addCallMethod, addCallMethod, addCallMethod, addCallParam, addCallParam, addCallParam, addCallParam, addCallParamPath, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addObjectCreate, addObjectCreate, addObjectCreate, addObjectCreate, addObjectParam, addRule, addRuleSet, addSetNestedProperties, addSetNestedProperties, addSetNestedProperties, addSetNext, addSetNext, addSetProperties, addSetProperties, addSetProperties, addSetProperty, addSetRoot, addSetRoot, addSetTop, addSetTop, characters, clear, createSAXException, createSAXException, createSAXException, endDocument, endElement, endPrefixMapping, error, fatalError, findNamespaceURI, getClassLoader, getCount, getCurrentElementName, getCustomContentHandler, getDebug, getDocumentLocator, getEntityResolver, getErrorHandler, getFactory, getFeature, getLogger, getMatch, getNamespaceAware, getParser, getProperty, getPublicId, getReader, getRoot, getRuleNamespaceURI, getRules, getSAXLogger, getSchema, getSchemaLanguage, getSubstitutor, getUseContextClassLoader, getValidating, getXMLReader, ignorableWhitespace, initialize, isEmpty, log, log, notationDecl, parse, parse, parse, parse, parse, peek, peek, peek, peek, peekParams, peekParams, pop, pop, popParams, processingInstruction, push, push, pushParams, register, resetRoot, resolveEntity, setClassLoader, setCustomContentHandler, setDebug, setDocumentLocator, setEntityResolver, setErrorHandler, setFeature, setLogger, setNamespaceAware, setProperty, setPublicId, setRuleNamespaceURI, setRules, setSAXLogger, setSchema, setSchemaLanguage, setSubstitutor, setUseContextClassLoader, setValidating, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLBeanInfoDigester

public XMLBeanInfoDigester()
Construct a new XMLBeanInfoDigester with default properties.


XMLBeanInfoDigester

public XMLBeanInfoDigester(javax.xml.parsers.SAXParser parser)
Construct a new XMLBeanInfoDigester, allowing a SAXParser to be passed in. This allows XMLBeanInfoDigester to be used in environments which are unfriendly to JAXP1.1 (such as WebLogic 6.0). Thanks for the request to change go to James House (james@interobjective.com). This may help in places where you are able to load JAXP 1.1 classes yourself.

Parameters:
parser - the SAXParser to be used to parse the xml

XMLBeanInfoDigester

public XMLBeanInfoDigester(org.xml.sax.XMLReader reader)
Construct a new XMLBeanInfoDigester, allowing an XMLReader to be passed in. This allows XMLBeanInfoDigester to be used in environments which are unfriendly to JAXP1.1 (such as WebLogic 6.0). Note that if you use this option you have to configure namespace and validation support yourself, as these properties only affect the SAXParser and emtpy constructor.

Parameters:
reader - the XMLReader to be used to parse the xml
Method Detail

getBeanClass

public java.lang.Class getBeanClass()
Gets the class of the bean whose .betwixt file is being processed

Returns:
the beans class for this XML descriptor

setBeanClass

public void setBeanClass(java.lang.Class beanClass)
Sets the beans class for this XML descriptor

Parameters:
beanClass - the Class of the bean being processed

getProcessedPropertyNameSet

public java.util.Set getProcessedPropertyNameSet()
Gets the property names already processed

Returns:
the set of property names that have been processed so far

isAttributesForPrimitives

public boolean isAttributesForPrimitives()
Should attributes (or elements) be used for primitive types?

Returns:
true if primitive properties should be written as attributes in the xml

setAttributesForPrimitives

public void setAttributesForPrimitives(boolean attributesForPrimitives)
Set whether attributes (or elements) should be used for primitive types.

Parameters:
attributesForPrimitives - pass true if primitive properties should be written as attributes

getXMLIntrospector

public XMLIntrospector getXMLIntrospector()
Gets the XMLIntrospector that's using this digester.

Returns:
the introspector that is using me

setXMLIntrospector

public void setXMLIntrospector(XMLIntrospector introspector)
Sets the introspector that is using me

Parameters:
introspector - the XMLIntrospector that using this for .betwixt digestion

configure

protected void configure()
Reset configure for new digestion

Overrides:
configure in class org.apache.commons.digester.Digester


Copyright 2002-2008 The Apache Software Foundation. All Rights Reserved.