hi Alvaro,
if your scenario is the first one, this means you either have the
document object still in use (i.e. done some kind of annotation and
want to do something more) in which case you can use the sync method if
you have stored the document.
The other scenario is that you have stored it before and you have
obtained it from the document store in order to apply some new
processing. Having obtained it, again you have the document and you
know it is stored.
I suspect that you are not obtaining the document from the document
store and this is why you are not sure i fit exists. In this case it is
always a new document, since the identification of the document in the
doc store (a persist id) is not present in this new one.
in order to get documents, one can use the QueryAPI - some of the
getDocuments methods.
borislav
Alvaro Hernandez wrote:
Thank you Borislav for your answer.
Mi scenario is the first one, but before I store a document, I
need to know if it is in the repository.
I have to use the store method to store it the first time, and
the sync method if the document already exist in the repository. So in
order to know what method I have to use, I have to know if the document
is in the repository.
My question is, how I could know if it is in the repository, I
mean, using what method ??
Thank you again,
Alvaro
Hi Alvaro,
indeed it is boring to have duplications :)
The sync method is the right one to use. But as you have seen it
requires a KIMDoc as a parameter.
The envisaged workflow is like this:
a new document comes to the system
you process it and store it
then if you like to re-process it, you find it in the repository,
reannotate something or change some doc-level features and then you
sync it.
If this is your scenario - then this is how it is supposed to work.
On the other hand, if you are passing the same corpus N times to the
server you would get N versions of each document in it.
Tell us your scenario and we will try to come up with a suggestion.
all the best to you
borislav
Alvaro Hernandez wrote:
Hi everybody, I'm trying to have only one annotation about a
document in the store.
I realized that when I store a document more than
once (using the storeDoc method), KIM stores it every time I use this
method.
However, I want only one occurrence of the document in the
store.
I found the sync method, but first I need to know if the
document was previously stored.
I didn`t found how to do that, using the API.
Could you please help me ??
Thank you,
Alvaro
Don't let your dream ride pass you by. Make it a reality with Yahoo! Autos.
_______________________________________________ NOTE: Please REPLY TO ALL to ensure that your reply reaches all members of this mailing list. KIM-discussion mailing list [email protected] http://ontotext.com/mailman/listinfo/kim-discussion_ontotext.com
No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.485 / Virus Database: 269.13.14 - Release Date: 9/10/2007 12:00 AM
Pinpoint
customers who are looking for what you sell.
Internal Virus Database is out-of-date.
Checked by AVG Free Edition.
Version: 7.5.485 / Virus Database: 269.13.14 - Release Date: 9/10/2007 12:00 AM
|
_______________________________________________
NOTE: Please REPLY TO ALL to ensure that your reply reaches all members of this
mailing list.
KIM-discussion mailing list
[email protected]
http://ontotext.com/mailman/listinfo/kim-discussion_ontotext.com