Added: incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/query/package-frame.html URL: http://svn.apache.org/viewvc/incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/query/package-frame.html?view=auto&rev=448367 ============================================================================== --- incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/query/package-frame.html (added) +++ incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/query/package-frame.html Wed Sep 20 15:17:15 2006 @@ -0,0 +1,47 @@ + + + + + + + Graffito JCR Mapping 1.0-a1-dev Reference Package org.apache.portals.graffito.jcr.persistence.query + + + + +

+ org.apache.portals.graffito.jcr.persistence.query +

+ +

Classes

+ + + + + Added: incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/query/package-summary.html URL: http://svn.apache.org/viewvc/incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/query/package-summary.html?view=auto&rev=448367 ============================================================================== --- incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/query/package-summary.html (added) +++ incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/query/package-summary.html Wed Sep 20 15:17:15 2006 @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + Graffito JCR Mapping 1.0-a1-dev Reference Package + + + + + + + + +
+ +
+
+ +
+ + + + + +

Package org.apache.portals.graffito.jcr.persistence.query

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Class Summary
+ AllTests +
+ PersistenceManagerAtomicQueryTest +
+ PersistenceManagerIteratorQueryTest +
+ PersistenceManagerMultiValueQueryTest +
+ PersistenceManagerScopeQueryTest +
+ PersistenceManagerSimpleQueryTest +
+ + + + + +
+ +
+
+ +
+ + + + + + +
+ + Copyright © 2004-2006 The Apache Software Foundation. All Rights Reserved. + + + Added: incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/version/AllTests.html URL: http://svn.apache.org/viewvc/incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/version/AllTests.html?view=auto&rev=448367 ============================================================================== --- incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/version/AllTests.html (added) +++ incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/version/AllTests.html Wed Sep 20 15:17:15 2006 @@ -0,0 +1,59 @@ + + + +AllTests xref + + + +
+
+1   /* ========================================================================
+2    * Copyright 2004 The Apache Software Foundation
+3    *
+4    * Licensed under the Apache License, Version 2.0 (the "License");
+5    * you may not use this file except in compliance with the License.
+6    * You may obtain a copy of the License at
+7    *
+8    *     http://www.apache.org/licenses/LICENSE-2.0
+9    *
+10   * Unless required by applicable law or agreed to in writing, software
+11   * distributed under the License is distributed on an "AS IS" BASIS,
+12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13   * See the License for the specific language governing permissions and
+14   * limitations under the License.
+15   * ========================================================================
+16   */
+17  package org.apache.portals.graffito.jcr.persistence.version;
+18  
+19  import org.apache.portals.graffito.jcr.RepositoryLifecycleTestSetup;
+20  
+21  import junit.framework.Test;
+22  import junit.framework.TestSuite;
+23  
+24  
+25  /***
+26   * Package level tests.
+27   * 
+28   * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
+29   */
+30  public class AllTests {
+31  
+32      public static Test suite() {
+33          return new RepositoryLifecycleTestSetup(buildSuite());
+34      }
+35  
+36      public static Test buildSuite() {
+37          TestSuite suite= new TestSuite("Test for org.apache.portals.graffito.jcr.persistence.version");
+38          //$JUnit-BEGIN$
+39          suite.addTestSuite(PersistenceManagerBasicVersionningTest.class);
+40         
+41          
+42          //$JUnit-END$
+43  
+44          return suite;
+45      }
+46  }
+
+
+ + Added: incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/version/PersistenceManagerBasicVersionningTest.html URL: http://svn.apache.org/viewvc/incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/version/PersistenceManagerBasicVersionningTest.html?view=auto&rev=448367 ============================================================================== --- incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/version/PersistenceManagerBasicVersionningTest.html (added) +++ incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/version/PersistenceManagerBasicVersionningTest.html Wed Sep 20 15:17:15 2006 @@ -0,0 +1,178 @@ + + + +PersistenceManagerBasicVersionningTest xref + + + +
+
+1   package org.apache.portals.graffito.jcr.persistence.version;
+2   
+3   
+4   import java.util.Date;
+5   
+6   import junit.framework.Test;
+7   import junit.framework.TestSuite;
+8   
+9   import org.apache.commons.logging.Log;
+10  import org.apache.commons.logging.LogFactory;
+11  import org.apache.portals.graffito.jcr.RepositoryLifecycleTestSetup;
+12  import org.apache.portals.graffito.jcr.TestBase;
+13  import org.apache.portals.graffito.jcr.persistence.PersistenceManager;
+14  import org.apache.portals.graffito.jcr.testmodel.Page;
+15  import org.apache.portals.graffito.jcr.testmodel.Paragraph;
+16  import org.apache.portals.graffito.jcr.version.Version;
+17  import org.apache.portals.graffito.jcr.version.VersionIterator;
+18  
+19  /***
+20   * Test Query on atomic fields
+21   *
+22   * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
+23   */
+24  public class PersistenceManagerBasicVersionningTest extends TestBase
+25  {
+26  	private final static Log log = LogFactory.getLog(PersistenceManagerBasicVersionningTest.class);
+27  	private Date date = new Date();
+28  	
+29  	/***
+30  	 * <p>Defines the test case name for junit.</p>
+31  	 * @param testName The test case name.
+32  	 */
+33  	public PersistenceManagerBasicVersionningTest(String testName) throws Exception
+34  	{
+35  		super(testName);
+36  		
+37  	}
+38  
+39  	public static Test suite()
+40  	{
+41  		// All methods starting with "test" will be executed in the test suite.
+42  		return new RepositoryLifecycleTestSetup(
+43                  new TestSuite(PersistenceManagerBasicVersionningTest.class));
+44  	}
+45  
+46      public void tearDown() throws Exception
+47      {
+48      	PersistenceManager persistenceManager = getPersistenceManager();
+49  	    persistenceManager.remove("/page");
+50      	persistenceManager.save();
+51         
+52          super.tearDown();
+53      }	
+54  
+55  	public void testSimpleVersion()
+56  	{
+57  		     PersistenceManager persistenceManager = getPersistenceManager();
+58               try
+59               {
+60              	 
+61              	 Page page = new Page();
+62              	 page.setPath("/page");
+63              	 page.setTitle("Page Title");            	 
+64              	 page.addParagraph(new Paragraph("para1"));
+65              	 page.addParagraph(new Paragraph("para2"));
+66              	 persistenceManager.insert(page);
+67              	 persistenceManager.save();
+68              	 
+69                   
+70              	 page.addParagraph(new Paragraph("para3"));
+71              	 persistenceManager.checkout("/page");
+72              	 persistenceManager.update(page);
+73              	 persistenceManager.save();
+74              	 persistenceManager.checkin("/page");
+75              	 
+76              	 page.addParagraph(new Paragraph("para4"));
+77              	 persistenceManager.checkout("/page");
+78              	 persistenceManager.update(page);
+79              	 persistenceManager.save();
+80              	 persistenceManager.checkin("/page");            	 
+81  
+82              	 VersionIterator versionIterator = persistenceManager.getAllVersions("/page");
+83              	 assertNotNull("VersionIterator is null", versionIterator);
+84              	 assertTrue("Invalid number of versions found", versionIterator.getSize() == 3);
+85              	 
+86              	 while (versionIterator.hasNext())
+87              	 {
+88              		 Version version = (Version) versionIterator.next();
+89              		 log.info("version found : " + version.getPath() + " - " +  version.getCreated().getTime());
+90              		 
+91              	 }
+92              	 
+93              	 Version baseVersion = persistenceManager.getBaseVersion("/page");
+94              	 System.out.println("Base version : " + baseVersion.getName());
+95  
+96              	 Version rootVersion = persistenceManager.getRootVersion("/page");
+97              	 System.out.println("Root version : " + rootVersion.getName());
+98              	 //this.exportDocument("/home/christophe/export.xml", "/jcr:system/jcr:versionStorage", true, false);
+99              	             	
+100              //Get the lasted version 
+101             	 page = (Page) persistenceManager.getObject( "/page");
+102             	 assertNotNull("Last version is nulll", page);
+103             	 assertTrue("Invalid number of paragraph found in the last  version", page.getParagraphs().size() == 4);
+104 
+105             	 
+106             	 //Get the object matching to the first version 
+107             Page  page1 = (Page) persistenceManager.getObject( "/page", "1.0");
+108             	 assertNotNull("version 1.0 object is null", page1);
+109             	 assertTrue("Invalid number of paragraph found in the root version", page1.getParagraphs().size() == 3);
+110 
+111              }
+112              catch(Exception e)
+113              {
+114             	 e.printStackTrace();
+115             	 fail(e.getMessage());
+116             	 
+117              }
+118 	}
+119 
+120 	
+121 	public void testVersionLabels()
+122 	{
+123 		     PersistenceManager persistenceManager = getPersistenceManager();
+124              try
+125              {
+126             	 
+127             	 Page page = new Page();
+128             	 page.setPath("/page");
+129             	 page.setTitle("Page Title");            	 
+130             	 page.addParagraph(new Paragraph("para1"));
+131             	 page.addParagraph(new Paragraph("para2"));
+132             	 persistenceManager.insert(page);
+133             	 persistenceManager.save();
+134             	 
+135                  
+136             	 page.addParagraph(new Paragraph("para3"));
+137             	 persistenceManager.checkout("/page");
+138             	 persistenceManager.update(page);
+139             	 persistenceManager.save();
+140             	 persistenceManager.checkin("/page", new String[] {"A", "B"});
+141             	 
+142             	 page.addParagraph(new Paragraph("para4"));
+143             	 persistenceManager.checkout("/page");
+144             	 persistenceManager.update(page);
+145             	 persistenceManager.save();
+146             	 persistenceManager.checkin("/page", new String[] {"C", "D"});         	 
+147 
+148             	 String[] allLabels = persistenceManager.getAllVersionLabels("/page");
+149             	 assertTrue("Incorrect number of labels", allLabels.length == 4);
+150 
+151             	 String[] versionLabels = persistenceManager.getVersionLabels("/page", "1.1");
+152             	 assertTrue("Incorrect number of labels", versionLabels.length == 2);
+153             	 assertTrue("Incorrect label", versionLabels[0].equals("C") || versionLabels[0].equals("D"));
+154             	 assertTrue("Incorrect label", versionLabels[1].equals("C") || versionLabels[0].equals("D"));
+155             	
+156 
+157              }
+158              catch(Exception e)
+159              {
+160             	 e.printStackTrace();
+161             	 fail(); 
+162              }
+163 	}
+164 	
+165 }
+
+
+ + Added: incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/version/package-frame.html URL: http://svn.apache.org/viewvc/incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/version/package-frame.html?view=auto&rev=448367 ============================================================================== --- incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/version/package-frame.html (added) +++ incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/version/package-frame.html Wed Sep 20 15:17:15 2006 @@ -0,0 +1,31 @@ + + + + + + + Graffito JCR Mapping 1.0-a1-dev Reference Package org.apache.portals.graffito.jcr.persistence.version + + + + +

