You are viewing a plain text version of this content. The canonical link for it is here.
Posted to graffito-commits@incubator.apache.org by cl...@apache.org on 2005/12/05 20:37:32 UTC
svn commit: r354168 [3/3] - in
/incubator/graffito/trunk/jcr/jcr-mapping/src/test: ./ org/ org/apache/
org/apache/portals/ org/apache/portals/graffito/
org/apache/portals/graffito/jcr/ org/apache/portals/graffito/jcr/mapper/
org/apache/portals/graffito...
Added: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/File.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/File.java?rev=354168&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/File.java (added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/File.java Mon Dec 5 12:37:06 2005
@@ -0,0 +1,48 @@
+package org.apache.portals.graffito.jcr.testmodel;
+
+import java.io.InputStream;
+import java.util.Calendar;
+
+public class File
+{
+
+ private String mimeType;
+ private String encoding;
+ private InputStream data;
+ private Calendar lastModified;
+
+ public InputStream getData()
+ {
+ return data;
+ }
+ public void setData(InputStream data)
+ {
+ this.data = data;
+ }
+ public String getEncoding()
+ {
+ return encoding;
+ }
+ public void setEncoding(String encoding)
+ {
+ this.encoding = encoding;
+ }
+ public Calendar getLastModified()
+ {
+ return lastModified;
+ }
+ public void setLastModified(Calendar lastModified)
+ {
+ this.lastModified = lastModified;
+ }
+ public String getMimeType()
+ {
+ return mimeType;
+ }
+ public void setMimeType(String mimeType)
+ {
+ this.mimeType = mimeType;
+ }
+
+
+}
Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/File.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Folder.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Folder.java?rev=354168&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Folder.java (added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Folder.java Mon Dec 5 12:37:06 2005
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.portals.graffito.jcr.testmodel;
+
+import java.util.List;
+
+
+
+
+/**
+ * CMS Folder Test
+ *
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
+ * @version $Id: Folder.java,v 1.1 2004/12/22 20:36:59 christophe Exp $
+ */
+public class Folder extends CmsObject
+{
+
+ protected List folders;
+ protected List documents;
+
+ /**
+ * @see org.apache.portals.graffito.model.Folder#getDocuments()
+ */
+ public List getDocuments()
+ {
+ return documents;
+ }
+
+ /**
+ * @see org.apache.portals.graffito.model.Folder#getFolders()
+ */
+ public List getFolders()
+ {
+ return folders;
+ }
+
+}
+
Added: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/MultiValue.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/MultiValue.java?rev=354168&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/MultiValue.java (added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/MultiValue.java Mon Dec 5 12:37:06 2005
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.portals.graffito.jcr.testmodel;
+
+import java.util.Collection;
+
+/**
+ *
+ * Simple object used to test multivalue properties
+ *
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart
+ * Christophe </a>
+ * @version $Id: Exp $
+ */
+public class MultiValue
+{
+ private String path;
+
+ private String name;
+
+ private Collection multiValues;
+
+ private Collection nullMultiValues;
+
+
+
+ public String getPath() {
+ return path;
+ }
+
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ /**
+ * @return Returns the name.
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * @param name The name to set.
+ */
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ /**
+ * @return Returns the multiValues.
+ */
+ public Collection getMultiValues()
+ {
+ return multiValues;
+ }
+
+ /**
+ * @param multiValues
+ * The multiValues to set.
+ */
+ public void setMultiValues(Collection multiValues)
+ {
+ this.multiValues = multiValues;
+ }
+
+ /**
+ * @return Returns the nullMultiValues.
+ */
+ public Collection getNullMultiValues()
+ {
+ return nullMultiValues;
+ }
+
+ /**
+ * @param nullMultiValues
+ * The nullMultiValues to set.
+ */
+ public void setNullMultiValues(Collection nullMultiValues)
+ {
+ this.nullMultiValues = nullMultiValues;
+ }
+
+}
Added: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Page.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Page.java?rev=354168&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Page.java (added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Page.java Mon Dec 5 12:37:06 2005
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2000-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.portals.graffito.jcr.testmodel;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+/**
+ *
+ * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
+ *
+ */
+public class Page
+{
+ String path;
+ String title;
+ Collection paragraphs;
+
+ public String getPath()
+ {
+ return path;
+ }
+ public void setPath(String path)
+ {
+ this.path = path;
+ }
+ /**
+ * @return Returns the paragraphs.
+ */
+ public Collection getParagraphs()
+ {
+ return paragraphs;
+ }
+ /**
+ * @param paragraphs The paragraphs to set.
+ */
+ public void setParagraphs(Collection paragraphs)
+ {
+ this.paragraphs = paragraphs;
+ }
+ /**
+ * @return Returns the title.
+ */
+ public String getTitle()
+ {
+ return title;
+ }
+ /**
+ * @param title The title to set.
+ */
+ public void setTitle(String title)
+ {
+ this.title = title;
+ }
+
+ public void addParagraph(Paragraph paragraph)
+ {
+ if (paragraphs == null)
+ {
+ paragraphs = new ArrayList();
+ }
+
+ paragraphs.add(paragraph);
+ }
+
+
+
+}
Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Page.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Paragraph.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Paragraph.java?rev=354168&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Paragraph.java (added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Paragraph.java Mon Dec 5 12:37:06 2005
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2000-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.portals.graffito.jcr.testmodel;
+
+/**
+ *
+ * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
+ *
+ */
+public class Paragraph
+{
+ private String path;
+ private String text;
+
+
+
+ public String getPath()
+ {
+ return path;
+ }
+
+ public void setPath(String path)
+ {
+ this.path = path;
+ }
+
+ public Paragraph()
+ {
+ this.text = "Default text";
+ }
+
+ public Paragraph(String text)
+ {
+ this.text = text;
+ }
+
+ /**
+ * @return Returns the text.
+ */
+ public String getText()
+ {
+ return text;
+ }
+
+ /**
+ * @param text The text to set.
+ */
+ public void setText(String text)
+ {
+ this.text = text;
+ }
+
+}
Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Paragraph.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/hashmap/Element.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/hashmap/Element.java?rev=354168&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/hashmap/Element.java (added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/hashmap/Element.java Mon Dec 5 12:37:06 2005
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.portals.graffito.jcr.testmodel.hashmap;
+
+
+/**
+ *
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
+ * @version $Id: Exp $
+ */
+public class Element
+{
+ private String id;
+ private String text;
+
+
+ /**
+ * @return Returns the id.
+ */
+ public String getId()
+ {
+ return id;
+ }
+ /**
+ * @param id The id to set.
+ */
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+ /**
+ * @return Returns the text.
+ */
+ public String getText()
+ {
+ return text;
+ }
+ /**
+ * @param text The text to set.
+ */
+ public void setText(String text)
+ {
+ this.text = text;
+ }
+
+
+}
Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/hashmap/Element.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/hashmap/HashMapElement.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/hashmap/HashMapElement.java?rev=354168&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/hashmap/HashMapElement.java (added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/hashmap/HashMapElement.java Mon Dec 5 12:37:06 2005
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2000-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.portals.graffito.jcr.testmodel.hashmap;
+
+import java.util.HashMap;
+import java.util.Iterator;
+
+import org.apache.portals.graffito.jcr.persistence.collectionconverter.ManageableCollection;
+
+/**
+ *
+ * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
+ *
+ */
+public class HashMapElement extends HashMap implements ManageableCollection
+{
+
+ /**
+ * @see org.apache.portals.graffito.jcr.persistence.collectionconverter.ManageableCollection#addObject(java.lang.Object)
+ */
+ public void addObject(Object object)
+ {
+ if (object instanceof Element)
+ {
+ this.put(((Element)object).getId(), object);
+ }
+ }
+
+ /**
+ * @see org.apache.portals.graffito.jcr.persistence.collectionconverter.ManageableCollection#getIterator()
+ */
+ public Iterator getIterator()
+ {
+ return this.values().iterator();
+ }
+
+ public int getSize()
+ {
+
+ return this.size();
+ }
+
+
+}
Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/hashmap/HashMapElement.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/hashmap/Main.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/hashmap/Main.java?rev=354168&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/hashmap/Main.java (added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/hashmap/Main.java Mon Dec 5 12:37:06 2005
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.portals.graffito.jcr.testmodel.hashmap;
+
+import java.util.HashMap;
+
+/**
+ *
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
+ * @version $Id: Exp $
+ */
+public class Main
+{
+ private String path;
+ private String text;
+ private HashMapElement elements;
+
+
+
+ public String getPath() {
+ return path;
+ }
+ public void setPath(String path) {
+ this.path = path;
+ }
+ /**
+ * @return Returns the elements.
+ */
+ public HashMapElement getElements()
+ {
+ return elements;
+ }
+ /**
+ * @param elements The elements to set.
+ */
+ public void setElements(HashMapElement elements)
+ {
+ this.elements = elements;
+ }
+ /**
+ * @return Returns the text.
+ */
+ public String getText()
+ {
+ return text;
+ }
+ /**
+ * @param text The text to set.
+ */
+ public void setText(String text)
+ {
+ this.text = text;
+ }
+
+
+}
Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/hashmap/Main.java
------------------------------------------------------------------------------
svn:executable = *