SparkseeNet  5.2.0
Public Member Functions | Static Public Member Functions | List of all members
com.sparsity.sparksee.script.ScriptParser Class Reference

ScriptParser. More...

Public Member Functions

bool Parse (System.String path, bool execute, System.String localeStr) throws System.IO.IOException
 Parses the given input file. More...
 
void SetErrorLog (System.String path) throws System.IO.IOException
 Sets the error log. More...
 
 ScriptParser ()
 Constructor.
 
void SetOutputLog (System.String path) throws System.IO.IOException
 Sets the output log. More...
 

Static Public Member Functions

static void Main ()
 Executes ScriptParser for the given file path. More...
 
static void GenerateSchemaScript (System.String path, com.sparsity.sparksee.gdb.Database db) throws System.IO.IOException
 Writes an script with the schema definition for the given database. More...
 

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

static void com.sparsity.sparksee.script.ScriptParser.GenerateSchemaScript ( System.String  path,
com.sparsity.sparksee.gdb.Database  db 
) throws System.IO.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
System.IO.IOExceptionIf bad things happen opening or writing the file.
static void com.sparsity.sparksee.script.ScriptParser.Main ( )
static

Executes ScriptParser for the given file path.

One argument is required, a file path which contains the script to be parsed.

A second argument may be given, a boolean to set if the script must be executed or just parsed.If not given, the script will be executed.

bool com.sparsity.sparksee.script.ScriptParser.Parse ( System.String  path,
bool  execute,
System.String  localeStr 
) throws System.IO.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
System.IO.IOExceptionIf bad things happen opening the file.
void com.sparsity.sparksee.script.ScriptParser.SetErrorLog ( System.String  path) throws System.IO.IOException

Sets the error log.

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

Parameters
path[in] Path of the error log.
Exceptions
System.IO.IOExceptionIf bad things happen opening the file.
void com.sparsity.sparksee.script.ScriptParser.SetOutputLog ( System.String  path) throws System.IO.IOException

Sets the output log.

If not set, output log corresponds to standard output.

Parameters
path[in] Path of the output log.
Exceptions
System.IO.IOExceptionIf bad things happen opening the file.