Hi, There are some examples in the unit tests :
nt:file http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-ocm/src/test/java/org/apache/jackrabbit/ocm/testmodel/File.java nt:resource http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-ocm/src/test/java/org/apache/jackrabbit/ocm/testmodel/Resource.java nt:folder http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-ocm/src/test/java/org/apache/jackrabbit/ocm/testmodel/Folder.java Let me know if you need more information Christophe On Thu, Apr 3, 2008 at 11:54 PM, Zhihai Liu <[EMAIL PROTECTED]> wrote: > Hi, > > I am trying to get an example of OCM mapping with nt:file. How the > annotation or XML will be to map a Java class like below to nt:file? > > public class File > { > Private String path; > private String mimeType; > private String encoding; > private InputStream data; > private Calendar lastModified; > // Add getters/setters > } > > In addition, how to ensure that "data" (InputStream) is mapped to > jcr:content as nt:resource? I think that's required to get it indexed and > become searchable. > > Thanks in advance. > > >
