FirteX-高性能全文索引和检索平台API Documentation |
00001 // 00002 // Copyright(C) 2005--2006 Institute of Computing Tech, Chinese Academy of Sciences. 00003 // All rights reserved. 00004 // This file is part of FirteX (www.firtex.org) 00005 // 00006 // Use of the FirteX is subject to the terms of the software license set forth in 00007 // the LICENSE file included with this software, and also available at 00008 // http://www.firtex.org/license.html 00009 // 00010 // Author : 郭瑞杰(GuoRuijie) 00011 // Email : ruijieguo@software.ict.ac.cn,ruijieguo@gmail.com 00012 // Created : 2005/11/20 00013 // 00014 #ifndef __SIMPLEPARSER_H 00015 #define __SIMPLEPARSER_H 00016 00017 #include "Parser.h" 00018 #include "../document/Document.h" 00019 #include "../utility/FileReader.h" 00020 00021 using namespace firtex::document; 00022 using namespace firtex::utility; 00023 00024 namespace firtex 00025 { 00026 namespace parser 00027 { 00028 class CPlainParser : public CParser 00029 { 00030 public: 00031 static const tstring category; 00032 static const tstring identifier; 00033 public: 00034 CPlainParser(); 00035 CPlainParser(const tchar* contentFieldName); 00036 virtual~CPlainParser(); 00037 public: 00038 tstring getFileType(){return _T("txt");} 00039 void close(); 00040 protected: 00041 bool parseInternal(CIndexParameter* pArg); 00042 void defineSchema(CDocumentSchema* pSchema); 00043 protected: 00044 CFileReader* m_reader; 00045 schemaid_t m_contentsId; 00046 CFXString m_contentField; 00047 }; 00048 } 00049 } 00050 00051 00052 #endif
http://www.firtex.org http://www.sourceforge.net/projects/firtex