SparkseeNet
6.0.2
|
EdgeTypeLoader class. More...
Public Member Functions | |
void | SetTailAttribute (int attr) |
Sets the attribute that will be used to find the tail of the edge. | |
void | SetFrequency (int freq) |
Sets the frequency of listener notification. | |
void | SetLogOff () |
Truns off all the error reporting. | |
void | SetTailMEP (com.sparsity.sparksee.gdb.MissingEndpoint mep) |
Sets the flag to create missing tail nodes when loading nodes or edges. | |
void | SetHeadMEP (com.sparsity.sparksee.gdb.MissingEndpoint mep) |
Sets the flag to create missing head nodes when loading nodes or edges. | |
void | SetLogError (System.String path) throws System.IO.IOException |
Sets a log error file. | |
void | SetHeadAttribute (int attr) |
Sets the attribute that will be used to find the head of the edge. | |
void | SetType (int type) |
Sets the type to be loaded. | |
void | RunTwoPhases () throws System.IO.IOException, System.ApplicationException |
See the TypeLoader class RunTwoPhases method. | |
void | SetTailPosition (int pos) |
Sets the position of the tail attribute in the source data. | |
void | SetRowReader (com.sparsity.sparksee.io.RowReader rr) |
Sets the input data source. | |
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. | |
EdgeTypeLoader (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, int hPos, int tPos, int hAttr, int tAttr, com.sparsity.sparksee.gdb.MissingEndpoint headMEP, com.sparsity.sparksee.gdb.MissingEndpoint tailMEP) | |
Creates a new instance. | |
void | RunNPhases (int partitions) throws System.IO.IOException, System.ApplicationException |
See the TypeLoader class RunNPhases method. | |
EdgeTypeLoader () | |
Creates a new instance. | |
void | SetTimestampFormat (System.String timestampFormat) |
Sets a specific timestamp format. | |
void | SetHeadPosition (int pos) |
Sets the position of the head attribute in the source data. | |
void | SetAttributes (com.sparsity.sparksee.gdb.AttributeList attrs) |
Sets the list of Attributes. | |
EdgeTypeLoader class.
Specific TypeLoader implementation for edge types.
Check out the 'Data import' section in the SPARKSEE User Manual for more details on this.
com.sparsity.sparksee.io.EdgeTypeLoader.EdgeTypeLoader | ( | 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, | ||
int | hPos, | ||
int | tPos, | ||
int | hAttr, | ||
int | tAttr, | ||
com.sparsity.sparksee.gdb.MissingEndpoint | headMEP, | ||
com.sparsity.sparksee.gdb.MissingEndpoint | tailMEP | ||
) |
Creates a new instance.
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. |
headMEP | [in] The MissingEndpoint policy for the head nodes |
tailMEP | [in] The MissingEndpoint policy for the tail nodes |
void com.sparsity.sparksee.io.EdgeTypeLoader.Register | ( | com.sparsity.sparksee.io.TypeLoaderListener | tel | ) |
Registers a new listener.
tel | TypeLoaderListener to be registered. |
void com.sparsity.sparksee.io.EdgeTypeLoader.Run | ( | ) | throws System.IO.IOException, System.ApplicationException |
See the TypeLoader class Run method.
System.IO.IOException | null |
System.ApplicationException | null |
void com.sparsity.sparksee.io.EdgeTypeLoader.RunNPhases | ( | int | partitions | ) | throws System.IO.IOException, System.ApplicationException |
See the TypeLoader class RunNPhases method.
partitions | null |
System.IO.IOException | null |
System.ApplicationException | null |
void com.sparsity.sparksee.io.EdgeTypeLoader.RunTwoPhases | ( | ) | throws System.IO.IOException, System.ApplicationException |
See the TypeLoader class RunTwoPhases method.
System.IO.IOException | null |
System.ApplicationException | null |
void com.sparsity.sparksee.io.EdgeTypeLoader.SetAttributePositions | ( | com.sparsity.sparksee.gdb.Int32List | attrsPos | ) |
Sets the list of attribute positions.
attrsPos | [in] Attribute positions (column index >=0). |
void com.sparsity.sparksee.io.EdgeTypeLoader.SetAttributes | ( | com.sparsity.sparksee.gdb.AttributeList | attrs | ) |
Sets the list of Attributes.
attrs | [in] Attribute identifiers to be loaded |
void com.sparsity.sparksee.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 |
void com.sparsity.sparksee.io.EdgeTypeLoader.SetGraph | ( | com.sparsity.sparksee.gdb.Graph | graph | ) |
Sets the graph where the data will be loaded.
graph | [in] Graph. |
void com.sparsity.sparksee.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.
attr | [in] Head Attribute |
void com.sparsity.sparksee.io.EdgeTypeLoader.SetHeadMEP | ( | com.sparsity.sparksee.gdb.MissingEndpoint | mep | ) |
Sets the flag to create missing head nodes when loading nodes or edges.
flagTrue if the nodes need to be created. False otherwise
mep | null |
void com.sparsity.sparksee.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.
pos | [in] Head position |
void com.sparsity.sparksee.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.
localeStr | [in] The locale string for the read data. See CSVReader. |
void com.sparsity.sparksee.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.
path | [in] The path to the error log file. |
System.IO.IOException | If bad things happen opening the file. |
void com.sparsity.sparksee.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.
void com.sparsity.sparksee.io.EdgeTypeLoader.SetRowReader | ( | com.sparsity.sparksee.io.RowReader | rr | ) |
Sets the input data source.
rr | [in] Input RowReader. |
void com.sparsity.sparksee.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.
attr | [in] Tail Attribute |
void com.sparsity.sparksee.io.EdgeTypeLoader.SetTailMEP | ( | com.sparsity.sparksee.gdb.MissingEndpoint | mep | ) |
Sets the flag to create missing tail nodes when loading nodes or edges.
flagTrue if the nodes need to be created. False otherwise
mep | null |
void com.sparsity.sparksee.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.
pos | [in] Tail position |
void com.sparsity.sparksee.io.EdgeTypeLoader.SetTimestampFormat | ( | System.String | timestampFormat | ) |
Sets a specific timestamp format.
timestampFormat | [in] A string with the timestamp format definition. |
void com.sparsity.sparksee.io.EdgeTypeLoader.SetType | ( | int | type | ) |
Sets the type to be loaded.
type | [in] Type identifier. |