rdonkin 2004/01/18 11:21:18
Modified: betwixt/src/java/org/apache/commons/betwixt Tag:
REFACTORING-BRANCH_2004-01-13 XMLIntrospector.java
betwixt/src/java/org/apache/commons/betwixt/digester Tag:
REFACTORING-BRANCH_2004-01-13 AddDefaultsRule.java
AttributeRule.java ElementRule.java
XMLIntrospectorHelper.java
betwixt/src/test/org/apache/commons/betwixt Tag:
REFACTORING-BRANCH_2004-01-13
TestXMLBeanInfoDigester.java
betwixt/xdocs Tag: REFACTORING-BRANCH_2004-01-13 tasks.xml
Log:
Moved methods out of XMLIntrospectorHelper in preparation to deprecate it.
Revision Changes Path
No revision
No revision
1.27.2.2 +224 -10
jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/XMLIntrospector.java
Index: XMLIntrospector.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/XMLIntrospector.java,v
retrieving revision 1.27.2.1
retrieving revision 1.27.2.2
diff -u -r1.27.2.1 -r1.27.2.2
--- XMLIntrospector.java 18 Jan 2004 12:30:57 -0000 1.27.2.1
+++ XMLIntrospector.java 18 Jan 2004 19:21:17 -0000 1.27.2.2
@@ -66,8 +66,10 @@
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
+import java.lang.reflect.Method;
import java.net.URL;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -80,6 +82,8 @@
import org.apache.commons.betwixt.expression.EmptyExpression;
import org.apache.commons.betwixt.expression.Expression;
import org.apache.commons.betwixt.expression.IteratorExpression;
+import org.apache.commons.betwixt.expression.MapEntryAdder;
+import org.apache.commons.betwixt.expression.MethodUpdater;
import org.apache.commons.betwixt.expression.StringExpression;
import org.apache.commons.betwixt.expression.Updater;
import org.apache.commons.betwixt.registry.DefaultXMLBeanInfoRegistry;
@@ -403,11 +407,6 @@
}
elementDescriptor.setElementDescriptors( new ElementDescriptor[] {
loopDescriptor } );
-/*
- elementDescriptor.setContextExpression(
- new IteratorExpression( EmptyExpression.getInstance() )
- );
-*/
} else {
log.trace("Bean is standard type");
List elements = new ArrayList();
@@ -441,7 +440,7 @@
xmlBeanInfo.setElementDescriptor( elementDescriptor );
// default any addProperty() methods
- XMLIntrospectorHelper.defaultAddMethods( this, elementDescriptor,
bean.getElementType() );
+ defaultAddMethods( elementDescriptor, bean.getElementType() );
if (log.isTraceEnabled()) {
log.trace("Populated descriptor:");
@@ -738,10 +737,225 @@
}
+ /**
+ * Add any addPropety(PropertyType) methods as Updaters
+ * which are often used for 1-N relationships in beans.
+ * <br>
+ * The tricky part here is finding which ElementDescriptor corresponds
+ * to the method. e.g. a property 'items' might have an Element descriptor
+ * which the method addItem() should match to.
+ * <br>
+ * So the algorithm we'll use
+ * by default is to take the decapitalized name of the property being added
+ * and find the first ElementDescriptor that matches the property starting with
+ * the string. This should work for most use cases.
+ * e.g. addChild() would match the children property.
+ *
+ * @param introspector use this <code>XMLIntrospector</code> for introspection
+ * @param rootDescriptor add defaults to this descriptor
+ * @param beanClass the <code>Class</code> to which descriptor corresponds
+ */
+ public void defaultAddMethods(
+ ElementDescriptor rootDescriptor,
+ Class beanClass ) {
+ // lets iterate over all methods looking for one of the form
+ // add*(PropertyType)
+ if ( beanClass != null ) {
+ Method[] methods = beanClass.getMethods();
+ for ( int i = 0, size = methods.length; i < size; i++ ) {
+ Method method = methods[i];
+ String name = method.getName();
+ if ( name.startsWith( "add" ) ) {
+ // XXX: should we filter out non-void returning methods?
+ // some beans will return something as a helper
+ Class[] types = method.getParameterTypes();
+ if ( types != null) {
+ if ( log.isTraceEnabled() ) {
+ log.trace("Searching for match for " + method);
+ }
+
+ if ( ( types.length == 1 ) || types.length == 2 ) {
+ String propertyName = Introspector.decapitalize(
name.substring(3) );
+ if (propertyName.length() == 0)
+ continue;
+ if ( log.isTraceEnabled() ) {
+ log.trace( name + "->" + propertyName );
+ }
+
+ // now lets try find the ElementDescriptor which
displays
+ // a property which starts with propertyName
+ // and if so, we'll set a new Updater on it if there
+ // is not one already
+ ElementDescriptor descriptor =
+ findGetCollectionDescriptor(
+
+ rootDescriptor,
+ propertyName );
+
+ if ( log.isDebugEnabled() ) {
+ log.debug( "!! " + propertyName + " -> " +
descriptor );
+ log.debug( "!! " + name + " -> "
+ +
(descriptor!=null?descriptor.getPropertyName():"") );
+ }
+ if ( descriptor != null ) {
+ boolean isMapDescriptor
+ = Map.class.isAssignableFrom(
descriptor.getPropertyType() );
+ if ( !isMapDescriptor && types.length == 1 ) {
+ // this may match a standard collection or
iteration
+ log.trace("Matching collection or iteration");
+
+ descriptor.setUpdater( new MethodUpdater(
method ) );
+ descriptor.setSingularPropertyType( types[0] );
+
+ if ( log.isDebugEnabled() ) {
+ log.debug( "!! " + method);
+ log.debug( "!! " + types[0]);
+ }
+
+ // is there a child element with no localName
+ ElementDescriptor[] children
+ = descriptor.getElementDescriptors();
+ if ( children != null && children.length > 0 ) {
+ ElementDescriptor child = children[0];
+ String localName = child.getLocalName();
+ if ( localName == null ||
localName.length() == 0 ) {
+ child.setLocalName(
+ getElementNameMapper()
+ .mapTypeToElementName(
propertyName ) );
+ }
+ }
+
+ } else if ( isMapDescriptor && types.length == 2 ) {
+ // this may match a map
+ log.trace("Matching map");
+ ElementDescriptor[] children
+ = descriptor.getElementDescriptors();
+ // see if the descriptor's been set up properly
+ if ( children.length == 0 ) {
+
+ log.info(
+ "'entry' descriptor is missing for map.
"
+ + "Updaters cannot be set");
+
+ } else {
+ // loop through grandchildren
+ // adding updaters for key and value
+ ElementDescriptor[] grandchildren
+ = children[0].getElementDescriptors();
+ MapEntryAdder adder = new
MapEntryAdder(method);
+ for (
+ int n=0,
+ noOfGrandChildren =
grandchildren.length;
+ n < noOfGrandChildren;
+ n++ ) {
+ if ( "key".equals(
+ grandchildren[n].getLocalName()
) ) {
+
+ grandchildren[n].setUpdater(
+
adder.getKeyUpdater() );
+
grandchildren[n].setSingularPropertyType(
+ types[0] );
+ if ( log.isTraceEnabled() ) {
+ log.trace(
+ "Key descriptor: " +
grandchildren[n]);
+ }
+
+ } else if (
+ "value".equals(
+ grandchildren[n].getLocalName()
) ) {
+
+ grandchildren[n].setUpdater(
+
adder.getValueUpdater() );
+
grandchildren[n].setSingularPropertyType(
+ types[1] );
+ if ( log.isTraceEnabled() ) {
+ log.trace(
+ "Value descriptor: " +
grandchildren[n]);
+ }
+ }
+ }
+ }
+ }
+ } else {
+ if ( log.isDebugEnabled() ) {
+ log.debug(
+ "Could not find an ElementDescriptor with
property name: "
+ + propertyName + " to attach the add
method: " + method
+ );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
// Implementation methods
//-------------------------------------------------------------------------
+
+ /**
+ * Attempts to find the element descriptor for the getter property that
+ * typically matches a collection or array. The property name is used
+ * to match. e.g. if an addChild() method is detected the
+ * descriptor for the 'children' getter property should be returned.
+ *
+ * @param introspector use this <code>XMLIntrospector</code>
+ * @param rootDescriptor the <code>ElementDescriptor</code> whose child element
will be
+ * searched for a match
+ * @param propertyName the name of the 'adder' method to match
+ * @return <code>ElementDescriptor</code> for the matching getter
+ */
+ private ElementDescriptor findGetCollectionDescriptor(
+ ElementDescriptor rootDescriptor,
+ String propertyName ) {
+ // create the Map of propertyName -> descriptor that the PluralStemmer will
choose
+ Map map = new HashMap();
+ //String propertyName = rootDescriptor.getPropertyName();
+ if ( log.isTraceEnabled() ) {
+ log.trace( "findPluralDescriptor( " + propertyName
+ + " ):root property name=" + rootDescriptor.getPropertyName() );
+ }
+
+ if (rootDescriptor.getPropertyName() != null) {
+ map.put(propertyName, rootDescriptor);
+ }
+ makeElementDescriptorMap( rootDescriptor, map );
+
+ PluralStemmer stemmer = getPluralStemmer();
+ ElementDescriptor elementDescriptor = stemmer.findPluralDescriptor(
propertyName, map );
+
+ if ( log.isTraceEnabled() ) {
+ log.trace(
+ "findPluralDescriptor( " + propertyName
+ + " ):ElementDescriptor=" + elementDescriptor );
+ }
+
+ return elementDescriptor;
+ }
+
+
+ /**
+ * Creates a map where the keys are the property names and the values are the
ElementDescriptors
+ *
+ * @param rootDescriptor the values of the maps are the children of this
+ * <code>ElementDescriptor</code> index by their property names
+ * @param map the map to which the elements will be added
+ */
+ private void makeElementDescriptorMap( ElementDescriptor rootDescriptor, Map
map ) {
+ ElementDescriptor[] children = rootDescriptor.getElementDescriptors();
+ if ( children != null ) {
+ for ( int i = 0, size = children.length; i < size; i++ ) {
+ ElementDescriptor child = children[i];
+ String propertyName = child.getPropertyName();
+ if ( propertyName != null ) {
+ map.put( propertyName, child );
+ }
+ makeElementDescriptorMap( child, map );
+ }
+ }
+ }
/**
* A Factory method to lazily create a new strategy
No revision
No revision
1.9.2.3 +5 -6
jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/digester/AddDefaultsRule.java
Index: AddDefaultsRule.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/digester/AddDefaultsRule.java,v
retrieving revision 1.9.2.2
retrieving revision 1.9.2.3
diff -u -r1.9.2.2 -r1.9.2.3
--- AddDefaultsRule.java 15 Jan 2004 19:50:56 -0000 1.9.2.2
+++ AddDefaultsRule.java 18 Jan 2004 19:21:17 -0000 1.9.2.3
@@ -129,8 +129,7 @@
}
// default any addProperty() methods
- XMLIntrospectorHelper.defaultAddMethods(
- getXMLIntrospector(),
+ getXMLIntrospector().defaultAddMethods(
getRootElementDescriptor(),
beanClass );
}
1.8.2.2 +58 -6
jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/digester/AttributeRule.java
Index: AttributeRule.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/digester/AttributeRule.java,v
retrieving revision 1.8.2.1
retrieving revision 1.8.2.2
diff -u -r1.8.2.1 -r1.8.2.2
--- AttributeRule.java 15 Jan 2004 19:50:56 -0000 1.8.2.1
+++ AttributeRule.java 18 Jan 2004 19:21:17 -0000 1.8.2.2
@@ -63,11 +63,14 @@
import java.beans.BeanInfo;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
+import java.lang.reflect.Method;
import org.apache.commons.betwixt.AttributeDescriptor;
import org.apache.commons.betwixt.ElementDescriptor;
import org.apache.commons.betwixt.XMLUtils;
import org.apache.commons.betwixt.expression.ConstantExpression;
+import org.apache.commons.betwixt.expression.MethodExpression;
+import org.apache.commons.betwixt.expression.MethodUpdater;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.xml.sax.Attributes;
@@ -189,8 +192,7 @@
for ( int i = 0, size = descriptors.length; i < size; i++ ) {
PropertyDescriptor descriptor = descriptors[i];
if ( name.equals( descriptor.getName() ) ) {
- XMLIntrospectorHelper
- .configureProperty( attributeDescriptor, descriptor
);
+ configureProperty( attributeDescriptor, descriptor );
getProcessedPropertyNameSet().add( name );
break;
}
@@ -201,4 +203,54 @@
}
}
}
+
+ /**
+ * Configure an <code>AttributeDescriptor</code> from a
<code>PropertyDescriptor</code>
+ *
+ * @param attributeDescriptor configure this <code>AttributeDescriptor</code>
+ * @param propertyDescriptor configure from this <code>PropertyDescriptor</code>
+ */
+ private void configureProperty(
+ AttributeDescriptor attributeDescriptor,
+ PropertyDescriptor propertyDescriptor ) {
+ Class type = propertyDescriptor.getPropertyType();
+ Method readMethod = propertyDescriptor.getReadMethod();
+ Method writeMethod = propertyDescriptor.getWriteMethod();
+
+ if ( readMethod == null ) {
+ log.trace( "No read method" );
+ return;
+ }
+
+ if ( log.isTraceEnabled() ) {
+ log.trace( "Read method=" + readMethod );
+ }
+
+ // choose response from property type
+
+ // XXX: ignore class property ??
+ if ( Class.class.equals( type ) && "class".equals(
propertyDescriptor.getName() ) ) {
+ log.trace( "Ignoring class property" );
+ return;
+ }
+ if ( XMLIntrospectorHelper.isLoopType( type ) ) {
+ log.warn( "Using loop type for an attribute. Type = "
+ + type.getName() + " attribute: " +
attributeDescriptor.getQualifiedName() );
+ }
+
+ log.trace( "Standard property" );
+ attributeDescriptor.setTextExpression( new MethodExpression( readMethod ) );
+
+ if ( writeMethod != null ) {
+ attributeDescriptor.setUpdater( new MethodUpdater( writeMethod ) );
+ }
+
+ attributeDescriptor.setLocalName( propertyDescriptor.getName() );
+ attributeDescriptor.setPropertyType( type );
+
+ // XXX: associate more bean information with the descriptor?
+ //nodeDescriptor.setDisplayName( propertyDescriptor.getDisplayName() );
+ //nodeDescriptor.setShortDescription(
propertyDescriptor.getShortDescription() );
+ }
+
}
1.13.2.3 +122 -6
jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/digester/ElementRule.java
Index: ElementRule.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/digester/ElementRule.java,v
retrieving revision 1.13.2.2
retrieving revision 1.13.2.3
diff -u -r1.13.2.2 -r1.13.2.3
--- ElementRule.java 15 Jan 2004 19:50:56 -0000 1.13.2.2
+++ ElementRule.java 18 Jan 2004 19:21:17 -0000 1.13.2.3
@@ -60,11 +60,15 @@
*
*/
import java.beans.PropertyDescriptor;
+import java.lang.reflect.Method;
import org.apache.commons.betwixt.ElementDescriptor;
import org.apache.commons.betwixt.XMLBeanInfo;
import org.apache.commons.betwixt.XMLUtils;
import org.apache.commons.betwixt.expression.ConstantExpression;
+import org.apache.commons.betwixt.expression.IteratorExpression;
+import org.apache.commons.betwixt.expression.MethodExpression;
+import org.apache.commons.betwixt.expression.MethodUpdater;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.xml.sax.Attributes;
@@ -230,8 +234,7 @@
getPropertyDescriptor( beanClass, name );
if ( descriptor != null ) {
- XMLIntrospectorHelper
- .configureProperty(
+ configureProperty(
elementDescriptor,
descriptor,
updateMethodName,
@@ -241,4 +244,117 @@
}
}
}
+
+
+ /**
+ * Configure an <code>ElementDescriptor</code> from a
<code>PropertyDescriptor</code>.
+ * A custom update method may be set.
+ *
+ * @param elementDescriptor configure this <code>ElementDescriptor</code>
+ * @param propertyDescriptor configure from this <code>PropertyDescriptor</code>
+ * @param updateMethodName the name of the custom updater method to user.
+ * If null, then then
+ * @param beanClass the <code>Class</code> from which the update method should
be found.
+ * This may be null only when <code>updateMethodName</code> is also null.
+ */
+ private void configureProperty(
+ ElementDescriptor elementDescriptor,
+ PropertyDescriptor propertyDescriptor,
+ String updateMethodName,
+ Class beanClass ) {
+
+ Class type = propertyDescriptor.getPropertyType();
+ Method readMethod = propertyDescriptor.getReadMethod();
+ Method writeMethod = propertyDescriptor.getWriteMethod();
+
+ elementDescriptor.setLocalName( propertyDescriptor.getName() );
+ elementDescriptor.setPropertyType( type );
+
+ // XXX: associate more bean information with the descriptor?
+ //nodeDescriptor.setDisplayName( propertyDescriptor.getDisplayName() );
+ //nodeDescriptor.setShortDescription(
propertyDescriptor.getShortDescription() );
+
+ if ( readMethod == null ) {
+ log.trace( "No read method" );
+ return;
+ }
+
+ if ( log.isTraceEnabled() ) {
+ log.trace( "Read method=" + readMethod.getName() );
+ }
+
+ // choose response from property type
+
+ // XXX: ignore class property ??
+ if ( Class.class.equals( type ) && "class".equals(
propertyDescriptor.getName() ) ) {
+ log.trace( "Ignoring class property" );
+ return;
+ }
+ if ( XMLIntrospectorHelper.isPrimitiveType( type ) ) {
+ elementDescriptor.setTextExpression( new MethodExpression( readMethod )
);
+
+ } else if ( XMLIntrospectorHelper.isLoopType( type ) ) {
+ log.trace("Loop type ??");
+
+ // don't wrap this in an extra element as its specified in the
+ // XML descriptor so no need.
+ elementDescriptor.setContextExpression(
+ new IteratorExpression( new MethodExpression( readMethod ) )
+ );
+
+ writeMethod = null;
+ } else {
+ log.trace( "Standard property" );
+ elementDescriptor.setContextExpression( new MethodExpression(
readMethod ) );
+ }
+
+ // see if we have a custom method update name
+ if (updateMethodName == null) {
+ // set standard write method
+ if ( writeMethod != null ) {
+ elementDescriptor.setUpdater( new MethodUpdater( writeMethod ) );
+ }
+
+ } else {
+ // see if we can find and set the custom method
+ if ( log.isTraceEnabled() ) {
+ log.trace( "Finding custom method: " );
+ log.trace( " on:" + beanClass );
+ log.trace( " name:" + updateMethodName );
+ }
+
+ Method updateMethod = null;
+ Method[] methods = beanClass.getMethods();
+ for ( int i = 0, size = methods.length; i < size; i++ ) {
+ Method method = methods[i];
+ if ( updateMethodName.equals( method.getName() ) ) {
+ // we have a matching name
+ // check paramters are correct
+ if (methods[i].getParameterTypes().length == 1) {
+ // we'll use first match
+ updateMethod = methods[i];
+ if ( log.isTraceEnabled() ) {
+ log.trace("Matched method:" + updateMethod);
+ }
+ // done since we're using the first match
+ break;
+ }
+ }
+ }
+
+ if (updateMethod == null) {
+ if ( log.isInfoEnabled() ) {
+
+ log.info("No method with name '" + updateMethodName + "' found
for update");
+ }
+ } else {
+
+ elementDescriptor.setUpdater( new MethodUpdater( updateMethod ) );
+ elementDescriptor.setSingularPropertyType(
updateMethod.getParameterTypes()[0] );
+ if ( log.isTraceEnabled() ) {
+ log.trace( "Set custom updater on " + elementDescriptor);
+ }
+ }
+ }
+ }
}
1.27.2.3 +15 -5
jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/digester/XMLIntrospectorHelper.java
Index: XMLIntrospectorHelper.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/digester/XMLIntrospectorHelper.java,v
retrieving revision 1.27.2.2
retrieving revision 1.27.2.3
diff -u -r1.27.2.2 -r1.27.2.3
--- XMLIntrospectorHelper.java 18 Jan 2004 12:30:57 -0000 1.27.2.2
+++ XMLIntrospectorHelper.java 18 Jan 2004 19:21:17 -0000 1.27.2.3
@@ -87,7 +87,10 @@
/**
* <p><code>XMLIntrospectorHelper</code> a helper class for
* common code shared between the digestor and introspector.</p>
- *
+ *
+ * TODO this class will be deprecated soon
+ * need to move the isLoop and isPrimitiveType but probably need to
+ * think about whether they need replacing with something different.
* @author <a href="mailto:[EMAIL PROTECTED]">James Strachan</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Martin van den Bemt</a>
* @version $Id$
@@ -257,6 +260,7 @@
*
* @param elementDescriptor configure this <code>ElementDescriptor</code>
* @param propertyDescriptor configure from this <code>PropertyDescriptor</code>
+ * @deprecated unused
*/
public static void configureProperty(
ElementDescriptor elementDescriptor,
@@ -275,6 +279,7 @@
* If null, then then
* @param beanClass the <code>Class</code> from which the update method should
be found.
* This may be null only when <code>updateMethodName</code> is also null.
+ * @deprecated moved into ElementRule
*/
public static void configureProperty(
ElementDescriptor elementDescriptor,
@@ -382,6 +387,7 @@
*
* @param attributeDescriptor configure this <code>AttributeDescriptor</code>
* @param propertyDescriptor configure from this <code>PropertyDescriptor</code>
+ * @deprecated moved into AttributeRule
*/
public static void configureProperty(
AttributeDescriptor attributeDescriptor,
@@ -444,6 +450,7 @@
* @param introspector use this <code>XMLIntrospector</code> for introspection
* @param rootDescriptor add defaults to this descriptor
* @param beanClass the <code>Class</code> to which descriptor corresponds
+ * @deprecated use the method in XMLIntrospector instead
*/
public static void defaultAddMethods(
XMLIntrospector introspector,
@@ -647,6 +654,7 @@
* searched for a match
* @param propertyName the name of the 'adder' method to match
* @return <code>ElementDescriptor</code> for the matching getter
+ * @deprecated moved into XMLIntrospector
*/
protected static ElementDescriptor findGetCollectionDescriptor(
XMLIntrospector introspector,
@@ -683,6 +691,7 @@
* @param rootDescriptor the values of the maps are the children of this
* <code>ElementDescriptor</code> index by their property names
* @param map the map to which the elements will be added
+ * @deprecated moved into XMLIntrospector
*/
protected static void makeElementDescriptorMap( ElementDescriptor
rootDescriptor, Map map ) {
ElementDescriptor[] children = rootDescriptor.getElementDescriptors();
@@ -705,6 +714,7 @@
* @param rootDescriptor traverse child graph for this
<code>ElementDescriptor</code>
* @param oldValue replace this <code>ElementDescriptor</code>
* @param newValue replace with this <code>ElementDescriptor</code>
+ * @deprecated now unused
*/
protected static void swapDescriptor(
ElementDescriptor rootDescriptor,
No revision
No revision
1.5.2.2 +5 -1
jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/TestXMLBeanInfoDigester.java
Index: TestXMLBeanInfoDigester.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/TestXMLBeanInfoDigester.java,v
retrieving revision 1.5.2.1
retrieving revision 1.5.2.2
diff -u -r1.5.2.1 -r1.5.2.2
--- TestXMLBeanInfoDigester.java 13 Jan 2004 21:49:46 -0000 1.5.2.1
+++ TestXMLBeanInfoDigester.java 18 Jan 2004 19:21:17 -0000 1.5.2.2
@@ -7,7 +7,7 @@
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001-2003 The Apache Software Foundation. All rights
+ * Copyright (c) 2001-2004 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -91,6 +91,10 @@
public void testDigester() throws Exception {
XMLBeanInfoDigester digester = new XMLBeanInfoDigester();
+ // TODO the digestion probably won't work without an XMLIntrospector
+ // so it might be better to enforce via a constructor
+ // or create a default one
+ digester.setXMLIntrospector(new XMLIntrospector());
InputStream in = new FileInputStream(
getTestFile("src/test/org/apache/commons/digester/rss/Channel.betwixt") );
No revision
No revision
1.25.2.2 +1 -0 jakarta-commons/betwixt/xdocs/tasks.xml
Index: tasks.xml
===================================================================
RCS file: /home/cvs/jakarta-commons/betwixt/xdocs/tasks.xml,v
retrieving revision 1.25.2.1
retrieving revision 1.25.2.2
diff -u -r1.25.2.1 -r1.25.2.2
--- tasks.xml 18 Jan 2004 12:30:58 -0000 1.25.2.1
+++ tasks.xml 18 Jan 2004 19:21:17 -0000 1.25.2.2
@@ -339,6 +339,7 @@
<li><code>PrimitiveType</code> property
removed</li>
</ul>
</li>
+ <li><strong>XMLIntrospectorHelper</strong> this will be
deprecated.
</ul>
</li>
</ul>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]