use of edu.uci.ics.textdb.storage.RelationManager in project textdb by TextDB.
the class MedlineIndexWriter method writeMedlineIndex.
public static void writeMedlineIndex(Path medlineFilepath, String tableName) throws IOException, StorageException, ParseException {
RelationManager relationManager = RelationManager.getRelationManager();
DataWriter dataWriter = relationManager.getTableDataWriter(tableName);
dataWriter.open();
BufferedReader reader = Files.newBufferedReader(medlineFilepath);
String line;
while ((line = reader.readLine()) != null) {
try {
dataWriter.insertTuple(recordToTuple(line));
} catch (Exception e) {
e.printStackTrace();
}
}
reader.close();
dataWriter.close();
}
use of edu.uci.ics.textdb.storage.RelationManager in project textdb by TextDB.
the class ScanBasedSourceOperatorTest method cleanUp.
@AfterClass
public static void cleanUp() throws Exception {
RelationManager relationManager = RelationManager.getRelationManager();
relationManager.deleteTable(PEOPLE_TABLE);
}
use of edu.uci.ics.textdb.storage.RelationManager in project textdb by TextDB.
the class OneToNBroadcastConnectorTest method setUp.
@BeforeClass
public static void setUp() throws Exception {
RelationManager relationManager = RelationManager.getRelationManager();
// create the people table and write tuples
relationManager.createTable(PEOPLE_TABLE, "../index/test_tables/" + PEOPLE_TABLE, TestConstants.SCHEMA_PEOPLE, LuceneAnalyzerConstants.standardAnalyzerString());
DataWriter peopleDataWriter = relationManager.getTableDataWriter(PEOPLE_TABLE);
peopleDataWriter.open();
for (Tuple tuple : TestConstants.getSamplePeopleTuples()) {
peopleDataWriter.insertTuple(tuple);
}
peopleDataWriter.close();
}
use of edu.uci.ics.textdb.storage.RelationManager in project textdb by TextDB.
the class OneToNBroadcastConnectorTest method cleanUp.
@AfterClass
public static void cleanUp() throws Exception {
RelationManager relationManager = RelationManager.getRelationManager();
relationManager.deleteTable(PEOPLE_TABLE);
}
use of edu.uci.ics.textdb.storage.RelationManager in project textdb by TextDB.
the class ComparableMatcherTest method setUp.
@BeforeClass
public static void setUp() throws TextDBException {
RelationManager relationManager = RelationManager.getRelationManager();
// create the people table and write tuples
relationManager.createTable(PEOPLE_TABLE, "../index/test_tables/" + PEOPLE_TABLE, TestConstants.SCHEMA_PEOPLE, LuceneAnalyzerConstants.standardAnalyzerString());
DataWriter peopleDataWriter = relationManager.getTableDataWriter(PEOPLE_TABLE);
peopleDataWriter.open();
for (Tuple tuple : TestConstants.getSamplePeopleTuples()) {
peopleDataWriter.insertTuple(tuple);
}
peopleDataWriter.close();
}
Aggregations