public class EadImporter extends AbstractImporter<Map<String,Object>,AbstractUnit>
TODO: Extensive cleanups, optimisation, and rationalisation.
| Modifier and Type | Field and Description |
|---|---|
static String |
ACCESS_POINT |
actioner, framedGraph, log, manager, permissionScope| Constructor and Description |
|---|
EadImporter(com.tinkerpop.frames.FramedGraph<?> graph,
PermissionScope permissionScope,
Actioner actioner,
ImportLog log)
Construct an EadImporter object.
|
| Modifier and Type | Method and Description |
|---|---|
protected Iterable<Map<String,Object>> |
extractRelations(Map<String,Object> data) |
protected Bundle |
getDescription(Map<String,Object> itemData)
Extract the documentary unit description bundle from the raw map data.
|
AbstractUnit |
importItem(Map<String,Object> itemData)
Import an item representation into the graph, and return the Node.
|
AbstractUnit |
importItem(Map<String,Object> itemData,
List<String> idPath)
Import a single archdesc or c01-12 item, keeping a reference to the hierarchical depth.
|
protected Bundle |
mergeWithPreviousAndSave(Bundle unit,
Bundle descBundle,
List<String> idPath)
Finds any bundle in the graph with the same ObjectIdentifier.
|
addCallback, addErrorCallback, getActioner, getPermissionScope, getPersister, getPersister, handleCallbacks, handleErrorpublic static final String ACCESS_POINT
public EadImporter(com.tinkerpop.frames.FramedGraph<?> graph,
PermissionScope permissionScope,
Actioner actioner,
ImportLog log)
graph - the framed graphpermissionScope - the permission scopelog - the logpublic AbstractUnit importItem(Map<String,Object> itemData, List<String> idPath) throws ValidationError
itemData - The raw data mapidPath - The identifiers of parent documents,
not including those of the overall permission scopeValidationError - when the itemData does not contain an identifier for the unit or...protected Bundle getDescription(Map<String,Object> itemData) throws ValidationError
Note: the itemData map is mutable and should be considered an out parameter.
itemData - the raw data mapValidationErrorprotected Bundle mergeWithPreviousAndSave(Bundle unit, Bundle descBundle, List<String> idPath) throws ValidationError
unit - the DocumentaryUnit to be saveddescBundle - the documentsDescription to replace any previous ones with this languageidPath - the ID path of this bundle (will be relative to the ID path of the permission scope)ValidationErrorpublic AbstractUnit importItem(Map<String,Object> itemData) throws ValidationError
ItemImporteritemData - the item representation to importValidationError - when the item representation does not validateCopyright © 2018 The European Holocaust Research Infrastructure (EHRI). All rights reserved.