Hi everyone!
We have to build a research paper submission system. The papers are stored in
the db in Paper table. The abstract and other paper related info is stored in Paper table,
and the paper data, e.g. the file_Name of the paper is stored in PaperData table, in the
db. Only the abstract is stored, in db, the whole paper is stored in a file, and its
filename is stored in the db PaperData table.
Now what we have to accomplish:
1. Be able to load the paper info, for example the abstract and the Paper contents from
db and file, respectively.
2. Be able to Edit the abstract and the Paper contetns, and do other wiki things , like
add an attachment, and history, PDF etc.
How XWiki does all the things:
XWiki stores the wiki pages, in the xwikidoc table, all the processing is done on this
table extracted contents, which are populated in the XWikiDocument doc object in java, in
the XWikiHibernateStore class.
But our requirement is a bit different we want to use the XWiki provided functionality
(as we are maintaining a wiki as well) as well as, load the Paper from different tables
than the xwikidoc table. from the Paper table and paper contents file.
There are a few ways how we can accomplish these things:
The first Solution:
The first solution, which I visualized as I went for a jog ;) this morning. Modify the
XWikiHibernateStore class to load the data from Paper table, and paper contents file
rather than xwiki doc table, since, XWikiHibernateClass is huge, and all the attacments
and other things are also done in it, so we modify those methods as well, but to do
minimum work we put a paper_id, in xwikiattachments table, and load those according to the
current paper_id, we will have to modify the attachments classes, and attachments
Hibernate configuration and the db table. Similarly, we will modify the XWikiDocument
classes, and modify the associated Hibernate configuration, adding the paper methods and
properties, so we will be able to use the xwiki code to the maximum.
The second solution:
Its that we rewrite everything, we write our own Hibernate java classes, and
do everything on our own, this will take a lot of time and trouble, so this solution is
less accepted.
The third solution:
there is a property in XWiki Classes on the view layer called Database List
Property, which also takes a hibernate query, parameter, can we use that, how can we, some
suggestions.
The fourth Solution:
There is an Article Object, can we use that, but I don't think, that such
rich functionality will be available to us. Remember we have to populate from our own
tables, instead of XWiki tables, and do all the things, which we do with a document, or
which a wiki can do with a wiki page.
I hope I will get some answers, the first solution seems to be the best fit, I
am waiting for your suggestions.
Regards,
Babar Abbas.