|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.xml.sax.helpers.DefaultHandler
|
+--org.apache.commons.digester.Digester
|
+--org.apache.commons.betwixt.io.BeanReader
BeanReader reads a tree of beans from an XML document.
| Fields inherited from class org.apache.commons.digester.Digester |
bodyText, bodyTexts, classLoader, configured, entityValidator, errorHandler, factory, locator, log, match, namespaceAware, namespaces, params, parser, publicId, reader, root, rules, stack, useContextClassLoader, validating |
| Constructor Summary | |
BeanReader()
Construct a new BeanReader with default properties. |
|
BeanReader(javax.xml.parsers.SAXParser parser)
Construct a new BeanReader, allowing a SAXParser to be passed in. |
|
BeanReader(org.xml.sax.XMLReader reader)
Construct a new BeanReader, allowing an XMLReader to be passed in. |
|
| Method Summary | |
protected void |
addBeanCreateRule(java.lang.String path,
ElementDescriptor elementDescriptor,
java.lang.Class beanClass)
Adds a new bean create rule for the specified path |
org.apache.commons.logging.Log |
getLog()
Get the current level for logging. |
boolean |
getMatchIDs()
Should the reader use ID attributes to match beans. |
XMLIntrospector |
getXMLIntrospector()
Get the introspector used. |
void |
registerBeanClass(java.lang.Class beanClass)
Registers a bean class which is used by the reader to deduce the digester rules. |
void |
registerBeanClass(java.lang.String path,
java.lang.Class beanClass)
Registers a bean class at the given path expression which is used by the reader to deduce the digester rules. |
void |
setLog(org.apache.commons.logging.Log log)
Set the current logging level. |
void |
setMatchIDs(boolean matchIDs)
Set whether the read should use ID attributes to match beans. |
void |
setXMLIntrospector(XMLIntrospector introspector)
Set the introspector to be used. |
| Methods inherited from class org.apache.commons.digester.Digester |
addBeanPropertySetter, addBeanPropertySetter, addCallMethod, addCallMethod, addCallMethod, addCallMethod, addCallParam, addCallParam, 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, endDocument, endElement, endPrefixMapping, error, fatalError, findNamespaceURI, getClassLoader, getCount, getCurrentElementName, getDebug, 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, setErrorHandler, setFeature, setLogger, setNamespaceAware, setProperty, setRuleNamespaceURI, setRules, setSchema, setSchemaLanguage, 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 |
public BeanReader()
public BeanReader(javax.xml.parsers.SAXParser parser)
parser - use this SAXParserpublic BeanReader(org.xml.sax.XMLReader reader)
reader - use this XMLReader as source for SAX events| Method Detail |
public void registerBeanClass(java.lang.Class beanClass)
throws java.beans.IntrospectionException
beanClass - the Class to be registeredjava.beans.IntrospectionException - if the bean introspection fails
public void registerBeanClass(java.lang.String path,
java.lang.Class beanClass)
throws java.beans.IntrospectionException
path - the xml path expression where the class is to registered.
This should be in digester path notationbeanClass - the Class to be registeredjava.beans.IntrospectionException - if the bean introspection failspublic XMLIntrospector getXMLIntrospector()
Get the introspector used.
The XMLBeanInfo used to map each bean is
created by the XMLIntrospector.
One way in which the mapping can be customized is by
altering the XMLIntrospector.
XMLIntrospector used for the introspectionpublic void setXMLIntrospector(XMLIntrospector introspector)
Set the introspector to be used.
The XMLBeanInfo used to map each bean is
created by the XMLIntrospector.
One way in which the mapping can be customized is by
altering the XMLIntrospector.
introspector - use this introspectorpublic org.apache.commons.logging.Log getLog()
Get the current level for logging.
Log implementation this class logs topublic void setLog(org.apache.commons.logging.Log log)
Set the current logging level.
log - the Logimplementation to use for loggingpublic boolean getMatchIDs()
ID attributes to match beans.ID and IDREF
attributes should be used to match instancespublic void setMatchIDs(boolean matchIDs)
ID attributes to match beans.matchIDs - pass true if ID's should be matched
protected void addBeanCreateRule(java.lang.String path,
ElementDescriptor elementDescriptor,
java.lang.Class beanClass)
path - the digester path at which this rule should be addedelementDescriptor - the ElementDescriptor describes the expected elementbeanClass - the Class of the bean created by this rule
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||