public class IdRegenerator extends Object
We also sometimes tweak the ID generation algorithm itself, which necessitates bulk ID re-generation.
Modifier and Type | Class and Description |
---|---|
static class |
IdRegenerator.IdCollisionError |
Constructor and Description |
---|
IdRegenerator(com.tinkerpop.frames.FramedGraph<?> graph) |
Modifier and Type | Method and Description |
---|---|
IdRegenerator |
collisionMode(boolean collisionMode)
Obtain a re-generator that only outputs items with IDs that if renamed
would collide with another item's ID.
|
Optional<List<String>> |
reGenerateId(Accessible item) |
List<List<String>> |
reGenerateIds(Iterable<? extends Accessible> items) |
List<List<String>> |
reGenerateIds(PermissionScope scope,
Iterable<? extends Entity> items) |
IdRegenerator |
skippingCollisions(boolean skipCollisions)
Obtain a re-generator that will skip items that would collide
with existing items.
|
IdRegenerator |
withActualRename(boolean doIt)
Obtain a re-generator that will actually perform the rename
step.
|
public List<List<String>> reGenerateIds(PermissionScope scope, Iterable<? extends Entity> items) throws IdRegenerator.IdCollisionError
IdRegenerator.IdCollisionError
public List<List<String>> reGenerateIds(Iterable<? extends Accessible> items) throws IdRegenerator.IdCollisionError
IdRegenerator.IdCollisionError
public Optional<List<String>> reGenerateId(Accessible item) throws IdRegenerator.IdCollisionError
IdRegenerator.IdCollisionError
public IdRegenerator withActualRename(boolean doIt)
doIt
- whether to actually commit changespublic IdRegenerator skippingCollisions(boolean skipCollisions)
skipCollisions
- whether or not to error on an ID collisionpublic IdRegenerator collisionMode(boolean collisionMode)
collisionMode
- only output items that would collide if renamedCopyright © 2018 The European Holocaust Research Infrastructure (EHRI). All rights reserved.