incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clomb...@apache.org
Subject svn commit: r505044 - in /incubator/graffito/trunk/jcr/jcr-mapping/src: test-config/ test/org/apache/portals/graffito/jcr/ test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/ test/org/apache/portals/graffito/jcr/testmodel/
Date Thu, 08 Feb 2007 21:53:37 GMT
Author: clombart
Date: Thu Feb  8 13:53:36 2007
New Revision: 505044

URL: http://svn.apache.org/viewvc?view=rev&rev=505044
Log:
Add unit tests based on jcr:hierarchyNode, jcr:File & jcr:Folder

Added:
    incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/jcrmapping-jcrnodetypes.xml
    incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/
    incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/AllTests.java
    incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/PersistenceManagerJcrNodeTypeTest.java
    incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Folder.java
    incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/HierarchyNode.java
    incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Resource.java
Modified:
    incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/AllTests.java
    incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/TestBase.java
    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-config/jcrmapping-jcrnodetypes.xml
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/jcrmapping-jcrnodetypes.xml?view=auto&rev=505044
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/jcrmapping-jcrnodetypes.xml (added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/jcrmapping-jcrnodetypes.xml Thu
Feb  8 13:53:36 2007
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE graffito-jcr PUBLIC "-//The Apache Software Foundation//DTD Repository//EN"
"./src/dtd/graffito-jcr-mapping.dtd">
+<graffito-jcr>
+
+	<class-descriptor className="org.apache.portals.graffito.jcr.testmodel.HierarchyNode"
 jcrNodeType="nt:hierarchyNode" >
+		<field-descriptor fieldName="path" path="true" />
+		<field-descriptor fieldName="creationDate" jcrName="jcr:created"/>	
+	</class-descriptor>	
+	
+	<class-descriptor className="org.apache.portals.graffito.jcr.testmodel.Folder"  jcrNodeType="nt:folder"
+	                  extend="org.apache.portals.graffito.jcr.testmodel.HierarchyNode" >
+		<field-descriptor fieldName="path" path="true" />
+		<collection-descriptor fieldName="children" proxy="false" autoUpdate="false" 
+		                       elementClassName="org.apache.portals.graffito.jcr.testmodel.HierarchyNode"

+		                       collectionConverter="org.apache.portals.graffito.jcr.persistence.collectionconverter.impl.NTCollectionConverterImpl"
/>
+
+	</class-descriptor>	
+	
+	<class-descriptor className="org.apache.portals.graffito.jcr.testmodel.File"  jcrNodeType="nt:file"

+	                  extend="org.apache.portals.graffito.jcr.testmodel.HierarchyNode" >
+	                  
+		<field-descriptor fieldName="path" path="true" />
+		<bean-descriptor  fieldName="resource"  jcrName="jcr:content" />
+	</class-descriptor>
+		
+    <class-descriptor className="org.apache.portals.graffito.jcr.testmodel.Resource" 
jcrNodeType="nt:resource">
+		<field-descriptor fieldName="mimeType" jcrName="jcr:mimeType"/>	
+		<!-- field-descriptor fieldName="encoding" jcrName="jcr:encoding"/ -->	
+		<field-descriptor fieldName="data" jcrName="jcr:data"/>	
+		<field-descriptor fieldName="lastModified" jcrName="jcr:lastModified"/>	
+	</class-descriptor>	
+	
+</graffito-jcr>
+ 
\ No newline at end of file

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/AllTests.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/AllTests.java?view=diff&rev=505044&r1=505043&r2=505044
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/AllTests.java
(original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/AllTests.java
Thu Feb  8 13:53:36 2007
@@ -51,6 +51,7 @@
         suite.addTest(org.apache.portals.graffito.jcr.persistence.lock.AllTests.buildSuite());
         suite.addTest(org.apache.portals.graffito.jcr.querymanager.AllTests.buildSuite());
         suite.addTest(org.apache.portals.graffito.jcr.repository.AllTests.buildSuite());
+        suite.addTest(org.apache.portals.graffito.jcr.persistence.jcrnodetype.AllTests.buildSuite());
         return suite;
     }
 }

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/TestBase.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/TestBase.java?view=diff&rev=505044&r1=505043&r2=505044
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/TestBase.java
(original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/TestBase.java
Thu Feb  8 13:53:36 2007
@@ -194,7 +194,8 @@
 						   "./src/test-config/jcrmapping-proxy.xml",
                            "./src/test-config/jcrmapping-atomic.xml",
                            "./src/test-config/jcrmapping-beandescriptor.xml",
-                           "./src/test-config/jcrmapping-inheritance.xml"};
+                           "./src/test-config/jcrmapping-inheritance.xml",
+                           "./src/test-config/jcrmapping-jcrnodetypes.xml"};
 		session = RepositoryUtil.login(repository, "superuser", "superuser");
 
 		

