31 lines
724 B
C++
31 lines
724 B
C++
#ifndef gstore_parser_RDFParser
|
|
#define gstore_parser_RDFParser
|
|
#include "TurtleParser.h"
|
|
#include "../Triple/Triple.h"
|
|
#include <iostream>
|
|
#include <fstream>
|
|
#include <sstream>
|
|
#include <cstring>
|
|
|
|
using namespace std;
|
|
|
|
class RDFParser
|
|
{
|
|
private:
|
|
stringstream _sin;
|
|
TurtleParser _TurtleParser;
|
|
|
|
public:
|
|
static const int TRIPLE_NUM_PER_GROUP = 10 * 1000 * 1000;
|
|
|
|
//for parseString
|
|
RDFParser():_TurtleParser(_sin){}
|
|
|
|
//for parseFile
|
|
RDFParser(ifstream& _fin):_TurtleParser(_fin){}
|
|
|
|
string parseFile(TripleWithObjType* _triple_array, int& _triple_num);
|
|
string parseString(string _str, TripleWithObjType* _triple_array, int& _triple_num);
|
|
};
|
|
#endif
|