net.sf.colle.xml
Class MapperCollection

java.lang.Object
  extended bynet.sf.colle.xml.Mapper
      extended bynet.sf.colle.xml.MapperCollection

class MapperCollection
extends Mapper

Maps objects and lists of objects into a DOM document. Created: 30 Jun 2003

Version:
$Revision: 1.3 $, $Date: 2004/06/04 05:51:09 $
Author:
Dwayne Schultz

Field Summary
 
Fields inherited from class net.sf.colle.xml.Mapper
mxParentMapper
 
Constructor Summary
(package private) MapperCollection()
           
 
Method Summary
(package private)  void add(Class pxClass, Mapper pxMapper)
           
protected  void map(org.jdom.Element pxElement, Object pxObject, Set pxPaths, String psPath)
          Maps the object into a DOM document.
 void map(org.jdom.Element pxParent, String psName, Object pxObject, Set pxPaths, String psPath)
          Maps the object into a DOM document.
 
Methods inherited from class net.sf.colle.xml.Mapper
map, map, map, map, map, map, map, map, mapCollection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapperCollection

MapperCollection()
Method Detail

add

void add(Class pxClass,
         Mapper pxMapper)

map

public void map(org.jdom.Element pxParent,
                String psName,
                Object pxObject,
                Set pxPaths,
                String psPath)
Maps the object into a DOM document.

Overrides:
map in class Mapper
Parameters:
pxParent - parent element to add new elements onto
psName - name the top element tag should be called
pxObject - object being mapped
pxPaths - paths to each explicitly requested object
psPath - ignored, included to simplify generated code

map

protected void map(org.jdom.Element pxElement,
                   Object pxObject,
                   Set pxPaths,
                   String psPath)
Description copied from class: Mapper
Maps the object into a DOM document. This version is usually used by generated mappers because it allows the caller to specify the path to the object being mapped. This is important to determine if children objects and expensive attributes should be mapped.

Specified by:
map in class Mapper
Parameters:
pxElement - parent element to add new elements onto
pxObject - object being mapped
pxPaths - paths to each explicitly requested object
psPath - xpath to the current object
See Also:
Mapper