|
Eclipse JDT Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jdt.internal.core.search.indexing.InternalSearchDocument
org.eclipse.jdt.core.search.SearchDocument
A search document encapsulates a content to be either indexed or searched in. A search particpant creates a search document.
This class is intended to be subclassed by clients.
Constructor Summary | |
---|---|
protected |
SearchDocument(String documentPath,
SearchParticipant participant)
Creates a new search document. |
Method Summary | |
---|---|
void |
addIndexEntry(char[] category,
char[] key)
Adds the given index entry (category and key) coming from this document to the index. |
abstract byte[] |
getByteContents()
Returns the contents of this document. |
abstract char[] |
getCharContents()
Returns the contents of this document. |
abstract String |
getEncoding()
Returns the encoding for this document. |
SearchParticipant |
getParticipant()
Returns the participant that created this document. |
String |
getPath()
Returns the path to the original document to publicly mention in index or search results. |
void |
removeAllIndexEntries()
Removes all index entries from the index for the given document. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected SearchDocument(String documentPath, SearchParticipant participant)
documentPath
- the path to the document,
or null
if noneparticipant
- the participant that creates the search documentMethod Detail |
public void addIndexEntry(char[] category, char[] key)
SearchParticipant.indexDocument(SearchDocument document, org.eclipse.core.runtime.IPath indexPath)
.
category
- the category of the index entrykey
- the key of the index entrypublic abstract byte[] getByteContents()
This method must be implemented in subclasses.
Note: some implementation may choose to cache the contents directly on the document for performance reason. However, this could induce scalability issues due to the fact that collections of documents are manipulated throughout the search operation, and cached contents would then consume lots of memory until they are all released at once in the end.
null
if nonepublic abstract char[] getCharContents()
This method must be implemented in subclasses.
Note: some implementation may choose to cache the contents directly on the document for performance reason. However, this could induce scalability issues due to the fact that collections of documents are manipulated throughout the search operation, and cached contents would then consume lots of memory until they are all released at once in the end.
null
if nonepublic abstract String getEncoding()
This method must be implemented in subclasses.
null
if nonepublic final SearchParticipant getParticipant()
public final String getPath()
public void removeAllIndexEntries()
SearchParticipant.indexDocument(SearchDocument document, org.eclipse.core.runtime.IPath indexPath)
.
|
Eclipse JDT Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |