TitanTransaction srcTx = srcGraph.newTransaction();
DendriteGraphTx dstTx = dstGraph.newTransaction();
for(TitanKey titanKey: srcTx.getTypes(TitanKey.class)) {
if (titanKey instanceof TitanKeyVertex) {
TitanKeyVertex keyVertex = (TitanKeyVertex) titanKey;
TypeAttribute.Map definition = getDefinition(keyVertex);
if (dstTx.getType(keyVertex.getName()) == null) {
dstTx.makePropertyKey(keyVertex.getName(), definition);
}
}
}
for(TitanLabel titanLabel: srcTx.getTypes(TitanLabel.class)) {
TitanLabelVertex keyVertex = (TitanLabelVertex) titanLabel;
TypeAttribute.Map definition = getDefinition(keyVertex);
if (dstTx.getType(keyVertex.getName()) == null) {
dstTx.makeEdgeLabel(keyVertex.getName(), definition);
}
}
dstTx.commit();
srcTx.commit();