Provides a parser for different document types.
|C#||Visual Basic||Visual C++|
public class ParserProvider
Public Class ParserProvider
public ref class ParserProvider
Creates an instance of the ParserProvider class.
Gets the instance of the Configuration class that holds the settings to be used.
Determines whether the specified(Inherited from is equal to the current . .)
Allows an(Inherited from to attempt to free resources and perform other cleanup operations before the is reclaimed by garbage collection. .)
Serves as a hash function for a particular type.(Inherited from .)
Gets a new parser object for the specified mimeType.
Gets the(Inherited from of the current instance. .)
Creates a shallow copy of the current(Inherited from . .)
Returns a(Inherited from that represents the current . .)
GetParser is used to return a Parser subclass for the specified mimeType. The mimeType is initially identified for a document based on the Response.ContentType returned from the server or from Configuration.fileTypesSettings for documents read using the file-system. Subclassing this class is necessary when adding new document parsers to the build system.
Suppose a new parser is written for your organizations XML files - called XMLDocumentParser. Of course this parser must now be used for these files, to do this ParserProvider is subclassed - called CustomParserProvider. To make the Document class use the new CustomParserProvider one way would be to subclass DocumentIndex and override CreateNewDocument method to return a new Document object with a preset ParserProvider property. This causes CustomParserProvider to be instantiated and passed to each Document object as it is indexed. In CustomParserProvider the GetParser is overridden to return the XMLDocumentParser for the XML mime type.
Assembly: Keyoti2.SearchEngine.Core (Module: Keyoti2.SearchEngine.Core) Version: 2010.4.1.609