Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

FileClassEnvironmentFactory.hpp

Go to the documentation of this file.
00001 /*==========================================================================
00002  * Copyright (c) 2003-2004 University of Massachusetts.  All Rights Reserved.
00003  *
00004  * Use of the Lemur Toolkit for Language Modeling and Information Retrieval
00005  * is subject to the terms of the software license set forth in the LICENSE
00006  * file included with this software, and also available at
00007  * http://www.lemurproject.org/license.html
00008  *
00009  *==========================================================================
00010  */
00011 
00012 //
00013 // FileClassEnvironmentFactory
00014 //
00015 // 23 August 2004 -- tds
00016 //
00017 
00018 #ifndef INDRI_FILECLASSENVIRONMENTFACTORY_HPP
00019 #define INDRI_FILECLASSENVIRONMENTFACTORY_HPP
00020 
00021 #include "indri/FileClassEnvironment.hpp"
00022 #include <string>
00023 /*#include "indri/HashTable.hpp"*/
00024 namespace indri
00025 {
00026   namespace parse
00027   {
00028     
00029     class FileClassEnvironmentFactory {
00030 
00031     public:
00034       struct Specification {
00036         std::string name;
00038         std::string parser;
00040         std::string tokenizer;
00042         std::string iterator;
00044         std::string startDocTag;
00046         std::string endDocTag;
00048         std::string endMetadataTag;
00051         std::vector<std::string> include;
00053         std::vector<std::string> exclude;
00055         std::vector<std::string> index;
00057         std::vector<std::string> metadata;
00060         std::map<indri::parse::ConflationPattern*,std::string> conflations;
00061       };
00062 
00063       ~FileClassEnvironmentFactory();
00070       FileClassEnvironment* get( const std::string& name );
00079       FileClassEnvironmentFactory::Specification* getFileClassSpec( const std::string& name );
00080 
00083       void addFileClass( const FileClassEnvironmentFactory::Specification &spec);
00084 
00085       // deprecate & remove.
00101       void addFileClass( const std::string& name, 
00102                          const std::string& iterator,
00103                          const std::string& parser,
00104                          const std::string& tokenizer,
00105                          const std::string& startDocTag,
00106                          const std::string& endDocTag,
00107                          const std::string& endMetadataTag,
00108                          const std::vector<std::string>& include,
00109                          const std::vector<std::string>& exclude,
00110                          const std::vector<std::string>& index,
00111                          const std::vector<std::string>& metadata, 
00112                          const std::map<indri::parse::ConflationPattern*,std::string>& conflations );
00113     private:
00114       std::map<std::string, struct FileClassEnvironmentFactory::Specification*> _userTable;
00115 
00116     };
00117   }
00118 }
00119 
00120 #endif // INDRI_FILECLASSENVIRONMENTFACTORY_HPP
00121 

Generated on Tue Jun 15 11:02:54 2010 for Lemur by doxygen 1.3.4