Skip to end of metadata
Go to start of metadata

Creating documents from texts and URLs

  • Use the CorporaAPI methods to create a document from:
    • text - use the one receiving a string content parameter and a Boolean parameter denoting if the text is actually a markup.
    • URL - use the one receiving an URL parameter and a string parameter for the encoding to be used.

Storing and loading documents

  • Use DocumentReporsitoryAPI for storing documents.
  • Use addDocument() method for storing a specific document.
    When the document is stored, it is assigned a persistence ID. You can later use the ID to load this document.

Loading documents from persistence

Use getDocumentIds() to get documents IDs, when you need to browse documents, based on some search criteria.
This method provides a filter, corresponding to these search criteria. Creating filters is the subject of the Searching for Documents scenario. Here, we focus on how to load documents. When you have the ID list, it is possible to go through it and load the required documents from persistence.

Synchronizing documents

Use syncDocument() to synchronize a document.
If the document already exists, it is updated. If not - it is added to the persistence and indexed.

Deleting documents

To remove the document from the persistence repository, you need to pass its ID as a parameter to the deleteDocument() method.

Labels:
kim_java_rmi kim_java_rmi Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.