jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r615649 [8/14] - in /jackrabbit/trunk: jackrabbit-classloader/src/main/java/org/apache/jackrabbit/classloader/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/ jackra...
Date Sun, 27 Jan 2008 21:08:36 GMT
Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/impl/ObjectContentManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/impl/ObjectContentManagerImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/impl/ObjectContentManagerImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/impl/ObjectContentManagerImpl.java Sun Jan 27 13:08:08 2008
@@ -66,10 +66,10 @@
 import org.apache.jackrabbit.ocm.version.VersionIterator;
 
 /**
- * 
+ *
  * Default implementation for
  * {@link org.apache.jackrabbit.ocm.manager.ObjectContentManager}
- * 
+ *
  * @author Sandro Boehme
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart
  *         Christophe</a>
@@ -107,7 +107,7 @@
     /**
      * Creates a new <code>ObjectContentManager</code> that uses the passed in
      * <code>Mapper</code>, and a <code>Session</code>
-     * 
+     *
      * @param mapper
      *            the Mapper component
      * @param session
@@ -134,7 +134,7 @@
     /**
      * Creates a new <code>ObjectContentManager</code> based on a JCR session
      * and some xml mapping files.
-     * 
+     *
      * @param session
      *            The JCR session
      * @param xmlMappingFiles
@@ -161,7 +161,7 @@
     /**
      * Creates a new <code>ObjectContentManager</code> based on a JCR session
      * and some xml mapping files.
-     * 
+     *
      * @param session
      *            The JCR session
      * @param xmlMappingFiles
@@ -187,7 +187,7 @@
 
     /**
      * Full constructor.
-     * 
+     *
      * @param mapper
      *            the Mapper component
      * @param converter
@@ -208,7 +208,7 @@
 
     /**
      * Sets the <code>Mapper</code> used by this object content manager.
-     * 
+     *
      * @param mapper
      *            mapping solver
      */
@@ -219,7 +219,7 @@
     /**
      * Sets the <code>ObjectConverter</code> that is used internally by this
      * object content manager.
-     * 
+     *
      * @param objectConverter
      *            the internal <code>ObjectConverter</code>
      */
@@ -229,7 +229,7 @@
 
     /**
      * Sets the <code>QueryManager</code> used by the object content manager.
-     * 
+     *
      * @param queryManager
      *            a <code>QueryManager</code>
      */
