Search in sources :

Example 1 with XmlMigrator

use of ai.grakn.migration.xml.XmlMigrator in project grakn by graknlabs.

the class XMLMigratorTest method migrateXMLWithElement.

private static void migrateXMLWithElement(String element, String template) {
    // load the schema
    MigratorTestUtils.load(session, MigratorTestUtils.getFile("xml", "schema.gql"));
    // load the data
    Migrator migrator = new MigratorBuilder().setUri(engine.uri()).setKeyspace(keyspace).build();
    File xmlFile = MigratorTestUtils.getFile("xml", "data.xml");
    XmlMigrator xmlMigrator = new XmlMigrator(xmlFile);
    xmlMigrator.element(element);
    migrator.load(template, xmlMigrator.convert());
}
Also used : XmlMigrator(ai.grakn.migration.xml.XmlMigrator) MigratorBuilder(ai.grakn.migration.base.MigratorBuilder) Migrator(ai.grakn.migration.base.Migrator) XmlMigrator(ai.grakn.migration.xml.XmlMigrator) File(java.io.File)

Aggregations

Migrator (ai.grakn.migration.base.Migrator)1 MigratorBuilder (ai.grakn.migration.base.MigratorBuilder)1 XmlMigrator (ai.grakn.migration.xml.XmlMigrator)1 File (java.io.File)1