sparksee.EdgeTypeLoader Class Reference

EdgeTypeLoader class. More...

Inheritance diagram for sparksee.EdgeTypeLoader:

Inheritance graph
Collaboration diagram for sparksee.EdgeTypeLoader:

Collaboration graph

List of all members.

Public Member Functions

def set_tail_attribute
 Sets the attribute that will be used to find the tail of the edge.
def set_frequency
 Sets the frequency of listener notification.
def set_log_off
 Truns off all the error reporting.
def set_log_error
 Sets a log error file.
def set_head_attribute
 Sets the attribute that will be used to find the head of the edge.
def set_type
 Sets the type to be loaded.
def run_two_phases
 See the TypeLoader class RunTwoPhases method.
def set_tail_position
 Sets the position of the tail attribute in the source data.
def set_row_reader
 Sets the input data source.
def set_attribute_positions
 Sets the list of attribute positions.
def register
 Registers a new listener.
def set_locale
 Sets the locale that will be used to read the data.
def run
 See the TypeLoader class Run method.
def set_graph
 Sets the graph where the data will be loaded.
def __init__
 Creates a new instance.
def run_n_phases
 See the TypeLoader class RunNPhases method.
def __init__
 Creates a new instance.
def set_timestamp_format
 Sets a specific timestamp format.
def set_head_position
 Sets the position of the head attribute in the source data.
def set_attributes
 Sets the list of Attributes.


Detailed Description

EdgeTypeLoader class.

Specific TypeLoader implementation for edge 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

Member Function Documentation

def sparksee.EdgeTypeLoader.set_tail_attribute (   self,
  attr 
)

Sets the attribute that will be used to find the tail of the edge.

This method is protected because only the Edge loaders should have it.

Parameters:
attr [in] Tail Attribute

def sparksee.EdgeTypeLoader.set_frequency (   self,
  freq 
)

Sets the frequency of listener notification.

Parameters:
freq [in] Frequency in number of rows managed to notify progress to all listeners

Reimplemented from sparksee.TypeLoader.

def sparksee.EdgeTypeLoader.set_log_off (   self  ) 

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.

Reimplemented from sparksee.TypeLoader.

def sparksee.EdgeTypeLoader.set_log_error (   self,
  path 
)

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:
IOError If bad things happen opening the file.

Reimplemented from sparksee.TypeLoader.

def sparksee.EdgeTypeLoader.set_head_attribute (   self,
  attr 
)

Sets the attribute that will be used to find the head of the edge.

This method is protected because only the Edge loaders should have it.

Parameters:
attr [in] Head Attribute

def sparksee.EdgeTypeLoader.set_type (   self,
  type 
)

Sets the type to be loaded.

Parameters:
type [in] Type identifier.

Reimplemented from sparksee.TypeLoader.

def sparksee.EdgeTypeLoader.run_two_phases (   self  ) 

See the TypeLoader class RunTwoPhases method.

Exceptions:
IOError null
RuntimeError null

Reimplemented from sparksee.TypeLoader.

def sparksee.EdgeTypeLoader.set_tail_position (   self,
  pos 
)

Sets the position of the tail attribute in the source data.

This method is protected because only the Edge loaders should have it.

Parameters:
pos [in] Tail position

def sparksee.EdgeTypeLoader.set_row_reader (   self,
  rr 
)

Sets the input data source.

Parameters:
rr [in] Input RowReader.

Reimplemented from sparksee.TypeLoader.

def sparksee.EdgeTypeLoader.set_attribute_positions (   self,
  attrsPos 
)

Sets the list of attribute positions.

Parameters:
attrsPos [in] Attribute positions (column index >=0).

Reimplemented from sparksee.TypeLoader.

def sparksee.EdgeTypeLoader.register (   self,
  tel 
)

Registers a new listener.

Parameters:
tel TypeLoaderListener to be registered.

Reimplemented from sparksee.TypeLoader.

def sparksee.EdgeTypeLoader.set_locale (   self,
  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.

Reimplemented from sparksee.TypeLoader.

def sparksee.EdgeTypeLoader.run (   self  ) 

See the TypeLoader class Run method.

Exceptions:
IOError null
RuntimeError null

Reimplemented from sparksee.TypeLoader.

def sparksee.EdgeTypeLoader.set_graph (   self,
  graph 
)

Sets the graph where the data will be loaded.

Parameters:
graph [in] Graph.

Reimplemented from sparksee.TypeLoader.

def sparksee.EdgeTypeLoader.__init__ (   self,
  rowReader,
  graph,
  type,
  attrs,
  attrsPos,
  hPos,
  tPos,
  hAttr,
  tAttr 
)

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). to all listeners.
hPos [in] The position (index column) for the head value.
tPos [in] The position (index column) for the tail value.
hAttr [in] The attribute identifier for the head.
tAttr [in] The attribute identifier for the tail.

def sparksee.EdgeTypeLoader.run_n_phases (   self,
  partitions 
)

See the TypeLoader class RunNPhases method.

Parameters:
partitions null
Exceptions:
IOError null
RuntimeError null

Reimplemented from sparksee.TypeLoader.

def sparksee.EdgeTypeLoader.set_timestamp_format (   self,
  timestampFormat 
)

Sets a specific timestamp format.

Parameters:
timestampFormat [in] A string with the timestamp format definition.

Reimplemented from sparksee.TypeLoader.

def sparksee.EdgeTypeLoader.set_head_position (   self,
  pos 
)

Sets the position of the head attribute in the source data.

This method is protected because only the Edge loaders should have it.

Parameters:
pos [in] Head position

def sparksee.EdgeTypeLoader.set_attributes (   self,
  attrs 
)

Sets the list of Attributes.

Parameters:
attrs [in] Attribute identifiers to be loaded

Reimplemented from sparksee.TypeLoader.


Generated on Tue Jun 2 16:12:26 2015 for SparkseePython by  doxygen 1.5.6