// PhotoInfo mappings
digester.addFactoryCreate( "*/photos/photo", new PhotoFactory() );
// After the photo is ready, inform listeners if a new photo was created.
digester.addRule( "*/photos/photo", new Rule() {
public void end( String namespace, String name ) {
Boolean isCreatingNew = (Boolean) digester.pop( STACK_CREATING_NEW );
if ( isCreatingNew.booleanValue() ) {
photoCount++;
fireObjectImportedEvent( digester.peek() );
}
}