|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.edu.agh.cast.model.base.DataImporter
public class DataImporter
Abstract data importer. It is used only for testing purpose in small installations.
Constructor Summary | |
---|---|
DataImporter(IModel newModel)
Deprecated. Constructor which binds the loader to the given model. |
Method Summary | |
---|---|
static IEntity |
getEntity(String id,
Map<String,IEntity> entities)
Deprecated. Returns an IEntity with given id, or creates a new one. |
static String |
getName(String path)
Deprecated. Return the name of new data set. |
static void |
importData(DataRow tokens,
IDataSet dataSet,
Map<String,IEntity> entities)
Deprecated. Transforms the tokens to 2 entities and 1 relation and puts the relation in the dataSet. |
IDataSet |
importDataFromFile(String path)
Deprecated. Imports the data from the file given as parameter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataImporter(IModel newModel)
newModel
- The model to be bounded to.Method Detail |
---|
public IDataSet importDataFromFile(String path) throws IOException
path
- The path of the file.
IOException
public static void importData(DataRow tokens, IDataSet dataSet, Map<String,IEntity> entities)
tokens
- Array of strings holding values of the 2 entities and relation (first entity, second entity, relation
start date, duration)dataSet
- The data set where the relation is putentities
- Entities map: entityId => Entitypublic static IEntity getEntity(String id, Map<String,IEntity> entities)
id
- The id of the entity.entities
- Entities map.
public static String getName(String path)
path
- The path to the file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |