public abstract class XMLSearchParticipant extends LuceneSearchParticipant
Modifier and Type | Class and Description |
---|---|
protected static interface |
XMLSearchParticipant.IParsedXMLContent
Class that implements this interface is used to store data obtained during the parsing phase.
|
Constructor and Description |
---|
XMLSearchParticipant() |
Modifier and Type | Method and Description |
---|---|
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.
|
addTitle, clear, getAllDocuments, getContributingPlugins, getId, init, open, resolveVariables
protected abstract void handleStartElement(String name, Attributes attributes, XMLSearchParticipant.IParsedXMLContent data)
name
- the element nameattributes
- the element attributesdata
- data the parser content data to updateprotected 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 updateprotected void handleProcessingInstruction(String type, XMLSearchParticipant.IParsedXMLContent data)
type
- the instruction datadata
- the parser content data to updateprotected abstract void handleText(String text, XMLSearchParticipant.IParsedXMLContent data)
text
- the body textdata
- the parser content data to updatepublic IStatus addDocument(ISearchIndex index, String pluginId, String name, URL url, String id, org.apache.lucene.document.Document doc)
LuceneSearchParticipant
addDocument
in class LuceneSearchParticipant
index
- 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 toStatus.OK
.protected String getTopElement()
protected String getElementStackPath()
Guidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.