Hi again, KIM uses a combination of semantic repository (Owlim) and document repository (Lucene) to index and retrieve documents. Both store their indexes in KIM/context/default/populated . Exporting only the RDF will not be sufficient. So in order to backup, you will need to archive the whole "populated" folder. Although, I will advise archiving the whole KIM installation.
Hope this helps, Philip On 6 Oct 2011, at 1:53 PM, Cong Nguyen wrote: > Hi, Philip > Thank you very much for your helpful answers. > I has another question in problem 2. I remember that i read somewhere in > kim-discussion which said that all new entities, also documents, stored in > /context/default/kb/populated. If there is any problem with KIM, i must > delete all thing in this folder and repopulate all documents. So does KIM > have any way to "backup" all entities, for example, export all entities to > N-triples file. > Best regards. > Cong > > Vào 16:39 Ngày 06 tháng 10 năm 2011, Philip Alexiev > <philip.alex...@ontotext.com> đã viết: > Hi Hoàng Công Nguyễn, > > My apologies. The answer to the first question was not correct. KIM uses > some indexes, which need to be synchronized when new documents are added. The > javadoc provides a good description: > > > /** > * Synchronizes the index > * > * <p> > * Asks the index to sync the newly added documents with the search > results. > * Before calling synchronizeIndex(true), documents recently added > documents may > * not be included the search results. Calling synchronizeIndex with > force = false > * cause the index to evaluate the need for synchronization and possibly > postpone it. > * > * @throws DocumentRepositoryException > * @return true - if operation was executed; false - if conditional > execution > * was invoked (<code>force<code> == false) and the operation was not > initiated > * due to conditions; > */ > @Description("Synchronizes the index") > public boolean synchronizeIndex(@PName("force") boolean force) throws > DocumentRepositoryException; > > > All the best. > Philip > > On 6 Oct 2011, at 12:29 PM, Philip Alexiev wrote: > >> >> >> Begin forwarded message: >> >>> From: Philip Alexiev <philip.alex...@sirma.bg> >>> Subject: Re: [Kim-discussion] Help - Adding to document repository, >>> importing new instances got from annotations into KB using Java API. >>> Date: 6 October 2011 12:26:11 PM GMT+03:00 >>> To: Hoàng Công Nguyễn <congnh0...@gmail.com> >>> Cc: KIM discussion <kim-discussion@ontotext.com> >>> >>> Hello Hoàng Công Nguyễn, >>> >>> I will answer the questions in order: >>> >>> 1) Adding the document through the DocumentRepositoryAPI is sufficient to >>> be able to see it in the UI. Making a search for documents will show it. >>> >>> 2) New entities, found in documents, are automatically added to the >>> semantic repository. They are assigned a label and a type. Also the >>> relation is created, that this document mentions that entity. Adding them >>> manually is not necessary. >>> >>> 3) The answer to this question is more a matter of style. You might want to >>> keep your ontology as a separate, complete module, so using the properties >>> from another ontology module might not be a good idea. You can relate the >>> properties, by making them subproperties of PROTON's equivalents. In fact, >>> this can be made by a separate module, which solely purpose is to create >>> the mapping between the PROTON and your ontology. You can map classes and >>> properties there. Then you can use your classes and properties, as they >>> are more relevant to your classes. >>> >>> Using any of the approaches will work (if you plan to use mainly your >>> ontology). It is just a matter of good style to keep ontologies in separate >>> modules and map them with a dedicated mapping module. >>> >>> There are functional differences in making your properties a subproperty of >>> PROTON ones. If you make a query, using your properties, you will get >>> statements with your properties only. If you make a query using the PROTON >>> equivalent, you will get both statements with PROTON property and yours. >>> >>> Hope this helps, >>> Philip Alexiev, >>> Software Engineer, KIM team >>> >>> >>> On 6 Oct 2011, at 11:07 AM, Hoàng Công Nguyễn wrote: >>> >>>> Hi, >>>> I'm using KIM platform 3.0-RC-4 and i've got some problems, please help me >>>> solving them: >>>> 1) I create new document, add to document repository >>>> >>>> DocumentRepositoryAPI apiDocs = kimService.getDocumentRepositoryAPI(); >>>> CorporaAPI apiCorpora = kimService.getCorporaAPI(); >>>> String content = DocumentResource.TEST_URL_01; >>>> KIMDocument doc = apiCorpora.createDocument(content, true); >>>> doc=apiSemnAnn.execute(doc); >>>> apiDocs.addDocument(doc); >>>> >>>> but when i browse web ui, i can't see this document and i must restart KIM >>>> to take effect. Is there any way adding new document to repository without >>>> restarting or it is the same problem with deleting document in >>>> http://www.mail-archive.com/kim-discussion@ontotext.com/msg00696.html? >>>> >>>> 2) In documentation, to import new instances into KB, i must create new >>>> file (nt..) , import it to owlim and restart to take effect. So with new >>>> instances got from annotated documents, is there another way to import >>>> them into KB using java API. >>>> >>>> 3) When i add my own ontology to KIM, there may be some properties which >>>> are the same as properties in PROTON, how i should do with them? Mapping >>>> it to PROTON's properties using rdfs:subPropertyOf or using only my >>>> properties or using only PROTON's properties... >>>> >>>> Regards. >>>> Cong >>>> -- >>>> Cong Hoang Nguyen >>>> University: Hanoi University of Techonology and Science. >>>> Email: congnh0...@gmail.com >>>> Facebook: http://www.facebook.com/monday0rsunday >>>> YH: congnh0902 >>>> Skype: monday0rsunday >>>> Phone: (+84)1678565200 >>>> >>>> _______________________________________________ >>>> Kim-discussion mailing list >>>> Kim-discussion@ontotext.com >>>> http://ontotext.com/mailman/listinfo/kim-discussion >>> >> >> _______________________________________________ >> Kim-discussion mailing list >> Kim-discussion@ontotext.com >> http://ontotext.com/mailman/listinfo/kim-discussion > > > > > -- > Cong Hoang Nguyen > University: Hanoi University of Techonology and Science. > Email: congnh0...@gmail.com > Facebook: http://www.facebook.com/monday0rsunday > YH: congnh0902 > Skype: monday0rsunday > Phone: (+84)1678565200 >
_______________________________________________ Kim-discussion mailing list Kim-discussion@ontotext.com http://ontotext.com/mailman/listinfo/kim-discussion