Page 1 of 1

OMR data export--

PostPosted:Mon Mar 03, 2014 6:53 pm
by ptimsina
Hello,
I am Prem Timsina. I want to use OMR component of OpenKM (openkm-6.2.5-community-windows-installer) for my research.
However, I am stuck in one problem.
How can we export data read from OMR to any text file, or Excel file or any database.
Or, can we automatically save data read from OMR to any pre-specified file.

I will very much appreciate your answer.
Thank You,
Prem

Re: OMR data export--

PostPosted:Tue Mar 04, 2014 5:55 pm
by jllort
OMR data is saved as metadata into OpenKM database. This kind of operation can be done in several ways. Probably the most easy is get directly from database. For it simply study the table OKM_NODE_DOCUMENT and OKM_NODE_PROPERTY. From first with date can select newer files from older. And with NBS_UUID ( unique document UUID ) can do a query to get properties of this document. Also you could do the same as a report http://wiki.openkm.com/index.php/Reports_Packs some reports from here can inspirate you how doing it ( for example this will help you understanding how to do queries based in java http://wiki.openkm.com/index.php/File:D ... ered.jrxml )

In production environment we suggest use MySQL etc... not default OpenKM database ( HSQL )

Re: OMR data export--

PostPosted:Fri Mar 07, 2014 7:18 pm
by ptimsina
Thank You for Your reply Jillort.
I tried to resolved it but still could not figure it out. Can you elaborate it more or provide me the link for the example.
Specifically, I want to
1. Use OMR component to read data from scanned files (I already make it work).
2. Where does the data from the scanned files are stored.
3. Can we specify the system to store in specified file (may be txt or database).
3. If the data are stored inside some system defined file, how Can we we access those data. Please elaborate in some details.

Thank You,
Prem

Re: OMR data export--

PostPosted:Sat Mar 08, 2014 10:24 am
by jllort
1-First step if you work in database explorer -> do sql to see the data you want.
metadata is stored in OKM_NODE_PROPERTY table what has NBS_UUID ( document uuid )
from OKM_NODE_DOCUMENT you can filter documents by name ( date ) and get document uuid and do query to get newer documents with OMR property group.

2- Second step is extract it in some place. If you want to doing it automatically then you must first apply some logic, based on documents creation time or similar ? Take in mind documents creation time has not relation with OMR extraction data ( at least you must be sure if you use it, at same day you create document you extract data, this should be a restriction ). Take the idea, can be done a period, for example week or month ( is simply how do you write your sql query ).
To extract data to file system txt file here you must do minimal application.

I suggest you configure openkm with mysql -> and simply you must create minimal application ( any language ) to query database directly and export data to file system or connect to other database to write there.

This is the idea, no other mistery than know how data is stored in database and connect application what does queries and do something else.