+ org.apache.portals.graffito.jcr.persistence.version +

+ +

Classes

+ + + + + Added: incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/version/package-summary.html URL: http://svn.apache.org/viewvc/incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/version/package-summary.html?view=auto&rev=448367 ============================================================================== --- incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/version/package-summary.html (added) +++ incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/version/package-summary.html Wed Sep 20 15:17:15 2006 @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + Graffito JCR Mapping 1.0-a1-dev Reference Package + + + + + + + + +
+ +
+
+ +
+ + + + + +

Package org.apache.portals.graffito.jcr.persistence.version

+ + + + + + + + + + + + + + + + + + + +
Class Summary
+ AllTests +
+ PersistenceManagerBasicVersionningTest +
+ + + + + +
+ +
+
+ +
+ + + + + + +
+ + Copyright © 2004-2006 The Apache Software Foundation. All Rights Reserved. + + + Added: incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/querymanager/AllTests.html URL: http://svn.apache.org/viewvc/incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/querymanager/AllTests.html?view=auto&rev=448367 ============================================================================== --- incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/querymanager/AllTests.html (added) +++ incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/querymanager/AllTests.html Wed Sep 20 15:17:15 2006 @@ -0,0 +1,59 @@ + + + +AllTests xref + + + +
+
+1   /* ========================================================================
+2    * Copyright 2004 The Apache Software Foundation
+3    *
+4    * Licensed under the Apache License, Version 2.0 (the "License");
+5    * you may not use this file except in compliance with the License.
+6    * You may obtain a copy of the License at
+7    *
+8    *     http://www.apache.org/licenses/LICENSE-2.0
+9    *
+10   * Unless required by applicable law or agreed to in writing, software
+11   * distributed under the License is distributed on an "AS IS" BASIS,
+12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13   * See the License for the specific language governing permissions and
+14   * limitations under the License.
+15   * ========================================================================
+16   */
+17  package org.apache.portals.graffito.jcr.querymanager;
+18  
+19  import org.apache.portals.graffito.jcr.RepositoryLifecycleTestSetup;
+20  
+21  import junit.framework.Test;
+22  import junit.framework.TestSuite;
+23  
+24  
+25  /***
+26   * Package level tests.
+27   * 
+28   * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
+29   */
+30  public class AllTests {
+31  
+32      public static Test suite() {
+33          return new RepositoryLifecycleTestSetup(buildSuite());
+34      }
+35  
+36      public static Test buildSuite() {
+37          TestSuite suite= new TestSuite("Test for org.apache.portals.graffito.jcr.querymanager");
+38          //$JUnit-BEGIN$
+39          suite.addTestSuite(QueryManagerTest.class);
+40         
+41          
+42          //$JUnit-END$
+43  
+44          return suite;
+45      }
+46  }
+
+
+ + Added: incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/querymanager/QueryManagerTest.html URL: http://svn.apache.org/viewvc/incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/querymanager/QueryManagerTest.html?view=auto&rev=448367 ============================================================================== --- incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/querymanager/QueryManagerTest.html (added) +++ incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/querymanager/QueryManagerTest.html Wed Sep 20 15:17:15 2006 @@ -0,0 +1,117 @@ + + + +QueryManagerTest xref + + + +
+
+1   /* ========================================================================
+2    * Copyright 2004 The Apache Software Foundation
+3    *
+4    * Licensed under the Apache License, Version 2.0 (the "License");
+5    * you may not use this file except in compliance with the License.
+6    * You may obtain a copy of the License at
+7    *
+8    *     http://www.apache.org/licenses/LICENSE-2.0
+9    *
+10   * Unless required by applicable law or agreed to in writing, software
+11   * distributed under the License is distributed on an "AS IS" BASIS,
+12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13   * See the License for the specific language governing permissions and
+14   * limitations under the License.
+15   * ========================================================================
+16   */
+17  package org.apache.portals.graffito.jcr.querymanager;
+18  
+19  import junit.framework.Test;
+20  import junit.framework.TestSuite;
+21  
+22  import org.apache.commons.logging.Log;
+23  import org.apache.commons.logging.LogFactory;
+24  import org.apache.portals.graffito.jcr.RepositoryLifecycleTestSetup;
+25  import org.apache.portals.graffito.jcr.TestBase;
+26  import org.apache.portals.graffito.jcr.query.Filter;
+27  import org.apache.portals.graffito.jcr.query.Query;
+28  import org.apache.portals.graffito.jcr.query.QueryManager;
+29  import org.apache.portals.graffito.jcr.testmodel.C;
+30  
+31  
+32  /***
+33   * Test QueryManagerImpl methods
+34   *
+35   * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
+36   */
+37  public class QueryManagerTest extends TestBase
+38  {
+39      private final static Log log = LogFactory.getLog(QueryManagerTest.class);
+40  
+41      /***
+42       * <p>Defines the test case name for junit.</p>
+43       * @param testName The test case name.
+44       */
+45      public QueryManagerTest(String testName)  throws Exception
+46      {
+47          super(testName);
+48      }
+49  
+50      public static Test suite()
+51      {
+52          // All methods starting with "test" will be executed in the test suite.
+53          return new RepositoryLifecycleTestSetup(
+54                  new TestSuite(QueryManagerTest.class));
+55      }
+56  
+57      public void testBuildExpression1()
+58      {
+59      	try
+60      	{
+61      	      QueryManager queryManager = this.getQueryManager();
+62      	      Filter filter = queryManager.createFilter(C.class);
+63      	      filter.addEqualTo("name", "a test value")
+64                      .addEqualTo("id", new Integer(1));
+65      	      filter.setScope("/test//");
+66      	      
+67      	      Query query = queryManager.createQuery(filter);
+68      	      String jcrExpression = queryManager.buildJCRExpression(query);
+69      	      assertNotNull("jcrExpression is null", jcrExpression);
+70      	      assertTrue("Invalid JcrExpression", jcrExpression.equals("/jcr:root/test//element(*, graffito:C) [@graffito:name = 'a test value' and @graffito:id = 1]"));
+71          }
+72          catch (Exception e)
+73          {
+74              e.printStackTrace();
+75              fail("Exception occurs during the unit test : " + e);
+76          }
+77          
+78      }
+79  
+80      public void testBuildExpression2()
+81      {
+82  
+83      	try
+84      	{
+85      	      QueryManager queryManager = this.getQueryManager();
+86      	      Filter filter = queryManager.createFilter(C.class);
+87      	      filter.addEqualTo("name", "a test value")
+88      	            .addEqualTo("id", new Integer(1));
+89      	      
+90      	      Query query = queryManager.createQuery(filter);
+91      	      String jcrExpression = queryManager.buildJCRExpression(query);
+92      	      assertNotNull("jcrExpression is null", jcrExpression);
+93      	      assertTrue("Invalid JcrExpression", jcrExpression.equals("//element(*, graffito:C) [@graffito:name = 'a test value' and @graffito:id = 1]"));
+94          }
+95          catch (Exception e)
+96          {
+97              e.printStackTrace();
+98              fail("Exception occurs during the unit test : " + e);
+99          }
+100         
+101     }
+102     
+103 
+104 }
+
+
+ + Added: incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/querymanager/package-frame.html URL: http://svn.apache.org/viewvc/incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/querymanager/package-frame.html?view=auto&rev=448367 ============================================================================== --- incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/querymanager/package-frame.html (added) +++ incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/querymanager/package-frame.html Wed Sep 20 15:17:15 2006 @@ -0,0 +1,31 @@ + + + + + + + Graffito JCR Mapping 1.0-a1-dev Reference Package org.apache.portals.graffito.jcr.querymanager + + + + +

