Goal
XWiki works on
Java Content Repository.
JCR node hierarchy
Similar to
Alternative Page Store and
Web DAV Service. format: node or property name (jcr node type).
- (jcr workspace) = single xwiki in multiwiki setup.
- / (jcr:root)
- <space> (xwiki:space)
- <documentName> (xwiki:document)
- <document properties>
- objects
- attachments
- <filename> (xwiki:attachment extends nt:file)
- translations
- <language> (xwiki:document)
- lock (xwiki:lock)
Store classes
- use value objects for storage (from xwiki data model proposal: sandbox/org.xwiki.model): org.xwiki.store.value.DocumentValue, ObjectValue, etc
- value objects allow us to eliminate xwiki-core dependency in jcrstore. we can reuse value objects in new data model later as in sandbox/org.xwiki.model
- put all storage specific code in DAO classes: DocumentDAO, ObjectDAO, etc
- Implement a clean xwiki stores with only business code and delegate storage specific code to DAO classes
- convert value objects to/from xwiki business objects: org.xwiki.store.value.ValueConverter, DocumentValue <-> XWikiDocument, etc.
JCR specific code
Many ideas are from
springmodules-jcr.
- RepositoryProvider provides a jcr repository.
- SessionFactory create/manage jcr sessions.
- JcrTemplate execute jcr code via callbacks/closures.
Quering
Use our QueryManager for quering. Add JCRSQL2 language to it.
Translate
XWQL to JCRSQL2.
Problems
- XWQL needs JCRSQL2 query language from JCRv2. JCRv1 has very limited quering power. But JCRv2 is late. Release was planed at September 2008.
- Without XWQL/JCRSQL2 it is almost impossible to run xwiki on jcr because it contains very much queries which need to be rewritten on xpath (not always possible).
Status
- JcrStore prototype located in sandbox/jcrstore
- Contains DefaultStore, basic JCR and InMemory DAOs, some tests of it on jackrabbit.