public class JsonMigrator extends Object implements AutoCloseable
| Constructor and Description |
|---|
JsonMigrator(File jsonFileOrDir)
Construct a JsonMigrator to migrate data in the given file or dir
|
JsonMigrator(Reader reader)
Construct a JsonMigrator to migrate data in given reader
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the readers
|
java.util.stream.Stream<Map<String,Object>> |
convert()
Migrate each of the given json objects as an insert query
|
static void |
main(String[] args) |
public JsonMigrator(File jsonFileOrDir)
jsonFileOrDir - either a Json file or a directory containing Json filespublic JsonMigrator(Reader reader)
reader - reader over the data to be migratedpublic static void main(String[] args)
public java.util.stream.Stream<Map<String,Object>> convert()
public void close()
close in interface AutoCloseableCopyright © 2017 Grakn Labs Ltd. All rights reserved.