public class Repository extends Object implements IVRepository
IVRepository.OpeningMode| Constructor and Description |
|---|
Repository(IDBAccess engine) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the repository.
|
void |
create(String name)
Creates a new physical repository.
|
Iterable<IVDocument> |
documents()
Creates an iterable object for all the documents contained into this repository.
|
protected void |
finalize() |
IVDocument |
getDocument(long docKey)
Gets the virtual document for a given document key.
|
IVDocument |
getFirstDocument()
Gets the first virtual document in this repository.
|
String |
importDocument(RawDocument rawDoc)
Imports a document into this repository.
|
long |
importDocumentReturnKey(RawDocument rawDoc) |
InputStream |
loadExtraData1() |
void |
open(String name)
Opens an existing physical repository.
|
void |
open(String name,
IVRepository.OpeningMode mode) |
void |
removeDocument(IVDocument doc)
Removes a given document from this repository.
|
void |
saveExtraData1(InputStream inputStream)
Saves a block of extra data into the repository.
|
public Repository(IDBAccess engine)
protected void finalize()
throws Throwable
public void open(String name, IVRepository.OpeningMode mode)
open in interface IVRepositorypublic void create(String name)
IVRepositorycreate in interface IVRepositoryname - the name of the repository.public void open(String name)
IVRepositoryopen in interface IVRepositoryname - the name of the repository.public void close()
IVRepositoryclose in interface IVRepositorypublic Iterable<IVDocument> documents()
IVRepositorydocuments in interface IVRepositorypublic IVDocument getDocument(long docKey)
IVRepositorygetDocument in interface IVRepositorydocKey - the key of the document to retrieve.public String importDocument(RawDocument rawDoc)
IVRepositoryimportDocument in interface IVRepositoryrawDoc - the document to import (must be URI based).public long importDocumentReturnKey(RawDocument rawDoc)
importDocumentReturnKey in interface IVRepositorypublic void removeDocument(IVDocument doc)
IVRepositoryCalling this method may invalidate any current iterator created by IVRepository.documents(),
as well as the sibling relationships for any current IVDocument corresponding to
the previous and next documents of this one.
To remove all documents from a repository it may be simpler to re-create the repository.
removeDocument in interface IVRepositorydoc - the virtual document to remove.public IVDocument getFirstDocument()
IVRepositorygetFirstDocument in interface IVRepositorypublic void saveExtraData1(InputStream inputStream)
IVRepositorysaveExtraData1 in interface IVRepositoryinputStream - the input stream of the object to save.public InputStream loadExtraData1()
loadExtraData1 in interface IVRepositoryCopyright © 2019. All rights reserved.