|
Eclipse Platform Release 3.2 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.help.search.LuceneSearchParticipant
org.eclipse.help.search.XMLSearchParticipant
An abstract search participants for adding XML documents to the Lucene search index. Subclass it and implement or override protected methods to handle parsing of the document.
| Nested Class Summary | |
|---|---|
protected static interface |
XMLSearchParticipant.IParsedXMLContent
Class that implements this interface is used to store data obtained during the parsing phase. |
| Constructor Summary | |
|---|---|
XMLSearchParticipant()
|
|
| Method Summary | |
|---|---|
IStatus |
addDocument(ISearchIndex index,
String pluginId,
String name,
URL url,
String id,
org.apache.lucene.document.Document doc)
Adds the document to the search index. |
protected String |
getElementStackPath()
Returns the full path of the current element in the stack separated by the '/' character. |
protected String |
getTopElement()
Returns the name of the element that is currently at the top of the element stack. |
protected void |
handleEndDocument(XMLSearchParticipant.IParsedXMLContent data)
Called when the XML document has been ended. |
protected abstract void |
handleEndElement(String name,
XMLSearchParticipant.IParsedXMLContent data)
Called when the element has been ended. |
protected void |
handleProcessingInstruction(String type,
XMLSearchParticipant.IParsedXMLContent data)
Called when a processing instruction has been encountered. |
protected void |
handleStartDocument(XMLSearchParticipant.IParsedXMLContent data)
Called when the XML document has been started. |
protected abstract void |
handleStartElement(String name,
Attributes attributes,
XMLSearchParticipant.IParsedXMLContent data)
Called when the element has been started. |
protected abstract void |
handleText(String text,
XMLSearchParticipant.IParsedXMLContent data)
Called when element body text has been encountered. |
| Methods inherited from class org.eclipse.help.search.LuceneSearchParticipant |
|---|
addTitle, clear, getAllDocuments, getContributingPlugins, getId, init, open, resolveVariables |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public XMLSearchParticipant()
| Method Detail |
protected abstract void handleStartElement(String name,
Attributes attributes,
XMLSearchParticipant.IParsedXMLContent data)
name - the element nameattributes - the element attributesdata - data the parser content data to update
protected abstract void handleEndElement(String name,
XMLSearchParticipant.IParsedXMLContent data)
name - the name of the XML elementdata - data the parser content data to updateprotected void handleStartDocument(XMLSearchParticipant.IParsedXMLContent data)
data - data the parser content data to updateprotected void handleEndDocument(XMLSearchParticipant.IParsedXMLContent data)
data - data the parser content data to update
protected void handleProcessingInstruction(String type,
XMLSearchParticipant.IParsedXMLContent data)
type - the instruction datadata - the parser content data to update
protected abstract void handleText(String text,
XMLSearchParticipant.IParsedXMLContent data)
text - the body textdata - the parser content data to update
public IStatus addDocument(ISearchIndex index,
String pluginId,
String name,
URL url,
String id,
org.apache.lucene.document.Document doc)
LuceneSearchParticipant
addDocument in class LuceneSearchParticipantindex - the abstract representation of the help index that is currently running. Indexing
known file types in participants that manage documents outside the TOC can be
delegated to the index.pluginId - the plug-in that owns the documentname - the name of the document to indexurl - the url of the document to indexid - the unique id associated with this documentdoc - the Lucene document to add searchable content to
Status.OK.protected String getTopElement()
protected String getElementStackPath()
|
Eclipse Platform Release 3.2 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.