public class DbUpgrader1to2 extends Object
Ideally, we'd use some declarative script for this, and were it not for the JSON data in Version nodes that represents prior incarnations of items, we could.
This function de-serializes the serialized data, upgrades it to the new format, and serializes it again.
Modifier and Type | Class and Description |
---|---|
static interface |
DbUpgrader1to2.OnChange |
Modifier and Type | Field and Description |
---|---|
static Map<String,String> |
changeMap |
static String |
OLD_ID_KEY |
static String |
OLD_TYPE_KEY |
Constructor and Description |
---|
DbUpgrader1to2(com.tinkerpop.frames.FramedGraph<?> graph,
DbUpgrader1to2.OnChange onChange) |
Modifier and Type | Method and Description |
---|---|
DbUpgrader1to2 |
setDbSchemaVersion() |
DbUpgrader1to2 |
setIdAndTypeOnEventLinks() |
DbUpgrader1to2 |
upgradeIdAndTypeKeys() |
static com.fasterxml.jackson.databind.node.ObjectNode |
upgradeNode(com.fasterxml.jackson.databind.node.ObjectNode beforeNode)
Recursively updates types in a JSON bundle structure,
returning a new node.
|
DbUpgrader1to2 |
upgradeTypeValues() |
public static final String OLD_ID_KEY
public static final String OLD_TYPE_KEY
public DbUpgrader1to2(com.tinkerpop.frames.FramedGraph<?> graph, DbUpgrader1to2.OnChange onChange)
public DbUpgrader1to2 setDbSchemaVersion()
public DbUpgrader1to2 upgradeIdAndTypeKeys()
public DbUpgrader1to2 setIdAndTypeOnEventLinks()
public DbUpgrader1to2 upgradeTypeValues() throws IOException
IOException
public static com.fasterxml.jackson.databind.node.ObjectNode upgradeNode(com.fasterxml.jackson.databind.node.ObjectNode beforeNode)
beforeNode
- the original JSONCopyright © 2018 The European Holocaust Research Infrastructure (EHRI). All rights reserved.