@@ -425,7 +425,7 @@
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.ObjectContentManager#remove(java.lang.String)
      */
     public void remove(String path) {
@@ -445,7 +445,7 @@
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.ObjectContentManager#remove(java.lang.Object)
      */
     public void remove(Object object) {
@@ -453,7 +453,7 @@
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.ObjectContentManager#remove(org.apache.jackrabbit.ocm.query.Query)
      */
     public void remove(Query query) {
@@ -495,7 +495,7 @@
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.ObjectContentManager#objectExists(java.lang.String)
      */
     public boolean objectExists(String path) {
@@ -508,7 +508,7 @@
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.ObjectContentManager#isPersistent(java.lang.Class)
      */
     public boolean isPersistent(final Class clazz) {
@@ -523,7 +523,7 @@
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.ObjectContentManager#getObject(org.apache.jackrabbit.ocm.query.Query)
      */
     public Object getObject(Query query) {
@@ -538,7 +538,7 @@
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.ObjectContentManager#getObjects(org.apache.jackrabbit.ocm.query.Query)
      */
     public Collection getObjects(Query query) {
@@ -550,7 +550,7 @@
      * Returns a list of objects of that particular class which are directly
      * under that path. This would not return the objects anywhere below the
      * denoted path.
-     * 
+     *
      * @param objectClass
      * @param path
      * @return
@@ -563,13 +563,13 @@
         } catch (RepositoryException e) {
             throw new org.apache.jackrabbit.ocm.exception.RepositoryException("Impossible to get the objects at " + path, e);
         }
-        
-        
+
+
         String parentPath = NodeUtil.getParentPath(path);
         if (! parentPath.equals("/")) {
         	parentPath = parentPath + "/";
         }
-        
+
         String nodeName = NodeUtil.getNodeName(path);
         // If nodeName is missing then include *.
         if (nodeName == null || nodeName.length() == 0) {
@@ -580,12 +580,12 @@
         filter.setNodeName(nodeName);
         Query query = queryManager.createQuery(filter);
         return getObjects(query);
-             
-        
+
+
     }
-   
+
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.ObjectContentManager#getObjectIterator(org.apache.jackrabbit.ocm.query.Query)
      */
     public Iterator getObjectIterator(Query query) {
@@ -598,7 +598,7 @@
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.ObjectContentManager#getObjectIterator(String,
      *      String)
      */
@@ -648,7 +648,7 @@
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.ObjectContentManager#checkin(java.lang.String)
      */
     public void checkin(String path) {
@@ -656,7 +656,7 @@
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.ObjectContentManager#checkin(java.lang.String,
      *      java.lang.String[])
      */
@@ -694,7 +694,7 @@
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.ObjectContentManager#checkout(java.lang.String)
      */
     public void checkout(String path) {
@@ -721,7 +721,7 @@
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.ObjectContentManager#addVersionLabel(java.lang.String,
      *      java.lang.String, java.lang.String)
      */
@@ -749,7 +749,7 @@
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.ObjectContentManager#getVersion(java.lang.String,
      *      java.lang.String)
      */
@@ -777,7 +777,7 @@
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.ObjectContentManager#getVersionLabels(java.lang.String,
      *      java.lang.String)
      */
@@ -830,7 +830,7 @@
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.ObjectContentManager#getAllVersions(java.lang.String)
      */
     public VersionIterator getAllVersions(String path) {
@@ -855,7 +855,7 @@
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.ObjectContentManager#getRootVersion(java.lang.String)
      */
     public Version getRootVersion(String path) {
@@ -880,7 +880,7 @@
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.ObjectContentManager#getBaseVersion(java.lang.String)
      */
     public Version getBaseVersion(String path) {
@@ -903,7 +903,7 @@
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.ObjectContentManager#lock(java.lang.String,
      *      java.lang.Object, boolean, boolean)
      */
@@ -928,7 +928,7 @@
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.ObjectContentManager#unlock(java.lang.String,
      *      java.lang.Object, java.lang.String)
      */
@@ -962,7 +962,7 @@
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.ObjectContentManager#isLocked(java.lang.String)
      */
     public boolean isLocked(final String absPath) {
@@ -986,7 +986,7 @@
     /**
      * Throws {@link LockedException} id node is locked so alter nopde cannot be
      * done
-     * 
+     *
      * @param absPath
      *            abs path to node
      * @throws RepositoryException
@@ -1039,7 +1039,7 @@
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.ObjectContentManager#logout()
      */
     public void logout() {
@@ -1060,7 +1060,7 @@
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.ObjectContentManager#save()
      */
     public void save() {
@@ -1093,7 +1093,7 @@
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.ObjectContentManager#move(java.lang.String,
      *      java.lang.String)
      */
@@ -1129,7 +1129,7 @@
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.ObjectContentManager#copy(java.lang.String,
      *      java.lang.String)
      */

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/impl/ObjectContentManagerUtil.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/impl/ObjectContentManagerUtil.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/impl/ObjectContentManagerUtil.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/impl/ObjectContentManagerUtil.java Sun Jan 27 13:08:08 2008
@@ -34,7 +34,7 @@
 	
     public static String getPath(Session session, BeanDescriptor beanDescriptor, Node parentNode) throws ObjectContentManagerException
     {		
-		 try 
+		 try
 		 {
 			String path = "";
 			if (parentNode != null)
@@ -43,8 +43,8 @@
 			}
 		    return path + "/"  + beanDescriptor.getJcrName();
 
-		} 
-		catch (javax.jcr.RepositoryException e) 
+		}
+		catch (javax.jcr.RepositoryException e)
 		{
 			throw new RepositoryException(e);
 		}

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/impl/ObjectIterator.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/impl/ObjectIterator.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/impl/ObjectIterator.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/impl/ObjectIterator.java Sun Jan 27 13:08:08 2008
@@ -40,7 +40,7 @@
  * <p>
  * This Iterator implementation does not support removing elements, therefore
  * the {@link #remove()} method throws a <code>UnsupportOperationException</code>.
- * 
+ *
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
  *
  */
@@ -48,7 +48,7 @@
 {
 
     private static final Log log = LogFactory.getLog(ObjectIterator.class);
-    
+
 	private NodeIterator nodeIterator;
 
 	private Session session;
@@ -58,11 +58,11 @@
     private Object nextResult;
 	
 	/**
-	 * Constructor 
-	 * 
-	 * @param iterator JCR node iterator 
+	 * Constructor
+	 *
+	 * @param iterator JCR node iterator
 	 * @param converter The object converter
-	 * @param session the JCR session 
+	 * @param session the JCR session
 	 */
 	public ObjectIterator(NodeIterator iterator, ObjectConverter converter, Session session)
 	{
@@ -78,24 +78,24 @@
 	public boolean hasNext() {
         return nextResult != null;
     }
-    
+
 	
     public Object next() {
         if (nextResult == null) {
             throw new NoSuchElementException();
         }
-        
+
         Object result = nextResult;
         seek();
         return result;
     }
 
-    
+
     public void remove() {
         throw new UnsupportedOperationException();
     }
-    
-    
+
+
     private void seek() {
         while (nodeIterator.hasNext()) {
             try {
@@ -113,7 +113,7 @@
                 log.info("Unexpected Problem while trying to map a node to an object", t);
             }
         }
-        
+
         // no more results
         nextResult = null;
     }

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/objectconverter/ObjectConverter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/objectconverter/ObjectConverter.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/objectconverter/ObjectConverter.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/objectconverter/ObjectConverter.java Sun Jan 27 13:08:08 2008
@@ -24,104 +24,104 @@
 
 /**
  * Convert any kind of beans into JCR nodes & properties
- * 
+ *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
  * @version $Id: Exp $
  */
 public interface ObjectConverter
 {
 	/**
-	 * Insert the object 
-	 * 
-	 * @param session the JCR session  
+	 * Insert the object
+	 *
+	 * @param session the JCR session
 	 * @param object the object to insert
 	 * @throws ObjectContentManagerException when it is not possible to insert the object
-	 * 
+	 *
 	 */
     public void insert(Session session, Object object) throws ObjectContentManagerException;
-    
+
 	/**
-	 * Update the object 
-	 * 
-	 * @param session the JCR session 
+	 * Update the object
+	 *
+	 * @param session the JCR session
 	 * @param object the object to update
 	 * @throws ObjectContentManagerException when it is not possible to update the object
-	 */    
+	 */
     public void update(Session session, Object object) throws ObjectContentManagerException;
-    
+
     /**
      * Retrieve an object from the JCR repo
-     * 
-     * @param session The JCR session 
+     *
+     * @param session The JCR session
      * @param clazz The class assigned to the object to retrieve
      * @param path the JCR path
      * @return The object found or null
-     * 
+     *
      * @throws ObjectContentManagerException when it is not possible to retrieve the object
      */
     public Object getObject(Session session, String path) throws ObjectContentManagerException;
-    
+
     /**
      * Retrieve an object from the JCR repo
-     * 
-     * @param session The JCR session 
+     *
+     * @param session The JCR session
      * @param clazz The class assigned to the object to retrieve
      * @param path the JCR path
      * @return The object found or null
-     * 
+     *
      * @throws ObjectContentManagerException when it is not possible to retrieve the object
      */
     public Object getObject(Session session, Class clazz, String path) throws ObjectContentManagerException;
-    
-    
+
+
     /**
      * Retrieve the specified attribute  for the given persistent object.
      * this attribute is either a bean or a collection. This method is usefull if the corresponding descriptor has an autoRetrieve="false"
-     * 
+     *
      * @param session The JCR session
      * @param object The persistent object
      * @param attributeName The name of the attribute to retrieve
      */
     public void retrieveMappedAttribute(Session session, Object object, String attributeName);
 
-    
+
     /**
      * Retrieve all mapped  attributes for the given persistent object.
-     * 
-     * @param session The JCR session     
+     *
+     * @param session The JCR session
      * @param object The persistent object
      */
     public void retrieveAllMappedAttributes(Session session, Object object);
-    
+
 	/**
-	 * Insert the object 
-	 * 
-	 * @param session the JCR session 
-	 * @param parentNode The parent node used to store the new JCR element (object) 
+	 * Insert the object
+	 *
+	 * @param session the JCR session
+	 * @param parentNode The parent node used to store the new JCR element (object)
 	 * @param nodeName The node name used to store the object
 	 * @param object the object to insert
 	 * @throws ObjectContentManagerException when it is not possible to insert the object
 	 */
     public void insert(Session session, Node parentNode, String nodeName, Object object) throws ObjectContentManagerException;
-    
+
 	/**
-	 * Update the object 
-	 * 
-	 * @param session the JCR session 
-	 * @param parentNode The parent node used to store the new JCR element (object) 
+	 * Update the object
+	 *
+	 * @param session the JCR session
+	 * @param parentNode The parent node used to store the new JCR element (object)
 	 * @param nodeName The node name used to store the object
 	 * @param object the object to update
 	 * @throws ObjectContentManagerException when it is not possible to update the object
-	 */    
+	 */
     public void update(Session session, Node parentNode, String nodeName, Object object) throws ObjectContentManagerException;
-    
-   
+
+
     /**
-     * Get the object JCR path 
-     * 
-     * @param session the JCR session 
-     * @param object the object for which the path has to be retrieve 
-     * @return the object JCR path 
+     * Get the object JCR path
+     *
+     * @param session the JCR session
+     * @param object the object for which the path has to be retrieve
+     * @return the object JCR path
      * @throws ObjectContentManagerException when it is not possible to retrieve the object path
      */
     public String getPath(Session session , Object object)  throws ObjectContentManagerException;

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/objectconverter/impl/BeanLazyLoader.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/objectconverter/impl/BeanLazyLoader.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/objectconverter/impl/BeanLazyLoader.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/objectconverter/impl/BeanLazyLoader.java Sun Jan 27 13:08:08 2008
@@ -29,22 +29,22 @@
 {
 
 	 private final static Log log = LogFactory.getLog(BeanLazyLoader.class);
-	 
+	
 	 private ObjectConverter objectConverter;
-	 private Session session; 
-	 private Class beanClass; 
-	 private String path; 
-	 
-	 
+	 private Session session;
+	 private Class beanClass;
+	 private String path;
+	
+	
 	public BeanLazyLoader(ObjectConverter objectConverter, Session session, Class beanClass, String path)
 	{
 	     this.objectConverter = objectConverter;
-	     this.session = session; 
+	     this.session = session;
 	     this.beanClass = beanClass;
-	     this.path = path; 
+	     this.path = path;
 	}
 
-	public Object loadObject() 
+	public Object loadObject()
 	{				
 		return objectConverter.getObject(session, beanClass, path);		
 	}

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/objectconverter/impl/CollectionLazyLoader.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/objectconverter/impl/CollectionLazyLoader.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/objectconverter/impl/CollectionLazyLoader.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/objectconverter/impl/CollectionLazyLoader.java Sun Jan 27 13:08:08 2008
@@ -35,10 +35,10 @@
 	private CollectionConverter collectionConverter;
 	private Session session;
 	private Node collectionParentNode;
-	private CollectionDescriptor collectionDescriptor; 
+	private CollectionDescriptor collectionDescriptor;
 	private Class collectionFieldClass;
 	
-	public CollectionLazyLoader(CollectionConverter collectionConverter, Session session, Node parentNode, 
+	public CollectionLazyLoader(CollectionConverter collectionConverter, Session session, Node parentNode,
 			                                               CollectionDescriptor collectionDescriptor, Class collectionFieldClass ) {
 		this.collectionConverter = collectionConverter;
 		this.session = session;

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/objectconverter/impl/ProxyManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/objectconverter/impl/ProxyManagerImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/objectconverter/impl/ProxyManagerImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/objectconverter/impl/ProxyManagerImpl.java Sun Jan 27 13:08:08 2008
@@ -33,18 +33,18 @@
 import org.apache.jackrabbit.ocm.manager.objectconverter.ProxyManager;
 import org.apache.jackrabbit.ocm.mapper.model.CollectionDescriptor;
 
-public class ProxyManagerImpl implements ProxyManager 
+public class ProxyManagerImpl implements ProxyManager
 {
 
 	private final static Log log = LogFactory.getLog(ProxyManagerImpl.class);
 	
-	 
+	
 
 	/**
-	 * 
+	 *
 	 * @see org.apache.jackrabbit.ocm.manager.objectconverter.ProxyManager#createBeanProxy(javax.jcr.Session, org.apache.jackrabbit.ocm.manager.objectconverter.ObjectConverter, java.lang.Class, java.lang.String)
 	 */
-	public  Object createBeanProxy(Session session, ObjectConverter objectConverter, Class beanClass, String path) 
+	public  Object createBeanProxy(Session session, ObjectConverter objectConverter, Class beanClass, String path)
 	{
 		
        try {
@@ -60,10 +60,10 @@
 	}
 
 	/**
-	 * 
+	 *
 	 * @see org.apache.jackrabbit.ocm.manager.objectconverter.ProxyManager#createCollectionProxy(javax.jcr.Session, org.apache.jackrabbit.ocm.manager.collectionconverter.CollectionConverter, javax.jcr.Node, org.apache.jackrabbit.ocm.mapper.model.CollectionDescriptor, java.lang.Class)
 	 */
-	public  Object createCollectionProxy(Session session, CollectionConverter collectionConverter, Node parentNode,  CollectionDescriptor collectionDescriptor, Class collectionFieldClass) 
+	public  Object createCollectionProxy(Session session, CollectionConverter collectionConverter, Node parentNode,  CollectionDescriptor collectionDescriptor, Class collectionFieldClass)
 	{	
 		
 		if (collectionConverter.isNull(session, parentNode, collectionDescriptor, collectionFieldClass)) 	{

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/objectconverter/impl/SimpleFieldsHelper.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/objectconverter/impl/SimpleFieldsHelper.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/objectconverter/impl/SimpleFieldsHelper.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/objectconverter/impl/SimpleFieldsHelper.java Sun Jan 27 13:08:08 2008
@@ -44,9 +44,9 @@
 
 /**
  * Helper class used to map simple fields.
- * 
+ *
  * @author <a href="mailto:christophe.lombart@gmail.com">Lombart Christophe </a>
- * 
+ *
  */
 public class SimpleFieldsHelper
 {
@@ -59,11 +59,11 @@
 
 	/**
 	 * Constructor
-	 * 
+	 *
 	 * @param converterProvider The atomic type converter provider
-	 * 
+	 *
 	 */
-	public SimpleFieldsHelper(AtomicTypeConverterProvider converterProvider) 
+	public SimpleFieldsHelper(AtomicTypeConverterProvider converterProvider)
 	{
 		this.atomicTypeConverterProvider = converterProvider;
 	}
@@ -71,19 +71,19 @@
 	
 	/**
 	 * Retrieve simple fields (atomic fields)
-	 * 
+	 *
 	 * @throws JcrMappingException
 	 * @throws org.apache.jackrabbit.ocm.exception.RepositoryException
 	 */
-	public Object retrieveSimpleFields(Session session, ClassDescriptor classDescriptor, Node node, Object object) 
+	public Object retrieveSimpleFields(Session session, ClassDescriptor classDescriptor, Node node, Object object)
 	{
 		Object initializedBean = object;
 		try {
 			Iterator fieldDescriptorIterator = classDescriptor.getFieldDescriptors().iterator();
 
-			if (classDescriptor.usesNodeTypePerHierarchyStrategy() && classDescriptor.hasDiscriminator()) 
+			if (classDescriptor.usesNodeTypePerHierarchyStrategy() && classDescriptor.hasDiscriminator())
 			{
-				if (!node.hasProperty(ManagerConstant.DISCRIMINATOR_PROPERTY_NAME)) 
+				if (!node.hasProperty(ManagerConstant.DISCRIMINATOR_PROPERTY_NAME))
 				{
 					throw new ObjectContentManagerException("Class '"
 							+ classDescriptor.getClassName()
@@ -134,11 +134,11 @@
 	private Object retrieveSimpleField(ClassDescriptor classDescriptor, Node node, Object initializedBean, FieldDescriptor fieldDescriptor, String fieldName, String propertyName) throws RepositoryException, ValueFormatException, PathNotFoundException {
 
 	    Value propValue;
-		if (node.hasProperty(propertyName)) 
+		if (node.hasProperty(propertyName))
 		{
 			propValue = node.getProperty(propertyName).getValue();
 			
-		} 
+		}
 		else if (fieldDescriptor.getJcrDefaultValue() != null)
 		{
 		    ValueFactory vf = node.getSession().getValueFactory();
@@ -147,7 +147,7 @@
 		else
 		{
 		    PropertyDefinition propDef = getPropertyDefinition(node, propertyName);
-		    
+		
 		    if (propDef != null && propDef.getDefaultValues() != null && propDef.getDefaultValues().length == 1)
 		    {
                 log.debug("retrieveSimpleField: Use default value from property definition for missing mapped property " + propertyName + " of class '" + classDescriptor.getClassName() + "'");
@@ -162,13 +162,13 @@
         // HINT: lazy initialize target bean - The bean can be null when it is inline
 		if (initializedBean == null)
 		{
-		    
+		
 		    // if we do not have a value, we do nothing at all and just return null
 		    if (propValue == null)
 		    {
 		        return null;
 		    }
-		    
+		
 		    // otherwise create the bean to set the value
 		    initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());
 		}
@@ -217,7 +217,7 @@
 		
 		boolean protectedProperty = isProtectedProperty(objectNode, fieldDescriptor, jcrName);
 
-		if (!protectedProperty) 
+		if (!protectedProperty)
 		{ // DO NOT TRY TO WRITE PROTECTED  PROPERTIES
 			
 			Object fieldValue = ReflectionUtils.getNestedProperty(object, fieldName);
@@ -240,12 +240,12 @@
 	}
 
 
-	private boolean isProtectedProperty(Node objectNode, FieldDescriptor fieldDescriptor, String jcrName) throws RepositoryException, PathNotFoundException 
+	private boolean isProtectedProperty(Node objectNode, FieldDescriptor fieldDescriptor, String jcrName) throws RepositoryException, PathNotFoundException
 	{
 		// Return true if the property is defined as protected in the mapping file
 		if (fieldDescriptor.isJcrProtected())
 		{
-			return true; 
+			return true;
 		}
 
 		// Check if the property is defined as protected in the JCR repo
@@ -255,7 +255,7 @@
 		{
 		    return objectNode.getProperty(jcrName).getDefinition().isProtected();
 		}
-		    
+		
 		// 2. Find a definition for the property and checks its protected status
 		PropertyDefinition definition = getPropertyDefinition(objectNode, jcrName);
 		if (definition != null)
@@ -316,12 +316,12 @@
 	 * name is found which is single-valued, this property definition is
 	 * returned. Otherwise the first residual property definition which is
 	 * single-valued is returned. Otherwise <code>null</code> is returned.
-	 * 
+	 *
 	 * @param nodeType The <code>NodeType</code> to search for matching node
 	 *         type definitions for the given property.
 	 * @param propertyName The name of the property for which the
 	 *         <code>PropertyDefinition</code> is requested.
-	 *         
+	 *
 	 * @return The <code>PropertyDefinition</code> for the given property or
 	 *         <code>null</code> if none can be found in the type.
 	 */
@@ -335,20 +335,20 @@
             {
                 continue;
             }
-            
+
             // if we have an exact match, use this and return
             if (propertyName.equals(pd[i].getName()))
             {
                 return pd[i];
             }
-            
+
             // if we have a residual property definition consider as candidate
             if (pd[i].getName() == null && candidate == null)
             {
                 candidate = pd[i];
             }
         }
-        
+
         // return the potential residal candidate definition
         return candidate;
 	}
@@ -362,44 +362,44 @@
 	 * If a definition whose name is the same as the <code>propertyName</code>
 	 * is found, this definition is returned. Otherwise a residual property
 	 * definition may be returned.
-	 * 
+	 *
 	 * @param node The <code>Node</code> whose primary and mixin node types are
 	 *         to be scanned for a single-valued property definition.
 	 * @param propertyName The name of the property for which the property
 	 *         definition is to be returned.
-	 *         
+	 *
 	 * @return The <code>PropertyDefinition</code> for the named property or
 	 *         <code>null</code> if no single-valued exact or residual property
 	 *         definintion may be found in the node's primary or mixin node
 	 *         types.
-	 *         
+	 *
 	 * @throws RepositoryException If an error occurrs accessing the primary or
 	 *         mixin node types of the node.
 	 */
 	private PropertyDefinition getPropertyDefinition(Node node, String propertyName) throws RepositoryException {
-	    
+	
 	    // try to find the definition in the primary node type
         NodeType nt = node.getPrimaryNodeType();
         PropertyDefinition propDef = getPropertyDefinition(nt, propertyName);
-        
+
         // return the definition if it is not residual
         if (propDef != null && propDef.getName() != null)
         {
             return propDef;
         }
-        
+
         // otherwise look it up in any of the mixin node types
         NodeType[] mixins = node.getMixinNodeTypes();
         for (int i = 0; mixins != null && i < mixins.length; i++)
         {
             PropertyDefinition candidate = getPropertyDefinition(mixins[i], propertyName);
-            
+
             // use this property definition if not residual
             if (candidate != null && candidate.getName() != null)
             {
                 return propDef;
             }
-            
+
             // otherwise use this if we do not have a candidate yet
             if (propDef == null)
             {

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/DescriptorReader.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/DescriptorReader.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/DescriptorReader.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/DescriptorReader.java Sun Jan 27 13:08:08 2008
@@ -23,13 +23,13 @@
 
 	/**
 	 * Load all class descriptors found in an classdescriptor definition.
-	 * A classdescriptor definition can be a xml config file or annotations 
-	 * or another kind of resource which contain the classdescriptors 
-	 * 
+	 * A classdescriptor definition can be a xml config file or annotations
+	 * or another kind of resource which contain the classdescriptors
+	 *
 	 * DescriptorReader is an abstraction used to maximize reusability in {@link AbstractMapperImpl}
-	 * 
+	 *
 	 * @return a {@link MappingDescriptor} wich will contains a collection of classdescriptors
-	 * 
+	 *
 	 */
 	public abstract MappingDescriptor loadClassDescriptors();
 

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/Mapper.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/Mapper.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/Mapper.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/Mapper.java Sun Jan 27 13:08:08 2008
@@ -20,23 +20,23 @@
 
 /**
  * This component read the mapping file and gives an access to the ClassDescriptors (the mapping object model)
- * 
+ *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
- * 
+ *
  */
 public interface Mapper
 {
     /**
      * Get the mapping defition to be used for a specific java bean
      * @param clazz The java bean class
-     * @return The mapping class found for the desired java bean class 
+     * @return The mapping class found for the desired java bean class
      */
     public abstract ClassDescriptor getClassDescriptorByClass(Class clazz);
-    
+
     /**
      * Get the mapping defition to be used for a specific JCR node type
      * @param jcrNodeType the jcr node type
-     * @return The mapping class found for the desired java bean class 
+     * @return The mapping class found for the desired java bean class
      */
-    public abstract ClassDescriptor getClassDescriptorByNodeType(String jcrNodeType);    
+    public abstract ClassDescriptor getClassDescriptorByNodeType(String jcrNodeType);
 }

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/AbstractMapperImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/AbstractMapperImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/AbstractMapperImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/AbstractMapperImpl.java Sun Jan 27 13:08:08 2008
@@ -39,7 +39,7 @@
  * Abstract class for {@link org.apache.jackrabbit.ocm.mapper.Mapper}
  *
  * @author <a href="mailto:christophe.lombart@gmail.com">Lombart Christophe </a>
- * 
+ *
  * TODO : Add more reference tests. For exemple, the mapper has to check if the class used for the elements
  *        of a collectiondescriptor exists. For performance reasone, we can defined some optional validations.
  */
@@ -48,30 +48,30 @@
 
     protected DescriptorReader descriptorReader;
     protected MappingDescriptor mappingDescriptor;
-    protected Collection rootClassDescriptors = new ArrayList(); // contains the class descriptor which have not ancestors 
+    protected Collection rootClassDescriptors = new ArrayList(); // contains the class descriptor which have not ancestors
 
-    public void buildMapper() 
+    public void buildMapper()
     {
     	mappingDescriptor = descriptorReader.loadClassDescriptors();
     	mappingDescriptor.setMapper(this);
     	
-        if (null != this.mappingDescriptor) 
+        if (null != this.mappingDescriptor)
         {
             List errors = new ArrayList();
-            errors =  solveReferences(errors);            
+            errors =  solveReferences(errors);
             errors = validateDescriptors(errors, rootClassDescriptors);
 
-            if (!errors.isEmpty()) 
+            if (!errors.isEmpty())
             {
                 throw new InitMapperException("Mapping descriptors contain errors."
                         + getErrorMessage(errors));
             }
         }
-        else 
+        else
         {
             throw new InitMapperException("No mappings were provided");
         }
-                
+
     }
 
 
@@ -80,18 +80,18 @@
             Map.Entry entry = (Map.Entry) it.next();
             ClassDescriptor cd = (ClassDescriptor) entry.getValue();
 
-            if (null != cd.getExtend() && !"".equals(cd.getExtend())) 
+            if (null != cd.getExtend() && !"".equals(cd.getExtend()))
             {
                 ClassDescriptor superClassDescriptor = this.mappingDescriptor.getClassDescriptorByName(cd.getExtend());
 
-                if (null == superClassDescriptor) 
+                if (null == superClassDescriptor)
                 {
                     errors.add("Cannot find mapping for class "
                             + cd.getExtend()
                             + " referenced as extends from "
                             + cd.getClassName());
                 }
-                else 
+                else
                 {
             	       log.debug("Class " +cd.getClassName() +  " extends " + cd.getExtend());
                     cd.setSuperClassDescriptor(superClassDescriptor);
@@ -101,40 +101,40 @@
             {
                    rootClassDescriptors.add(cd);
             }
-            
+
             Collection interfaces = cd.getImplements();
-            if (interfaces.size() > 0) 
+            if (interfaces.size() > 0)
             {	
             	      for (Iterator iterator = interfaces.iterator(); iterator.hasNext();)
             	      {
             	    	          String interfaceName= (String) iterator.next();
                           ClassDescriptor interfaceClassDescriptor = this.mappingDescriptor.getClassDescriptorByName(interfaceName);
 
-                          if (null == interfaceClassDescriptor) 
+                          if (null == interfaceClassDescriptor)
                           {
                               errors.add("Cannot find mapping for interface "
                                       + interfaceName
                                       + " referenced as implements from "
                                       + cd.getClassName());
                           }
-                          else 
+                          else
                           {
                       	       log.debug("Class " +cd.getClassName() +  " implements " + interfaceName);
                               //cd.setSuperClassDescriptor(interfaceClassDescriptor);
-                      	      interfaceClassDescriptor.addDescendantClassDescriptor(cd); 
+                      	      interfaceClassDescriptor.addDescendantClassDescriptor(cd);
                           }
-            	    	      
+            	    	
             	      }
             }
-            
+
         }
 
         return errors;
     }
-    
+
     /**
      * Validate all class descriptors.
-     * This method validates the toplevel ancestors and after the descendants. 
+     * This method validates the toplevel ancestors and after the descendants.
      * Otherwise, we can have invalid settings in the class descriptors
      * @param errors all errors found during the validation process
      * @param classDescriptors the ancestor classdescriptors
@@ -155,8 +155,8 @@
             }
         }
         return errors;
-    }    
-    
+    }
+
     protected String getErrorMessage(List errors) {
         final String lineSep = System.getProperty("line.separator");
         StringBuffer buf = new StringBuffer();
@@ -165,8 +165,8 @@
         }
 
         return buf.toString();
-    }    
-    
+    }
+
     /**
     *
     * @see org.apache.jackrabbit.ocm.mapper.Mapper#getClassDescriptorByClass(java.lang.Class)
@@ -176,9 +176,9 @@
 	   if (descriptor==null) {
 			throw new IncorrectPersistentClassException("Class of type: " + clazz.getName() + " has no descriptor.");
 	   }
-       return descriptor ; 
+       return descriptor ;
    }
-   
+
    /**
    * @see org.apache.jackrabbit.ocm.mapper.Mapper#getClassDescriptorByNodeType(String)
    */
@@ -187,6 +187,6 @@
 	   if (descriptor==null) {
 			throw new IncorrectPersistentClassException("Node type: " + jcrNodeType + " has no descriptor.");
 	   }
-      return descriptor ;      
-  }   
+      return descriptor ;
+  }
 }

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/AnnotationDescriptorReader.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/AnnotationDescriptorReader.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/AnnotationDescriptorReader.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/AnnotationDescriptorReader.java Sun Jan 27 13:08:08 2008
@@ -35,7 +35,7 @@
 
 /**
  * Helper class that reads the xml mapping file and load all class descriptors into memory (object graph)
- * 
+ *
  * @author <a href="mailto:christophe.lombart@gmail.com">Lombart Christophe </a>
  *
  */
@@ -48,8 +48,8 @@
     {
    	     this.annotatedClassNames = annotatedClassNames;
     }
-    
-    
+
+
 
     public MappingDescriptor loadClassDescriptors()
 	{
@@ -63,7 +63,7 @@
 		
 	}
 	
-	private ClassDescriptor buildClassDescriptor(MappingDescriptor mappingDescriptor, Class clazz)  
+	private ClassDescriptor buildClassDescriptor(MappingDescriptor mappingDescriptor, Class clazz)
 	{
 		ClassDescriptor classDescriptor = null;
 		
@@ -84,7 +84,7 @@
 		
 	}
 
-	private ClassDescriptor createClassDescriptor(Class clazz, Node nodeAnnotation) 
+	private ClassDescriptor createClassDescriptor(Class clazz, Node nodeAnnotation)
 	{
 		ClassDescriptor classDescriptor = new ClassDescriptor();
 		classDescriptor.setClassName(clazz.getName());
@@ -110,10 +110,10 @@
 		return classDescriptor;
 	}
 	
-	private void addImplementDescriptor(ClassDescriptor classDescriptor, Class clazz) 
+	private void addImplementDescriptor(ClassDescriptor classDescriptor, Class clazz)
 	{
 		Implement implementAnnotation = (Implement) clazz.getAnnotation(Implement.class);
-		if (implementAnnotation != null) 
+		if (implementAnnotation != null)
 		{
             ImplementDescriptor implementDescriptor =  new ImplementDescriptor();
             implementDescriptor.setInterfaceName(implementAnnotation.interfaceName().getName());
@@ -124,22 +124,22 @@
 	
 	/**
 	 * Add FieldDescriptors, BeanDescriptors and CollectionDescriptors.
-	 * The descriptots can be defined on the getter methods or on the field declation. 
-	 * 
+	 * The descriptots can be defined on the getter methods or on the field declation.
+	 *
 	 * @param mappingDescriptor The mapping descriptor
 	 * @param classDescriptor the classdescriptor for which the descriptors have to be added
 	 * @param clazz The associated class
 	 */
 	private void addAttributeDescriptors(MappingDescriptor mappingDescriptor, ClassDescriptor classDescriptor,Class clazz) {
- 
+
 		addDescriptorsFromFields(mappingDescriptor, classDescriptor, clazz);
 		addDescriptorsFromGetters(mappingDescriptor, classDescriptor, clazz);
 	}
 
 	private void addDescriptorsFromFields(MappingDescriptor mappingDescriptor, ClassDescriptor classDescriptor, Class clazz) {
-	    
+	
 		java.lang.reflect.Field[] fields = clazz.getDeclaredFields();
-	    for (int index = 0; index < fields.length; index++) 
+	    for (int index = 0; index < fields.length; index++)
 	    {
 			Field fieldAnnotation = fields[index].getAnnotation(Field.class);
 			if (fieldAnnotation != null) {
@@ -155,7 +155,7 @@
 			// Check if there is an Collection annotation
 			Collection collectionAnnotation = fields[index].getAnnotation(Collection.class);
 			if (collectionAnnotation != null) {
-				addCollectionDescriptor(mappingDescriptor, classDescriptor, fields[index].getName(), 
+				addCollectionDescriptor(mappingDescriptor, classDescriptor, fields[index].getName(),
 						                fields[index].getName(), collectionAnnotation);
 			}
 					
@@ -189,7 +189,7 @@
 			// Check if there is an Collection annotation
 			Collection collectionAnnotation = propertyDescriptor.getReadMethod().getAnnotation(Collection.class);
 			if (collectionAnnotation != null) {
-				addCollectionDescriptor(mappingDescriptor, classDescriptor, propertyDescriptor.getName(), 
+				addCollectionDescriptor(mappingDescriptor, classDescriptor, propertyDescriptor.getName(),
 						                propertyDescriptor.getReadMethod().getReturnType().getName(), collectionAnnotation);
 			}
 		}
@@ -270,14 +270,14 @@
 		beanDescriptor.setJcrAutoCreated(beanAnnotation.jcrAutoCreated());
 		beanDescriptor.setJcrMandatory(beanAnnotation.jcrMandatory());
 		beanDescriptor.setJcrOnParentVersion(beanAnnotation.jcrOnParentVersion());
-		beanDescriptor.setJcrProtected(beanAnnotation.jcrProtected());			            
+		beanDescriptor.setJcrProtected(beanAnnotation.jcrProtected());			
 		beanDescriptor.setJcrSameNameSiblings(beanAnnotation.jcrSameNameSiblings());				
 
 		classDescriptor.addBeanDescriptor(beanDescriptor);
 	}
 
 
-	private void addFieldDescriptor(ClassDescriptor classDescriptor, String fieldName, Field fieldAnnotation) 
+	private void addFieldDescriptor(ClassDescriptor classDescriptor, String fieldName, Field fieldAnnotation)
 	{
 				
 		FieldDescriptor fieldDescriptor = new FieldDescriptor();				
@@ -330,7 +330,7 @@
 		
 		//fieldDescriptor.setJcrType(value)
 		classDescriptor.addFieldDescriptor(fieldDescriptor);
-	}    
+	}
 
 
 }

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/AnnotationMapperImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/AnnotationMapperImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/AnnotationMapperImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/AnnotationMapperImpl.java Sun Jan 27 13:08:08 2008
@@ -24,9 +24,9 @@
 /**
  * An implementation of the OCM mapper that builds class descriptors based on
  * the use of annotations on the underlying classes
- * 
+ *
  * @author Philip Dodds
- * 
+ *
  */
 public class AnnotationMapperImpl extends AbstractMapperImpl implements Mapper {
 

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/Bean.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/Bean.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/Bean.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/Bean.java Sun Jan 27 13:08:08 2008
@@ -25,30 +25,30 @@
 
 /**
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
- * 
- * 
+ *
+ *
  */
 @Retention(RetentionPolicy.RUNTIME)
 @Target({ElementType.FIELD, ElementType.METHOD })
 public @interface Bean {
 
 	String jcrName() default "";
-    boolean proxy() default false;	 
-    Class converter() default DefaultBeanConverterImpl.class;    
+    boolean proxy() default false;	
+    Class converter() default DefaultBeanConverterImpl.class;
     boolean autoInsert() default true;
     boolean autoRetrieve() default true;
     boolean autoUpdate() default true;
-    
-    // The folling annotation props are used to create jcr node type. 
-    // There are not necessary for the mapping bean strategies. 
-    String jcrType() default "";    
+
+    // The folling annotation props are used to create jcr node type.
+    // There are not necessary for the mapping bean strategies.
+    String jcrType() default "";
     boolean jcrAutoCreated() default false;
-    boolean jcrMandatory() default false;        
-    String jcrOnParentVersion() default "COPY";    
-    boolean jcrProtected() default false; 
-    boolean jcrSameNameSiblings() default false; 
-            
-	       
+    boolean jcrMandatory() default false;
+    String jcrOnParentVersion() default "COPY";
+    boolean jcrProtected() default false;
+    boolean jcrSameNameSiblings() default false;
+
+	
 
 
 }

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/Collection.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/Collection.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/Collection.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/Collection.java Sun Jan 27 13:08:08 2008
@@ -25,9 +25,9 @@
 
 /**
  * Allows the annotation of getting methods to show that they reflect a child node in JCR
- * 
+ *
  * @author Philip Dodds
- * 
+ *
  */
 @Retention(RetentionPolicy.RUNTIME)
 @Target({ElementType.FIELD, ElementType.METHOD })
@@ -43,26 +43,26 @@
 	
     boolean autoInsert() default true;
 
-    // Use Object.class as default value 
+    // Use Object.class as default value
     // because it is not possible to have a default null value in annotation field
-    Class elementClassName() default Object.class;      
-    
+    Class elementClassName() default Object.class;
+
 	Class collectionConverter() default DefaultCollectionConverterImpl.class;
 
-	// Use Object.class as default value 
+	// Use Object.class as default value
     // because it is not possible to have a default null value in annotation field	
-	Class collectionClassName() default Object.class; 
+	Class collectionClassName() default Object.class;
 
     String jcrType() default "";
-    
-    boolean jcrAutoCreated() default false; 
-    
-    boolean jcrMandatory() default false; 
-    
+
+    boolean jcrAutoCreated() default false;
+
+    boolean jcrMandatory() default false;
+
     String jcrOnParentVersion() default "COPY";
-    
+
     boolean jcrProtected() default false;
-        
-    boolean jcrSameNameSiblings() default false;    
-    
+
+    boolean jcrSameNameSiblings() default false;
+
 }

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/Field.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/Field.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/Field.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/Field.java Sun Jan 27 13:08:08 2008
@@ -23,40 +23,40 @@
 
 /**
  * Allows the annotation of a getter method to show that it will be mapped to a JCR property
- * 
+ *
  * @author Philip Dodds
- * 
+ *
  */
 @Retention(RetentionPolicy.RUNTIME)
 @Target({ElementType.FIELD, ElementType.METHOD })
 public @interface Field {
-    
-    String jcrName() default "";    
+
+    String jcrName() default "";
 
     boolean id() default false;
-    
+
     boolean path() default false;
-    
+
     boolean uuid() default false;
-    
-    // Use Object.class as default value 
+
+    // Use Object.class as default value
     // because it is not possible to have a default null value in annotation field
     Class converter() default Object.class;
-    
+
     String jcrDefaultValue() default "";
-    
-    String jcrValueConstraints() default ""; 
-    
-    String jcrType() default ""; 
-    
-    boolean jcrAutoCreated() default false;     
-    
-    boolean jcrMandatory() default false;    
-    
+
+    String jcrValueConstraints() default "";
+
+    String jcrType() default "";
+
+    boolean jcrAutoCreated() default false;
+
+    boolean jcrMandatory() default false;
+
     String jcrOnParentVersion() default "COPY";
-    
+
     boolean jcrProtected() default false;
-    
+
     boolean jcrMultiple () default false;
-    
+
 }

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/Implement.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/Implement.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/Implement.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/Implement.java Sun Jan 27 13:08:08 2008
@@ -22,15 +22,15 @@
 import java.lang.annotation.Target;
 
 /**
- * This annotation allow to defined the implement descriptor on the class 
+ * This annotation allow to defined the implement descriptor on the class
  * level
- * 
+ *
  * @author <a href="mailto:christophe.lombart@gmail.com">Lombart Christophe </a>
- * 
+ *
  */
 @Retention(RetentionPolicy.RUNTIME)
 @Target({ElementType.TYPE})
-public @interface Implement 
+public @interface Implement
 {
-    Class interfaceName();    
+    Class interfaceName();
 }

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/Node.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/Node.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/Node.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/Node.java Sun Jan 27 13:08:08 2008
@@ -23,14 +23,14 @@
 
 /**
  * Allows for the annotation of a Java class so mapping through OCM to a JCR node
- * 
+ *
  * @author Philip Dodds
- * 
+ *
  */
 @Retention(RetentionPolicy.RUNTIME)
 @Target({ElementType.TYPE})
 public @interface Node {
-    
+
 	String jcrType() default "nt:unstructured";
 	String jcrSuperTypes() default "";
 	String jcrMixinTypes() default "";
@@ -38,13 +38,13 @@
 	Class extend() default Object.class;
 
 	// Define the abstract setting in the mapping descriptor - Provide less flexibility if we use the java instrospection
-	boolean isAbstract() default false; 
+	boolean isAbstract() default false;
 	
 //	 Define the inteface setting in the mapping descriptor - Provide less flexibility if we use the java instrospection
 	boolean isInterface() default false;
 	
 	// Discriminator is used when an object hierarchy tree is mapped into the same jcr node type
-	// TODO : try to drop it from the mapping strategy. it should be hidden in the persistence manager impl. 
+	// TODO : try to drop it from the mapping strategy. it should be hidden in the persistence manager impl.
 	boolean discriminator() default true;
 	
 	

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/digester/DigesterDescriptorReader.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/digester/DigesterDescriptorReader.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/digester/DigesterDescriptorReader.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/digester/DigesterDescriptorReader.java Sun Jan 27 13:08:08 2008
@@ -36,7 +36,7 @@
 
 /**
  * Helper class that reads the xml mapping file and load all class descriptors into memory (object graph)
- * 
+ *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
  * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
  */
@@ -44,23 +44,23 @@
 {
     private boolean validating = true;
     private URL dtdResolver;
-    
+
     private Collection configFileStreams = new ArrayList();
-    
+
     public DigesterDescriptorReader(InputStream stream)
     {
         configFileStreams.add(stream);	
     }
-    
+
     public DigesterDescriptorReader(InputStream[] streams)
     {
-        for (int i = 0; i < streams.length; i++) 
+        for (int i = 0; i < streams.length; i++)
         {
         	configFileStreams.add(streams[i]);	
 		}
     	
     }
-    
+
     public DigesterDescriptorReader(String xmlFile)
     {
     	try
@@ -71,12 +71,12 @@
 		{
 			throw new InitMapperException("Mapping file not found : " + xmlFile,e);
 		}
-    } 
-    
+    }
+
     public DigesterDescriptorReader(String[] xmlFiles)
     {
    	
-    	for (int i = 0; i < xmlFiles.length; i++) 
+    	for (int i = 0; i < xmlFiles.length; i++)
     	{
         	try
     		{
@@ -88,9 +88,9 @@
     			throw new InitMapperException("Mapping file not found : " + xmlFiles[i],e);
     		}    				
 		}
-    } 
-    
-    
+    }
+
+
     /**
      * Set if the mapping should be validated.
      * @param flag <tt>true</tt> if the mapping should be validated
@@ -102,25 +102,25 @@
     public void setResolver(URL dtdResolver) {
         this.dtdResolver = dtdResolver;
     }
-    
+
 	/**
 	 * Load all class descriptors found in the xml mapping file.
-	 * 
+	 *
 	 * @return a {@link MappingDescriptor}
-	 * 
+	 *
 	 */
 	public MappingDescriptor loadClassDescriptors()
 	{
 		try
 		{
 			MappingDescriptor mappingDescriptor = new MappingDescriptor();
-			for (Iterator iter = configFileStreams.iterator(); iter.hasNext();) 
+			for (Iterator iter = configFileStreams.iterator(); iter.hasNext();)
 			{
 				InputStream xmlMappingDescriptorFile = (InputStream) iter.next();
 				
 				Digester digester = new Digester();
 				digester.setValidating(this.validating);
-				if (null != this.dtdResolver) 
+				if (null != this.dtdResolver)
 				{
 	                digester.register("-//The Apache Software Foundation//DTD Repository//EN",
 	                                  this.dtdResolver.toString());
@@ -133,7 +133,7 @@
 
 				// --------------------------------------------------------------------------------
 				// Rules used for the class-descriptor element
-				// --------------------------------------------------------------------------------	                        
+				// --------------------------------------------------------------------------------	
 				digester.addObjectCreate("jackrabbit-ocm/class-descriptor", ClassDescriptor.class);
 				digester.addSetProperties("jackrabbit-ocm/class-descriptor");
 				digester.addSetNext("jackrabbit-ocm/class-descriptor", "addClassDescriptor");		
@@ -170,7 +170,7 @@
 				
 				mappingDescriptor.getClassDescriptorsByClassName().putAll(currentMappingDescriptor.getClassDescriptorsByClassName());
 				mappingDescriptor.getClassDescriptorsByNodeType().putAll(currentMappingDescriptor.getClassDescriptorsByNodeType());
-                
+
 			}
 			return mappingDescriptor;
 		}

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/digester/DigesterMapperImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/digester/DigesterMapperImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/digester/DigesterMapperImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/digester/DigesterMapperImpl.java Sun Jan 27 13:08:08 2008
@@ -26,12 +26,12 @@
 /**
  *
  * Digester implementation for {@link org.apache.jackrabbit.ocm.mapper.Mapper}
- * 
+ *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
  * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
  */
 public class DigesterMapperImpl extends AbstractMapperImpl implements Mapper {
-    
+
 
     /**
      * No-arg constructor.

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/model/BeanDescriptor.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/model/BeanDescriptor.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/model/BeanDescriptor.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/model/BeanDescriptor.java Sun Jan 27 13:08:08 2008
@@ -26,15 +26,15 @@
  */
 public class BeanDescriptor implements ChildNodeDefDescriptor, PropertyDefDescriptor {
     private ClassDescriptor classDescriptor;
-    
+
     private String fieldName;
     private String jcrName;
     private boolean proxy;
     private boolean autoRetrieve = true;
     private boolean autoUpdate = true;
-    private boolean autoInsert = true;    
+    private boolean autoInsert = true;
     private String converter;
-    private BeanConverter beanConverter;    
+    private BeanConverter beanConverter;
     private String jcrType;
     private boolean jcrAutoCreated;
     private boolean jcrMandatory;
@@ -85,8 +85,8 @@
     public void setProxy(boolean proxy) {
         this.proxy = proxy;
     }
-       
-    
+
+
     public boolean isAutoInsert() {
 		return autoInsert;
 	}
@@ -115,7 +115,7 @@
     /**
      * Get the <code>BeanConverter</code> fully qualified name or <tt>null</tt>
      * if none specified by the bean descriptor.
-     * 
+     *
      * @return fully qualified class name or <tt>null</tt>
      */
     public String getConverter() {
@@ -124,7 +124,7 @@
 
     /**
      * Sets the fully qualified name of a <code>BeanConverter</code> to be used.
-     * 
+     *
      * @param converterClass a fully qualified class name
      */
     public void setConverter(String converterClass) {
@@ -134,7 +134,7 @@
 
     /**
      * Getter for property jcrType.
-     * 
+     *
      * @return jcrType
      */
     public String getJcrType() {
@@ -143,7 +143,7 @@
 
     /**
      * Setter for property jcrType.
-     * 
+     *
      * @param value jcrType
      */
     public void setJcrType(String value) {
@@ -232,7 +232,7 @@
 
     /**
      * Getter for property jcrMultiple.
-     * 
+     *
      * @return jcrMultiple
      */
     public boolean isJcrMultiple() {
@@ -241,7 +241,7 @@
 
     /**
      * Setter for property jcrMultiple.
-     * 
+     *
      * @param value jcrMultiple
      */
     public void setJcrMultiple(boolean value) {
@@ -261,11 +261,11 @@
     public ClassDescriptor getClassDescriptor() {
         return classDescriptor;
     }
-    
+
 	public String toString() {
 		
 		return "Bean Descriptor : " +  this.fieldName;
-	}    
+	}
 
     public String getDefaultPrimaryType() {
         return defaultPrimaryType;

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/model/CollectionDescriptor.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/model/CollectionDescriptor.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/model/CollectionDescriptor.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/model/CollectionDescriptor.java Sun Jan 27 13:08:08 2008
@@ -18,35 +18,35 @@
 
 
 /**
- * 
+ *
  * CollectionDescriptor is used by the mapper to read general information on a collection field
- * 
+ *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
- * 
+ *
  */
 public class CollectionDescriptor implements ChildNodeDefDescriptor, PropertyDefDescriptor
 {
 
      private String fieldName;
-     private String jcrName;     
-     private String elementClassName; 
+     private String jcrName;
+     private String elementClassName;
      private String collectionConverterClassName;
      private String collectionClassName;
      private boolean proxy;
      private boolean autoRetrieve = true;
      private boolean autoUpdate = true;
-     private boolean autoInsert = true;          
+     private boolean autoInsert = true;
      private String jcrType;
      private boolean jcrAutoCreated;
      private boolean jcrMandatory;
      private String jcrOnParentVersion;
      private boolean jcrProtected;
-     private boolean jcrSameNameSiblings;     
+     private boolean jcrSameNameSiblings;
      private boolean jcrMultiple;
      private String defaultPrimaryType;
 
      private ClassDescriptor classDescriptor;
-    
+
     /**
      * @return Returns the fieldName.
      */
@@ -75,8 +75,8 @@
     {
         this.jcrName = jcrName;
     }
-    
-    
+
+
     /**
      * @return Returns the elementClassName.
      */
@@ -107,9 +107,9 @@
     {
         this.proxy = proxy;
     }
-    
-    
-    
+
+
+
     public boolean isAutoInsert() {
 		return autoInsert;
 	}
@@ -129,14 +129,14 @@
 		this.autoUpdate = autoUpdate;
 	}
 	/**
-     * 
-     * @return The collection converter class name 
+     *
+     * @return The collection converter class name
      */
     public String getCollectionConverter()
     {
         return collectionConverterClassName;
     }
-    
+
     /**
      * Set the collection converter class name
      * @param collectionConverterClassName The converter to set
@@ -145,18 +145,18 @@
     {
         this.collectionConverterClassName = collectionConverterClassName;
     }
-    
+
     /**
-     *  
+     *
      * @return the collection class name (can be also a Map)
      */
     public String getCollectionClassName()
     {
         return collectionClassName;
     }
-    
+
     /**
-     * Set the collection class name. 
+     * Set the collection class name.
      * This collection class has to implement {@link org.apache.jackrabbit.ocm.manager.collectionconverter.ManageableCollection}
      * @param collectionClassName The collection class name to set
      */
@@ -164,29 +164,29 @@
     {
         this.collectionClassName = collectionClassName;
     }
-    
+
     /**
-     * 
+     *
      * @return The associated class descriptor
      */
     public ClassDescriptor getClassDescriptor()
     {
         return classDescriptor;
     }
-    
+
     /**
      * Set the associated class descriptor
-     * @param classDescriptor the class descriptor to set 
+     * @param classDescriptor the class descriptor to set
      */
     public void setClassDescriptor(ClassDescriptor classDescriptor)
     {
         this.classDescriptor = classDescriptor;
     }
-    
+
 
     /**
      * Getter for property jcrType.
-     * 
+     *
      * @return jcrType
      */
     public String getJcrType() {
@@ -195,7 +195,7 @@
 
     /**
      * Setter for property jcrType.
-     * 
+     *
      * @param value jcrType
      */
     public void setJcrType(String value) {
@@ -203,7 +203,7 @@
     }
 
     /** Getter for property jcrAutoCreated.
-     * 
+     *
      * @return jcrAutoCreated
      */
     public boolean isJcrAutoCreated()
@@ -212,7 +212,7 @@
     }
 
     /** Setter for property jcrAutoCreated.
-     * 
+     *
      * @param value jcrAutoCreated
      */
     public void setJcrAutoCreated(boolean value)
@@ -221,7 +221,7 @@
     }
 
     /** Getter for property jcrMandatory.
-     * 
+     *
      * @return jcrMandatory
      */
     public boolean isJcrMandatory()
@@ -230,7 +230,7 @@
     }
 
     /** Setter for property jcrMandatory.
-     * 
+     *
      * @param value jcrMandatory
      */
     public void setJcrMandatory(boolean value)
@@ -239,7 +239,7 @@
     }
 
     /** Getter for property jcrOnParentVersion.
-     * 
+     *
      * @return jcrOnParentVersion
      */
     public String getJcrOnParentVersion()
@@ -248,7 +248,7 @@
     }
 
     /** Setter for property jcrOnParentVersion.
-     * 
+     *
      * @param value jcrOnParentVersion
      */
     public void setJcrOnParentVersion(String value)
@@ -257,7 +257,7 @@
     }
 
     /** Getter for property jcrProtected.
-     * 
+     *
      * @return jcrProtected
      */
     public boolean isJcrProtected()
@@ -266,7 +266,7 @@
     }
 
     /** Setter for property jcrProtected.
-     * 
+     *
      * @param value jcrProtected
      */
     public void setJcrProtected(boolean value)
@@ -275,7 +275,7 @@
     }
 
     /** Getter for property jcrSameNameSiblings.
-     * 
+     *
      * @return jcrSameNameSiblings
      */
     public boolean isJcrSameNameSiblings()
@@ -284,17 +284,17 @@
     }
 
     /** Setter for property jcrSameNameSiblings.
-     * 
+     *
      * @param value jcrSameNameSiblings
      */
     public void setJcrSameNameSiblings(boolean value)
     {
         this.jcrSameNameSiblings = value;
     }
-    
+
     /**
      * Getter for property jcrMultiple.
-     * 
+     *
      * @return jcrMultiple
      */
     public boolean isJcrMultiple() {
@@ -303,7 +303,7 @@
 
     /**
      * Setter for property jcrMultiple.
-     * 
+     *
      * @param value jcrMultiple
      */
     public void setJcrMultiple(boolean value) {
@@ -313,7 +313,7 @@
 	public String toString() {
 		
 		return "Collection Descriptor : " +  this.getFieldName();
-	}    
+	}
 
     public String getDefaultPrimaryType() {
         return defaultPrimaryType;

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/model/FieldDescriptor.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/model/FieldDescriptor.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/model/FieldDescriptor.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/model/FieldDescriptor.java Sun Jan 27 13:08:08 2008
@@ -27,7 +27,7 @@
  *
  */
 public class FieldDescriptor implements PropertyDefDescriptor {
-    private String fieldName;    
+    private String fieldName;
     private String jcrName;
     private String jcrType;
     private boolean jcrAutoCreated;
@@ -40,9 +40,9 @@
     private boolean path;
     private boolean uuid;
     private String converter;
-    private String jcrDefaultValue; 
+    private String jcrDefaultValue;
     private String[] jcrValueConstraints = new String[0];
-   
+
 
     /**
      * @return Returns the fieldName.
@@ -73,9 +73,9 @@
         this.jcrName = jcrName;
     }
 
-    
+
     /**
-     * 
+     *
      * @return The atomic type converter to use, can be null
      */
     public String getConverter() {
@@ -83,7 +83,7 @@
 	}
 
     /**
-     * Set the atomic converter 
+     * Set the atomic converter
      * @param converter the atomic converter to use
      */
 	public void setConverter(String converter) {
@@ -147,8 +147,8 @@
      */
     public void setUuid(boolean uuid) {
         this.uuid = uuid;
-    }    
-    
+    }
+
     /** Getter for property jcrType.
      *
      * @return jcrType
@@ -244,7 +244,7 @@
     public void setJcrMultiple(boolean value) {
         this.jcrMultiple = value;
     }
-    
+
     public String getJcrDefaultValue() {
 		return jcrDefaultValue;
 	}
@@ -264,16 +264,16 @@
 
 	}
 	
-    public void setJcrValueConstraints(String jcrValueConstraints) {                
+    public void setJcrValueConstraints(String jcrValueConstraints) {
     	if (jcrValueConstraints != null && ! jcrValueConstraints.equals(""))
     	{
     		this.jcrValueConstraints = jcrValueConstraints.split(" *, *");
     	}
     }
 
-    
+
 	public String toString() {
 		
 		return "Field Descriptor : " +  this.getFieldName();
-	}    
+	}
 }

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/model/ImplementDescriptor.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/model/ImplementDescriptor.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/model/ImplementDescriptor.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/model/ImplementDescriptor.java Sun Jan 27 13:08:08 2008
@@ -39,5 +39,5 @@
 	public String toString() {
 		
 		return "Implement Descriptor : " +  this.interfaceName;
-	}    
+	}
 }

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/model/MappingDescriptor.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/model/MappingDescriptor.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/model/MappingDescriptor.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/mapper/model/MappingDescriptor.java Sun Jan 27 13:08:08 2008
@@ -42,12 +42,12 @@
     private Mapper mapper;
 
     private String packageName;
-    
+
     public void setPackage(String pckgName) {
         this.packageName = pckgName;
     }
-    
-    
+
+
     /**
      * Add a new ClassDescriptor
      *
@@ -71,8 +71,8 @@
         }
 
         classDescriptorsByClassName.put(classDescriptor.getClassName(), classDescriptor);
-        
-        if (null != classDescriptor.getJcrType() && !  "".equals(classDescriptor.getJcrType()) && 
+
+        if (null != classDescriptor.getJcrType() && !  "".equals(classDescriptor.getJcrType()) &&
         		 ! ManagerConstant.NT_UNSTRUCTURED.equals(classDescriptor.getJcrType()))
         {
         	if ((classDescriptorsByNodeType.get(classDescriptor.getClassName()) != null) &&
@@ -93,7 +93,7 @@
     public ClassDescriptor getClassDescriptorByName(String className) {
         return (ClassDescriptor) classDescriptorsByClassName.get(className);
     }
-    
+
     public ClassDescriptor getClassDescriptorByNodeType(String nodeType)
     {
         return (ClassDescriptor) classDescriptorsByNodeType.get(nodeType);	
@@ -103,7 +103,7 @@
     {
     	return classDescriptorsByClassName.values();
     }
-    
+
     /**
      * Get all class descriptors by class name
      * @return all class descriptors found

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/query/Filter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/query/Filter.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/query/Filter.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/query/Filter.java Sun Jan 27 13:08:08 2008
@@ -19,9 +19,9 @@
 
 
 /**
- * 
+ *
  * JCR Filter interface.
- * 
+ *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
  *
  */
@@ -29,47 +29,47 @@
 {
     /**
      * Set the filter scope. The scope is an Node path specifying where to search in the content tree.
-     * For example, 
+     * For example,
      * /mynode/mysecondnode/', the search engine will search on child objects in the /mynode/mysecondnode
      * /mynode/mysecondnode//', the search engine will search on desncendant objects in the /mynode/mysecondnode (the complete subnode tree)
-     * 
+     *
      * @param scope The filter scope
-     *  
+     *
      */
     void setScope(String scope);
-        
-    
+
+
     /**
      * Get the filter scope.
-     * 
+     *
      * @return The filter scope
      */
     String getScope();
-    
-    
+
+
     /**
-     * Set the node name used to build the jcr search expression. 
-     * 
+     * Set the node name used to build the jcr search expression.
+     *
      * @param nodeName
      */
     void setNodeName(String nodeName);
-    
+
     /**
      * Get the node name used in the jcr expression
      * @return
      */
     String getNodeName();
-    
-    
+
+
     /**
-     * Search content based on a fullTextSearch. 
+     * Search content based on a fullTextSearch.
      * Depending on the full text search engine, you can also filter on properties.
-     * 
+     *
      * @param scope either a a jcr node or propserty. If a node is used, all properties of this node are searche (following the internal index
-     * @param fullTextSearch The full text search string  
+     * @param fullTextSearch The full text search string
      */
     Filter addContains(String scope, String fullTextSearch);
-        
+
 	Filter addBetween(String arg0, Object arg1, Object arg2);
 
 	Filter addEqualTo(String arg0, Object arg1);

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/query/Query.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/query/Query.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/query/Query.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/query/Query.java Sun Jan 27 13:08:08 2008
@@ -19,7 +19,7 @@
 
 /**
  * JCR Query interface
- * 
+ *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
  *
  */
@@ -27,25 +27,25 @@
 {
 		
 	/**
-	 * Set the filter to use with this query 
+	 * Set the filter to use with this query
 	 * @param filter The filter to use
 	 */
 	public void setFilter(Filter filter);
 	
 	/**
-	 * 
+	 *
 	 * @return The filter used for this query
 	 */
 	public Filter getFilter();
 	
 	/**
-	 * Order the object found (ascending) 
+	 * Order the object found (ascending)
 	 * @param fieldNameAttribute the name of the field used to sort the search result
 	 */
 	public void addOrderByAscending(String fieldNameAttribute);
 	
 	/**
-	 * Order the object found (descending) 
+	 * Order the object found (descending)
 	 * @param fieldNameAttribute the name of the field used to sort the search result
 	 */
 	

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/query/QueryManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/query/QueryManager.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/query/QueryManager.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/query/QueryManager.java Sun Jan 27 13:08:08 2008
@@ -20,9 +20,9 @@
 
 
 /**
- * The query manager is used to instantiate query objects and execute query based on the object model. 
+ * The query manager is used to instantiate query objects and execute query based on the object model.
  * Internally, this service used the JCR QueryManager
- * 
+ *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
  *
  */
@@ -34,20 +34,20 @@
 	 * @return a new instantiated filter object
 	 */
 	 public Filter createFilter(Class classQuery);
-	 
+	
 	 /**
-	  * Create a new empty query 
+	  * Create a new empty query
 	  * @param filter the filter used by the query
 	  * @return a new instantiated query object
 	  */
-     public Query createQuery(Filter filter); 
-     
+     public Query createQuery(Filter filter);
+
      /**
       * Build a JCR search expression from a Query
       * @param query the query matching to the JCR search expression
-      * @return a JCR XPATH search expression 
+      * @return a JCR XPATH search expression
       */
-     public String buildJCRExpression(Query query); 
-     
-       
+     public String buildJCRExpression(Query query);
+
+
 }

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/query/impl/FilterImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/query/impl/FilterImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/query/impl/FilterImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/query/impl/FilterImpl.java Sun Jan 27 13:08:08 2008
@@ -80,8 +80,8 @@
      */
     public String getScope() {
         return this.scope;
-    }    
-    
+    }
+
     public String getNodeName() {
 		return nodeName;
 	}
@@ -228,7 +228,7 @@
         {
     	   if ( null == jcrExpression || "".equals(jcrExpression) )
     	   {
-    		   jcrExpression =    ((FilterImpl) filter).getJcrExpression() ;    		   
+    		   jcrExpression =    ((FilterImpl) filter).getJcrExpression() ;    		
     	   }
     	   else
     	   {
@@ -247,7 +247,7 @@
         {
      	   if ( null == jcrExpression || "".equals(jcrExpression) )
     	   {
-    		   jcrExpression =    ((FilterImpl) filter).getJcrExpression() ;    		   
+    		   jcrExpression =    ((FilterImpl) filter).getJcrExpression() ;    		
     	   }
     	   else
     	   {
@@ -256,7 +256,7 @@
         }
         return this;
     }
-    
+
 
     public Filter addJCRExpression(String jcrExpression) {
        addExpression(jcrExpression);
@@ -286,7 +286,7 @@
     }
 
     private void addExpression(String jcrExpression) {
-            
+
     	     if (this.jcrExpression.length() >0) {
               	this.jcrExpression += " and ";
         }
@@ -296,6 +296,6 @@
 	public String toString() {
 		return getJcrExpression();
 	}
-    
-   
+
+
 }

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/query/impl/QueryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/query/impl/QueryImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/query/impl/QueryImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/query/impl/QueryImpl.java Sun Jan 27 13:08:08 2008
@@ -26,8 +26,8 @@
 import org.apache.jackrabbit.ocm.query.Query;
 
 /**
- * Default Query implementation 
- * 
+ * Default Query implementation
+ *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
  *
  */
@@ -37,16 +37,16 @@
 	private Filter filter;
 	
     ClassDescriptor classDescriptor;
-    
+
     private ArrayList orderByExpressions = new ArrayList();
 
 	/**
-	 * Constructor 
-	 * 
+	 * Constructor
+	 *
 	 * @param filter
 	 * @param mapper
 	 */
-	public QueryImpl(Filter filter, Mapper mapper) 
+	public QueryImpl(Filter filter, Mapper mapper)
 	{				
 		this.filter = filter;
 		classDescriptor = mapper.getClassDescriptorByClass(filter.getFilterClass());
@@ -74,7 +74,7 @@
 	}
 
 	/**
-	 * 
+	 *
 	 * @see org.apache.jackrabbit.ocm.query.Query#addOrderByAscending(java.lang.String)
 	 */
 	public void addOrderByAscending(String fieldNameAttribute)

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/query/impl/QueryManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/query/impl/QueryManagerImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/query/impl/QueryManagerImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/query/impl/QueryManagerImpl.java Sun Jan 27 13:08:08 2008
@@ -30,7 +30,7 @@
 import org.apache.jackrabbit.ocm.query.QueryManager;
 
 public class QueryManagerImpl implements QueryManager {
-    
+
 	private Mapper mapper;
     private Map atomicTypeConverters;
     private ValueFactory valueFactory;
@@ -92,13 +92,13 @@
 
     private Filter buildDiscriminatorFilter(Query query, ClassDescriptor classDescriptor) {
         Filter discriminatorFilter = this.createFilter(query.getFilter().getFilterClass());
-        if (!classDescriptor.isAbstract() && (! classDescriptor.isInterface()) ) {        
+        if (!classDescriptor.isAbstract() && (! classDescriptor.isInterface()) ) {
             discriminatorFilter.addJCRExpression("@" + ManagerConstant.DISCRIMINATOR_PROPERTY_NAME + "='" +    classDescriptor.getClassName() + "'");
         }
 
         if (classDescriptor.hasDescendants()) {
             Iterator descendantDescriptorIterator = classDescriptor.getDescendantClassDescriptors().iterator();
-            
+
             while (descendantDescriptorIterator.hasNext()) {
                 ClassDescriptor descendantClassDescriptor = (ClassDescriptor) descendantDescriptorIterator.next();
 



Mime
View raw message