public class CSVImport extends Object
| Constructor and Description |
|---|
CSVImport() |
| Modifier and Type | Method and Description |
|---|---|
static void |
analyzeFile(Object file,
org.stjs.javascript.functions.Callback1<Object> success,
org.stjs.javascript.functions.Callback1<Object> failure)
Analyzes a CSV File to return the column names to the user for specifying
which columns contain which data.
|
static void |
importCompetencies(Object file,
String serverUrl,
org.cassproject.ebac.identity.EcIdentity owner,
Integer nameIndex,
Integer descriptionIndex,
Integer scopeIndex,
Integer idIndex,
Object relations,
Integer sourceIndex,
Integer relationTypeIndex,
Integer destIndex,
org.stjs.javascript.functions.Callback2<org.stjs.javascript.Array<EcCompetency>,org.stjs.javascript.Array<EcAlignment>> success,
org.stjs.javascript.functions.Callback1<Object> failure,
org.stjs.javascript.functions.Callback1<Object> incremental,
Boolean uniquify,
org.cassproject.ebac.repository.EcRepository repo)
Method to create competencies (and relationships if the parameters are passed in)
based on a CSV file and references to which columns correspond to which pieces
of data.
|
static void |
importData(Object file,
String serverUrl,
org.cassproject.ebac.identity.EcIdentity owner,
org.stjs.javascript.functions.Callback1<org.stjs.javascript.Array<org.cassproject.schema.general.EcRemoteLinkedData>> success,
org.stjs.javascript.functions.Callback1<Object> failure,
org.stjs.javascript.functions.Callback1<Object> incremental,
Integer idIndex,
String assignedContext,
String assignedType,
org.cassproject.ebac.repository.EcRepository repo) |
static void |
saveCompetency(EcCompetency comp,
org.stjs.javascript.functions.Callback1<Object> incremental,
org.stjs.javascript.Array<EcCompetency> competencies,
Object relations,
org.stjs.javascript.functions.Callback2<org.stjs.javascript.Array<EcCompetency>,org.stjs.javascript.Array<EcAlignment>> success,
String serverUrl,
org.cassproject.ebac.identity.EcIdentity owner,
Integer sourceIndex,
Integer relationTypeIndex,
Integer destIndex,
org.stjs.javascript.functions.Callback1<Object> failure,
org.cassproject.ebac.repository.EcRepository repo) |
static void |
saveRelation(EcAlignment relation,
org.stjs.javascript.functions.Callback1<Object> incremental,
org.stjs.javascript.Array<EcAlignment> relations,
org.stjs.javascript.functions.Callback2<org.stjs.javascript.Array<EcCompetency>,org.stjs.javascript.Array<EcAlignment>> success,
org.stjs.javascript.Array<EcCompetency> competencies,
org.stjs.javascript.functions.Callback1<Object> failure,
org.cassproject.ebac.repository.EcRepository repo) |
static void |
saveTransformedData(org.cassproject.schema.general.EcRemoteLinkedData data,
org.stjs.javascript.functions.Callback1<Object> incremental,
org.stjs.javascript.Array<org.cassproject.schema.general.EcRemoteLinkedData> objects,
org.stjs.javascript.functions.Callback1<org.stjs.javascript.Array<org.cassproject.schema.general.EcRemoteLinkedData>> success,
org.stjs.javascript.functions.Callback1<Object> failure,
org.cassproject.ebac.repository.EcRepository repo) |
static void |
transformReferences(Object data) |
public static void analyzeFile(Object file, org.stjs.javascript.functions.Callback1<Object> success, org.stjs.javascript.functions.Callback1<Object> failure)
{Object} - file
CSV file to be analyzed{Callback1 - success
Callback triggered after successfully analyzing the CSV file{Callback1 - [failure]
Callback triggered if there is an error analyzing the CSV filepublic static void importCompetencies(Object file, String serverUrl, org.cassproject.ebac.identity.EcIdentity owner, Integer nameIndex, Integer descriptionIndex, Integer scopeIndex, Integer idIndex, Object relations, Integer sourceIndex, Integer relationTypeIndex, Integer destIndex, org.stjs.javascript.functions.Callback2<org.stjs.javascript.Array<EcCompetency>,org.stjs.javascript.Array<EcAlignment>> success, org.stjs.javascript.functions.Callback1<Object> failure, org.stjs.javascript.functions.Callback1<Object> incremental, Boolean uniquify, org.cassproject.ebac.repository.EcRepository repo)
{Object} - file
CSV File to import competencies from{String} - serverUrl
URL Prefix for the created competencies (and relationships?){EcIdentity} - owner
EcIdentity that will own the created competencies (and relationships?){int} - nameIndex
Index of the column that contains the competency names{int} - descriptionIndex
Index of the column that contains the competency descriptions{int} - scopeIndex
Index of the column that contains the competency scopes{int} - idIndex
Index of the column that contains the old competency ID (Optional, if not exists pass null or negative){Object} - [relations]
CSV File to import relationships from (Optional, if not exists pass null){int} - [sourceIndex]
Index (in relation file) of the column containing the relationship source competency ID (Optional, if not exists pass null or negative){int} - [relationTypeIndex]
Index (in relation file) of the column containing the relationship type (Optional, if not exists pass null or negative){int} - [destIndex]
Index (in relation file) of the column containing the relationship destination competency ID (Optional, if not exists pass null or negative){Callback2, - Array{Callback1 - [failure]
Callback triggered if an error during creating the competencies{Callback1 - [incremental]
Callback triggered incrementally during creation of competencies to indicate progress,
returns an object indicating the number of competencies (and relationships?) created so farpublic static void saveCompetency(EcCompetency comp, org.stjs.javascript.functions.Callback1<Object> incremental, org.stjs.javascript.Array<EcCompetency> competencies, Object relations, org.stjs.javascript.functions.Callback2<org.stjs.javascript.Array<EcCompetency>,org.stjs.javascript.Array<EcAlignment>> success, String serverUrl, org.cassproject.ebac.identity.EcIdentity owner, Integer sourceIndex, Integer relationTypeIndex, Integer destIndex, org.stjs.javascript.functions.Callback1<Object> failure, org.cassproject.ebac.repository.EcRepository repo)
public static void saveRelation(EcAlignment relation, org.stjs.javascript.functions.Callback1<Object> incremental, org.stjs.javascript.Array<EcAlignment> relations, org.stjs.javascript.functions.Callback2<org.stjs.javascript.Array<EcCompetency>,org.stjs.javascript.Array<EcAlignment>> success, org.stjs.javascript.Array<EcCompetency> competencies, org.stjs.javascript.functions.Callback1<Object> failure, org.cassproject.ebac.repository.EcRepository repo)
public static void transformReferences(Object data)
public static void importData(Object file, String serverUrl, org.cassproject.ebac.identity.EcIdentity owner, org.stjs.javascript.functions.Callback1<org.stjs.javascript.Array<org.cassproject.schema.general.EcRemoteLinkedData>> success, org.stjs.javascript.functions.Callback1<Object> failure, org.stjs.javascript.functions.Callback1<Object> incremental, Integer idIndex, String assignedContext, String assignedType, org.cassproject.ebac.repository.EcRepository repo)
public static void saveTransformedData(org.cassproject.schema.general.EcRemoteLinkedData data,
org.stjs.javascript.functions.Callback1<Object> incremental,
org.stjs.javascript.Array<org.cassproject.schema.general.EcRemoteLinkedData> objects,
org.stjs.javascript.functions.Callback1<org.stjs.javascript.Array<org.cassproject.schema.general.EcRemoteLinkedData>> success,
org.stjs.javascript.functions.Callback1<Object> failure,
org.cassproject.ebac.repository.EcRepository repo)
Copyright © 2019 Eduworks Corporation. All rights reserved.