I
- Type of node representation that can be imported,
for example, Map<String, Object>
.public interface ItemImporter<I,T extends Accessible>
Modifier and Type | Method and Description |
---|---|
void |
addCallback(ImportCallback callback)
Add a callback to run when an item is created.
|
void |
addErrorCallback(ErrorCallback callback)
Add a callback to run when an item errors.
|
void |
handleError(Exception ex)
Used to indicate a validation error in the
handler for a given element.
|
T |
importItem(I itemData)
Import an item representation into the graph, and return the Node.
|
T |
importItem(I itemData,
List<String> scopeIds)
Import an item representation into the graph at a certain depth, and return the Node.
|
T importItem(I itemData) throws ValidationError
itemData
- the item representation to importValidationError
- when the item representation does not validateT importItem(I itemData, List<String> scopeIds) throws ValidationError
itemData
- the item representation to importscopeIds
- parent identifiers for ID generation,
not including permission scopeValidationError
- when the item representation does not validatevoid handleError(Exception ex)
ex
- a validation exceptionvoid addCallback(ImportCallback callback)
callback
- a callback function objectvoid addErrorCallback(ErrorCallback callback)
callback
- a callback function objectCopyright © 2018 The European Holocaust Research Infrastructure (EHRI). All rights reserved.