ScriptParser Class Reference
[Script]

ScriptParser. More...

List of all members.

Public Member Functions

 ScriptParser ()
 Constructor.
virtual ~ScriptParser ()
 Destructor.
void SetOutputLog (const std::wstring &path) throw (sparksee::gdb::IOException)
 Sets the output log.
void SetErrorLog (const std::wstring &path) throw (sparksee::gdb::IOException)
 Sets the error log.
sparksee::gdb::bool_t Parse (sparksee_core::FileReader *fileReader, sparksee::gdb::bool_t execute)
 Parser the given input stream.
sparksee::gdb::bool_t Parse (const std::wstring &path, sparksee::gdb::bool_t execute, const std::wstring &localeStr) throw (sparksee::gdb::IOException)
 Parses the given input file.

Static Public Member Functions

static void GenerateSchemaScript (const std::wstring &path, sparksee::gdb::Database &db) throw (sparksee::gdb::IOException)
 Writes an script with the schema definition for the given database.


Detailed Description

ScriptParser.

The ScriptParser can create schemas and load data from a set of commands in a sparksee script.

A SPARKSEE script contains an ordered list of commands. ScriptParser will execute each one of them in order. Commands may create schemas, define nodes and edges, and load data into a previous defined SPARKSEE schema.

Check out the 'Scripting' chapter in the SPARKSEE User Manual for a comprehensive explanation on the grammar of the SPARKSEE commands and how they work.

Author:
Sparsity Technologies http://www.sparsity-technologies.com

Member Function Documentation

void ScriptParser::SetOutputLog ( const std::wstring &  path  )  throw (sparksee::gdb::IOException)

Sets the output log.

If not set, output log corresponds to standard output.

Parameters:
path [in] Path of the output log.
Exceptions:
IOException If bad things happen opening the file.

void ScriptParser::SetErrorLog ( const std::wstring &  path  )  throw (sparksee::gdb::IOException)

Sets the error log.

If not set, error log corresponds to standard error output.

Parameters:
path [in] Path of the error log.
Exceptions:
IOException If bad things happen opening the file.

sparksee::gdb::bool_t ScriptParser::Parse ( sparksee_core::FileReader *  fileReader,
sparksee::gdb::bool_t  execute 
)

Parser the given input stream.

Parameters:
fileReader [in] Input file reader.
execute [in] If TRUE the script is executed, if FALSE it is just parsed.
Returns:
TRUE if ok, FALSE in case of error.

sparksee::gdb::bool_t ScriptParser::Parse ( const std::wstring &  path,
sparksee::gdb::bool_t  execute,
const std::wstring &  localeStr 
) throw (sparksee::gdb::IOException)

Parses the given input file.

Parameters:
path [in] Input file path.
execute [in] If TRUE the script is executed, if FALSE it is just parsed.
localeStr [in] The locale string for reading the input file. See CSVReader.
Returns:
TRUE if ok, FALSE in case of error.
Exceptions:
IOException If bad things happen opening the file.

static void ScriptParser::GenerateSchemaScript ( const std::wstring &  path,
sparksee::gdb::Database &  db 
) throw (sparksee::gdb::IOException) [static]

Writes an script with the schema definition for the given database.

Parameters:
path [in] Filename of the script to be writen.
db [in] Database.
Exceptions:
IOException If bad things happen opening or writing the file.


The documentation for this class was generated from the following file:

Generated on Fri Feb 7 13:10:02 2014 for Sparksee by  doxygen 1.5.6