DexNet 4.7.0
Public Member Functions
com::sparsity::dex::io::EdgeTypeLoader Class Reference

EdgeTypeLoader class. More...

Inheritance diagram for com::sparsity::dex::io::EdgeTypeLoader:
Inheritance graph
Collaboration diagram for com::sparsity::dex::io::EdgeTypeLoader:
Collaboration graph

List of all members.

Public Member Functions

 EdgeTypeLoader (com.sparsity.dex.io.RowReader rr, com.sparsity.dex.gdb.Graph g, int t, com.sparsity.dex.gdb.AttributeList attrs, com.sparsity.dex.gdb.Int32List attrsPos, int hPos, int tPos, int hAttr, int tAttr)
 Creates a new instance.
void SetLogOff ()
 Truns off all the error reporting.
void SetTailPosition (int pos)
 Sets the position of the tail attribute in the source data.
void SetLogError (System.String path) throws System.IO.IOException
 Sets a log error file.
void SetAttributes (com.sparsity.dex.gdb.AttributeList attrs)
 Sets the list of Attributes.
void RunTwoPhases () throws System.IO.IOException, System.ApplicationException
 See TypeLoader::RunTwoPhases.
void SetHeadAttribute (int attr)
 Sets the attribute that will be used to find the head of the edge.
void SetRowReader (com.sparsity.dex.io.RowReader rr)
 Sets the input data source.
void RunNPhases (int partitions) throws System.IO.IOException, System.ApplicationException
 See TypeLoader::RunNPhases.
void Register (com.sparsity.dex.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 TypeLoader::Run.
void SetAttributePositions (com.sparsity.dex.gdb.Int32List attrsPos)
 Sets the list of attribute positions.
void SetFrequency (int freq)
 Sets the frequency of listener notification.
void SetGraph (com.sparsity.dex.gdb.Graph g)
 Sets the graph where the data will be loaded.
 EdgeTypeLoader ()
 Creates a new instance.
void SetTimestampFormat (System.String timestampFormat)
 Sets a specific timestamp format.
void SetType (int t)
 Sets the type to be loaded.
void SetTailAttribute (int attr)
 Sets the attribute that will be used to find the tail of the edge.
void SetHeadPosition (int pos)
 Sets the position of the head attribute in the source data.

Detailed Description

EdgeTypeLoader class.

Specific TypeLoader implementation for edge types.

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

Constructor & Destructor Documentation

com::sparsity::dex::io::EdgeTypeLoader::EdgeTypeLoader ( com.sparsity.dex.io.RowReader  rr,
com.sparsity.dex.gdb.Graph  g,
int  t,
com.sparsity.dex.gdb.AttributeList  attrs,
com.sparsity.dex.gdb.Int32List  attrsPos,
int  hPos,
int  tPos,
int  hAttr,
int  tAttr 
)

Creates a new instance.

Parameters:
rr[in] Input RowReader.
g[in] Graph.
t[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.

Member Function Documentation

void com::sparsity::dex::io::EdgeTypeLoader::Register ( com.sparsity.dex.io.TypeLoaderListener  tel)

Registers a new listener.

Parameters:
telTypeLoaderListener to be registered.

Reimplemented from com::sparsity::dex::io::TypeLoader.

void com::sparsity::dex::io::EdgeTypeLoader::Run ( ) throws System.IO.IOException, System.ApplicationException

See TypeLoader::Run.

Exceptions:
System.IO.IOExceptionnull
System.ApplicationExceptionnull

Reimplemented from com::sparsity::dex::io::TypeLoader.

void com::sparsity::dex::io::EdgeTypeLoader::RunNPhases ( int  partitions) throws System.IO.IOException, System.ApplicationException

See TypeLoader::RunNPhases.

Parameters:
partitionsnull
Exceptions:
System.IO.IOExceptionnull
System.ApplicationExceptionnull

Reimplemented from com::sparsity::dex::io::TypeLoader.

void com::sparsity::dex::io::EdgeTypeLoader::RunTwoPhases ( ) throws System.IO.IOException, System.ApplicationException

See TypeLoader::RunTwoPhases.

Exceptions:
System.IO.IOExceptionnull
System.ApplicationExceptionnull

Reimplemented from com::sparsity::dex::io::TypeLoader.

void com::sparsity::dex::io::EdgeTypeLoader::SetAttributePositions ( com.sparsity.dex.gdb.Int32List  attrsPos)

Sets the list of attribute positions.

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

Parameters:
attrsPosnull

Reimplemented from com::sparsity::dex::io::TypeLoader.

void com::sparsity::dex::io::EdgeTypeLoader::SetAttributes ( com.sparsity.dex.gdb.AttributeList  attrs)

Sets the list of Attributes.

Parameters:
attrs[in] Attribute identifiers to be loaded

Reimplemented from com::sparsity::dex::io::TypeLoader.

void com::sparsity::dex::io::EdgeTypeLoader::SetFrequency ( int  freq)

Sets the frequency of listener notification.

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

Parameters:
freqnull

Reimplemented from com::sparsity::dex::io::TypeLoader.

void com::sparsity::dex::io::EdgeTypeLoader::SetGraph ( com.sparsity.dex.gdb.Graph  g)

Sets the graph where the data will be loaded.

Parameters:
g[in] Graph.

Reimplemented from com::sparsity::dex::io::TypeLoader.

void com::sparsity::dex::io::EdgeTypeLoader::SetHeadAttribute ( int  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
void com::sparsity::dex::io::EdgeTypeLoader::SetHeadPosition ( int  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
void com::sparsity::dex::io::EdgeTypeLoader::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.

Reimplemented from com::sparsity::dex::io::TypeLoader.

void com::sparsity::dex::io::EdgeTypeLoader::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:
pathnull
Exceptions:
System.IO.IOExceptionIf bad things happen opening the file.

Reimplemented from com::sparsity::dex::io::TypeLoader.

void com::sparsity::dex::io::EdgeTypeLoader::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.

Reimplemented from com::sparsity::dex::io::TypeLoader.

void com::sparsity::dex::io::EdgeTypeLoader::SetRowReader ( com.sparsity.dex.io.RowReader  rr)

Sets the input data source.

Parameters:
rr[in] Input RowReader.

Reimplemented from com::sparsity::dex::io::TypeLoader.

void com::sparsity::dex::io::EdgeTypeLoader::SetTailAttribute ( int  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
void com::sparsity::dex::io::EdgeTypeLoader::SetTailPosition ( int  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
void com::sparsity::dex::io::EdgeTypeLoader::SetTimestampFormat ( System.String  timestampFormat)

Sets a specific timestamp format.

Parameters:
timestampFormatnull

Reimplemented from com::sparsity::dex::io::TypeLoader.

void com::sparsity::dex::io::EdgeTypeLoader::SetType ( int  t)

Sets the type to be loaded.

Parameters:
t[in] Type identifier.

Reimplemented from com::sparsity::dex::io::TypeLoader.