+ org.apache.portals.graffito.jcr.querymanager +

+ +

Classes

+ + + + + Added: incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/querymanager/package-summary.html URL: http://svn.apache.org/viewvc/incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/querymanager/package-summary.html?view=auto&rev=448367 ============================================================================== --- incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/querymanager/package-summary.html (added) +++ incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/querymanager/package-summary.html Wed Sep 20 15:17:15 2006 @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + Graffito JCR Mapping 1.0-a1-dev Reference Package + + + + + + + + +
+ +
+
+ +
+ + + + + +

Package org.apache.portals.graffito.jcr.querymanager

+ + + + + + + + + + + + + + + + + + + +
Class Summary
+ AllTests +
+ QueryManagerTest +
+ + + + + +
+ +
+
+ +
+ + + + + + +
+ + Copyright © 2004-2006 The Apache Software Foundation. All Rights Reserved. + + + Added: incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/repository/AllTests.html URL: http://svn.apache.org/viewvc/incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/repository/AllTests.html?view=auto&rev=448367 ============================================================================== --- incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/repository/AllTests.html (added) +++ incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/repository/AllTests.html Wed Sep 20 15:17:15 2006 @@ -0,0 +1,59 @@ + + + +AllTests xref + + + +
+
+1   /* ========================================================================
+2    * Copyright 2004 The Apache Software Foundation
+3    *
+4    * Licensed under the Apache License, Version 2.0 (the "License");
+5    * you may not use this file except in compliance with the License.
+6    * You may obtain a copy of the License at
+7    *
+8    *     http://www.apache.org/licenses/LICENSE-2.0
+9    *
+10   * Unless required by applicable law or agreed to in writing, software
+11   * distributed under the License is distributed on an "AS IS" BASIS,
+12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13   * See the License for the specific language governing permissions and
+14   * limitations under the License.
+15   * ========================================================================
+16   */
+17  package org.apache.portals.graffito.jcr.repository;
+18  
+19  import org.apache.portals.graffito.jcr.RepositoryLifecycleTestSetup;
+20  
+21  import junit.framework.Test;
+22  import junit.framework.TestSuite;
+23  
+24  
+25  /***
+26   * Package level tests.
+27   * 
+28   * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
+29   */
+30  public class AllTests {
+31  
+32      public static Test suite() {
+33          return new RepositoryLifecycleTestSetup(buildSuite());
+34      }
+35  
+36      public static Test buildSuite() {
+37          TestSuite suite= new TestSuite("Test for org.apache.portals.graffito.jcr.repository");
+38          //$JUnit-BEGIN$
+39          suite.addTestSuite(RepositoryUtilTest.class);
+40         
+41          
+42          //$JUnit-END$
+43  
+44          return suite;
+45      }
+46  }
+
+
+ + Added: incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/testmodel/Discriminator.html URL: http://svn.apache.org/viewvc/incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/testmodel/Discriminator.html?view=auto&rev=448367 ============================================================================== --- incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/testmodel/Discriminator.html (added) +++ incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/testmodel/Discriminator.html Wed Sep 20 15:17:15 2006 @@ -0,0 +1,53 @@ + + + +Discriminator xref + + + +
+
+1   /*
+2    * Copyright 2000-2004 The Apache Software Foundation.
+3    * 
+4    * Licensed under the Apache License, Version 2.0 (the "License");
+5    * you may not use this file except in compliance with the License.
+6    * You may obtain a copy of the License at
+7    * 
+8    *      http://www.apache.org/licenses/LICENSE-2.0
+9    * 
+10   * Unless required by applicable law or agreed to in writing, software
+11   * distributed under the License is distributed on an "AS IS" BASIS,
+12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13   * See the License for the specific language governing permissions and
+14   * limitations under the License.
+15   */
+16  package org.apache.portals.graffito.jcr.testmodel;
+17  
+18  
+19  /***
+20   * @author <a href='mailto:christophe.lombart@gmail.com'>Christophe Lombart</a>
+21   */
+22  public class Discriminator {
+23      private String path;
+24      private String content;
+25  	public String getContent() {
+26  		return content;
+27  	}
+28  	public void setContent(String content) {
+29  		this.content = content;
+30  	}
+31  	public String getPath() {
+32  		return path;
+33  	}
+34  	public void setPath(String path) {
+35  		this.path = path;
+36  	}
+37      
+38      
+39      
+40  }
+
+
+ + Added: incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/testmodel/inheritance/Ancestor.html URL: http://svn.apache.org/viewvc/incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/testmodel/inheritance/Ancestor.html?view=auto&rev=448367 ============================================================================== --- incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/testmodel/inheritance/Ancestor.html (added) +++ incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/testmodel/inheritance/Ancestor.html Wed Sep 20 15:17:15 2006 @@ -0,0 +1,60 @@ + + + +Ancestor xref + + + +
+
+1   /*
+2    * Copyright 2000-2004 The Apache Software Foundation.
+3    * 
+4    * Licensed under the Apache License, Version 2.0 (the "License");
+5    * you may not use this file except in compliance with the License.
+6    * You may obtain a copy of the License at
+7    * 
+8    *      http://www.apache.org/licenses/LICENSE-2.0
+9    * 
+10   * Unless required by applicable law or agreed to in writing, software
+11   * distributed under the License is distributed on an "AS IS" BASIS,
+12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13   * See the License for the specific language governing permissions and
+14   * limitations under the License.
+15   */
+16  package org.apache.portals.graffito.jcr.testmodel.inheritance;
+17  
+18  public class Ancestor
+19  {
+20  	protected String path;
+21  	protected String ancestorField;
+22  	protected String discriminator;
+23  	
+24  	public String getPath() {
+25  		return path;
+26  	}
+27  
+28  	public void setPath(String path) {
+29  		this.path = path;
+30  	}
+31  
+32  	public String getAncestorField() {
+33  		return ancestorField;
+34  	}
+35  
+36  	public void setAncestorField(String ancestorField) {
+37  		this.ancestorField = ancestorField;
+38  	}
+39      
+40  	public String getDiscriminator() {
+41  		return discriminator;
+42  	}
+43  
+44  	public void setDiscriminator(String discriminator) {
+45  		this.discriminator = discriminator;
+46  	}
+47  }
+
+
+ + Added: incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/testmodel/inheritance/AnotherDescendant.html URL: http://svn.apache.org/viewvc/incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/testmodel/inheritance/AnotherDescendant.html?view=auto&rev=448367 ============================================================================== --- incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/testmodel/inheritance/AnotherDescendant.html (added) +++ incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/testmodel/inheritance/AnotherDescendant.html Wed Sep 20 15:17:15 2006 @@ -0,0 +1,46 @@ + + + +AnotherDescendant xref + + + +
+
+1   /*
+2    * Copyright 2000-2004 The Apache Software Foundation.
+3    * 
+4    * Licensed under the Apache License, Version 2.0 (the "License");
+5    * you may not use this file except in compliance with the License.
+6    * You may obtain a copy of the License at
+7    * 
+8    *      http://www.apache.org/licenses/LICENSE-2.0
+9    * 
+10   * Unless required by applicable law or agreed to in writing, software
+11   * distributed under the License is distributed on an "AS IS" BASIS,
+12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13   * See the License for the specific language governing permissions and
+14   * limitations under the License.
+15   */
+16  package org.apache.portals.graffito.jcr.testmodel.inheritance;
+17  
+18  import org.apache.portals.graffito.jcr.testmodel.interfaces.Interface;
+19  
+20  public class AnotherDescendant extends Ancestor implements Interface{
+21  
+22  	protected String anotherDescendantField;
+23  
+24  	public String getAnotherDescendantField() {
+25  		return anotherDescendantField;
+26  	}
+27  
+28  	public void setAnotherDescendantField(String anotherDescendantField) {
+29  		this.anotherDescendantField = anotherDescendantField;
+30  	}
+31  	
+32  
+33  }
+
+
+ + Added: incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/testmodel/inheritance/Descendant.html URL: http://svn.apache.org/viewvc/incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/testmodel/inheritance/Descendant.html?view=auto&rev=448367 ============================================================================== --- incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/testmodel/inheritance/Descendant.html (added) +++ incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/testmodel/inheritance/Descendant.html Wed Sep 20 15:17:15 2006 @@ -0,0 +1,51 @@ + + + +Descendant xref + + + +
+
+1   /*
+2    * Copyright 2000-2004 The Apache Software Foundation.
+3    * 
+4    * Licensed under the Apache License, Version 2.0 (the "License");
+5    * you may not use this file except in compliance with the License.
+6    * You may obtain a copy of the License at
+7    * 
+8    *      http://www.apache.org/licenses/LICENSE-2.0
+9    * 
+10   * Unless required by applicable law or agreed to in writing, software
+11   * distributed under the License is distributed on an "AS IS" BASIS,
+12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13   * See the License for the specific language governing permissions and
+14   * limitations under the License.
+15   */
+16  package org.apache.portals.graffito.jcr.testmodel.inheritance;
+17  
+18  import org.apache.portals.graffito.jcr.testmodel.interfaces.AnotherInterface;
+19  
+20  public class Descendant extends Ancestor implements AnotherInterface {
+21  
+22  	protected String descendantField;
+23  
+24  	
+25  
+26  	public String getDescendantField() {
+27  		return descendantField;
+28  	}
+29  
+30  	public void setDescendantField(String descendantField) {
+31  		this.descendantField = descendantField;
+32  	}
+33  
+34  
+35  	
+36  	
+37  
+38  }
+
+
+ + Added: incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/testmodel/inheritance/SubDescendant.html URL: http://svn.apache.org/viewvc/incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/testmodel/inheritance/SubDescendant.html?view=auto&rev=448367 ============================================================================== --- incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/testmodel/inheritance/SubDescendant.html (added) +++ incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/testmodel/inheritance/SubDescendant.html Wed Sep 20 15:17:15 2006 @@ -0,0 +1,44 @@ + + + +SubDescendant xref + + + +
+
+1   /*
+2    * Copyright 2000-2004 The Apache Software Foundation.
+3    * 
+4    * Licensed under the Apache License, Version 2.0 (the "License");
+5    * you may not use this file except in compliance with the License.
+6    * You may obtain a copy of the License at
+7    * 
+8    *      http://www.apache.org/licenses/LICENSE-2.0
+9    * 
+10   * Unless required by applicable law or agreed to in writing, software
+11   * distributed under the License is distributed on an "AS IS" BASIS,
+12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13   * See the License for the specific language governing permissions and
+14   * limitations under the License.
+15   */
+16  package org.apache.portals.graffito.jcr.testmodel.inheritance;
+17  
+18  public class SubDescendant extends Descendant {
+19  
+20  	protected String subDescendantField;
+21  
+22  	public String getSubDescendantField() {
+23  		return subDescendantField;
+24  	}
+25  
+26  	public void setSubDescendantField(String subDescendantField) {
+27  		this.subDescendantField = subDescendantField;
+28  	}
+29  
+30  	
+31  }
+
+
+ +