SparkseeNet  6.0.2
Public Member Functions | List of all members
com.sparsity.sparksee.io.NodeTypeLoader Class Reference

NodeTypeLoader class. More...

Inheritance diagram for com.sparsity.sparksee.io.NodeTypeLoader:
Inheritance graph
Collaboration diagram for com.sparsity.sparksee.io.NodeTypeLoader:
Collaboration graph

Public Member Functions

void SetFrequency (int freq)
 Sets the frequency of listener notification.
 
void SetLogOff ()
 Truns off all the error reporting.
 
void SetLogError (System.String path) throws System.IO.IOException
 Sets a log error file.
 
void SetType (int type)
 Sets the type to be loaded.
 
 NodeTypeLoader (com.sparsity.sparksee.io.RowReader rowReader, com.sparsity.sparksee.gdb.Graph graph, int type, com.sparsity.sparksee.gdb.AttributeList attrs, com.sparsity.sparksee.gdb.Int32List attrsPos)
 Creates a new instance.
 
void RunTwoPhases () throws System.IO.IOException, System.ApplicationException
 See the TypeLoader class RunTwoPhases method.
 
void SetRowReader (com.sparsity.sparksee.io.RowReader rr)
 Sets the input data source.
 
 NodeTypeLoader ()
 Creates a new instance.
 
void SetAttributePositions (com.sparsity.sparksee.gdb.Int32List attrsPos)
 Sets the list of attribute positions.
 
void Register (com.sparsity.sparksee.io.TypeLoaderListener tel)
 Registers a new listener.
 
void SetLocale (System.String localeStr)
 Sets the locale that will be used to read the data.
 
void Run () throws System.IO.IOException, System.ApplicationException
 See the TypeLoader class Run method.
 
void SetGraph (com.sparsity.sparksee.gdb.Graph graph)
 Sets the graph where the data will be loaded.
 
void RunNPhases (int partitions) throws System.IO.IOException, System.ApplicationException
 See the TypeLoader class RunNPhases method.
 
void SetTimestampFormat (System.String timestampFormat)
 Sets a specific timestamp format.
 
void SetAttributes (com.sparsity.sparksee.gdb.AttributeList attrs)
 Sets the list of Attributes.
 

Detailed Description

NodeTypeLoader class.

Specific TypeLoader implementation for node types.

Check out the 'Data import' section in the SPARKSEE User Manual for more details on this.

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

Constructor & Destructor Documentation

com.sparsity.sparksee.io.NodeTypeLoader.NodeTypeLoader ( com.sparsity.sparksee.io.RowReader  rowReader,
com.sparsity.sparksee.gdb.Graph  graph,
int  type,
com.sparsity.sparksee.gdb.AttributeList  attrs,
com.sparsity.sparksee.gdb.Int32List  attrsPos 
)

Creates a new instance.

Parameters
rowReader[in] Input RowReader.
graph[in] Graph.
type[in] Type identifier.
attrs[in] Attribute identifiers to be loaded.
attrsPos[in] Attribute positions (column index >=0).

Member Function Documentation

void com.sparsity.sparksee.io.NodeTypeLoader.Register ( com.sparsity.sparksee.io.TypeLoaderListener  tel)

Registers a new listener.

Parameters
telTypeLoaderListener to be registered.
void com.sparsity.sparksee.io.NodeTypeLoader.Run ( ) throws System.IO.IOException, System.ApplicationException

See the TypeLoader class Run method.

Exceptions
System.IO.IOExceptionnull
System.ApplicationExceptionnull
void com.sparsity.sparksee.io.NodeTypeLoader.RunNPhases ( int  partitions) throws System.IO.IOException, System.ApplicationException

See the TypeLoader class RunNPhases method.

Parameters
partitionsnull
Exceptions
System.IO.IOExceptionnull
System.ApplicationExceptionnull
void com.sparsity.sparksee.io.NodeTypeLoader.RunTwoPhases ( ) throws System.IO.IOException, System.ApplicationException

See the TypeLoader class RunTwoPhases method.

Exceptions
System.IO.IOExceptionnull
System.ApplicationExceptionnull
void com.sparsity.sparksee.io.NodeTypeLoader.SetAttributePositions ( com.sparsity.sparksee.gdb.Int32List  attrsPos)

Sets the list of attribute positions.

Parameters
attrsPos[in] Attribute positions (column index >=0).
void com.sparsity.sparksee.io.NodeTypeLoader.SetAttributes ( com.sparsity.sparksee.gdb.AttributeList  attrs)

Sets the list of Attributes.

Parameters
attrs[in] Attribute identifiers to be loaded
void com.sparsity.sparksee.io.NodeTypeLoader.SetFrequency ( int  freq)

Sets the frequency of listener notification.

Parameters
freq[in] Frequency in number of rows managed to notify progress to all listeners
void com.sparsity.sparksee.io.NodeTypeLoader.SetGraph ( com.sparsity.sparksee.gdb.Graph  graph)

Sets the graph where the data will be loaded.

Parameters
graph[in] Graph.
void com.sparsity.sparksee.io.NodeTypeLoader.SetLocale ( System.String  localeStr)

Sets the locale that will be used to read the data.

It should match the locale used in the rowreader.

Parameters
localeStr[in] The locale string for the read data. See CSVReader.
void com.sparsity.sparksee.io.NodeTypeLoader.SetLogError ( System.String  path) throws System.IO.IOException

Sets a log error file.

By default errors are thrown as a exception and the load process ends. If a log file is set, errors are logged there and the load process does not stop.

Parameters
path[in] The path to the error log file.
Exceptions
System.IO.IOExceptionIf bad things happen opening the file.
void com.sparsity.sparksee.io.NodeTypeLoader.SetLogOff ( )

Truns off all the error reporting.

The log file will not be created and no exceptions for invalid data will be thrown. If you just want to turn off the logs, but abort at the first error what you should do is not call this method and not set a logError file.

void com.sparsity.sparksee.io.NodeTypeLoader.SetRowReader ( com.sparsity.sparksee.io.RowReader  rr)

Sets the input data source.

Parameters
rr[in] Input RowReader.
void com.sparsity.sparksee.io.NodeTypeLoader.SetTimestampFormat ( System.String  timestampFormat)

Sets a specific timestamp format.

Parameters
timestampFormat[in] A string with the timestamp format definition.
void com.sparsity.sparksee.io.NodeTypeLoader.SetType ( int  type)

Sets the type to be loaded.

Parameters
type[in] Type identifier.