Added: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/AllTests.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/AllTests.java?view=auto&rev=505044
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/AllTests.java
(added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/AllTests.java
Thu Feb  8 13:53:36 2007
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.persistence.jcrnodetype;
+
+import org.apache.portals.graffito.jcr.RepositoryLifecycleTestSetup;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+/**
+ * Package level tests.
+ * 
+ * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
+ */
+public class AllTests {
+
+    public static Test suite() {
+        return new RepositoryLifecycleTestSetup(buildSuite());
+    }
+
+    public static Test buildSuite() {
+        TestSuite suite= new TestSuite("Test for org.apache.portals.graffito.jcr.persistence.jcrnodetype");
+        //$JUnit-BEGIN$
+        suite.addTestSuite(PersistenceManagerJcrNodeTypeTest.class);                
+        //$JUnit-END$
+
+        return suite;
+    }
+}

Added: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/PersistenceManagerJcrNodeTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/PersistenceManagerJcrNodeTypeTest.java?view=auto&rev=505044
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/PersistenceManagerJcrNodeTypeTest.java
(added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/PersistenceManagerJcrNodeTypeTest.java
Thu Feb  8 13:53:36 2007
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.persistence.jcrnodetype;
+
+import java.io.ByteArrayInputStream;
+
+import java.util.Calendar;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.portals.graffito.jcr.RepositoryLifecycleTestSetup;
+import org.apache.portals.graffito.jcr.TestBase;
+import org.apache.portals.graffito.jcr.persistence.PersistenceManager;
+import org.apache.portals.graffito.jcr.testmodel.File;
+import org.apache.portals.graffito.jcr.testmodel.Folder;
+import org.apache.portals.graffito.jcr.testmodel.Resource;
+
+/**
+ * Test inheritance with node type per concrete class (without  discreminator field)
+ *
+ * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
+ */
+public class PersistenceManagerJcrNodeTypeTest extends TestBase {
+	private final static Log log = LogFactory.getLog(PersistenceManagerJcrNodeTypeTest.class);
+
+	/**
+	 * <p>Defines the test case name for junit.</p>
+	 * @param testName The test case name.
+	 */
+	public PersistenceManagerJcrNodeTypeTest(String testName) throws Exception {
+		super(testName);
+
+	}
+
+	public static Test suite() {
+		// All methods starting with "test" will be executed in the test suite.
+		return new RepositoryLifecycleTestSetup(new TestSuite(
+				PersistenceManagerJcrNodeTypeTest.class));
+	}
+
+	public void tearDown() throws Exception {
+
+		cleanUpRepisotory();
+		super.tearDown();
+		
+	}
+
+
+	public void testRetrieveSingleton() 
+	{
+
+		try 
+		{
+			PersistenceManager persistenceManager = this.getPersistenceManager();
+
+			//---------------------------------------------------------------------------------------------------------
+			// Insert a  folder (class mapped to jcr:folder)
+			//---------------------------------------------------------------------------------------------------------
		
+//            Folder folder = new Folder();
+//            folder.setPath("/folder1");            
+//                        
+//            persistenceManager.insert(folder); 
+//           
+//			persistenceManager.save();
+			
+			
+			//---------------------------------------------------------------------------------------------------------
+			// Retrieve a document object
+			//---------------------------------------------------------------------------------------------------------
					
+//			folder = (Folder) persistenceManager.getObject( "/folder1");
+//			assertNotNull("folder is null", folder);			
+//			assertEquals("Document path is invalid", folder.getPath(), "/folder1");
+//			System.out.println("Folder calendar: " + folder.getCreationDate());	// The prop is autocreated

+			
+
+			//---------------------------------------------------------------------------------------------------------
+			// Insert a  folder (class mapped to jcr:folder) with one file (class mapped to jcr:file)
+			//---------------------------------------------------------------------------------------------------------
		
+            Resource resource = new Resource();
+            resource.setData(new ByteArrayInputStream("this is the content".getBytes()));
           
+            resource.setLastModified(Calendar.getInstance());
+            resource.setMimeType("plain/text");
+            File file = new File();    
+            file.setResource(resource);
+            
+            
+            Folder folder = new Folder();
+            folder.setPath("/folder1");
+            folder.addChildren(file);
+            
+            persistenceManager.insert(folder);            
+			persistenceManager.save();
+			
+			
+			//---------------------------------------------------------------------------------------------------------
+			// Retrieve a document object
+			//---------------------------------------------------------------------------------------------------------
					
+			folder = (Folder) persistenceManager.getObject( "/folder1");
+			assertNotNull("folder is null", folder);
+			assertTrue("Invalid number of children", folder.getChildren().size() == 1);
+			file = (File) folder.getChildren().iterator().next();
+			assertNotNull("resource is null", file.getResource());	
+			System.out.println("File resource calendar: " + file.getResource().getLastModified());
// The prop is autocreated
+			
+			
+		}
+		catch (Exception e)
+		{
+			e.printStackTrace();
+			fail();
+		}
+			
+	}	
+}
\ No newline at end of file

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/File.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/File.java?view=diff&rev=505044&r1=505043&r2=505044
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/File.java
(original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/File.java
Thu Feb  8 13:53:36 2007
@@ -1,48 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.io.InputStream;
-import java.util.Calendar;
-
-public class File
+/**
+ * Java class used to map the jcr node type nt:file
+ * @author <a href="mailto:christophe.lombart@gmail.com">Lombart Christophe </a>
+ *
+ */
+public class File  extends HierarchyNode
 {
 
-    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;
-    }
-    
+    private Resource resource;
+    private String path;
+
+	public Resource getResource() 
+	{
+		return resource;
+	}
+
+	public void setResource(Resource resource) 
+	{
+		this.resource = resource;
+	}
+
+	public String getPath() 
+	{
+		return path;
+	}
+
+	public void setPath(String path) 
+	{
+		this.path = path;
+	}
+
+	
     
 }

Added: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Folder.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Folder.java?view=auto&rev=505044
==============================================================================
--- 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
Thu Feb  8 13:53:36 2007
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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;
+/**
+ * Java class used to map the jcr node type nt:folder
+ * @author <a href="mailto:christophe.lombart@gmail.com">Lombart Christophe </a>
+ *
+ */
+public class Folder extends HierarchyNode
+{
+    private String path;
+    
+    private Collection children;   // = a collection of HierarchyNodes 
+
+    
+	public String getPath() 
+	{
+		return path;
+	}
+
+	public void setPath(String path) 
+	{
+		this.path = path;
+	}
+
+
+	public Collection getChildren() 
+	{
+		return children;
+	}
+
+	public void setChildren(Collection children) 
+	{
+		this.children = children;
+	}
+
+	public void addChildren(HierarchyNode node)
+	{
+		if (children == null)
+		{
+			children = new ArrayList();			
+		}
+		children.add(node);
+	}
+    
+}

Added: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/HierarchyNode.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/HierarchyNode.java?view=auto&rev=505044
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/HierarchyNode.java
(added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/HierarchyNode.java
Thu Feb  8 13:53:36 2007
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.Calendar;
+
+/**
+ * Java class used to map the jcr node type nt:hierarchyNode
+ * @author <a href="mailto:christophe.lombart@gmail.com">Lombart Christophe </a>
+ *
+ */
+public class HierarchyNode
+{	
+	private Calendar creationDate;
+	
+	public Calendar getCreationDate() 
+	{
+		return creationDate;
+	}
+
+	public void setCreationDate(Calendar creationDate) 
+	{
+		this.creationDate = creationDate;
+	}
+	
+}

Added: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Resource.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Resource.java?view=auto&rev=505044
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Resource.java
(added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Resource.java
Thu Feb  8 13:53:36 2007
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.io.InputStream;
+import java.util.Calendar;
+/**
+ * Java class used to map the jcr node type nt:resource
+ * @author <a href="mailto:christophe.lombart@gmail.com">Lombart Christophe </a>
+ *
+ */
+public class Resource
+{
+
+    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;
+    }
+    
+    
+}



Mime
View raw message