public abstract class AbstractSearchIndex extends Object implements SearchIndex
| Modifier and Type | Field and Description |
|---|---|
protected int |
maxDocs |
| Constructor and Description |
|---|
AbstractSearchIndex() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(Literal literal)
Returns whether the provided literal is accepted by the LuceneIndex to be
indexed.
|
protected abstract void |
addDocument(SearchDocument doc) |
void |
addDocuments(Resource subject,
List<Statement> statements)
Add a complete Lucene Document based on these statements.
|
void |
addRemoveStatements(Collection<Statement> added,
Collection<Statement> removed)
Add many statements at the same time, remove many statements at the same
time.
|
void |
addStatement(Statement statement)
Indexes the specified Statement.
|
protected abstract SearchDocument |
copyDocument(SearchDocument doc) |
protected abstract void |
deleteDocument(SearchDocument doc) |
Collection<BindingSet> |
evaluate(QuerySpec query) |
protected abstract SearchDocument |
getDocument(String id) |
protected abstract Iterable<? extends SearchDocument> |
getDocuments(String resourceId) |
protected Resource |
getResource(SearchDocument document)
Returns the Resource corresponding with the specified Document.
|
void |
initialize(Properties parameters) |
protected abstract BulkUpdater |
newBulkUpdate() |
protected abstract SearchDocument |
newDocument(String id,
String resourceId,
String context) |
protected abstract SearchQuery |
parseQuery(String q,
URI property) |
void |
removeStatement(Statement statement)
Removes the specified Statement from the indexes.
|
protected abstract void |
updateDocument(SearchDocument doc) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbegin, beginReading, clear, clearContexts, commit, endReading, rollback, shutDownpublic void initialize(Properties parameters) throws Exception
initialize in interface SearchIndexExceptionpublic boolean accept(Literal literal)
accept in interface SearchIndexliteral - the literal to be acceptedpublic final void addStatement(Statement statement) throws IOException
addStatement in interface SearchIndexIOExceptionpublic final void removeStatement(Statement statement) throws IOException
SearchIndexremoveStatement in interface SearchIndexIOExceptionpublic final void addRemoveStatements(Collection<Statement> added, Collection<Statement> removed) throws IOException
addRemoveStatements in interface SearchIndexadded - all added statements, can have multiple subjectsremoved - all removed statements, can have multiple subjectsIOExceptionpublic final void addDocuments(Resource subject, List<Statement> statements) throws IOException
addDocuments in interface SearchIndexstatements - the statements that make up the resourceIOExceptionpublic final Collection<BindingSet> evaluate(QuerySpec query) throws SailException
evaluate in interface SearchIndexSailExceptionprotected Resource getResource(SearchDocument document)
protected abstract SearchDocument getDocument(String id) throws IOException
IOExceptionprotected abstract Iterable<? extends SearchDocument> getDocuments(String resourceId) throws IOException
IOExceptionprotected abstract SearchDocument newDocument(String id, String resourceId, String context)
protected abstract SearchDocument copyDocument(SearchDocument doc)
protected abstract void addDocument(SearchDocument doc) throws IOException
IOExceptionprotected abstract void updateDocument(SearchDocument doc) throws IOException
IOExceptionprotected abstract void deleteDocument(SearchDocument doc) throws IOException
IOExceptionprotected abstract SearchQuery parseQuery(String q, URI property) throws MalformedQueryException
MalformedQueryExceptionprotected abstract BulkUpdater newBulkUpdate()
Copyright © 2001-2015 Aduna. All Rights Reserved.