From c77f32968e1057961fb65a98f1f679d24bb35080 Mon Sep 17 00:00:00 2001 From: Sarah Morrissey Date: Mon, 16 Oct 2017 11:04:15 -0400 Subject: [PATCH 01/19] pauses when connection to AS is lost --- .../archiviststoolkit/plugin/dbCopyCLI.java | 2 + .../archiviststoolkit/plugin/dbCopyFrame.java | 3 + .../dbdialog/RemoteDBConnectDialogLight.java | 2 + .../plugin/utils/aspace/ASpaceClient.java | 19 +- .../plugin/utils/aspace/ASpaceCopyUtil.java | 195 +++++++++++++++++- .../plugin/utils/aspace/ASpaceEnumUtil.java | 5 +- .../plugin/utils/aspace/ASpaceMapper.java | 120 ++++++++++- .../utils/aspace/TopContainerMapper.java | 3 +- src/test/TestUtils.java | 9 +- src/test/Testing.java | 1 - 10 files changed, 344 insertions(+), 15 deletions(-) diff --git a/src/org/archiviststoolkit/plugin/dbCopyCLI.java b/src/org/archiviststoolkit/plugin/dbCopyCLI.java index 9ac7941..a7130b6 100644 --- a/src/org/archiviststoolkit/plugin/dbCopyCLI.java +++ b/src/org/archiviststoolkit/plugin/dbCopyCLI.java @@ -271,6 +271,8 @@ private void startASpaceCopyProcess() { ascopy.addContainerData(); + ascopy.addAssessments(); + // DEBUG code which checks to see that all ISO dates are valid if(checkISODates) { ascopy.checkISODates(); diff --git a/src/org/archiviststoolkit/plugin/dbCopyFrame.java b/src/org/archiviststoolkit/plugin/dbCopyFrame.java index d543733..396e6bb 100644 --- a/src/org/archiviststoolkit/plugin/dbCopyFrame.java +++ b/src/org/archiviststoolkit/plugin/dbCopyFrame.java @@ -314,6 +314,7 @@ public void run() { //Check if working System.out.println("Version: " + aspaceVersion); + if (aspaceVersion.isEmpty()) ascopy.setCopyAssessments(); if(!aspaceVersion.isEmpty() && !ASpaceCopyUtil.SUPPORTED_ASPACE_VERSION.contains(aspaceVersion)) { String message = "Unsupported Archivesspace Version\nSupport Versions: " + ASpaceCopyUtil.SUPPORTED_ASPACE_VERSION + " ...\n"; @@ -397,6 +398,8 @@ public void run() { if (!copyStopped) ascopy.addContainerData(); + if (!copyStopped) ascopy.addAssessments(); + ascopy.cleanUp(); // set the number of errors and message now diff --git a/src/org/archiviststoolkit/plugin/dbdialog/RemoteDBConnectDialogLight.java b/src/org/archiviststoolkit/plugin/dbdialog/RemoteDBConnectDialogLight.java index 99e40fc..9313ec6 100644 --- a/src/org/archiviststoolkit/plugin/dbdialog/RemoteDBConnectDialogLight.java +++ b/src/org/archiviststoolkit/plugin/dbdialog/RemoteDBConnectDialogLight.java @@ -651,6 +651,8 @@ public ArrayList getLookupLists() { return lookupLists; } + public ArrayList getAssessments() { return (ArrayList)getRecords(Assessments.class, session); } + /** * Method to return the language code * diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceClient.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceClient.java index b31046b..40207d6 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceClient.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceClient.java @@ -11,6 +11,8 @@ import org.json.JSONArray; import org.json.JSONObject; +import javax.swing.*; +import java.net.ConnectException; import java.util.HashMap; /** @@ -44,6 +46,8 @@ public class ASpaceClient { public static final String ENUM_ENDPOINT = "/config/enumerations"; public static final String BATCH_IMPORT_ENDPOINT = "/batch_imports?migration=ArchivistToolkit"; public static final String INDEXER_ENDPOINT = "/aspace-indexer/"; + public static final String ASSESSMENT_ENDPOINT = "/assessments"; + public static final String ASSESSMENT_ATTR_DEFNS_ENDPOINT = "/assessment_attribute_definitions"; private HttpClient httpclient = new HttpClient(); private String host = ""; @@ -200,7 +204,20 @@ private String executePost(PostMethod post, String idName, String atId, String j // Execute request try { - int statusCode = httpclient.executeMethod(post); + int statusCode; + try { + statusCode = httpclient.executeMethod(post); + } catch (ConnectException e) { + boolean ready = false; + String message = "Connection has been lost.\nCheck that your web server and Archives\nSpace session " + + "are still running."; + while (!ready) { + int result = JOptionPane.showConfirmDialog(null, message, "Fix connection", + JOptionPane.OK_CANCEL_OPTION, JOptionPane.ERROR_MESSAGE); + if (result == JOptionPane.OK_OPTION) ready = true; + } + return executePost(post, idName, atId, jsonText); + } // Display status code String statusMessage = "Status code: " + statusCode + diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java index ed36e9f..61caa0d 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java @@ -3,6 +3,7 @@ import org.apache.commons.httpclient.NameValuePair; import org.archiviststoolkit.ApplicationFrame; import org.archiviststoolkit.model.*; +import org.archiviststoolkit.mydomain.DomainObject; import org.archiviststoolkit.plugin.dbCopyFrame; import org.archiviststoolkit.plugin.dbdialog.RemoteDBConnectDialogLight; import org.archiviststoolkit.plugin.utils.ScriptDataUtils; @@ -14,6 +15,7 @@ import javax.swing.*; import java.io.File; import java.util.ArrayList; +import java.util.Collection; import java.util.HashMap; import java.util.Set; @@ -26,7 +28,11 @@ */ public class ASpaceCopyUtil { - public static final String SUPPORTED_ASPACE_VERSION = "v2.1"; + private static final Class[] recordsToCopy = new Class[]{LookupList.class, Repositories.class, Locations.class, + Users.class, Subjects.class, Names.class, Accessions.class, DigitalObjects.class, Resources.class, + Assessments.class}; + + public static final String SUPPORTED_ASPACE_VERSION = "v2.1 & v2.2"; // used to get session from the source and destination databases private RemoteDBConnectDialogLight sourceRCD; @@ -83,6 +89,36 @@ public class ASpaceCopyUtil { // hashmap that maps resource from old database with copy in new database private HashMap resourceURIMap = new HashMap(); + private HashMap assessmentURIMap = new HashMap(); + + private HashMap> assessmentAttributeDefinitions = new HashMap>(); + + private Boolean copyAssessments; + + public String getURIMapping(DomainObject record) { + + Long recordIdentifier = record.getIdentifier(); + Class recordClass = record.getClass(); + + if (recordClass.toString().contains("Locations")) { + return locationURIMap.get(recordIdentifier); + } else if (recordClass.toString().contains("Subjects")) { + return subjectURIMap.get(recordIdentifier); + } else if (recordClass.toString().contains("Names")) { + return nameURIMap.get(recordIdentifier); + } else if (recordClass.toString().contains("Accessions")) { + return accessionURIMap.get(recordIdentifier); + } else if (recordClass.toString().contains("DigitalObjects")) { + return digitalObjectURIMap.get(recordIdentifier); + } else if (recordClass.toString().contains("Resources")) { + return resourceURIMap.get(recordIdentifier); + } else if (recordClass.toString().contains("Assessments")) { + return assessmentURIMap.get(recordIdentifier); + } else { + return null; + } + } + // stop watch object for keeping tract of time private StopWatch stopWatch = null; @@ -145,6 +181,7 @@ public class ASpaceCopyUtil { private final String ACCESSION_KEY = "accessionURIMap"; private final String DIGITAL_OBJECT_KEY = "digitalObjectURIMap"; private final String RESOURCE_KEY = "resourceURIMap"; + private final String ASSESSMENT_KEY = "assessmentURIMap"; private final String REPOSITORY_MISMATCH_KEY = "repositoryMismatchMap"; private final String RECORD_TOTAL_KEY = "copyProgress"; @@ -429,6 +466,22 @@ private void setASpaceVersion() { } catch (Exception e) { } } + public void setCopyAssessments() { + if (aspaceVersion.isEmpty()) { + String message = "Cannot determine your version of ArchivesSpace. Do you want to attempt to\n" + + "copy assessments to ArchivesSpace? (This will only work with version 2.2.)"; + while (copyAssessments == null) { + int result = JOptionPane.showConfirmDialog(null, message, "Copy assessments?", + JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); + if (result == JOptionPane.NO_OPTION) { + copyAssessments = false; + } else if (result == JOptionPane.YES_OPTION) { + copyAssessments = true; + } + } + } + } + /** * Method to return the aspace version */ @@ -883,6 +936,144 @@ public void copyNameRecords() throws Exception { freeMemory(); } + public void addAssessments() throws Exception { + + if (aspaceVersion.contains("2.2")) { + System.out.println("Copying assessments ..."); + } else if (aspaceVersion.isEmpty()) { + if (copyAssessments == null) setCopyAssessments(); + if (!copyAssessments) return; + System.out.println("Unknown version of ASpace.\nAttempting to copy assessments ..."); + } else { + System.out.println("ASpace version does not support assessments. Can not copy."); + print("ASpace version " + aspaceVersion + " does not support assessments.\nSkipping copy assessments."); + addErrorMessage("Can not copy assessments. ASpace version " + aspaceVersion + " does not support."); + return; + } + + loadAssessmentAtributeDefinitions(); + + ArrayList records = sourceRCD.getAssessments(); + + // these are used to update the progress bar + int total = records.size(); + int count = 0; + int success = 0; + int unlinkedCount = 0; + + for (Assessments assessment : records) { + if (stopCopy) return; + + String repoURI = getRemappedRepositoryURI("assessment", assessment.getIdentifier(), assessment.getRepository()); + String uri = repoURI + ASpaceClient.ASSESSMENT_ENDPOINT; + + String jsonText = (String) mapper.convert(assessment); + if (jsonText != null) { + String id = saveRecord(uri, jsonText, "Assessment->" + assessment.getAssessmentId()); + + if(!id.equalsIgnoreCase(NO_ID)) { + uri = uri + "/" + id; + assessmentURIMap.put(assessment.getIdentifier(), uri); + print("Copied Assessment: " + assessment + " :: " + id); + success++; + } else { + print("Fail -- Assessment: " + assessment); + } + } else { + print("Fail -- Assessment to JSON: " + assessment); + } + + count++; + updateProgress("Assessments", total, count); + } + + updateRecordTotals("Assessments", total, success); + + // refresh the database connection to prevent heap space error + freeMemory(); + } + + // when an assessment attribute definition is added this is how to know what id it was assigned + private int nextAssesAttrDefnID = 1; + + /** + * loads the default assessment attribute definitions from ASpace (as well as any other existing to be safe) + * @throws Exception + */ + private void loadAssessmentAtributeDefinitions() throws Exception { + boolean globalSet = false; + + //first add all the repo URIs to an array list so that the admin repo is first in the loop + ArrayList repos = new ArrayList(); + repos.add(ASpaceClient.ADMIN_REPOSITORY_ENDPOINT); + repos.addAll(repositoryURIMap.values()); + + for (String repoURI: repos) { + + //admin repo will be in repos twice so skip it the second time + if (repoURI.equals(ASpaceClient.ADMIN_REPOSITORY_ENDPOINT)) { + if (globalSet) continue; + globalSet = true; + } + + //add the repository and have it map to an empty hash map that will store its definitions + assessmentAttributeDefinitions.put(repoURI, new HashMap()); + + //get the definitions from ASpace and add each one to that repo's hashmap (label and type map to id) + JSONObject result = new JSONObject(aspaceClient.get(repoURI + ASpaceClient.ASSESSMENT_ATTR_DEFNS_ENDPOINT, null)); + JSONArray definitionsJA = (JSONArray) result.get("definitions"); + for (int i = 0; i < definitionsJA.length(); i++) { + JSONObject definitionJS = (JSONObject) definitionsJA.get(i); + String key = definitionJS.get("label").toString() + " - " + definitionJS.get("type").toString(); + //don't need to add it if its already in the global map + if (!assessmentAttributeDefinitions.get(ASpaceClient.ADMIN_REPOSITORY_ENDPOINT).containsKey(key)) { + assessmentAttributeDefinitions.get(repoURI).put(key, (Integer) definitionJS.get("id")); + nextAssesAttrDefnID++; + } + } + } + } + + /** + * gets the mapping for a assessment attribute definition if it already exists. Otherwise adds the definition + * @param repo + * @param label + * @param type + * @return + */ + public Integer getAssessmentAttributeID(Repositories repo, String label, String type) throws Exception { + Integer id; + String key = label + " - " + type; + + //first see if it is in the global assessment attributes list + id = assessmentAttributeDefinitions.get(aspaceClient.ADMIN_REPOSITORY_ENDPOINT).get(key); + if (id != null) return id; + + //next see if it is in the repository specific assessment attributes list + String repoURI = repositoryURIMap.get(repo.getShortName()); + id = assessmentAttributeDefinitions.get(repoURI).get(key); + if (id != null) return id; + + //otherwise add it to the repository assessment attributes list + JSONObject defn = new JSONObject(); + defn.put("label", label); + defn.put("type", type); + JSONObject previous = new JSONObject(aspaceClient.get(repoURI + aspaceClient.ASSESSMENT_ATTR_DEFNS_ENDPOINT, + null)); + JSONArray previousJA = (JSONArray) previous.get("definitions"); + id = nextAssesAttrDefnID++; + previousJA.put(defn); + JSONObject json = new JSONObject(); + json.put("definitions", previousJA); + saveRecord(repoURI + aspaceClient.ASSESSMENT_ATTR_DEFNS_ENDPOINT, json.toString(), + "Assessment Attributes->" + type); + assessmentAttributeDefinitions.get(repoURI).put(key, id); + //decrement errors because it counts this as an error for some reason + saveErrorCount--; + aspaceErrorCount--; + return id; + } + /** * Method to copy the subject records * @@ -2356,6 +2547,7 @@ public void saveURIMaps() { uriMap.put(ACCESSION_KEY, accessionURIMap); uriMap.put(DIGITAL_OBJECT_KEY, digitalObjectURIMap); uriMap.put(RESOURCE_KEY, resourceURIMap); + uriMap.put(ASSESSMENT_KEY, assessmentURIMap); // store the record totals array list here also uriMap.put(RECORD_TOTAL_KEY, recordTotals); @@ -2387,6 +2579,7 @@ public void loadURIMaps() { accessionURIMap = (HashMap)uriMap.get(ACCESSION_KEY); digitalObjectURIMap = (HashMap)uriMap.get(DIGITAL_OBJECT_KEY); resourceURIMap = (HashMap)uriMap.get(RESOURCE_KEY); + assessmentURIMap = (HashMap)uriMap.get(ASSESSMENT_KEY); // load the repository mismatch map if its not null if(uriMap.containsKey(REPOSITORY_MISMATCH_KEY)) { diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java index 8e6bfcc..612d3a0 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java @@ -95,7 +95,7 @@ public Object[] getASpaceSubjectSource(String atValue) { code = "gmgpc"; } else { code = lookupListValuesToCodes.get(atValue); - if (code == null) code = "local"; + if (code == null || code.isEmpty()) code = "local"; } return getASpaceEnumValue("subject_source", code); } @@ -108,8 +108,8 @@ public Object[] getASpaceSubjectSource(String atValue) { */ public Object[] getASpaceNameSource(String atValue) { - atValue = atValue.toLowerCase(); if (atValue == null || atValue.trim().isEmpty()) atValue = "local"; + atValue = atValue.toLowerCase(); if(atValue.contains("naco")) { atValue = "naf"; @@ -129,6 +129,7 @@ public Object[] getASpaceNameSource(String atValue) { */ public Object[] getASpaceNameOrder(Boolean directOrder) { String atValue; + if (directOrder == null) {directOrder = true;} if(directOrder) { atValue = "direct"; } else { diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java index c7af7b9..564960c 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java @@ -99,6 +99,7 @@ public class ASpaceMapper { // string builder used for finding bad dates private ArrayList datesList = null; private boolean checkISODates = false; + private JSONArray unknownName; /** * Main constructor @@ -201,6 +202,8 @@ public Object convert(DomainObject record) throws Exception { return convertResourceComponent((ResourcesComponents) record); } else if (record instanceof DigitalObjects) { return convertDigitalObject((DigitalObjects) record); + } else if (record instanceof Assessments) { + return convertAssessment((Assessments) record); } else { return null; } @@ -836,10 +839,6 @@ private void addRightsStatementRecord(Accessions record, JSONObject json) throws rightStatementJS.put("rights_type", "copyright"); rightStatementJS.put("status", "copyrighted"); rightStatementJS.put("jurisdiction", "US"); // TODO 8/12/2013 this is not suppose to be required -// JSONObject dateJS = new JSONObject(); -// dateJS.put("type", "single"); -// dateJS.put("label", "other"); -// dateJS.put("expression", record.getRightsTransferredDate().toString()); Date startDate = record.getRightsTransferredDate(); if (startDate == null) { rightStatementJS.put("start_date", DEFAULT_DATE.toString()); @@ -1040,7 +1039,7 @@ public void convertArchDescriptionDates(JSONArray dateJA, Set" + assessment.getIdentifier()); + + String uri = endpoint + "/" + id; + + JSONArray ja = new JSONArray(); + ja.put(getReferenceObject(uri)); + if (unknown) unknownName = ja; + return ja; + } + + private void addAssessmentsAttributes(JSONObject json, Assessments record) throws Exception { + + Repositories repo = record.getRepository(); + + //first add the formats + JSONArray formatsJA = new JSONArray(); + HashMap formats = new HashMap(); + formats.put("Architectural Materials", record.getArchitecturalMaterials()); + formats.put("Glass", record.getGlass()); + formats.put("Art Originals", record.getArtOriginals()); + formats.put("Photographs", record.getPhotographs()); + formats.put("Artifacts", record.getArtifacts()); + formats.put("Scrapbooks", record.getScrapbooks()); + formats.put("Audio Materials", record.getAudioMaterials()); + formats.put("Technical Drawings & Schematics", record.getTechnicalDrawingsAndSchematics()); + formats.put("Biological Specimens", record.getBiologicalSpecimens()); + formats.put("Textiles", record.getTextiles()); + formats.put("Botanical Specimens", record.getBotanicalSpecimens()); + formats.put("Vellum & Parchment", record.getVellumAndParchment()); + formats.put("Computer Storage Units", record.getComputerStorageUnits()); + formats.put("Video Materials", record.getVideoMaterials()); + formats.put("Film (negative, slide, or motion picture)", record.getFilm()); + formats.put("Other", record.getOther()); + formats.put("Special Format 1", record.getSpecialFormat1()); + formats.put("Special Format 2", record.getSpecialFormat2()); + + for (String format : formats.keySet()) { + if (formats.get(format)) { + JSONObject formatJSON = new JSONObject(); + int id = aspaceCopyUtil.getAssessmentAttributeID(repo, format, "format"); + formatJSON.put("definition_id", id); + formatJSON.put("value", "true"); + formatsJA.put(formatJSON); + } + } + + json.put("formats", formatsJA); + } + /** * Method to set the language code for a json record * diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java b/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java index 795c7da..c503494 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java @@ -198,7 +198,8 @@ public void addLocationURI(String uri, String note) throws Exception { } LocationJSONObject json = new LocationJSONObject(uri, note); - alreadyAdded.get(this).locationURIs.add(json); + Info info = alreadyAdded.get(this); + if (info != null) info.locationURIs.add(json); } public void addLocationURI(String uri) throws Exception {addLocationURI(uri, "");} diff --git a/src/test/TestUtils.java b/src/test/TestUtils.java index ec062a3..9c8a911 100644 --- a/src/test/TestUtils.java +++ b/src/test/TestUtils.java @@ -45,15 +45,16 @@ class TestUtils { e.printStackTrace(); } } - private static String propertiesUrl = "C:/Users/morrissey/Desktop/at-mig-6/dbcopy.properties"; + //should be in base at-migration folder + private static String propertiesUrl = "C:/Users/morrissey/Desktop/at-migration/dbcopy.properties"; private static String atURL; private static String at_username; private static String at_password; private static String asURL = "jdbc:mysql://localhost:3306/"; private static String as_username = "root"; - private static String as_password = "cinnamon"; - private static String schemaSetup = "C:/Users/morrissey/Documents/dumps/as_21_empty.sql"; - private static String asDirectory = "C:/Users/morrissey/Desktop/archivesspace"; + private static String as_password = ""; + //create a dump of your empty AS database and set this as the schemaSetup url + private static String schemaSetup = "C:/Users/morrissey/Documents/dumps/as_22_empty.sql"; private static String host; public static boolean manualConnect = true; diff --git a/src/test/Testing.java b/src/test/Testing.java index 01b82d2..fcba4a4 100644 --- a/src/test/Testing.java +++ b/src/test/Testing.java @@ -32,7 +32,6 @@ public Testing() { */ public static void main(String[] args) throws Exception { TestUtils.resetDatabase(); - dbCopyFrame.main(TestUtils.empty); //Call constructors for any tests you want to run here // new dbCopyCLITest(); // new ASpaceMapperTest(); From 43bd4604d9ea63eedceec893abf1be2056e3aa73 Mon Sep 17 00:00:00 2001 From: Sarah Morrissey Date: Mon, 16 Oct 2017 12:13:05 -0400 Subject: [PATCH 02/19] changed the way top container locations are added --- .../archiviststoolkit/plugin/dbCopyCLI.java | 2 +- .../archiviststoolkit/plugin/dbCopyFrame.java | 2 +- .../plugin/utils/aspace/ASpaceCopyUtil.java | 112 +++++++++--------- .../utils/aspace/TopContainerMapper.java | 33 +++++- 4 files changed, 88 insertions(+), 61 deletions(-) diff --git a/src/org/archiviststoolkit/plugin/dbCopyCLI.java b/src/org/archiviststoolkit/plugin/dbCopyCLI.java index a7130b6..36b7e14 100644 --- a/src/org/archiviststoolkit/plugin/dbCopyCLI.java +++ b/src/org/archiviststoolkit/plugin/dbCopyCLI.java @@ -269,7 +269,7 @@ private void startASpaceCopyProcess() { ascopy.copyResourceRecords(numberOfResourcesToCopy, clientThreads); - ascopy.addContainerData(); +// ascopy.addContainerData(); ascopy.addAssessments(); diff --git a/src/org/archiviststoolkit/plugin/dbCopyFrame.java b/src/org/archiviststoolkit/plugin/dbCopyFrame.java index 396e6bb..7b8abcc 100644 --- a/src/org/archiviststoolkit/plugin/dbCopyFrame.java +++ b/src/org/archiviststoolkit/plugin/dbCopyFrame.java @@ -396,7 +396,7 @@ public void run() { ascopy.copyResourceRecords(resourcesToCopy, threads); } - if (!copyStopped) ascopy.addContainerData(); +// if (!copyStopped) ascopy.addContainerData(); if (!copyStopped) ascopy.addAssessments(); diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java index 61caa0d..170dd90 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java @@ -246,62 +246,62 @@ public ASpaceCopyUtil(ApplicationFrame mainFrame, RemoteDBConnectDialogLight sou init(); } - public void addContainerData() throws Exception { - print("Adding data for top containers ..."); - - Set records = TopContainerMapper.getAlreadyAdded().keySet(); - - // these are used to update the progress bar - int total = records.size(); - int count = 0; - int success = 0; - - for (TopContainerMapper topContainer: records) { - - if (stopCopy) return; - - JSONArray locations = topContainer.getContainerLocations(); - if (locations == null) { - count++; - success++; - updateProgress("Top Containers", total, count); - continue; - } - - String containerURI = topContainer.getRef(); - JSONObject json = getRecord(containerURI); - if (json == null) { - print("Record was not saved -- " + topContainer + "\nCan't add its locations\n"); - continue; - } - - print("Saving locations for top container -- " + topContainer); - json.put("container_locations", locations); - - String instanceClassName; - try { - instanceClassName = topContainer.getInstance().getClass().getName(); - } catch (NullPointerException e) { - instanceClassName = "ArchivesSpace Container"; - } - String id = saveRecord(containerURI, json.toString(), - instanceClassName + "->" + topContainer.getAtID()); - if(!id.equalsIgnoreCase(NO_ID)) { - print("Copied Top Container " + topContainer); - success++; - } else { - print("Fail -- Top Container: " + topContainer); - } - - count++; - updateProgress("Top Containers", total, count); - } - - updateRecordTotals("Top Containers", total, success); - - // refresh the database connection to prevent heap space error - freeMemory(); - } +// public void addContainerData() throws Exception { +// print("Adding data for top containers ..."); +// +// Set records = TopContainerMapper.getAlreadyAdded().keySet(); +// +// // these are used to update the progress bar +// int total = records.size(); +// int count = 0; +// int success = 0; +// +// for (TopContainerMapper topContainer: records) { +// +// if (stopCopy) return; +// +// JSONArray locations = topContainer.getContainerLocations(); +// if (locations == null) { +// count++; +// success++; +// updateProgress("Top Containers", total, count); +// continue; +// } +// +// String containerURI = topContainer.getRef(); +// JSONObject json = getRecord(containerURI); +// if (json == null) { +// print("Record was not saved -- " + topContainer + "\nCan't add its locations\n"); +// continue; +// } +// +// print("Saving locations for top container -- " + topContainer); +// json.put("container_locations", locations); +// +// String instanceClassName; +// try { +// instanceClassName = topContainer.getInstance().getClass().getName(); +// } catch (NullPointerException e) { +// instanceClassName = "ArchivesSpace Container"; +// } +// String id = saveRecord(containerURI, json.toString(), +// instanceClassName + "->" + topContainer.getAtID()); +// if(!id.equalsIgnoreCase(NO_ID)) { +// print("Copied Top Container " + topContainer); +// success++; +// } else { +// print("Fail -- Top Container: " + topContainer); +// } +// +// count++; +// updateProgress("Top Containers", total, count); +// } +// +// updateRecordTotals("Top Containers", total, success); +// +// // refresh the database connection to prevent heap space error +// freeMemory(); +// } /** * Method to initiate certain variables that are needed to work diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java b/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java index c503494..e4df2c2 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java @@ -42,9 +42,15 @@ public DomainObject getInstance() { private class Info { public String uri; private Set locationURIs = new HashSet(); + String indicator; + String type; + String barcode; - public Info(String uri) { + public Info(String uri, TopContainerMapper container) { this.uri = uri; + this.indicator = container.indicator; + this.type = container.type; + this.barcode = container.barcode; } } @@ -144,6 +150,7 @@ private String addTopContainer() throws Exception { jsonObject.put("indicator", indicator); jsonObject.put("type", type); jsonObject.put("barcode", barcode); + jsonObject.put("container_locations", new JSONArray()); String id = aSpaceCopyUtil.saveRecord(parentRepoURI + "top_containers", jsonObject.toString(), instance.getClass().getSimpleName() + "->" + atID); if (!(id.equalsIgnoreCase("no id assigned"))) { @@ -154,6 +161,23 @@ private String addTopContainer() throws Exception { return parentRepoURI + "top_containers/" + id; } + /** + * method that resaves a top container record. Mainly for adding additional locations. + * @param uri + * @throws Exception + */ + private void resaveTopContainer(String uri) throws Exception { + JSONObject json = aSpaceCopyUtil.getRecord(uri); + json.put("container_locations", getContainerLocations()); + String instanceClassName; + try { + instanceClassName = getInstance().getClass().getName(); + } catch (NullPointerException e) { + instanceClassName = "ArchivesSpace Container"; + } + aSpaceCopyUtil.saveRecord(uri, json.toString(),instanceClassName + "->" + getAtID()); + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -180,7 +204,7 @@ public int hashCode() { */ public void addToExisting(String uri) { if (uri.contains("10000001") || uri.contains("no id assigned")) return; - alreadyAdded.put(this, new Info(uri)); + alreadyAdded.put(this, new Info(uri, this)); } /** @@ -199,7 +223,10 @@ public void addLocationURI(String uri, String note) throws Exception { LocationJSONObject json = new LocationJSONObject(uri, note); Info info = alreadyAdded.get(this); - if (info != null) info.locationURIs.add(json); + if (info != null) { + info.locationURIs.add(json); + resaveTopContainer(info.uri); + } } public void addLocationURI(String uri) throws Exception {addLocationURI(uri, "");} From 0ec161a384caa398e0f32e72aad43a13c06780fd Mon Sep 17 00:00:00 2001 From: Sarah Morrissey Date: Mon, 16 Oct 2017 14:07:46 -0400 Subject: [PATCH 03/19] finished adding assessment attributes --- .../archiviststoolkit/plugin/dbCopyFrame.java | 1 + .../plugin/utils/aspace/ASpaceCopyUtil.java | 9 +-- .../plugin/utils/aspace/ASpaceMapper.java | 55 +++++++++++++++++++ 3 files changed, 61 insertions(+), 4 deletions(-) diff --git a/src/org/archiviststoolkit/plugin/dbCopyFrame.java b/src/org/archiviststoolkit/plugin/dbCopyFrame.java index 7b8abcc..83c4f38 100644 --- a/src/org/archiviststoolkit/plugin/dbCopyFrame.java +++ b/src/org/archiviststoolkit/plugin/dbCopyFrame.java @@ -9,6 +9,7 @@ import com.jgoodies.forms.layout.*; import org.archiviststoolkit.ApplicationFrame; import org.archiviststoolkit.importer.ImportExportLogDialog; +import org.archiviststoolkit.model.LookupList; import org.archiviststoolkit.plugin.beanshell.ScriptViewerDialog; import org.archiviststoolkit.plugin.dbdialog.RemoteDBConnectDialogLight; import org.archiviststoolkit.plugin.utils.CodeViewerDialog; diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java index 170dd90..3b5cc75 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java @@ -13,7 +13,10 @@ import org.json.JSONObject; import javax.swing.*; +import java.io.BufferedWriter; import java.io.File; +import java.io.FileWriter; +import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; @@ -28,10 +31,6 @@ */ public class ASpaceCopyUtil { - private static final Class[] recordsToCopy = new Class[]{LookupList.class, Repositories.class, Locations.class, - Users.class, Subjects.class, Names.class, Accessions.class, DigitalObjects.class, Resources.class, - Assessments.class}; - public static final String SUPPORTED_ASPACE_VERSION = "v2.1 & v2.2"; // used to get session from the source and destination databases @@ -332,6 +331,8 @@ private void init() { // map used when copying lookup list items to the archive space backend lookupListMap.put("subject term source", ASpaceClient.VOCABULARY_ENDPOINT); + TopContainerMapper.setaSpaceCopyUtil(this); + // start the stop watch object so we can see how long this data transfer takes startWatch(); } diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java index 564960c..c701537 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java @@ -1741,6 +1741,61 @@ private void addAssessmentsAttributes(JSONObject json, Assessments record) throw } json.put("formats", formatsJA); + + //next the conservation issues + JSONArray conservationJA = new JSONArray(); + HashMap conservationIssues = new HashMap(); + conservationIssues.put("Potential Mold or Mold Damage", record.getPotentialMoldOrMoldDamage()); + conservationIssues.put("Recent Pest Damage", record.getRecentPestDamage()); + conservationIssues.put("Deteriorating Film Base", record.getDeterioratingFilmBase()); + conservationIssues.put("Special Conservation Issue 1", record.getSpecialConservationIssue1()); + conservationIssues.put("Special Conservation Issue 2", record.getSpecialConservationIssue2()); + conservationIssues.put("Special Conservation Issue 3", record.getSpecialConservationIssue3()); + conservationIssues.put("Brittle Paper", record.getBrittlePaper()); + conservationIssues.put("Metal Fasteners", record.getMetalFasteners()); + conservationIssues.put("Newspaper", record.getNewspaper()); + conservationIssues.put("Tape", record.getTape()); + conservationIssues.put("Thermofax Paper", record.getThermofaxPaper()); + conservationIssues.put("Other Conservation Issue 1", record.getOtherConservationIssue1()); + conservationIssues.put("Other Conservation Issue 2", record.getOtherConservationIssue2()); + conservationIssues.put("Other Conservation Issue 3", record.getOtherConservationIssue3()); + + for (String conservationIssue : conservationIssues.keySet()) { + if (conservationIssues.get(conservationIssue)) { + JSONObject conservationJSON = new JSONObject(); + int id = aspaceCopyUtil.getAssessmentAttributeID(repo, conservationIssue, "conservation_issue"); + conservationJSON.put("definition_id", id); + conservationJSON.put("value", "true"); + conservationJA.put(conservationJSON); + } + } + + json.put("conservation_issues", conservationJA); + + //finally the ratings + JSONArray ratingsJA = new JSONArray(); + HashMap ratings = new HashMap(); + ratings.put("Physical Condition", record.getConditionOfMaterial()); + ratings.put("Physical Access (arrangement)", record.getPhysicalAccess()); + ratings.put("Documentation Quality", record.getDocumentationQuality()); + ratings.put("Housing Quality", record.getQualityOfHousing()); + ratings.put("Intellectual Access (description)", record.getIntellectualAccess()); + ratings.put("Interest", record.getInterest()); + ratings.put("Numerical Rating 1", record.getUserNumericalRating1()); + ratings.put("Numerical Rating 2", record.getUserNumericalRating2()); + + for (String rating : ratings.keySet()) { + Integer value = ratings.get(rating); + if (value != null) { + JSONObject ratingJSON = new JSONObject(); + int id = aspaceCopyUtil.getAssessmentAttributeID(repo, rating, "rating"); + ratingJSON.put("definition_id", id); + ratingJSON.put("value", value.toString()); + ratingsJA.put(ratingJSON); + } + } + + json.put("ratings", ratingsJA); } /** From c138a727e6f842aed935aff097e2d7c49911aad0 Mon Sep 17 00:00:00 2001 From: Sarah Morrissey Date: Mon, 16 Oct 2017 14:38:05 -0400 Subject: [PATCH 04/19] finished adding fields for assessments --- .../plugin/utils/aspace/ASpaceMapper.java | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java index c701537..caa342a 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java @@ -1632,6 +1632,12 @@ private JSONObject convertResourceComponent(ResourcesComponents record) throws E return json; } + /** + * method to convert an AT assessment to an AS assessment + * @param record + * @return + * @throws Exception + */ private String convertAssessment(Assessments record) throws Exception { JSONObject json = new JSONObject(); @@ -1660,15 +1666,39 @@ private String convertAssessment(Assessments record) throws Exception { json.put("surveyed_by", addAssessmentsAgent(record.getWhoDidSurvey(), record)); Date surveyBegin = record.getDateOfSurvey(); + //use the date the assessment record was created if the date of survey is not specified + if (surveyBegin == null) surveyBegin = record.getCreated(); if (surveyBegin == null) surveyBegin = DEFAULT_DATE; String surveyBeginStr = new SimpleDateFormat("yyyy-MM-dd").format(surveyBegin); json.put("survey_begin", surveyBeginStr); + Double duration = record.getAmountOfTimeSurveyTook(); + if (duration != null) json.put("surveyed_duration", duration + " hours"); + + Double extent = record.getTotalExtent(); + if (extent != null) json.put("surveyed_extent", extent + " feet"); + + json.put("review_required", record.getReviewNeeded()); + String reviewer = record.getWhoNeedsToReview(); if (reviewer != null && !(reviewer.isEmpty())) json.put("reviewer", addAssessmentsAgent(reviewer, record)); + json.put("review_note", record.getReviewNote()); + + json.put("inactive", record.getInactive()); + addAssessmentsAttributes(json, record); + json.put("general_assessment_note", record.getGeneralNote()); + json.put("special_format_note", record.getSpecialFormatNote()); + json.put("exhibition_value_note", record.getExhibitionValueNote()); + + Double monetaryValue = record.getMonetaryValue(); + if (monetaryValue != null) json.put("monetary_value", monetaryValue.toString()); + json.put("monetary_value_note", record.getMonetaryValueNote()); + + json.put("conservation_note", record.getConservationNote()); + return json.toString(); } From 77994a91911d079e395260a89b889f280b7864e2 Mon Sep 17 00:00:00 2001 From: Sarah Morrissey Date: Tue, 17 Oct 2017 09:34:27 -0400 Subject: [PATCH 05/19] top container type can be empty --- README.md | 5 +- .../plugin/utils/aspace/ASpaceCopyUtil.java | 2 +- .../plugin/utils/aspace/ASpaceEnumUtil.java | 56 +++++++++++-------- .../plugin/utils/aspace/ASpaceMapper.java | 30 +++++----- .../utils/aspace/TopContainerMapper.java | 2 +- 5 files changed, 57 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index a231cc1..a5dfa3b 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,10 @@ NOTES ON DATA MIGRATION DEFAULTS 2. Many containers including all of those for accessions do not have meaningful identifiers in AT. Any such container will be assigned a default container indication which will include the words "unknown container" as well as information about it's content. -3. Some IDs are checked for uniqueness in AS but not AT. In these cases if an ID is not unique the problem will be +3. Sometimes AT records will have an indicator but no container type for either container 2 or 3. This is not +allowed in AS so the default for AS will be "unknown_item" so that the indicator is not lost. The same goes for if +a container 3 is specified without a container 2. +4. Some IDs are checked for uniqueness in AS but not AT. In these cases if an ID is not unique the problem will be corrected by adding ## along with some random string to the ID. NOTE ON CPU AND MEMORY USAGE diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java index 3b5cc75..fc689bf 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java @@ -536,7 +536,7 @@ public void copyLookupList() throws Exception { lookupList.addListItem("ingest"); lookupList.addListItem("local"); } else if(listName.equals("Container types")) { - lookupList.addListItem("item"); + lookupList.addListItem("unknown_item"); } else if(listName.equals("Resource type")) { lookupList.addListItem("collection"); } else if(listName.equals("Date type")) { diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java index 612d3a0..586ed30 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java @@ -39,8 +39,6 @@ public class ASpaceEnumUtil { // A trying that is used to bypass public final static String UNMAPPED = "other_unmapped"; - public boolean returnATValue = true; // set this to return the AR value instead of UNMAPPED - /** * Method to set the language code hash map */ @@ -569,21 +567,27 @@ public Object[] getASpaceInstanceType(String atValue) { /** * Method to return the equivalent ASpace instance container type * - * if statements with "&& returnATValue" should really be removed, but depending on if the - * enum is ASpace is expanded then this will save some work - * * @param atValue * @return */ public Object[] getASpaceInstanceContainerType(String atValue) { + return getASpaceEnumValue("container_type", atValue); + } + + /** + * if it is a sub-container the type can not be empty - corrects these + * @param atValue + * @return + */ + public Object[] getASpaceSubContainerType(String atValue) { if(atValue == null || atValue.trim().isEmpty()) { - atValue = "item"; + atValue = "unknown_item"; } - return getASpaceEnumValue("container_type", atValue); + return getASpaceInstanceContainerType(atValue); } /** - * Method to get the ASpace type + * Method to get the ASpace accession_acquisition_type * * @param atValue * @return @@ -593,7 +597,7 @@ public Object[] getASpaceAcquisitionType(String atValue) { } /** - * Method to return the AccessionResourceType + * Method to return the accession_resource_type * * @param atValue * @return @@ -682,7 +686,13 @@ public JSONObject getDynamicEnum(String listName) { } } - public Object[] getASpaceEnumValue(String enumListName, String atValue) { + /** + * for configurable enum lists + * @param enumListName + * @param atValue + * @return + */ + private Object[] getASpaceEnumValue(String enumListName, String atValue) { return getASpaceEnumValue(enumListName, atValue, true, null); } @@ -694,35 +704,37 @@ public Object[] getASpaceEnumValue(String enumListName, String atValue) { * @param defaultValue * @return */ - public Object[] getASpaceEnumValue(String enumListName, String atValue, boolean returnATValue, String defaultValue) { + private Object[] getASpaceEnumValue(String enumListName, String atValue, boolean returnATValue, String defaultValue) { + //this really shouldn't occur but is here as a safety measure if (dynamicEnums == null) { return new Object[]{null, false}; } + + //if value is null go ahead and return it if (atValue == null) { return new Object[]{null, false}; } + + //convert AT value to typical ASpace enum format atValue = atValue.trim().toLowerCase(); - if (atValue.contains(" ")) { - StringBuilder newAtValue = new StringBuilder(); - for (int i = 0; i < atValue.length(); i++) { - char ch = atValue.charAt(i); - if (ch == ' ') { - ch = '_'; - } - newAtValue.append(ch); - } - atValue = newAtValue.toString(); - } + atValue = atValue.replace(" ", "_"); + try { + //if there is a value in ASpace that matches return this and true JSONArray enumValues = dynamicEnums.get(enumListName).getJSONArray("values"); for (int i = 0; i < enumValues.length(); i++) { String value = enumValues.getString(i); if (value.equalsIgnoreCase(atValue)) return new Object[]{value, true}; } + + //if there is no matching value in ASpace but the list is configurable return the value from AT and false if (returnATValue) { return new Object[]{atValue, false}; } + + //otherwise try to return the defalt value return getASpaceEnumValue(enumListName, defaultValue, returnATValue, null); + } catch (JSONException e) { e.printStackTrace(); return new Object[]{null, false}; diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java index caa342a..248f732 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java @@ -2408,21 +2408,26 @@ public JSONObject convertAnalogInstance(ArchDescriptionAnalogInstances analogIns TopContainerMapper topContainer = new TopContainerMapper(analogInstance, parentRepoURI); topContainer.addLocationURI(locationURI); containerJS.put("top_container", getReferenceObject(topContainer.getRef())); -// containerJS.put("type_1", enumUtil.getASpaceInstanceContainerType(analogInstance.getContainer1Type())); -// containerJS.put("indicator_1", fixEmptyString(analogInstance.getContainer1Indicator(), "not specified")); -// containerJS.put("barcode_1", analogInstance.getBarcode()); - - if(!analogInstance.getContainer2Type().isEmpty()) { - containerJS.put("type_2", enumUtil.getASpaceInstanceContainerType(analogInstance.getContainer2Type())[0]); - String indicator2 = analogInstance.getContainer2Indicator(); - if (indicator2 == null || indicator2.isEmpty()) indicator2 = "unknown"; + + String type2 = analogInstance.getContainer2Type(); + String indicator2 = analogInstance.getContainer2Indicator(); + String type3 = analogInstance.getContainer3Type(); + String indicator3 = analogInstance.getContainer3Indicator(); + + boolean have2 = !(type2 == null || type2.isEmpty()) || !(indicator2 == null || indicator2.isEmpty()); + boolean have3 = !(type3 == null || type3.isEmpty()) || !(indicator3 == null || indicator3.isEmpty()); + + //add container 2 type and indicator - must be done if there is a container 3 because 2 is required to create 3 + if(have2 || have3) { + containerJS.put("type_2", enumUtil.getASpaceSubContainerType(type2)[0]); + if (indicator2 == null || indicator2.isEmpty()) indicator2 = "unknown container"; containerJS.put("indicator_2", indicator2); } - if(!analogInstance.getContainer3Type().isEmpty()) { - containerJS.put("type_3", enumUtil.getASpaceInstanceContainerType(analogInstance.getContainer3Type())[0]); - String indicator3 = analogInstance.getContainer3Indicator(); - if (indicator3 == null || indicator3.isEmpty()) indicator3 = "unknown"; + //add container 3 + if(have3) { + containerJS.put("type_3", enumUtil.getASpaceSubContainerType(type3)[0]); + if (indicator3 == null || indicator3.isEmpty()) indicator3 = "unknown container"; containerJS.put("indicator_3", indicator3); } @@ -2554,7 +2559,6 @@ public void setASpaceDynamicEnums(HashMap dynamicEnums) { * @param value */ public void setReturnATValue(boolean value) { - enumUtil.returnATValue = value; } /** diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java b/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java index e4df2c2..25e6df4 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java @@ -101,7 +101,7 @@ public TopContainerMapper(AccessionsLocations accessionLocation, Accessions acce this.accession = accessionLocation.getAccession(); if (this.accession == null) {this.accession = accession;} instance = accessionLocation; - type = "item"; +// type = "item"; //pull barcode from the accessionLocation the accession instance housed here was created for barcode = accessionLocation.getLocation().getBarcode(); From e15a6acba0bd707dafc619c8ea9676fbb6b66b44 Mon Sep 17 00:00:00 2001 From: Sarah Morrissey Date: Tue, 17 Oct 2017 12:31:26 -0400 Subject: [PATCH 06/19] fixed a memory problem --- .../plugin/utils/aspace/ASpaceCopyUtil.java | 60 +---- .../plugin/utils/aspace/ASpaceEnumUtil.java | 15 +- .../plugin/utils/aspace/ASpaceMapper.java | 3 + .../utils/aspace/TopContainerMapper.java | 228 +++++++++--------- 4 files changed, 127 insertions(+), 179 deletions(-) diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java index fc689bf..019594d 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java @@ -238,70 +238,14 @@ public ASpaceCopyUtil(RemoteDBConnectDialogLight sourceRCD, String host, String * * @param sourceRCD */ - public ASpaceCopyUtil(ApplicationFrame mainFrame, RemoteDBConnectDialogLight sourceRCD, String host, String admin, String adminPassword) { + public ASpaceCopyUtil(ApplicationFrame mainFrame, RemoteDBConnectDialogLight sourceRCD, String host, String admin, + String adminPassword) { this.mainFrame = mainFrame; this.sourceRCD = sourceRCD; this.aspaceClient = new ASpaceClient(host, admin, adminPassword); init(); } -// public void addContainerData() throws Exception { -// print("Adding data for top containers ..."); -// -// Set records = TopContainerMapper.getAlreadyAdded().keySet(); -// -// // these are used to update the progress bar -// int total = records.size(); -// int count = 0; -// int success = 0; -// -// for (TopContainerMapper topContainer: records) { -// -// if (stopCopy) return; -// -// JSONArray locations = topContainer.getContainerLocations(); -// if (locations == null) { -// count++; -// success++; -// updateProgress("Top Containers", total, count); -// continue; -// } -// -// String containerURI = topContainer.getRef(); -// JSONObject json = getRecord(containerURI); -// if (json == null) { -// print("Record was not saved -- " + topContainer + "\nCan't add its locations\n"); -// continue; -// } -// -// print("Saving locations for top container -- " + topContainer); -// json.put("container_locations", locations); -// -// String instanceClassName; -// try { -// instanceClassName = topContainer.getInstance().getClass().getName(); -// } catch (NullPointerException e) { -// instanceClassName = "ArchivesSpace Container"; -// } -// String id = saveRecord(containerURI, json.toString(), -// instanceClassName + "->" + topContainer.getAtID()); -// if(!id.equalsIgnoreCase(NO_ID)) { -// print("Copied Top Container " + topContainer); -// success++; -// } else { -// print("Fail -- Top Container: " + topContainer); -// } -// -// count++; -// updateProgress("Top Containers", total, count); -// } -// -// updateRecordTotals("Top Containers", total, success); -// -// // refresh the database connection to prevent heap space error -// freeMemory(); -// } - /** * Method to initiate certain variables that are needed to work */ diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java index 586ed30..57b1916 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java @@ -218,19 +218,20 @@ public Object[] getASpaceDateCalender(String atValue) { } /** - * map the date uncertainty + * map the date certainty * * @param archDescriptionDate * @return */ public Object[] getASpaceDateCertainty(ArchDescriptionDates archDescriptionDate) { - String atValue; - if(archDescriptionDate != null && archDescriptionDate.getCertainty() != null && archDescriptionDate.getCertainty()) { - atValue = "inferred"; - } else { - atValue = "questionable"; + String atValue = null; + if(archDescriptionDate != null && archDescriptionDate.getCertainty() != null && !archDescriptionDate.getCertainty()) { + atValue = "approximate"; } - return getASpaceEnumValue("date_certainty", atValue, false, "questionable"); +// } else { +// atValue = "questionable"; +// } + return getASpaceEnumValue("date_certainty", atValue, false, null); } /** diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java index 248f732..b9b3daa 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java @@ -24,6 +24,7 @@ public class ASpaceMapper { // String used when mapping AT access class to groups public static final String ACCESS_CLASS_PREFIX = "_AccessClass_"; + //default date for use when no other date is available public static final Date DEFAULT_DATE = new Date(0, 0, 1); // The utility class used to map to ASpace Enums @@ -2405,10 +2406,12 @@ public JSONObject convertAnalogInstance(ArchDescriptionAnalogInstances analogIns // add the container now JSONObject containerJS = new JSONObject(); + //add the top container TopContainerMapper topContainer = new TopContainerMapper(analogInstance, parentRepoURI); topContainer.addLocationURI(locationURI); containerJS.put("top_container", getReferenceObject(topContainer.getRef())); + //now for the sub-container String type2 = analogInstance.getContainer2Type(); String indicator2 = analogInstance.getContainer2Indicator(); String type3 = analogInstance.getContainer3Type(); diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java b/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java index 25e6df4..b30476f 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java @@ -18,65 +18,36 @@ */ public class TopContainerMapper { - public TopContainerMapper(JSONObject containerJS) throws Exception { - parentRepoURI = containerJS.getJSONObject("repository").get("ref") + "/"; - indicator = containerJS.get("indicator").toString(); - try { - barcode = containerJS.get("barcode").toString(); - } catch (JSONException e) { - barcode = null; - } - type = containerJS.get("type").toString(); - addToExisting(containerJS.get("uri").toString()); - JSONArray locations = containerJS.getJSONArray("container_locations"); - for (int i = 0; i < locations.length(); i++) { - JSONObject location = locations.getJSONObject(i); - addLocationURI(location.get("ref").toString()); - } - } - - public DomainObject getInstance() { - return instance; - } - - private class Info { - public String uri; - private Set locationURIs = new HashSet(); - String indicator; - String type; - String barcode; - - public Info(String uri, TopContainerMapper container) { - this.uri = uri; - this.indicator = container.indicator; - this.type = container.type; - this.barcode = container.barcode; - } - } - - public static Map getAlreadyAdded() { - return alreadyAdded; - } - - private static Map alreadyAdded = new HashMap(); + //keys are containers that have been added to ASpace and values are objects that store that container's information + private static Map alreadyAdded = new HashMap(); + //used for making unique identifiers for containers without indicators private static int unknownCount = 1; private ASpaceEnumUtil enumUtil = new ASpaceEnumUtil(); private static ASpaceCopyUtil aSpaceCopyUtil; - public String getAtID() { - return atID; - } - + //analog instance or accession location the container was created for private DomainObject instance; private String atID; - private String parentRepoURI; //*** - private String indicator; //*** - private String type; //dynamic enum "container_type" + private String parentRepoURI; + private String indicator; + private String type; private String barcode; private Accessions accession; + public DomainObject getInstance() { + return instance; + } + + /** + * method to get the AT identifier + * @return + */ + public String getAtID() { + return atID; + } + /** * initializes a top container for an analog instance * @param analogInstance @@ -93,7 +64,7 @@ public TopContainerMapper(ArchDescriptionAnalogInstances analogInstance, String } /** - * initializes a top container for an accession instance + * initializes a top container for an accession location instance * @param parentRepoURI * @throws JSONException */ @@ -101,7 +72,6 @@ public TopContainerMapper(AccessionsLocations accessionLocation, Accessions acce this.accession = accessionLocation.getAccession(); if (this.accession == null) {this.accession = accession;} instance = accessionLocation; -// type = "item"; //pull barcode from the accessionLocation the accession instance housed here was created for barcode = accessionLocation.getLocation().getBarcode(); @@ -109,6 +79,32 @@ public TopContainerMapper(AccessionsLocations accessionLocation, Accessions acce initContainer(); } + /** + * constructor for a top container created from one previously in ASpace for comparison purposes + * @param containerJS + * @throws Exception + */ + public TopContainerMapper(JSONObject containerJS) throws Exception { + parentRepoURI = containerJS.getJSONObject("repository").get("ref") + "/"; + indicator = containerJS.get("indicator").toString(); + try { + barcode = containerJS.get("barcode").toString(); + } catch (JSONException e) { + barcode = null; + } + try { + type = containerJS.get("type").toString(); + } catch (JSONException e) { + type = null; + } + addToExisting(containerJS.get("uri").toString()); + JSONArray locations = containerJS.getJSONArray("container_locations"); + for (int i = 0; i < locations.length(); i++) { + JSONObject location = locations.getJSONObject(i); + addLocationURI(location.get("ref").toString()); + } + } + public static void setaSpaceCopyUtil(ASpaceCopyUtil copyUtil) { aSpaceCopyUtil = copyUtil; } @@ -130,7 +126,7 @@ private void initContainer() throws Exception { else indicator += analogInstances.getResourceComponent().getTitle(); } } - if (! alreadyAdded.keySet().contains(this)) { + if (! alreadyAdded.keySet().contains(new MiniContainer(this))) { String uri; uri = this.addTopContainer(); this.addToExisting(uri); @@ -166,9 +162,11 @@ private String addTopContainer() throws Exception { * @param uri * @throws Exception */ - private void resaveTopContainer(String uri) throws Exception { + private void resaveTopContainer(String uri, JSONObject location) throws Exception { JSONObject json = aSpaceCopyUtil.getRecord(uri); - json.put("container_locations", getContainerLocations()); + JSONArray locationsJA = (JSONArray) json.get("container_locations"); + locationsJA.put(location); + json.put("container_locations", locationsJA); String instanceClassName; try { instanceClassName = getInstance().getClass().getName(); @@ -178,33 +176,12 @@ private void resaveTopContainer(String uri) throws Exception { aSpaceCopyUtil.saveRecord(uri, json.toString(),instanceClassName + "->" + getAtID()); } - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || !(o instanceof TopContainerMapper)) return false; - TopContainerMapper other = (TopContainerMapper) o; - if (!(this.parentRepoURI.equals(other.parentRepoURI))) return false; - if (!(this.barcode == null || this.barcode.isEmpty() || other.barcode == null || other.barcode.isEmpty())) { - if (this.barcode.trim().equalsIgnoreCase(other.barcode.trim())) return true; - } - Boolean sameType = true; - if (!(this.type == null || this.type.isEmpty() || other.type == null || other.type.isEmpty())) { - sameType = this.type.equals(other.type); - } - return (this.indicator.equalsIgnoreCase(other.indicator) && sameType); - } - - @Override - public int hashCode() { - return parentRepoURI.hashCode(); - } - /** * add a top container to the list of containers that have already been added so that it won't be duplicated */ public void addToExisting(String uri) { if (uri.contains("10000001") || uri.contains("no id assigned")) return; - alreadyAdded.put(this, new Info(uri, this)); + alreadyAdded.put(new MiniContainer(this), new Info(uri)); } /** @@ -212,70 +189,93 @@ public void addToExisting(String uri) { * @return uri for top container */ public String getRef() { - if (!alreadyAdded.containsKey(this)) return null; - return alreadyAdded.get(this).uri; + if (!alreadyAdded.containsKey(new MiniContainer(this))) return null; + return alreadyAdded.get(new MiniContainer(this)).uri; } public void addLocationURI(String uri, String note) throws Exception { if (uri == null || uri.isEmpty()) { return; } - LocationJSONObject json = new LocationJSONObject(uri, note); + JSONObject json = getLocationJSON(uri, note); - Info info = alreadyAdded.get(this); + Info info = alreadyAdded.get(new MiniContainer(this)); if (info != null) { - info.locationURIs.add(json); - resaveTopContainer(info.uri); + if (info.locationURIs.add(uri)) resaveTopContainer(info.uri, json); } } public void addLocationURI(String uri) throws Exception {addLocationURI(uri, "");} - private class LocationJSONObject extends JSONObject { + private static JSONObject getLocationJSON(String uri, String note) throws JSONException { + JSONObject json = new JSONObject(); + json.put("ref", uri); + json.put("status", "current"); + json.put("note", note); + //TODO find out if this info is stored in AT + json.put("start_date", ASpaceMapper.DEFAULT_DATE.toString()); + return json; + } - String uri; + @Override + public String toString() { + return type + " " + indicator + " -- " + printableInstance(); + } - public LocationJSONObject(String uri, String note) throws JSONException { - this.uri = uri; - put("ref", uri); - put("status", "current"); - put("note", note); - //TODO find out if this info is stored in AT - put("start_date", ASpaceMapper.DEFAULT_DATE.toString()); + private String printableInstance() { + if (instance == null) return "ArchivesSpace Container"; + return instance.getClass().getSimpleName() + " " + atID; + } + + /** + * holds only the data needed to determine if containers are equivalent + * used in the already added map in place of the top container object to minimize memory usage + */ + private class MiniContainer { + + private String parentRepoURI; + private String indicator; + private String type; + private String barcode; + + MiniContainer(TopContainerMapper container) { + this.parentRepoURI = container.parentRepoURI; + this.indicator = container.indicator; + this.type = container.type; + this.barcode = container.barcode; } @Override - public boolean equals(Object other) { - if (this == other) return true; - if (other == null || !(other instanceof LocationJSONObject)) return false; - return this.uri.equals(((LocationJSONObject) other).uri); + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || !(o instanceof MiniContainer)) return false; + MiniContainer other = (MiniContainer) o; + if (!(this.parentRepoURI.equals(other.parentRepoURI))) return false; + if (!(this.barcode == null || this.barcode.isEmpty() || other.barcode == null || other.barcode.isEmpty())) { + if (this.barcode.trim().equalsIgnoreCase(other.barcode.trim())) return true; + } + Boolean sameType = true; + if (!(this.type == null || this.type.isEmpty() || other.type == null || other.type.isEmpty())) { + sameType = this.type.equals(other.type); + } + return (this.indicator.equalsIgnoreCase(other.indicator) && sameType); } @Override public int hashCode() { - return uri.hashCode(); - } - } - - public JSONArray getContainerLocations() throws Exception { - Set containerLocs = alreadyAdded.get(this).locationURIs; - if (containerLocs.size() == 0) { - aSpaceCopyUtil.addErrorMessage("No locations exist for top container " + this + "\n"); - aSpaceCopyUtil.print("No locations exist for " + this + ". Skipping.\n"); - return null; - } else { - return new JSONArray(containerLocs); + return parentRepoURI.hashCode(); } } - @Override - public String toString() { - return type + " " + indicator + " -- " + printableInstance(); - } + /** + * stores the information for a top container as it was added to ASpace + */ + private class Info { + public String uri; + private Set locationURIs = new HashSet(); - public String printableInstance() { - if (instance == null) return "ArchivesSpace Container"; - return instance.getClass().getSimpleName() + " " + atID; + public Info(String uri) { + this.uri = uri; + } } - } From e698042896765626289ecb0a0128fa6221ae0fe8 Mon Sep 17 00:00:00 2001 From: Sarah Morrissey Date: Tue, 17 Oct 2017 15:24:45 -0400 Subject: [PATCH 07/19] child repo procssing notes --- makep | 4 +- .../plugin/utils/aspace/ASpaceMapper.java | 56 ++++++++++--------- .../utils/aspace/TopContainerMapper.java | 34 ++++++++--- 3 files changed, 57 insertions(+), 37 deletions(-) diff --git a/makep b/makep index cc54800..d24af7c 100755 --- a/makep +++ b/makep @@ -11,9 +11,9 @@ cd out/production/ScriptAT zip -rv scriptAT.zip . -i \*.class *.bsh *.xml -x test/* -mv -v scriptAT.zip C:/"Program Files"/"Archivists Toolkit 2.0"/plugins #This should be wherever AT is installed +mv -v scriptAT.zip C:/"Program Files (x86)"/"Archivists Toolkit 2.0"/plugins #This should be wherever AT is installed # create a zip of the source code -cd $cwd +cd ${cwd} zip -vr scriptAT_src.zip src -x "*.svn*" "*.DS_Store*" \ No newline at end of file diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java index b9b3daa..73236c2 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java @@ -1443,22 +1443,22 @@ public JSONObject convertResource(Resources record) throws Exception { if(record.getRestrictionsApply() != null && record.getRestrictionsApply()) { json.put("restrictions", record.getRestrictionsApply()); } - StringBuilder sb = new StringBuilder(); - String note = record.getRepositoryProcessingNote(); - if (note != null && !(note.isEmpty())) { - sb.append(note); - sb.append('\n'); - } - for (ResourcesComponents component: record.getResourcesComponents()) { - addRepositoryProcessingNote(sb, component); - } - String repoProcessingNote; - if (sb.length() > 65000) { - repoProcessingNote = sb.substring(0, 64999); - } else { - repoProcessingNote = sb.toString(); - } - json.put("repository_processing_note", repoProcessingNote); +// StringBuilder sb = new StringBuilder(); +// String note = record.getRepositoryProcessingNote(); +// if (note != null && !(note.isEmpty())) { +// sb.append(note); +// sb.append('\n'); +// } +// for (ResourcesComponents component: record.getResourcesComponents()) { +// addRepositoryProcessingNote(sb, component); +// } +// String repoProcessingNote; +// if (sb.length() > 65000) { +// repoProcessingNote = sb.substring(0, 64999); +// } else { +// repoProcessingNote = sb.toString(); +// } + json.put("repository_processing_note", record.getRepositoryProcessingNote());//repoProcessingNote); json.put("container_summary", record.getContainerSummary()); @@ -1508,17 +1508,17 @@ public JSONObject convertResource(Resources record) throws Exception { return json; } - public void addRepositoryProcessingNote(StringBuilder sb, ResourcesComponents component) { - if (sb.length() >= 65000) return; - String note = component.getRepositoryProcessingNote(); - if (note != null && !(note.isEmpty())) { - sb.append(component); - sb.append(": "); - sb.append(note); - sb.append('\n'); - } - for (ResourcesComponents child: component.getResourcesComponents()) addRepositoryProcessingNote(sb, child); - } +// public void addRepositoryProcessingNote(StringBuilder sb, ResourcesComponents component) { +// if (sb.length() >= 65000) return; +// String note = component.getRepositoryProcessingNote(); +// if (note != null && !(note.isEmpty())) { +// sb.append(component); +// sb.append(": "); +// sb.append(note); +// sb.append('\n'); +// } +// for (ResourcesComponents child: component.getResourcesComponents()) addRepositoryProcessingNote(sb, child); +// } /** * Method to convert a resource record into an archival object @@ -1541,6 +1541,8 @@ private JSONObject convertResourceComponent(ResourcesComponents record) throws E String title = record.getTitle(); json.put("title", title); + json.put("repository_processing_note", record.getRepositoryProcessingNote()); + // add the language code addLanguageCode(json, record.getLanguageCode()); diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java b/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java index b30476f..92e729d 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java @@ -135,9 +135,8 @@ private void initContainer() throws Exception { /** * adds a top container to the ASpace database - * TODO add the foreign key * @return the uri of the top container - * @throws JSONException + * @throws Exception */ private String addTopContainer() throws Exception { JSONObject jsonObject = new JSONObject(); @@ -158,11 +157,12 @@ private String addTopContainer() throws Exception { } /** - * method that resaves a top container record. Mainly for adding additional locations. - * @param uri + * method that adds a location to a previously saved top container record + * @param uri of the container + * @param location json object for the container location to be added * @throws Exception */ - private void resaveTopContainer(String uri, JSONObject location) throws Exception { + private void saveTopContainerLocation(String uri, JSONObject location) throws Exception { JSONObject json = aSpaceCopyUtil.getRecord(uri); JSONArray locationsJA = (JSONArray) json.get("container_locations"); locationsJA.put(location); @@ -177,7 +177,8 @@ private void resaveTopContainer(String uri, JSONObject location) throws Exceptio } /** - * add a top container to the list of containers that have already been added so that it won't be duplicated + * add a top container to the list of containers that have already been added so that it won't be duplicated * + * @param uri of the top container */ public void addToExisting(String uri) { if (uri.contains("10000001") || uri.contains("no id assigned")) return; @@ -185,7 +186,7 @@ public void addToExisting(String uri) { } /** - * gets the reference to the matching top container + * gets the uri reference to the matching top container * @return uri for top container */ public String getRef() { @@ -193,6 +194,12 @@ public String getRef() { return alreadyAdded.get(new MiniContainer(this)).uri; } + /** + * adds a location for a container if it is not already associated with said container + * @param uri of the location + * @param note for accession containers the note from accession location record + * @throws Exception + */ public void addLocationURI(String uri, String note) throws Exception { if (uri == null || uri.isEmpty()) { return; @@ -201,12 +208,19 @@ public void addLocationURI(String uri, String note) throws Exception { Info info = alreadyAdded.get(new MiniContainer(this)); if (info != null) { - if (info.locationURIs.add(uri)) resaveTopContainer(info.uri, json); + if (info.locationURIs.add(uri)) saveTopContainerLocation(info.uri, json); } } public void addLocationURI(String uri) throws Exception {addLocationURI(uri, "");} + /** + * method to get a json object for a containers location + * @param uri the location's uri + * @param note for accession containers the note for the accession location, otherwise null + * @return a json object for the container location + * @throws JSONException + */ private static JSONObject getLocationJSON(String uri, String note) throws JSONException { JSONObject json = new JSONObject(); json.put("ref", uri); @@ -222,6 +236,10 @@ public String toString() { return type + " " + indicator + " -- " + printableInstance(); } + /** + * gives information about what AT record the top container was created from + * @return class and id of item the container was created from + */ private String printableInstance() { if (instance == null) return "ArchivesSpace Container"; return instance.getClass().getSimpleName() + " " + atID; From b02c8881c2669e4134cd6f49e4f28b53fca8e48e Mon Sep 17 00:00:00 2001 From: Sarah Morrissey Date: Tue, 17 Oct 2017 16:06:26 -0400 Subject: [PATCH 08/19] top container locations use resource/accession created date as start date --- .../plugin/utils/aspace/ASpaceMapper.java | 16 +--------------- .../utils/aspace/TopContainerMapper.java | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java index 73236c2..baf0257 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java @@ -1443,21 +1443,7 @@ public JSONObject convertResource(Resources record) throws Exception { if(record.getRestrictionsApply() != null && record.getRestrictionsApply()) { json.put("restrictions", record.getRestrictionsApply()); } -// StringBuilder sb = new StringBuilder(); -// String note = record.getRepositoryProcessingNote(); -// if (note != null && !(note.isEmpty())) { -// sb.append(note); -// sb.append('\n'); -// } -// for (ResourcesComponents component: record.getResourcesComponents()) { -// addRepositoryProcessingNote(sb, component); -// } -// String repoProcessingNote; -// if (sb.length() > 65000) { -// repoProcessingNote = sb.substring(0, 64999); -// } else { -// repoProcessingNote = sb.toString(); -// } + json.put("repository_processing_note", record.getRepositoryProcessingNote());//repoProcessingNote); json.put("container_summary", record.getContainerSummary()); diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java b/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java index 92e729d..9c9fb27 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java @@ -221,13 +221,26 @@ public void addLocationURI(String uri, String note) throws Exception { * @return a json object for the container location * @throws JSONException */ - private static JSONObject getLocationJSON(String uri, String note) throws JSONException { + private JSONObject getLocationJSON(String uri, String note) throws JSONException { JSONObject json = new JSONObject(); json.put("ref", uri); json.put("status", "current"); json.put("note", note); - //TODO find out if this info is stored in AT - json.put("start_date", ASpaceMapper.DEFAULT_DATE.toString()); + + //set start date for location to date record was created + Date startDate = null; + try { + if (instance instanceof AccessionsLocations) { + startDate = accession.getCreated(); + } else if (instance instanceof ArchDescriptionAnalogInstances) { + ArchDescriptionAnalogInstances aIn = (ArchDescriptionAnalogInstances) instance; + if (aIn.getResource() != null) startDate = aIn.getResource().getCreated(); + if (aIn.getResourceComponent() != null) startDate = aIn.getResourceComponent().getCreated(); + } + } finally { + if (startDate == null) startDate = ASpaceMapper.DEFAULT_DATE; + } + json.put("start_date", startDate.toString()); return json; } From fb3502ec9f5fe4363def52903be44f0c1aa04a46 Mon Sep 17 00:00:00 2001 From: Sarah Morrissey Date: Tue, 17 Oct 2017 16:49:10 -0400 Subject: [PATCH 09/19] updated rights statement mapping --- .../plugin/utils/aspace/ASpaceCopyUtil.java | 5 +++++ .../plugin/utils/aspace/ASpaceEnumUtil.java | 9 +++++++++ .../plugin/utils/aspace/ASpaceMapper.java | 14 ++++++-------- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java index 019594d..bbb4c35 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java @@ -462,6 +462,11 @@ public void copyLookupList() throws Exception { eventList.addListItem("rights_transferred"); records.add(eventList); + LookupList rightsBasisList = new LookupList(); + rightsBasisList.setListName("Rights Basis"); + rightsBasisList.addListItem("archivists_toolkit"); + records.add(rightsBasisList); + // these are used to update the progress bar int total = records.size(); int count = 0; diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java index 57b1916..573c33b 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java @@ -608,6 +608,11 @@ public Object[] getASpaceAccessionResourceType(String atValue) { return getASpaceEnumValue("accession_resource_type", atValue); } + public Object[] getASpaceRightsBasis(String atValue) { + if (atValue == null || atValue.isEmpty()) atValue = "archivists_toolkit"; + return getASpaceEnumValue("rights_statement_other_rights_basis", atValue); + } + /** * Method to set the hash map that holds the dynamic enums * @@ -682,6 +687,8 @@ public JSONObject getDynamicEnum(String listName) { return dynamicEnums.get("subject_source"); } else if (listName.equalsIgnoreCase("File use attributes")) { return dynamicEnums.get("file_version_use_statement"); + } else if (listName.equalsIgnoreCase("Rights Basis")) { + return dynamicEnums.get("rights_statement_other_rights_basis"); } else { return null; } @@ -795,6 +802,8 @@ public Object[] mapsToASpaceEnumValue(String enumListName, String atValue, Strin mappedValue = getASpaceSubjectSource(atValue); } else if(enumListName.equals("file_version_use_statement")) { mappedValue = getASpaceFileVersionUseStatement(atValue); + } else if (enumListName.equals("rights_statement_other_rights_basis")) { + mappedValue = getASpaceRightsBasis(atValue); } else { mappedValue = new Object[]{null, false}; } diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java index baf0257..ed081ff 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java @@ -837,15 +837,13 @@ private void addRightsStatementRecord(Accessions record, JSONObject json) throws JSONArray rightsStatementJA = new JSONArray(); JSONObject rightStatementJS = new JSONObject(); - rightStatementJS.put("rights_type", "copyright"); - rightStatementJS.put("status", "copyrighted"); - rightStatementJS.put("jurisdiction", "US"); // TODO 8/12/2013 this is not suppose to be required + rightStatementJS.put("rights_type", "other"); + rightStatementJS.put("other_rights_basis", enumUtil.getASpaceRightsBasis(null)[0]); +// rightStatementJS.put("status", "copyrighted"); +// rightStatementJS.put("jurisdiction", "US"); // TODO 8/12/2013 this is not suppose to be required Date startDate = record.getRightsTransferredDate(); - if (startDate == null) { - rightStatementJS.put("start_date", DEFAULT_DATE.toString()); - } else { - rightStatementJS.put("start_date", record.getRightsTransferredDate());//dateJS); - } + if (startDate == null) startDate = DEFAULT_DATE; + rightStatementJS.put("start_date", startDate.toString()); JSONArray notesJA = new JSONArray(); String note = record.getRightsTransferredNote(); if (note != null && !(note.isEmpty())) { From a295614236a82f167333e1f4d36d17712ba6eb6e Mon Sep 17 00:00:00 2001 From: Sarah Morrissey Date: Wed, 18 Oct 2017 09:22:58 -0400 Subject: [PATCH 10/19] fixed an issue that was causing an error where there shouldn't be --- README.md | 12 +++++++++++- .../plugin/utils/aspace/ASpaceClient.java | 6 +++++- .../plugin/utils/aspace/ASpaceCopyUtil.java | 3 --- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a5dfa3b..5c37eea 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,8 @@ NOTES ON RUNNING THE PLUGIN IN COMMAND LINE MODE NOTES ON DATA MIGRATION DEFAULTS 1. If a date is missing in AT but is required for AS the default date will be set to 1/1/1900 or 0 for integer dates. -2. Many containers including all of those for accessions do not have meaningful identifiers in AT. Any such +2. The start date specified for a container location is the creation date of the associated resource/accession. +3. Many containers including all of those for accessions do not have meaningful identifiers in AT. Any such container will be assigned a default container indication which will include the words "unknown container" as well as information about it's content. 3. Sometimes AT records will have an indicator but no container type for either container 2 or 3. This is not @@ -60,6 +61,15 @@ a container 3 is specified without a container 2. 4. Some IDs are checked for uniqueness in AS but not AT. In these cases if an ID is not unique the problem will be corrected by adding ## along with some random string to the ID. +HOW TOP CONTAINER UNIQUENESS IS DETERMINED + +Archivist's Toolkit does not include the concept of distinct top containers but rather the same container may +be entered many times for multiple instances. For this reason it was necessary to determine a set of rules for +determining what constitutes a unique top container. For top containers created from instances, they are considered +to be the same if either the repository and barcode match or if the repository, indicator, and container type +match. As for accessions, no instances exist in Archivist's Toolkit. In stead, a top container is created for each +location the accession is linked to. + NOTE ON CPU AND MEMORY USAGE Data migration is a memory intensive task due to the large amounts of objects being created. diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceClient.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceClient.java index 40207d6..3757800 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceClient.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceClient.java @@ -256,7 +256,11 @@ private String executePost(PostMethod post, String idName, String atId, String j response = new JSONObject(responseBody); } - id = response.getString(idName); + if (post.getURI().toString().contains(ASSESSMENT_ATTR_DEFNS_ENDPOINT)) { + if (response.getString("status").equalsIgnoreCase("updated")) id = "ok"; + } else { + id = response.getString(idName); + } if (id == null || id.trim().isEmpty()) { errorBuffer.append("Endpoint: ").append(post.getURI()).append("\n"). diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java index bbb4c35..6101a2f 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java @@ -1018,9 +1018,6 @@ public Integer getAssessmentAttributeID(Repositories repo, String label, String saveRecord(repoURI + aspaceClient.ASSESSMENT_ATTR_DEFNS_ENDPOINT, json.toString(), "Assessment Attributes->" + type); assessmentAttributeDefinitions.get(repoURI).put(key, id); - //decrement errors because it counts this as an error for some reason - saveErrorCount--; - aspaceErrorCount--; return id; } From 1ef1b517c59a7a0cf6aa47ba54c29ce5f38cbbcc Mon Sep 17 00:00:00 2001 From: Sarah Morrissey Date: Fri, 20 Oct 2017 11:15:10 -0400 Subject: [PATCH 11/19] stop and start feature --- dbcopy.properties | 6 +- lib/hamcrest-core-1.3.jar | Bin 0 -> 45024 bytes .../archiviststoolkit/plugin/dbCopyCLI.java | 51 +- .../archiviststoolkit/plugin/dbCopyFrame.java | 66 +- .../plugin/utils/CodeViewerDialog.java | 4 +- .../plugin/utils/aspace/ASpaceClient.java | 56 +- .../plugin/utils/aspace/ASpaceCopyUtil.java | 331 +- .../aspace/IntentionalExitException.java | 10 + .../utils/aspace/TopContainerMapper.java | 53 +- src/test/TestUtils.java | 26 +- src/test/Testing.java | 10 +- src/test/as_22_empty.sql | 6043 +++++++++++++++++ 12 files changed, 6522 insertions(+), 134 deletions(-) create mode 100644 lib/hamcrest-core-1.3.jar create mode 100644 src/org/archiviststoolkit/plugin/utils/aspace/IntentionalExitException.java create mode 100644 src/test/as_22_empty.sql diff --git a/dbcopy.properties b/dbcopy.properties index d66e8bb..9325bae 100644 --- a/dbcopy.properties +++ b/dbcopy.properties @@ -43,9 +43,9 @@ checkISODates=false # AT database connection information databaseType=MySQL -atUrl=jdbc:mysql://dev.archiviststoolkit.org:3306/AT_SANDBOX2_0 -atUsername=atuser -atPassword=cr4ckA1t +atUrl=jdbc:mysql://localhost:3306/AT_copy +atUsername=root +atPassword= # parameters used to connect to an ASpace instance aspaceHost=http://localhost:8089 diff --git a/lib/hamcrest-core-1.3.jar b/lib/hamcrest-core-1.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..9d5fe16e3dd37ebe79a36f61f5d0e1a69a653a8a GIT binary patch literal 45024 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 UgpPtD2z>DYYp}SJr5?)v0beu;=l}o! literal 0 HcmV?d00001 diff --git a/src/org/archiviststoolkit/plugin/dbCopyCLI.java b/src/org/archiviststoolkit/plugin/dbCopyCLI.java index 36b7e14..c7dc56e 100644 --- a/src/org/archiviststoolkit/plugin/dbCopyCLI.java +++ b/src/org/archiviststoolkit/plugin/dbCopyCLI.java @@ -3,6 +3,7 @@ import org.archiviststoolkit.plugin.dbdialog.RemoteDBConnectDialogLight; import org.archiviststoolkit.plugin.utils.aspace.ASpaceClient; import org.archiviststoolkit.plugin.utils.aspace.ASpaceCopyUtil; +import org.archiviststoolkit.plugin.utils.aspace.IntentionalExitException; import org.hibernate.Session; import java.io.*; @@ -236,28 +237,32 @@ private void startASpaceCopyProcess() { } else { System.out.println("Administrator authenticated ...\n"); } - - // first load the notes etc types and resource from the destination database - ascopy.loadRepositories(); +// +// // first load the notes etc types and resource from the destination database +// ascopy.loadRepositories(); if (continueFromResources && ascopy.uriMapFileExist()) { ascopy.loadURIMaps(); } else { - if(!copyOnlyResources) { - ascopy.copyLookupList(); - ascopy.copyRepositoryRecords(); - ascopy.mapRepositoryGroups(); - ascopy.copyLocationRecords(); - ascopy.copyUserRecords(); - ascopy.copySubjectRecords(); - ascopy.copyNameRecords(); - ascopy.copyAccessionRecords(); - ascopy.copyDigitalObjectRecords(); - - // save the record maps for possible future use - ascopy.saveURIMaps(); - } + ascopy.loadRepositories(); } +// if(!copyOnlyResources) { + ascopy.copyLookupList(); + ascopy.copyRepositoryRecords(); + ascopy.mapRepositoryGroups(); + ascopy.copyLocationRecords(); + //just so it gets removed from recordsToCopy + ascopy.addAdminUser(null, null, null); + ascopy.copyUserRecords(); + ascopy.copySubjectRecords(); + ascopy.copyNameRecords(); + ascopy.copyAccessionRecords(); + ascopy.copyDigitalObjectRecords(); + + // save the record maps for possible future use +// ascopy.saveURIMaps(); +// } +// } // set the number of resources to copy int numberOfResourcesToCopy = 1000000; @@ -274,7 +279,7 @@ private void startASpaceCopyProcess() { ascopy.addAssessments(); // DEBUG code which checks to see that all ISO dates are valid - if(checkISODates) { + if (checkISODates) { ascopy.checkISODates(); } @@ -286,13 +291,19 @@ private void startASpaceCopyProcess() { // now save the migration log saveLogFile("migration_log-" + getDatabaseNameFromURL(atUrl) + ".txt", migrationErrors); + } catch (IntentionalExitException e) { + System.out.println(e.getMessage()); + if (ascopy != null) ascopy.saveURIMaps(); + else System.out.println("Could not save URI maps ...\nMigration will need to be restarted ..."); } catch (Exception e) { System.out.println("Unrecoverable exception, migration stopped ...\n\n"); - if (ascopy != null) { + if(ascopy != null) { + ascopy.saveURIMaps(); System.out.println(ascopy.getCurrentRecordInfo() + "\n\n"); + } else { + System.out.println("Could not save URI maps ...\nMigration will need to be restarted ..."); } - e.printStackTrace(); } } diff --git a/src/org/archiviststoolkit/plugin/dbCopyFrame.java b/src/org/archiviststoolkit/plugin/dbCopyFrame.java index 83c4f38..3e8077b 100644 --- a/src/org/archiviststoolkit/plugin/dbCopyFrame.java +++ b/src/org/archiviststoolkit/plugin/dbCopyFrame.java @@ -16,6 +16,7 @@ import org.archiviststoolkit.plugin.utils.ScriptsDAO; import org.archiviststoolkit.plugin.utils.aspace.ASpaceClient; import org.archiviststoolkit.plugin.utils.aspace.ASpaceCopyUtil; +import org.archiviststoolkit.plugin.utils.aspace.IntentionalExitException; import org.fife.ui.rsyntaxtextarea.SyntaxConstants; import org.hibernate.Session; @@ -269,7 +270,7 @@ public void run() { boolean ignoreUnlinkedSubjects = ignoreUnlinkedSubjectsCheckBox.isSelected(); // create the hash map use to see if a certain record should be exported automatically - HashMap publishMap = new HashMap(); + HashMap publishMap = new HashMap(); publishMap.put("names", publishNamesCheckBox.isSelected()); publishMap.put("subjects", publishSubjectsCheckBox.isSelected()); publishMap.put("accessions", publishAccessionsCheckBox.isSelected()); @@ -300,7 +301,7 @@ public void run() { ascopy.setCopying(true); // try getting the session and only continue if a valid session is return; - if(!ascopy.getSession()) { + if (!ascopy.getSession()) { consoleTextArea.append("No session, nothing to do ...\n"); reEnableCopyButtons(); return; @@ -316,8 +317,8 @@ public void run() { System.out.println("Version: " + aspaceVersion); if (aspaceVersion.isEmpty()) ascopy.setCopyAssessments(); - if(!aspaceVersion.isEmpty() && !ASpaceCopyUtil.SUPPORTED_ASPACE_VERSION.contains(aspaceVersion)) { - String message = "Unsupported Archivesspace Version\nSupport Versions: " + + if (!aspaceVersion.isEmpty() && !ASpaceCopyUtil.SUPPORTED_ASPACE_VERSION.contains(aspaceVersion)) { + String message = "Unsupported Archivesspace Version\nSupport Versions: " + ASpaceCopyUtil.SUPPORTED_ASPACE_VERSION + " ...\n"; consoleTextArea.append(message); @@ -343,30 +344,33 @@ public void run() { } } - // first load the notes etc types and resource from the destination database - if(!copyStopped) ascopy.loadRepositories(); - // set the progress bar from doing it's thing since the ascopy class is going to take over - copyProgressBar.setIndeterminate(false); - if(useSaveURIMapsCheckBox.isSelected() && ascopy.uriMapFileExist()) { + if (useSaveURIMapsCheckBox.isSelected() && ascopy.uriMapFileExist()) { ascopy.loadURIMaps(); } else { - if(!copyStopped) ascopy.copyLookupList(); - if(!copyStopped) ascopy.copyRepositoryRecords(); - if(!copyStopped) ascopy.mapRepositoryGroups(); - if(!copyStopped) ascopy.copyLocationRecords(); - if(!copyStopped) ascopy.addAdminUser(admin, "Administrator User", adminPassword); - if(!copyStopped) ascopy.copyUserRecords(); - if(!copyStopped) ascopy.copySubjectRecords(); - if(!copyStopped) ascopy.copyNameRecords(); - if(!copyStopped) ascopy.copyAccessionRecords(); - if(!copyStopped) ascopy.copyDigitalObjectRecords(); - - // save the record maps for possible future use - ascopy.saveURIMaps(); + // first load the notes etc types and resource from the destination database if not using saved ones + if (!copyStopped) ascopy.loadRepositories(); } + // set the progress bar from doing it's thing since the ascopy class is going to take over + copyProgressBar.setIndeterminate(false); + + if (!copyStopped) ascopy.copyLookupList(); + if (!copyStopped) ascopy.copyRepositoryRecords(); + if (!copyStopped) ascopy.mapRepositoryGroups(); + if (!copyStopped) ascopy.copyLocationRecords(); + if (!copyStopped) ascopy.addAdminUser(admin, "Administrator User", adminPassword); + if (!copyStopped) ascopy.copyUserRecords(); + if (!copyStopped) ascopy.copySubjectRecords(); + if (!copyStopped) ascopy.copyNameRecords(); + if (!copyStopped) ascopy.copyAccessionRecords(); + if (!copyStopped) ascopy.copyDigitalObjectRecords(); + + // save the record maps for possible future use +// ascopy.saveURIMaps(); +// } + // get the number of resources to copy here to allow it to be reset while the migration // has been started, but migration of resources has not yet started int resourcesToCopy = 1000000; @@ -382,17 +386,18 @@ public void run() { threads = Integer.parseInt(threadsTextField.getText()); // get the number of resource to copy - if(resourcesIDsList.isEmpty()) { + if (resourcesIDsList.isEmpty()) { resourcesToCopy = Integer.parseInt(numResourceToCopyTextField.getText()); } else { resourcesToCopy = resourcesIDsList.size(); } - } catch (NumberFormatException nfe) { } + } catch (NumberFormatException nfe) { + } // check to make sure we didn't stop the copy process or resource to copy is // not set to zero. Setting resources to copy to zero is a convenient way // to generate a URI map which contains no resource records for testing purposes - if(!copyStopped && resourcesToCopy != 0) { + if (!copyStopped && resourcesToCopy != 0) { ascopy.setResourcesToCopyList(resourcesIDsList); ascopy.copyResourceRecords(resourcesToCopy, threads); } @@ -407,11 +412,19 @@ public void run() { String errorCount = "" + ascopy.getASpaceErrorCount(); errorCountLabel.setText(errorCount); migrationErrors = ascopy.getSaveErrorMessages() + "\n\nTotal errors/warnings: " + errorCount; + } catch (IntentionalExitException e) { + consoleTextArea.setText(e.getMessage()); + consoleTextArea.append("Will attempt to save URI maps ..."); + if (ascopy != null) ascopy.saveURIMaps(); + else consoleTextArea.append("Could not save URI maps ...\nMigration will need to be restarted ..."); } catch (Exception e) { consoleTextArea.setText("Unrecoverable exception, migration stopped ...\n\n"); if(ascopy != null) { + ascopy.saveURIMaps(); consoleTextArea.append(ascopy.getCurrentRecordInfo() + "\n\n"); + } else { + consoleTextArea.append("Could not save URI maps ...\nMigration will need to be restarted ..."); } consoleTextArea.append(getStackTrace(e)); @@ -551,6 +564,7 @@ private void reEnableCopyButtons() { copyProgressBar.setValue(0); if (copyStopped) { + if (ascopy != null) ascopy.saveURIMaps(); copyStopped = false; copyProgressBar.setString("Cancelled Copy Process ..."); } else { @@ -978,7 +992,7 @@ public void actionPerformed(ActionEvent e) { contentPanel.add(adminPasswordTextField, cc.xy(13, 7)); //---- useSaveURIMapsCheckBox ---- - useSaveURIMapsCheckBox.setText("Continue From Resource Records"); + useSaveURIMapsCheckBox.setText("Continue Previous Migration"); contentPanel.add(useSaveURIMapsCheckBox, cc.xy(1, 9)); //---- resetPassswordLabel ---- diff --git a/src/org/archiviststoolkit/plugin/utils/CodeViewerDialog.java b/src/org/archiviststoolkit/plugin/utils/CodeViewerDialog.java index 9acbb8b..c644ac2 100644 --- a/src/org/archiviststoolkit/plugin/utils/CodeViewerDialog.java +++ b/src/org/archiviststoolkit/plugin/utils/CodeViewerDialog.java @@ -122,8 +122,8 @@ private void storeButtonActionPerformed() { String message = ""; // see whether we note posting to the aspace backend by seeing if we have http - if(testHost.toLowerCase().contains("http")) { - if(!testMultipleRecords) { + if (testHost.toLowerCase().contains("http")) { + if (!testMultipleRecords) { message = recordTestServletClient.storeRecord(jsonText); } else { message = recordTestServletClient.storeMultipleRecords(jsonText); diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceClient.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceClient.java index 3757800..7a45fb2 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceClient.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceClient.java @@ -1,5 +1,6 @@ package org.archiviststoolkit.plugin.utils.aspace; +import com.mysql.jdbc.CommunicationsException; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.NameValuePair; @@ -48,6 +49,7 @@ public class ASpaceClient { public static final String INDEXER_ENDPOINT = "/aspace-indexer/"; public static final String ASSESSMENT_ENDPOINT = "/assessments"; public static final String ASSESSMENT_ATTR_DEFNS_ENDPOINT = "/assessment_attribute_definitions"; + public static final String TOP_CONTAINER_ENDPOINT = "/top_containers"; private HttpClient httpclient = new HttpClient(); private String host = ""; @@ -110,7 +112,7 @@ public void setASpaceCopyUtil(ASpaceCopyUtil aspaceCopyUtil) { /** * Method to get the session using the admin login */ - public boolean getSession() { + public boolean getSession() throws IntentionalExitException { boolean haveSession = false; // get a session id using the admin login @@ -136,6 +138,8 @@ public boolean getSession() { // default indexer port of 8090 was not changed indexerHost = host.replace("89", "90"); } + } catch (IntentionalExitException e) { + throw e; } catch (Exception e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } @@ -207,15 +211,27 @@ private String executePost(PostMethod post, String idName, String atId, String j int statusCode; try { statusCode = httpclient.executeMethod(post); + if (statusCode == HttpStatus.SC_INTERNAL_SERVER_ERROR) { + throw new IntentionalExitException("Could not connect to server ...\nFix connection then resume ..."); + } } catch (ConnectException e) { boolean ready = false; - String message = "Connection has been lost.\nCheck that your web server and Archives\nSpace session " + - "are still running."; + String message = "Connection has been lost. Check your \n" + + "connection to Archives Space and your \n" + + "web server and then press 'yes' to \n" + + "contiue migration. Otherwise press \n" + + "'no' to save your URI maps and \n" + + "continue this migration later."; while (!ready) { - int result = JOptionPane.showConfirmDialog(null, message, "Fix connection", - JOptionPane.OK_CANCEL_OPTION, JOptionPane.ERROR_MESSAGE); - if (result == JOptionPane.OK_OPTION) ready = true; + int result = JOptionPane.showConfirmDialog(null, message, "Lost connection", + JOptionPane.YES_NO_OPTION, JOptionPane.ERROR_MESSAGE); + if (result == JOptionPane.YES_OPTION) { + ready = true; + } else if (result == JOptionPane.NO_OPTION) { + throw new IntentionalExitException(); + } } + return executePost(post, idName, atId, jsonText); } @@ -348,7 +364,7 @@ public String get(String endpoint, NameValuePair[] params) throws Exception { if (debug) System.out.println("get: " + fullUrl); int statusCode = httpclient.executeMethod(get); - +//bookmark String statusMessage = "Status code: " + statusCode + "\nStatus text: " + get.getStatusText(); @@ -411,7 +427,9 @@ public HashMap loadRepositories() { try { String jsonText = get(REPOSITORY_ENDPOINT, null); + System.out.println(jsonText); JSONArray jsonArray = new JSONArray(jsonText); + System.out.println(jsonArray); if (jsonArray.length() != 0) { for (int i = 0; i < jsonArray.length(); i++) { @@ -420,7 +438,10 @@ public HashMap loadRepositories() { String uri = (String) json.get("uri"); repos.put(shortName, uri); } + + //we don't need to load the top containers if only assessments still need to be copied loadExistingTopContainers(repos); + return repos; } } catch (Exception e) { @@ -431,11 +452,22 @@ public HashMap loadRepositories() { private void loadExistingTopContainers(HashMap repos) throws Exception { for (String repoURI: repos.values()) { - for (int i = 1; true; i++) { - String container = get(repoURI + "/top_containers/" + i, null); - if (container == null || container.isEmpty()) {break;} - JSONObject containerJS = new JSONObject(container); - new TopContainerMapper(containerJS); + NameValuePair[] params = new NameValuePair[1]; + params[0] = new NameValuePair("page", "1"); + JSONObject page1JS = new JSONObject(get(repoURI + TOP_CONTAINER_ENDPOINT, params)); + int lastPage = (Integer) page1JS.get("last_page"); + for (int page = 1; page <= lastPage; page++) { + params[0] = new NameValuePair("page", page + ""); + JSONObject pageJS = new JSONObject(get(repoURI + TOP_CONTAINER_ENDPOINT, params)); + JSONArray results = (JSONArray) pageJS.get("results"); + for (int i = 0; i < results.length(); i++) { + String container = results.getString(i); + if (container == null || container.isEmpty()) { + break; + } + JSONObject containerJS = new JSONObject(container); + new TopContainerMapper(containerJS); + } } } diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java index 6101a2f..7d79cdc 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java @@ -13,14 +13,8 @@ import org.json.JSONObject; import javax.swing.*; -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.Set; +import java.io.*; +import java.util.*; /** * Created by IntelliJ IDEA. @@ -181,12 +175,21 @@ public String getURIMapping(DomainObject record) { private final String DIGITAL_OBJECT_KEY = "digitalObjectURIMap"; private final String RESOURCE_KEY = "resourceURIMap"; private final String ASSESSMENT_KEY = "assessmentURIMap"; + private final String TOP_CONTAINER_KEY = "topContainerURIMap"; private final String REPOSITORY_MISMATCH_KEY = "repositoryMismatchMap"; + private final String REPOSITORY_AGENT_KEY = "repositoryAgentMap"; + private final String REPOSITORY_GROUP_KEY = "repositoryGroupMap"; private final String RECORD_TOTAL_KEY = "copyProgress"; + private final String RECORD_ATTEMPTED_KEY = "progressBookmark"; // An Array List for storing the total number of main records transferred ArrayList recordTotals = new ArrayList(); + private LinkedList recordsToCopy = new LinkedList(); + private int numAttempted = 0; + private int numSuccessful = 0; + private int numUnlinked = 0; + // Specifies whether or not to simulate the REST calls private boolean simulateRESTCalls = false; @@ -277,6 +280,20 @@ private void init() { TopContainerMapper.setaSpaceCopyUtil(this); + recordsToCopy = new LinkedList(); + recordsToCopy.add("Lookup List"); + recordsToCopy.add("Repositories"); + recordsToCopy.add("RepositoryGroups"); + recordsToCopy.add("Locations"); + recordsToCopy.add("Admin User"); + recordsToCopy.add("Users"); + recordsToCopy.add("Subjects"); + recordsToCopy.add("Names"); + recordsToCopy.add("Accessions"); + recordsToCopy.add("Digital Objects"); + recordsToCopy.add("Resource Records"); + recordsToCopy.add("Assessments"); + // start the stop watch object so we can see how long this data transfer takes startWatch(); } @@ -385,7 +402,7 @@ private String stopWatch() { * * @return */ - public boolean getSession() { + public boolean getSession() throws IntentionalExitException { if(simulateRESTCalls) return true; boolean connected = aspaceClient.getSession(); @@ -452,6 +469,8 @@ public void copyLookupList() throws Exception { return; } + if (!recordsToCopy.contains("Lookup List")) return; + ArrayList records = sourceRCD.getLookupLists(); /* add a dummy lookup list to hold new event fields */ @@ -469,8 +488,12 @@ public void copyLookupList() throws Exception { // these are used to update the progress bar int total = records.size(); - int count = 0; - int success = 0; + int count = numAttempted; + int success = numSuccessful; + +// if (recordsToCopy.peek().equals("Lookup List")) { + records = new ArrayList(records.subList(numAttempted, total)); +// } for (LookupList lookupList: records) { String listName = lookupList.getListName(); @@ -502,13 +525,20 @@ public void copyLookupList() throws Exception { if (!id.equalsIgnoreCase(NO_ID)) { print("Copied Lookup List Values: " + lookupList.getListName() + " :: " + id); success++; + numSuccessful++; } } count++; + numAttempted++; updateProgress("Lookup List", total, count); } + recordsToCopy.remove(); + numAttempted = 0; + numSuccessful = 0; + saveURIMaps(); + // set this to be 100 percent since not all lookup will need to be migrated updateRecordTotals("Lookup List", total, total); @@ -537,15 +567,23 @@ public void loadRepositories() { * @throws Exception */ public void copyRepositoryRecords() throws Exception { + + if (!recordsToCopy.contains("Repositories")) return; + print("Copying repository records ..."); ArrayList records = sourceRCD.getRepositories(); +// if (recordsToCopy.peek().equals("Repositories")) { +// records = new ArrayList(records.subList(numAttempted, records.size())); +// } // these are used to update the progress bar int total = records.size(); - int count = 0; - int success = 0; + int count = numAttempted;//0; + int success = numSuccessful; + + records = new ArrayList(records.subList(numAttempted, total)); for (Repositories repository : records) { if(stopCopy) return; @@ -574,19 +612,29 @@ public void copyRepositoryRecords() throws Exception { repositoryAgentURIMap.put(uri, agentURI); print("Copied Repository: " + repository.getShortName() + " :: " + id); +// print("Mapping repository user group records for " + repository.getShortName() + "..."); +// mapRepositoryGroups(uri); success++; + numSuccessful++; } else { print("Fail -- Repository: " + repository.getShortName()); } } else { print("Repository already in database " + shortName); success++; + numSuccessful++; } count++; + numAttempted++; updateProgress("Repositories", total, count); } + recordsToCopy.remove(); + numAttempted = 0; + numSuccessful = 0; + saveURIMaps(); + updateRecordTotals("Repositories", total, success); } @@ -597,6 +645,8 @@ public void copyRepositoryRecords() throws Exception { public void mapRepositoryGroups() { if(simulateRESTCalls) return; + if (!recordsToCopy.contains("RepositoryGroups")) return; + print("Mapping repository user group records ..."); // these are used to update the progress bar @@ -629,6 +679,9 @@ public void mapRepositoryGroups() { } } + recordsToCopy.remove(); + saveURIMaps(); + if(debug) { print("Number of groups mapped: " + repositoryGroupURIMap.size()); } @@ -638,14 +691,25 @@ public void mapRepositoryGroups() { * Method to copy the location records */ public void copyLocationRecords() throws Exception { + + if (!recordsToCopy.contains("Locations")) return; + print("Copying locations records ..."); + ArrayList records = sourceRCD.getLocations(); +// if (recordsToCopy.peek().equals("Locations")) { +// records = new ArrayList(records.subList(numAttempted, records.size())); +// } // these are used to update the progress bar and import log int total = records.size(); - int count = 0; - int success = 0; + int count = numAttempted; + int success = numSuccessful; + + records = new ArrayList(records.subList(numAttempted, total)); + + updateProgress("Locations", total, count); for (Locations location : records) { if(stopCopy) return; @@ -666,6 +730,7 @@ public void copyLocationRecords() throws Exception { locationURIMap.put(location.getIdentifier(), uri); print("Copied Location: " + location.getSortString() + " :: " + id); success++; + numSuccessful++; } else { print("Fail -- Location: " + location.getSortString()); } @@ -674,9 +739,15 @@ public void copyLocationRecords() throws Exception { } count++; + numAttempted++; updateProgress("Locations", total, count); } + recordsToCopy.remove(); + numAttempted = 0; + numSuccessful = 0; + saveURIMaps(); + updateRecordTotals("Locations", total, success); // refresh the database connection to prevent heap space error @@ -689,15 +760,23 @@ public void copyLocationRecords() throws Exception { * @throws Exception */ public void copyUserRecords() throws Exception { + + if (!recordsToCopy.contains("Users")) return; + print("Copying User records ..."); ArrayList records = sourceRCD.getUsers(); +// if (recordsToCopy.peek().equals("Users")) { +// records = new ArrayList(records.subList(numAttempted, records.size())); +// } // these are used to update the progress bar int total = records.size(); - int count = 0; - int success = 0; + int count = numAttempted; + int success = numSuccessful; + + records = new ArrayList(records.subList(numAttempted, total)); for (Users user : records) { if(stopCopy) return; @@ -724,14 +803,21 @@ public void copyUserRecords() throws Exception { if (!id.equalsIgnoreCase(NO_ID)) { print("Copied User: " + user.toString() + " :: " + id); success++; + numSuccessful++; } else { print("Fail -- User: " + user.toString()); } count++; + numAttempted++; updateProgress("Users", total, count); } + recordsToCopy.remove(); + numAttempted = 0; + numSuccessful = 0; + saveURIMaps(); + updateRecordTotals("Users", total, success); // refresh the database connection to prevent heap space error @@ -746,6 +832,11 @@ public void copyUserRecords() throws Exception { * @param password */ public void addAdminUser(String username, String name, String password) throws Exception { + + if (username == null) recordsToCopy.remove(); + + if (!recordsToCopy.contains("Admin User")) return; + // get the administrator group uri String groupURI = ""; @@ -769,6 +860,9 @@ public void addAdminUser(String username, String name, String password) throws E String id = saveRecord(ASpaceClient.USER_ENDPOINT, jsonText, params, "N/A"); print("Added Admin User: " + username + " :: " + id); + + recordsToCopy.remove(); + saveURIMaps(); } /** @@ -813,16 +907,24 @@ public ArrayList getUserGroupURIs(Users user) { * @throws Exception */ public void copyNameRecords() throws Exception { + + if (!recordsToCopy.contains("Names")) return; + print("Copying Name records ..."); ArrayList records = sourceRCD.getNames(); +// if (recordsToCopy.peek().equals("Names")) { +// records = new ArrayList(records.subList(numAttempted, records.size())); +// } // these are used to update the progress bar int total = records.size(); - int count = 0; - int success = 0; - int unlinkedCount = 0; + int count = numAttempted; + int success = numSuccessful; + int unlinkedCount = numUnlinked; + + records = new ArrayList(records.subList(numAttempted, total)); for (Names name : records) { if(stopCopy) return; @@ -830,6 +932,7 @@ public void copyNameRecords() throws Exception { // check to see if to ignore this record if it has no links if(ignoreNames && name.getArchDescriptionNames().size() == 0) { unlinkedCount++; + numUnlinked++; print("Not Copying Unlinked Name: " + name); continue; } @@ -862,6 +965,7 @@ public void copyNameRecords() throws Exception { nameURIMap.put(name.getIdentifier(), uri); print("Copied Name: " + name + " :: " + id); success++; + numSuccessful++; } else { print("Failed -- Name: " + name); } @@ -870,9 +974,14 @@ public void copyNameRecords() throws Exception { } count++; + numAttempted++; updateProgress("Names", total, count); } + recordsToCopy.remove(); + numAttempted = 0; + numSuccessful = 0; + updateRecordTotals("Names", total, success); // add error message indicating any records that were not copied because they @@ -881,6 +990,8 @@ public void copyNameRecords() throws Exception { String unlinkMessage = "Did Not Copy " + unlinkedCount + " Unlinked Name Record(s)\n"; addErrorMessage(unlinkMessage); } + numUnlinked = 0; + saveURIMaps(); // refresh the database connection to prevent heap space error freeMemory(); @@ -888,16 +999,24 @@ public void copyNameRecords() throws Exception { public void addAssessments() throws Exception { + if (!recordsToCopy.contains("Assessments")) return; + if (aspaceVersion.contains("2.2")) { System.out.println("Copying assessments ..."); } else if (aspaceVersion.isEmpty()) { if (copyAssessments == null) setCopyAssessments(); - if (!copyAssessments) return; + if (!copyAssessments) { + recordsToCopy.remove(); + return; + } System.out.println("Unknown version of ASpace.\nAttempting to copy assessments ..."); + print("Unknown version of ASpace ..."); + print("Attempting to copy assessments ..."); } else { System.out.println("ASpace version does not support assessments. Can not copy."); print("ASpace version " + aspaceVersion + " does not support assessments.\nSkipping copy assessments."); addErrorMessage("Can not copy assessments. ASpace version " + aspaceVersion + " does not support."); + recordsToCopy.remove(); return; } @@ -905,11 +1024,16 @@ public void addAssessments() throws Exception { ArrayList records = sourceRCD.getAssessments(); +// if (recordsToCopy.peek().equals("Assessments")) { +// records = new ArrayList(records.subList(numAttempted, records.size())); +// } + // these are used to update the progress bar int total = records.size(); - int count = 0; - int success = 0; - int unlinkedCount = 0; + int count = numAttempted; + int success = numSuccessful; + + records = new ArrayList(records.subList(numAttempted, total)); for (Assessments assessment : records) { if (stopCopy) return; @@ -926,6 +1050,7 @@ public void addAssessments() throws Exception { assessmentURIMap.put(assessment.getIdentifier(), uri); print("Copied Assessment: " + assessment + " :: " + id); success++; + numSuccessful++; } else { print("Fail -- Assessment: " + assessment); } @@ -934,9 +1059,15 @@ public void addAssessments() throws Exception { } count++; + numAttempted++; updateProgress("Assessments", total, count); } + recordsToCopy.remove(); + numAttempted = 0; + numSuccessful = 0; + saveURIMaps(); + updateRecordTotals("Assessments", total, success); // refresh the database connection to prevent heap space error @@ -1027,15 +1158,24 @@ public Integer getAssessmentAttributeID(Repositories repo, String label, String * @throws Exception */ public void copySubjectRecords() throws Exception { + + if (!recordsToCopy.contains("Subjects")) return; + print("Copying Subject records ..."); ArrayList records = sourceRCD.getSubjects(); +// if (recordsToCopy.peek().equals("Subjects")) { +// records = new ArrayList(records.subList(numAttempted, records.size())); +// } + // these are used to update the progress bar int total = records.size(); - int count = 0; - int success = 0; - int unlinkedCount = 0; + int count = numAttempted; + int success = numSuccessful; + int unlinkedCount = numUnlinked; + + records = new ArrayList(records.subList(numAttempted, total)); for (Subjects subject : records) { if(stopCopy) return; @@ -1043,6 +1183,7 @@ public void copySubjectRecords() throws Exception { // check to see if to ignore this record if it has no links if(ignoreSubjects && subject.getArchDescriptionSubjects().size() == 0) { unlinkedCount++; + numUnlinked++; print("Not Copying Unlinked Subject: " + subject); continue; } @@ -1062,6 +1203,7 @@ public void copySubjectRecords() throws Exception { subjectURIMap.put(subject.getIdentifier(), uri); print("Copied Subject: " + subject + " :: " + id); success++; + numSuccessful++; } else { print("Fail -- Subject: " + subject); } @@ -1070,9 +1212,14 @@ public void copySubjectRecords() throws Exception { } count++; + numAttempted++; updateProgress("Subjects", total, count); } + recordsToCopy.remove(); + numAttempted = 0; + numSuccessful = 0; + updateRecordTotals("Subjects", total, success); // add error message indicating any records that were not copied because they @@ -1081,6 +1228,8 @@ public void copySubjectRecords() throws Exception { String unlinkMessage = "Did Not Copy " + unlinkedCount + " Unlinked Subject Record(s)\n"; addErrorMessage(unlinkMessage); } + numUnlinked = 0; + saveURIMaps(); // refresh the database connection to prevent heap space error freeMemory(); @@ -1092,14 +1241,25 @@ public void copySubjectRecords() throws Exception { * @throws Exception */ public void copyAccessionRecords() throws Exception { + + if (!recordsToCopy.contains("Accessions")) return; + print("Copying Accession records ..."); ArrayList records = sourceRCD.getAccessions(); +// if (recordsToCopy.peek().equals("Accessions")) { +// records = new ArrayList(records.subList(numAttempted, records.size())); +// } + // these are used to update the progress bar int total = records.size(); - int count = 0; - int success = 0; + int count = numAttempted; + int success = numSuccessful; + + records = new ArrayList(records.subList(numAttempted, total)); + +// updateProgress("Accessions", total, count); for (Accessions accession : records) { if(stopCopy) return; @@ -1136,6 +1296,7 @@ public void copyAccessionRecords() throws Exception { accessionURIMap.put(accession.getIdentifier(), uri); print("Copied Accession: " + accession.getTitle() + " :: " + id); success++; + numSuccessful++; } else { print("Fail -- Accession: " + accession.getTitle()); } @@ -1144,9 +1305,15 @@ public void copyAccessionRecords() throws Exception { } count++; + numAttempted++; updateProgress("Accessions", total, count); } + recordsToCopy.remove(); + numAttempted = 0; + numSuccessful = 0; + saveURIMaps(); + updateRecordTotals("Accessions", total, success); // refresh the database connection to prevent heap space error @@ -1208,14 +1375,23 @@ public void addInstance(Accessions accession, JSONObject json) throws Exception * @throws Exception */ public void copyDigitalObjectRecords() throws Exception { + + if (!recordsToCopy.contains("Digital Objects")) return; + print("Copying Digital Object records ..."); ArrayList records = sourceRCD.getDigitalObjects(); +// if (recordsToCopy.peek().equals("Digital Objects")) { +// records = new ArrayList(records.subList(numAttempted, records.size())); +// } + // these are used to update the progress bar int total = records.size(); - int count = 0; - int success = 0; + int count = numAttempted; + int success = numSuccessful; + + records = new ArrayList(records.subList(numAttempted, total)); for (DigitalObjects digitalObject : records) { if(stopCopy) return; @@ -1288,6 +1464,7 @@ public void copyDigitalObjectRecords() throws Exception { print("Copied Digital Object: " + digitalObject.getTitle() + " :: " + id); success++; + numSuccessful++; } else { print("Fail -- Digital Object: " + digitalObject.getTitle()); } @@ -1296,9 +1473,15 @@ public void copyDigitalObjectRecords() throws Exception { } count++; + numAttempted++; updateProgress("Digital Objects", total, count); } + recordsToCopy.remove(); + numAttempted = 0; + numSuccessful = 0; + saveURIMaps(); + updateRecordTotals("Digital Objects", total, success); // refresh the database connection to prevent heap space error @@ -1364,26 +1547,36 @@ public void copyDigitalObjectChildren(String endpoint, String digitalObjectURI, * @param threads */ public void copyResourceRecords(int max, int threads) throws Exception { + if (!enumsSet) mapper.setASpaceDynamicEnums(aspaceClient.loadDynamicEnums()); enumsSet = true; currentRecordType = "Resource Record"; // first delete previously saved resource records if that option was selected by user - if(deleteSavedResources) { - deleteSavedResources(); - } +// if(deleteSavedResources) { +// deleteSavedResources(); +// } + + if (!recordsToCopy.contains("Resource Records")) return; ArrayList records = sourceRCD.getResources(); +// if (recordsToCopy.peek().equals("Resource Records")) { +// records = new ArrayList(records.subList(numAttempted, records.size())); +// } - print("Copying " + records.size() + " Resource records ..."); +// print("Copying " + records.size() + " Resource records ..."); copyCount = 0; // keep track of the number of resource records copied // these are used to update the progress bar int total = records.size(); - int count = 0; + int count = numAttempted; + + records = new ArrayList(records.subList(numAttempted, total)); + + print("Copying " + records.size() + " Resource records ..."); // if we in debug mode, then set total to max if(debug && max < total) total = max; @@ -1538,10 +1731,12 @@ public void copyResourceRecords(int max, int threads) throws Exception { if(threads == 1) { String bids = saveRecord(batchEndpoint, batchJA.toString(2), atId); - if(!bids.equals(NO_ID)) { + if(!bids.equals(NO_ID) && bids.length() != 0) { if(!simulateRESTCalls) { + System.out.println("bids: " + bids); JSONObject bidsJS = new JSONObject(bids); resourceURI = (new JSONArray(bidsJS.getString(resourceURI))).getString(0); + } print("Batch Copied Resource: " + resourceTitle + " :: " + resourceURI); @@ -1578,8 +1773,15 @@ public void copyResourceRecords(int max, int threads) throws Exception { if(!useBatchImport) { freeMemory(); } + + if (!simulateRESTCalls) numAttempted++; } + if (!simulateRESTCalls) recordsToCopy.remove(); + numAttempted = 0; + numSuccessful = 0; + if (!simulateRESTCalls) saveURIMaps(); + // wait for any threads to finish before returning if we running more than one // thread to copy while(getTotalASpaceClients() != 0 && !stopCopy) { @@ -2032,6 +2234,7 @@ private synchronized void updateResourceURIMap(Long oldIdentifier, String uri) { */ private synchronized void incrementCopyCount() { copyCount++; + if (!simulateRESTCalls) numSuccessful++; } /** @@ -2124,7 +2327,7 @@ private synchronized String getRemappedRepositoryURI(String recordType, Long atI * @param endpoint to make post to * @param jsonText record */ - public synchronized String saveRecord(String endpoint, String jsonText, String atId) { + public synchronized String saveRecord(String endpoint, String jsonText, String atId) throws IntentionalExitException { return saveRecord(endpoint, jsonText, null, atId); } @@ -2136,25 +2339,27 @@ public synchronized String saveRecord(String endpoint, String jsonText, String a * @param jsonText record * @param params parameters to pass to service */ - public synchronized String saveRecord(String endpoint, String jsonText, NameValuePair[] params, String atId) { + public synchronized String saveRecord(String endpoint, String jsonText, NameValuePair[] params, String atId) throws IntentionalExitException { String id = NO_ID; try { // Make sure we don't try to print out a batch import record since they can // be thousands of lines long - if(endpoint.contains(ASpaceClient.BATCH_IMPORT_ENDPOINT)) { + if (endpoint.contains(ASpaceClient.BATCH_IMPORT_ENDPOINT)) { print("Route: " + endpoint + "\nBatch Record Length: " + jsonText.length() + " bytes"); } else { print("Route: " + endpoint + "\n" + jsonText); } - if(simulateRESTCalls) { + if (simulateRESTCalls) { id = "10000001"; Thread.sleep(2); } else { id = aspaceClient.post(endpoint, jsonText, params, atId); } + } catch (IntentionalExitException e) { + throw e; } catch (Exception e) { if(endpoint.contains(ASpaceClient.BATCH_IMPORT_ENDPOINT)) { print("Error saving batch import record ..."); @@ -2234,7 +2439,7 @@ private synchronized void updateProgress(String recordType, int total, int count progressBar.setMinimum(0); progressBar.setMaximum(1); progressBar.setString("Loading " + recordType); - } else if(count == 1) { + } else if(count >= 1) { progressBar.setMinimum(0); progressBar.setMaximum(total); @@ -2403,6 +2608,9 @@ public String getCurrentRecordCheckMessage() { * Method to do certain task after the copy has completed */ public void cleanUp() { + + saveURIMaps(); + copying = false; aspaceClient.startIndexer(); @@ -2486,6 +2694,16 @@ private void freeMemory() { public void saveURIMaps() { HashMap uriMap = new HashMap(); + uriMap.put(REPOSITORY_KEY, repositoryURIMap); + uriMap.put(REPOSITORY_MISMATCH_KEY, repositoryMismatchMap); + uriMap.put(REPOSITORY_AGENT_KEY, repositoryAgentURIMap); + + HashMap repoGroups = new HashMap(); + for (String key: repositoryGroupURIMap.keySet()) { + repoGroups.put(key, repositoryGroupURIMap.get(key).toString()); + } + uriMap.put(REPOSITORY_GROUP_KEY, repoGroups); + // only save maps we are going to need, // or we not generating from ASpace backend data uriMap.put(LOCATION_KEY, locationURIMap); @@ -2496,9 +2714,18 @@ public void saveURIMaps() { uriMap.put(RESOURCE_KEY, resourceURIMap); uriMap.put(ASSESSMENT_KEY, assessmentURIMap); + uriMap.put(TOP_CONTAINER_KEY, TopContainerMapper.getAlreadyAddedStringForm()); + // store the record totals array list here also uriMap.put(RECORD_TOTAL_KEY, recordTotals); + HashMap progress = new HashMap(); + progress.put("records_to_copy", recordsToCopy); + progress.put("number_attempted", numAttempted); + progress.put("number_successful", numSuccessful); + progress.put("number_unlinked", numUnlinked); + uriMap.put(RECORD_ATTEMPTED_KEY, progress); + if(repositoryMismatchMap != null) { uriMap.put(REPOSITORY_MISMATCH_KEY, repositoryMismatchMap); } @@ -2510,6 +2737,7 @@ public void saveURIMaps() { ScriptDataUtils.saveScriptData(uriMapFile, uriMap); } catch (Exception e) { print("Unable to save URI map file " + uriMapFile.getName()); + System.out.println(e.getMessage()); } } @@ -2527,6 +2755,25 @@ public void loadURIMaps() { digitalObjectURIMap = (HashMap)uriMap.get(DIGITAL_OBJECT_KEY); resourceURIMap = (HashMap)uriMap.get(RESOURCE_KEY); assessmentURIMap = (HashMap)uriMap.get(ASSESSMENT_KEY); + repositoryURIMap = (HashMap)uriMap.get(REPOSITORY_KEY); + repositoryAgentURIMap = (HashMap)uriMap.get(REPOSITORY_AGENT_KEY); + + HashMap repoGroupMap = (HashMap)uriMap.get(REPOSITORY_GROUP_KEY); + for (String key: repoGroupMap.keySet()) { + repositoryGroupURIMap.put(key, new JSONObject(repoGroupMap.get(key))); + } + + TopContainerMapper.setAlreadyAdded((HashMap) uriMap.get(TOP_CONTAINER_KEY)); + + HashMap progress = (HashMap)uriMap.get(RECORD_ATTEMPTED_KEY); + LinkedList saved = (LinkedList) progress.get("records_to_copy"); + if (saved != null) recordsToCopy = saved; + Integer numAttemptedInteger = (Integer) progress.get("number_attempted"); + if (numAttemptedInteger != null) numAttempted = numAttemptedInteger; + Integer numSuccessfulInteger = (Integer) progress.get("number_successful"); + if (numSuccessfulInteger != null) numSuccessful = numSuccessfulInteger; + Integer numUnlinkedInteger = (Integer) progress.get("number_unlinked"); + if (numUnlinkedInteger != null) numUnlinked = numUnlinkedInteger; // load the repository mismatch map if its not null if(uriMap.containsKey(REPOSITORY_MISMATCH_KEY)) { diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/IntentionalExitException.java b/src/org/archiviststoolkit/plugin/utils/aspace/IntentionalExitException.java new file mode 100644 index 0000000..0665257 --- /dev/null +++ b/src/org/archiviststoolkit/plugin/utils/aspace/IntentionalExitException.java @@ -0,0 +1,10 @@ +package org.archiviststoolkit.plugin.utils.aspace; + +public class IntentionalExitException extends Exception { + + public IntentionalExitException() { + super("Exiting migration ..."); + } + + public IntentionalExitException(String message) {super(message);} +} diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java b/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java index 9c9fb27..33c0a34 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java @@ -8,6 +8,7 @@ import org.json.JSONException; import org.json.JSONObject; +import java.io.Serializable; import java.util.*; /** @@ -19,7 +20,7 @@ public class TopContainerMapper { //keys are containers that have been added to ASpace and values are objects that store that container's information - private static Map alreadyAdded = new HashMap(); + private static HashMap alreadyAdded = new HashMap(); //used for making unique identifiers for containers without indicators private static int unknownCount = 1; @@ -262,7 +263,7 @@ private String printableInstance() { * holds only the data needed to determine if containers are equivalent * used in the already added map in place of the top container object to minimize memory usage */ - private class MiniContainer { + private static class MiniContainer { private String parentRepoURI; private String indicator; @@ -276,6 +277,18 @@ private class MiniContainer { this.barcode = container.barcode; } + MiniContainer(String ... args) { + this.parentRepoURI = args[0]; + this.indicator = args[1]; + this.type = args[2]; + this.barcode = args[3]; + } + + @Override + public String toString() { + return parentRepoURI + SEPARATOR + indicator + SEPARATOR + type + SEPARATOR + barcode; + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -301,12 +314,46 @@ public int hashCode() { /** * stores the information for a top container as it was added to ASpace */ - private class Info { + private static class Info { public String uri; private Set locationURIs = new HashSet(); public Info(String uri) { this.uri = uri; } + + public Info(String ... args) { + this.uri = args[0]; + for (int i = 1; i < args.length; i++) locationURIs.add(args[i]); + } + + @Override + public String toString() { + StringBuilder value = new StringBuilder(uri); + for (String uri: locationURIs) { + value.append(SEPARATOR); + value.append(uri); + } + return value.toString(); + } + } + + private static String[] fromString(String stringForm) { + return stringForm.split(SEPARATOR); + } + + private static final String SEPARATOR = "! . . . !"; + + public static HashMap getAlreadyAddedStringForm() { + HashMap alreadyAddedStringForm = new HashMap(); + return alreadyAddedStringForm; + } + + public static void setAlreadyAdded(HashMap topContainerURIMap) { + for (String key: topContainerURIMap.keySet()) { + MiniContainer miniContainer = new MiniContainer(fromString(key)); + Info info = new Info(fromString(topContainerURIMap.get(key))); + alreadyAdded.put(miniContainer, info); + } } } diff --git a/src/test/TestUtils.java b/src/test/TestUtils.java index 9c8a911..77da251 100644 --- a/src/test/TestUtils.java +++ b/src/test/TestUtils.java @@ -27,10 +27,8 @@ class TestUtils { private static final boolean testMode = true; public static final String[] empty = new String[0]; - public static boolean trimData = false; - public static int startNum = 0; - public static int numToCopy = 50; static HashMap dynamicEnums = new HashMap(); + private static JSONObject json; static { try { @@ -45,8 +43,8 @@ class TestUtils { e.printStackTrace(); } } - //should be in base at-migration folder - private static String propertiesUrl = "C:/Users/morrissey/Desktop/at-migration/dbcopy.properties"; + + private static String propertiesUrl = System.getProperty("user.dir") + "/dbcopy.properties"; private static String atURL; private static String at_username; private static String at_password; @@ -54,16 +52,8 @@ class TestUtils { private static String as_username = "root"; private static String as_password = ""; //create a dump of your empty AS database and set this as the schemaSetup url - private static String schemaSetup = "C:/Users/morrissey/Documents/dumps/as_22_empty.sql"; + private static String schemaSetup = System.getProperty("user.dir") + "/src/test/as_22_empty.sql"; private static String host; - public static boolean manualConnect = true; - - static { - if (!testMode) { - manualConnect = false; - trimData = false; - } - } public static Properties getProperties() { return properties; @@ -174,13 +164,7 @@ public static void resetDatabase() throws SQLException, FileNotFoundException { public static Statement dbConnect() throws SQLException { Connection conn = DriverManager.getConnection(asURL, as_username, as_password); - Statement st = conn.createStatement(); - return st; - } - - public static void printStackTrace() { - System.out.println("Stack Trace:\n"); - for (StackTraceElement e : Thread.currentThread().getStackTrace()) System.out.println(e); + return conn.createStatement(); } public static void print(Object o) {System.out.println(o);} diff --git a/src/test/Testing.java b/src/test/Testing.java index fcba4a4..796b197 100644 --- a/src/test/Testing.java +++ b/src/test/Testing.java @@ -31,11 +31,11 @@ public Testing() { * @param args */ public static void main(String[] args) throws Exception { - TestUtils.resetDatabase(); +// TestUtils.resetDatabase(); //Call constructors for any tests you want to run here -// new dbCopyCLITest(); -// new ASpaceMapperTest(); -// new ASpaceEnumUtilTest(); -// org.junit.runner.JUnitCore.main(testsToRun.toArray(new String[0])); + new dbCopyCLITest(); + new ASpaceMapperTest(); + new ASpaceEnumUtilTest(); + org.junit.runner.JUnitCore.main(testsToRun.toArray(new String[0])); } } diff --git a/src/test/as_22_empty.sql b/src/test/as_22_empty.sql new file mode 100644 index 0000000..025480b --- /dev/null +++ b/src/test/as_22_empty.sql @@ -0,0 +1,6043 @@ +-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) +-- +-- Host: localhost Database: archivesspace +-- ------------------------------------------------------ +-- Server version 5.5.8 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `accession` +-- + +DROP TABLE IF EXISTS `accession`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `accession` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `repo_id` int(11) NOT NULL, + `suppressed` int(11) NOT NULL DEFAULT '0', + `identifier` varchar(255) NOT NULL, + `title` varchar(8704) DEFAULT NULL, + `display_string` text, + `publish` int(11) DEFAULT NULL, + `content_description` text, + `condition_description` text, + `disposition` text, + `inventory` text, + `provenance` text, + `general_note` text, + `resource_type_id` int(11) DEFAULT NULL, + `acquisition_type_id` int(11) DEFAULT NULL, + `accession_date` date DEFAULT NULL, + `restrictions_apply` int(11) DEFAULT NULL, + `retention_rule` text, + `access_restrictions` int(11) DEFAULT NULL, + `access_restrictions_note` text, + `use_restrictions` int(11) DEFAULT NULL, + `use_restrictions_note` text, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `accession_unique_identifier` (`repo_id`,`identifier`), + KEY `resource_type_id` (`resource_type_id`), + KEY `acquisition_type_id` (`acquisition_type_id`), + KEY `accession_system_mtime_index` (`system_mtime`), + KEY `accession_user_mtime_index` (`user_mtime`), + KEY `accession_suppressed_index` (`suppressed`), + CONSTRAINT `accession_ibfk_3` FOREIGN KEY (`repo_id`) REFERENCES `repository` (`id`), + CONSTRAINT `accession_ibfk_1` FOREIGN KEY (`resource_type_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `accession_ibfk_2` FOREIGN KEY (`acquisition_type_id`) REFERENCES `enumeration_value` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `accession` +-- + +LOCK TABLES `accession` WRITE; +/*!40000 ALTER TABLE `accession` DISABLE KEYS */; +/*!40000 ALTER TABLE `accession` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `active_edit` +-- + +DROP TABLE IF EXISTS `active_edit`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `active_edit` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `uri` varchar(255) NOT NULL, + `operator` varchar(255) NOT NULL, + `timestamp` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `active_edit_timestamp_index` (`timestamp`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `active_edit` +-- + +LOCK TABLES `active_edit` WRITE; +/*!40000 ALTER TABLE `active_edit` DISABLE KEYS */; +/*!40000 ALTER TABLE `active_edit` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `agent_contact` +-- + +DROP TABLE IF EXISTS `agent_contact`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `agent_contact` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `agent_person_id` int(11) DEFAULT NULL, + `agent_family_id` int(11) DEFAULT NULL, + `agent_corporate_entity_id` int(11) DEFAULT NULL, + `agent_software_id` int(11) DEFAULT NULL, + `name` text NOT NULL, + `salutation_id` int(11) DEFAULT NULL, + `address_1` text, + `address_2` text, + `address_3` text, + `city` text, + `region` text, + `country` text, + `post_code` text, + `email` text, + `email_signature` text, + `note` text, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `salutation_id` (`salutation_id`), + KEY `agent_contact_system_mtime_index` (`system_mtime`), + KEY `agent_contact_user_mtime_index` (`user_mtime`), + KEY `agent_person_id` (`agent_person_id`), + KEY `agent_family_id` (`agent_family_id`), + KEY `agent_corporate_entity_id` (`agent_corporate_entity_id`), + KEY `agent_software_id` (`agent_software_id`), + CONSTRAINT `agent_contact_ibfk_1` FOREIGN KEY (`salutation_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `agent_contact_ibfk_2` FOREIGN KEY (`agent_person_id`) REFERENCES `agent_person` (`id`), + CONSTRAINT `agent_contact_ibfk_3` FOREIGN KEY (`agent_family_id`) REFERENCES `agent_family` (`id`), + CONSTRAINT `agent_contact_ibfk_4` FOREIGN KEY (`agent_corporate_entity_id`) REFERENCES `agent_corporate_entity` (`id`), + CONSTRAINT `agent_contact_ibfk_5` FOREIGN KEY (`agent_software_id`) REFERENCES `agent_software` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `agent_contact` +-- + +LOCK TABLES `agent_contact` WRITE; +/*!40000 ALTER TABLE `agent_contact` DISABLE KEYS */; +/*!40000 ALTER TABLE `agent_contact` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `agent_corporate_entity` +-- + +DROP TABLE IF EXISTS `agent_corporate_entity`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `agent_corporate_entity` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `publish` int(11) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `agent_sha1` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `sha1_agent_corporate_entity` (`agent_sha1`), + KEY `agent_corporate_entity_system_mtime_index` (`system_mtime`), + KEY `agent_corporate_entity_user_mtime_index` (`user_mtime`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `agent_corporate_entity` +-- + +LOCK TABLES `agent_corporate_entity` WRITE; +/*!40000 ALTER TABLE `agent_corporate_entity` DISABLE KEYS */; +/*!40000 ALTER TABLE `agent_corporate_entity` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `agent_family` +-- + +DROP TABLE IF EXISTS `agent_family`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `agent_family` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `publish` int(11) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `agent_sha1` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `sha1_agent_family` (`agent_sha1`), + KEY `agent_family_system_mtime_index` (`system_mtime`), + KEY `agent_family_user_mtime_index` (`user_mtime`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `agent_family` +-- + +LOCK TABLES `agent_family` WRITE; +/*!40000 ALTER TABLE `agent_family` DISABLE KEYS */; +/*!40000 ALTER TABLE `agent_family` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `agent_person` +-- + +DROP TABLE IF EXISTS `agent_person`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `agent_person` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `publish` int(11) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `agent_sha1` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `sha1_agent_person` (`agent_sha1`), + KEY `agent_person_system_mtime_index` (`system_mtime`), + KEY `agent_person_user_mtime_index` (`user_mtime`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `agent_person` +-- + +LOCK TABLES `agent_person` WRITE; +/*!40000 ALTER TABLE `agent_person` DISABLE KEYS */; +INSERT INTO `agent_person` VALUES (1,0,1,0,NULL,NULL,'2017-10-10 13:57:47','2017-10-10 14:07:19','2017-10-10 13:57:47','34b9f8e2743cd3b6350abb05af694ff4ca399402'); +/*!40000 ALTER TABLE `agent_person` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `agent_software` +-- + +DROP TABLE IF EXISTS `agent_software`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `agent_software` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `system_role` varchar(255) NOT NULL DEFAULT 'none', + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `publish` int(11) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `agent_sha1` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `sha1_agent_software` (`agent_sha1`), + KEY `agent_software_system_role_index` (`system_role`), + KEY `agent_software_system_mtime_index` (`system_mtime`), + KEY `agent_software_user_mtime_index` (`user_mtime`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `agent_software` +-- + +LOCK TABLES `agent_software` WRITE; +/*!40000 ALTER TABLE `agent_software` DISABLE KEYS */; +INSERT INTO `agent_software` VALUES (1,'archivesspace_agent',0,1,0,NULL,NULL,'2017-10-10 13:57:47','2017-10-10 13:57:47','2017-10-10 13:57:47','bf279fd776532bc4b288a9acde481da89c5e0253'); +/*!40000 ALTER TABLE `agent_software` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `archival_object` +-- + +DROP TABLE IF EXISTS `archival_object`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `archival_object` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `repo_id` int(11) NOT NULL, + `root_record_id` int(11) DEFAULT NULL, + `parent_id` int(11) DEFAULT NULL, + `parent_name` varchar(255) DEFAULT NULL, + `position` int(11) NOT NULL, + `publish` int(11) DEFAULT NULL, + `ref_id` varchar(255) NOT NULL, + `component_id` varchar(255) DEFAULT NULL, + `title` varchar(8704) DEFAULT NULL, + `display_string` text, + `level_id` int(11) NOT NULL, + `other_level` varchar(255) DEFAULT NULL, + `language_id` int(11) DEFAULT NULL, + `system_generated` int(11) DEFAULT '0', + `restrictions_apply` int(11) DEFAULT NULL, + `repository_processing_note` text, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `suppressed` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `ao_unique_refid` (`root_record_id`,`ref_id`), + UNIQUE KEY `uniq_ao_pos` (`parent_name`,`position`), + KEY `level_id` (`level_id`), + KEY `language_id` (`language_id`), + KEY `archival_object_system_mtime_index` (`system_mtime`), + KEY `archival_object_user_mtime_index` (`user_mtime`), + KEY `repo_id` (`repo_id`), + KEY `ao_parent_root_idx` (`parent_id`,`root_record_id`), + KEY `archival_object_ref_id_index` (`ref_id`), + KEY `archival_object_component_id_index` (`component_id`), + CONSTRAINT `archival_object_ibfk_1` FOREIGN KEY (`level_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `archival_object_ibfk_2` FOREIGN KEY (`language_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `archival_object_ibfk_3` FOREIGN KEY (`repo_id`) REFERENCES `repository` (`id`), + CONSTRAINT `archival_object_ibfk_4` FOREIGN KEY (`root_record_id`) REFERENCES `resource` (`id`), + CONSTRAINT `archival_object_ibfk_5` FOREIGN KEY (`parent_id`) REFERENCES `archival_object` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `archival_object` +-- + +LOCK TABLES `archival_object` WRITE; +/*!40000 ALTER TABLE `archival_object` DISABLE KEYS */; +/*!40000 ALTER TABLE `archival_object` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `assessment` +-- + +DROP TABLE IF EXISTS `assessment`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assessment` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `repo_id` int(11) NOT NULL, + `accession_report` int(11) NOT NULL DEFAULT '0', + `appraisal` int(11) NOT NULL DEFAULT '0', + `container_list` int(11) NOT NULL DEFAULT '0', + `catalog_record` int(11) NOT NULL DEFAULT '0', + `control_file` int(11) NOT NULL DEFAULT '0', + `finding_aid_ead` int(11) NOT NULL DEFAULT '0', + `finding_aid_paper` int(11) NOT NULL DEFAULT '0', + `finding_aid_word` int(11) NOT NULL DEFAULT '0', + `finding_aid_spreadsheet` int(11) NOT NULL DEFAULT '0', + `surveyed_duration` varchar(255) DEFAULT NULL, + `surveyed_extent` text, + `review_required` int(11) NOT NULL DEFAULT '0', + `purpose` text, + `scope` text, + `sensitive_material` int(11) NOT NULL DEFAULT '0', + `general_assessment_note` text, + `special_format_note` text, + `exhibition_value_note` text, + `deed_of_gift` int(11) DEFAULT NULL, + `finding_aid_online` int(11) DEFAULT NULL, + `related_eac_records` int(11) DEFAULT NULL, + `existing_description_notes` text, + `survey_begin` date NOT NULL DEFAULT '1970-01-01', + `survey_end` date DEFAULT NULL, + `review_note` text, + `inactive` int(11) DEFAULT NULL, + `monetary_value` decimal(16,2) DEFAULT NULL, + `monetary_value_note` text, + `conservation_note` text, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `assessment_system_mtime_index` (`system_mtime`), + KEY `assessment_user_mtime_index` (`user_mtime`), + KEY `repo_id` (`repo_id`), + CONSTRAINT `assessment_ibfk_1` FOREIGN KEY (`repo_id`) REFERENCES `repository` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `assessment` +-- + +LOCK TABLES `assessment` WRITE; +/*!40000 ALTER TABLE `assessment` DISABLE KEYS */; +/*!40000 ALTER TABLE `assessment` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `assessment_attribute` +-- + +DROP TABLE IF EXISTS `assessment_attribute`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assessment_attribute` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `assessment_id` int(11) NOT NULL, + `assessment_attribute_definition_id` int(11) NOT NULL, + `value` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + KEY `assessment_id` (`assessment_id`), + KEY `assessment_attribute_definition_id` (`assessment_attribute_definition_id`), + CONSTRAINT `assessment_attribute_ibfk_2` FOREIGN KEY (`assessment_attribute_definition_id`) REFERENCES `assessment_attribute_definition` (`id`), + CONSTRAINT `assessment_attribute_ibfk_1` FOREIGN KEY (`assessment_id`) REFERENCES `assessment` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `assessment_attribute` +-- + +LOCK TABLES `assessment_attribute` WRITE; +/*!40000 ALTER TABLE `assessment_attribute` DISABLE KEYS */; +/*!40000 ALTER TABLE `assessment_attribute` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `assessment_attribute_definition` +-- + +DROP TABLE IF EXISTS `assessment_attribute_definition`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assessment_attribute_definition` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `repo_id` int(11) NOT NULL, + `label` varchar(255) NOT NULL, + `type` varchar(255) NOT NULL, + `position` int(11) NOT NULL, + `readonly` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `assessment_attr_unique_label` (`repo_id`,`type`,`label`) +) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `assessment_attribute_definition` +-- + +LOCK TABLES `assessment_attribute_definition` WRITE; +/*!40000 ALTER TABLE `assessment_attribute_definition` DISABLE KEYS */; +INSERT INTO `assessment_attribute_definition` VALUES (1,1,'Reformatting Readiness','rating',0,0),(2,1,'Housing Quality','rating',1,0),(3,1,'Physical Condition','rating',2,0),(4,1,'Physical Access (arrangement)','rating',3,0),(5,1,'Intellectual Access (description)','rating',4,0),(6,1,'Interest','rating',5,0),(7,1,'Documentation Quality','rating',6,0),(8,1,'Research Value','rating',7,1),(9,1,'Architectural Materials','format',7,0),(10,1,'Art Originals','format',8,0),(11,1,'Artifacts','format',9,0),(12,1,'Audio Materials','format',10,0),(13,1,'Biological Specimens','format',11,0),(14,1,'Botanical Specimens','format',12,0),(15,1,'Computer Storage Units','format',13,0),(16,1,'Film (negative, slide, or motion picture)','format',14,0),(17,1,'Glass','format',15,0),(18,1,'Photographs','format',16,0),(19,1,'Scrapbooks','format',17,0),(20,1,'Technical Drawings & Schematics','format',18,0),(21,1,'Textiles','format',19,0),(22,1,'Vellum & Parchment','format',20,0),(23,1,'Video Materials','format',21,0),(24,1,'Other','format',22,0),(25,1,'Potential Mold or Mold Damage','conservation_issue',23,0),(26,1,'Recent Pest Damage','conservation_issue',24,0),(27,1,'Deteriorating Film Base','conservation_issue',25,0),(28,1,'Brittle Paper','conservation_issue',26,0),(29,1,'Metal Fasteners','conservation_issue',27,0),(30,1,'Newspaper','conservation_issue',28,0),(31,1,'Tape','conservation_issue',29,0),(32,1,'Heat-Sensitive Paper','conservation_issue',30,0),(33,1,'Water Damage','conservation_issue',31,0); +/*!40000 ALTER TABLE `assessment_attribute_definition` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `assessment_attribute_note` +-- + +DROP TABLE IF EXISTS `assessment_attribute_note`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assessment_attribute_note` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `assessment_id` int(11) NOT NULL, + `assessment_attribute_definition_id` int(11) NOT NULL, + `note` text NOT NULL, + PRIMARY KEY (`id`), + KEY `assessment_id` (`assessment_id`), + KEY `assessment_attribute_definition_id` (`assessment_attribute_definition_id`), + CONSTRAINT `assessment_attribute_note_ibfk_2` FOREIGN KEY (`assessment_attribute_definition_id`) REFERENCES `assessment_attribute_definition` (`id`), + CONSTRAINT `assessment_attribute_note_ibfk_1` FOREIGN KEY (`assessment_id`) REFERENCES `assessment` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `assessment_attribute_note` +-- + +LOCK TABLES `assessment_attribute_note` WRITE; +/*!40000 ALTER TABLE `assessment_attribute_note` DISABLE KEYS */; +/*!40000 ALTER TABLE `assessment_attribute_note` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `assessment_reviewer_rlshp` +-- + +DROP TABLE IF EXISTS `assessment_reviewer_rlshp`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assessment_reviewer_rlshp` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `assessment_id` int(11) NOT NULL, + `agent_person_id` int(11) DEFAULT NULL, + `aspace_relationship_position` int(11) DEFAULT NULL, + `suppressed` int(11) NOT NULL DEFAULT '0', + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `assessment_reviewer_rlshp_system_mtime_index` (`system_mtime`), + KEY `assessment_reviewer_rlshp_user_mtime_index` (`user_mtime`), + KEY `assessment_id` (`assessment_id`), + KEY `agent_person_id` (`agent_person_id`), + CONSTRAINT `assessment_reviewer_rlshp_ibfk_2` FOREIGN KEY (`agent_person_id`) REFERENCES `agent_person` (`id`), + CONSTRAINT `assessment_reviewer_rlshp_ibfk_1` FOREIGN KEY (`assessment_id`) REFERENCES `assessment` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `assessment_reviewer_rlshp` +-- + +LOCK TABLES `assessment_reviewer_rlshp` WRITE; +/*!40000 ALTER TABLE `assessment_reviewer_rlshp` DISABLE KEYS */; +/*!40000 ALTER TABLE `assessment_reviewer_rlshp` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `assessment_rlshp` +-- + +DROP TABLE IF EXISTS `assessment_rlshp`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assessment_rlshp` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `assessment_id` int(11) NOT NULL, + `accession_id` int(11) DEFAULT NULL, + `resource_id` int(11) DEFAULT NULL, + `archival_object_id` int(11) DEFAULT NULL, + `digital_object_id` int(11) DEFAULT NULL, + `aspace_relationship_position` int(11) DEFAULT NULL, + `suppressed` int(11) NOT NULL DEFAULT '0', + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `assessment_rlshp_system_mtime_index` (`system_mtime`), + KEY `assessment_rlshp_user_mtime_index` (`user_mtime`), + KEY `assessment_id` (`assessment_id`), + KEY `accession_id` (`accession_id`), + KEY `resource_id` (`resource_id`), + KEY `archival_object_id` (`archival_object_id`), + KEY `digital_object_id` (`digital_object_id`), + CONSTRAINT `assessment_rlshp_ibfk_5` FOREIGN KEY (`digital_object_id`) REFERENCES `digital_object` (`id`), + CONSTRAINT `assessment_rlshp_ibfk_1` FOREIGN KEY (`assessment_id`) REFERENCES `assessment` (`id`), + CONSTRAINT `assessment_rlshp_ibfk_2` FOREIGN KEY (`accession_id`) REFERENCES `accession` (`id`), + CONSTRAINT `assessment_rlshp_ibfk_3` FOREIGN KEY (`resource_id`) REFERENCES `resource` (`id`), + CONSTRAINT `assessment_rlshp_ibfk_4` FOREIGN KEY (`archival_object_id`) REFERENCES `archival_object` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `assessment_rlshp` +-- + +LOCK TABLES `assessment_rlshp` WRITE; +/*!40000 ALTER TABLE `assessment_rlshp` DISABLE KEYS */; +/*!40000 ALTER TABLE `assessment_rlshp` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `auth_db` +-- + +DROP TABLE IF EXISTS `auth_db`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `auth_db` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `username` varchar(255) NOT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `pwhash` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `username` (`username`), + KEY `auth_db_system_mtime_index` (`system_mtime`) +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `auth_db` +-- + +LOCK TABLES `auth_db` WRITE; +/*!40000 ALTER TABLE `auth_db` DISABLE KEYS */; +INSERT INTO `auth_db` VALUES (1,'admin','2017-10-10 13:57:47','2017-10-10 13:57:47','$2a$10$yy/p8x6n7G56geJjV8RnluF3hAz2mCMiYY92Zhc8hoQ2sOt0Rp23e'),(2,'search_indexer','2017-10-10 13:57:49','2017-10-10 14:08:04','$2a$10$Iirck3ecGCs9h2UZBRokLewstJNB79RMjwNNP.qdrZCYky5/hByM.'),(4,'public_anonymous','2017-10-10 13:57:49','2017-10-10 14:08:04','$2a$10$bDalVJB.kQTH0ab28L75EeXtnPY96NtYIgOZTlbpAdsGi6C3YoFf6'),(6,'staff_system','2017-10-10 13:57:49','2017-10-10 14:08:04','$2a$10$840ynFfTA6wCBJL9Vv9NGOQa1YXEhU./o2bG7lklrmylqEd8Ksn2.'); +/*!40000 ALTER TABLE `auth_db` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `classification` +-- + +DROP TABLE IF EXISTS `classification`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `classification` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `repo_id` int(11) NOT NULL, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `identifier` varchar(255) NOT NULL, + `title` varchar(8704) NOT NULL, + `description` text, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `publish` int(11) DEFAULT '1', + `suppressed` int(11) DEFAULT '0', + PRIMARY KEY (`id`), + KEY `classification_system_mtime_index` (`system_mtime`), + KEY `classification_user_mtime_index` (`user_mtime`), + KEY `repo_id` (`repo_id`), + CONSTRAINT `classification_ibfk_1` FOREIGN KEY (`repo_id`) REFERENCES `repository` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `classification` +-- + +LOCK TABLES `classification` WRITE; +/*!40000 ALTER TABLE `classification` DISABLE KEYS */; +/*!40000 ALTER TABLE `classification` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `classification_creator_rlshp` +-- + +DROP TABLE IF EXISTS `classification_creator_rlshp`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `classification_creator_rlshp` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `agent_person_id` int(11) DEFAULT NULL, + `agent_software_id` int(11) DEFAULT NULL, + `agent_family_id` int(11) DEFAULT NULL, + `agent_corporate_entity_id` int(11) DEFAULT NULL, + `classification_id` int(11) DEFAULT NULL, + `aspace_relationship_position` int(11) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `suppressed` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `classification_creator_rlshp_system_mtime_index` (`system_mtime`), + KEY `classification_creator_rlshp_user_mtime_index` (`user_mtime`), + KEY `agent_person_id` (`agent_person_id`), + KEY `agent_family_id` (`agent_family_id`), + KEY `agent_corporate_entity_id` (`agent_corporate_entity_id`), + KEY `agent_software_id` (`agent_software_id`), + KEY `classification_id` (`classification_id`), + CONSTRAINT `classification_creator_rlshp_ibfk_1` FOREIGN KEY (`agent_person_id`) REFERENCES `agent_person` (`id`), + CONSTRAINT `classification_creator_rlshp_ibfk_2` FOREIGN KEY (`agent_family_id`) REFERENCES `agent_family` (`id`), + CONSTRAINT `classification_creator_rlshp_ibfk_3` FOREIGN KEY (`agent_corporate_entity_id`) REFERENCES `agent_corporate_entity` (`id`), + CONSTRAINT `classification_creator_rlshp_ibfk_4` FOREIGN KEY (`agent_software_id`) REFERENCES `agent_software` (`id`), + CONSTRAINT `classification_creator_rlshp_ibfk_5` FOREIGN KEY (`classification_id`) REFERENCES `classification` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `classification_creator_rlshp` +-- + +LOCK TABLES `classification_creator_rlshp` WRITE; +/*!40000 ALTER TABLE `classification_creator_rlshp` DISABLE KEYS */; +/*!40000 ALTER TABLE `classification_creator_rlshp` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `classification_rlshp` +-- + +DROP TABLE IF EXISTS `classification_rlshp`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `classification_rlshp` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `resource_id` int(11) DEFAULT NULL, + `accession_id` int(11) DEFAULT NULL, + `classification_id` int(11) DEFAULT NULL, + `classification_term_id` int(11) DEFAULT NULL, + `aspace_relationship_position` int(11) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `suppressed` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `classification_rlshp_system_mtime_index` (`system_mtime`), + KEY `classification_rlshp_user_mtime_index` (`user_mtime`), + KEY `resource_id` (`resource_id`), + KEY `accession_id` (`accession_id`), + KEY `classification_id` (`classification_id`), + KEY `classification_term_id` (`classification_term_id`), + CONSTRAINT `classification_rlshp_ibfk_1` FOREIGN KEY (`resource_id`) REFERENCES `resource` (`id`), + CONSTRAINT `classification_rlshp_ibfk_2` FOREIGN KEY (`accession_id`) REFERENCES `accession` (`id`), + CONSTRAINT `classification_rlshp_ibfk_3` FOREIGN KEY (`classification_id`) REFERENCES `classification` (`id`), + CONSTRAINT `classification_rlshp_ibfk_4` FOREIGN KEY (`classification_term_id`) REFERENCES `classification_term` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `classification_rlshp` +-- + +LOCK TABLES `classification_rlshp` WRITE; +/*!40000 ALTER TABLE `classification_rlshp` DISABLE KEYS */; +/*!40000 ALTER TABLE `classification_rlshp` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `classification_term` +-- + +DROP TABLE IF EXISTS `classification_term`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `classification_term` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `repo_id` int(11) NOT NULL, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `identifier` varchar(255) NOT NULL, + `title` varchar(8704) NOT NULL, + `title_sha1` varchar(255) NOT NULL, + `description` text, + `root_record_id` int(11) DEFAULT NULL, + `parent_id` int(11) DEFAULT NULL, + `parent_name` varchar(255) DEFAULT NULL, + `position` int(11) NOT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `publish` int(11) DEFAULT '1', + `suppressed` int(11) DEFAULT '0', + `display_string` text NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `classification_term_parent_name_title_sha1_index` (`parent_name`,`title_sha1`), + UNIQUE KEY `classification_term_parent_name_identifier_index` (`parent_name`,`identifier`), + UNIQUE KEY `uniq_ct_pos` (`parent_name`,`position`), + KEY `classification_term_system_mtime_index` (`system_mtime`), + KEY `classification_term_user_mtime_index` (`user_mtime`), + KEY `repo_id` (`repo_id`), + CONSTRAINT `classification_term_ibfk_1` FOREIGN KEY (`repo_id`) REFERENCES `repository` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `classification_term` +-- + +LOCK TABLES `classification_term` WRITE; +/*!40000 ALTER TABLE `classification_term` DISABLE KEYS */; +/*!40000 ALTER TABLE `classification_term` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `classification_term_creator_rlshp` +-- + +DROP TABLE IF EXISTS `classification_term_creator_rlshp`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `classification_term_creator_rlshp` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `agent_person_id` int(11) DEFAULT NULL, + `agent_software_id` int(11) DEFAULT NULL, + `agent_family_id` int(11) DEFAULT NULL, + `agent_corporate_entity_id` int(11) DEFAULT NULL, + `classification_term_id` int(11) DEFAULT NULL, + `aspace_relationship_position` int(11) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `suppressed` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `classification_term_creator_rlshp_system_mtime_index` (`system_mtime`), + KEY `classification_term_creator_rlshp_user_mtime_index` (`user_mtime`), + KEY `agent_person_id` (`agent_person_id`), + KEY `agent_family_id` (`agent_family_id`), + KEY `agent_corporate_entity_id` (`agent_corporate_entity_id`), + KEY `agent_software_id` (`agent_software_id`), + KEY `classification_term_id` (`classification_term_id`), + CONSTRAINT `classification_term_creator_rlshp_ibfk_1` FOREIGN KEY (`agent_person_id`) REFERENCES `agent_person` (`id`), + CONSTRAINT `classification_term_creator_rlshp_ibfk_2` FOREIGN KEY (`agent_family_id`) REFERENCES `agent_family` (`id`), + CONSTRAINT `classification_term_creator_rlshp_ibfk_3` FOREIGN KEY (`agent_corporate_entity_id`) REFERENCES `agent_corporate_entity` (`id`), + CONSTRAINT `classification_term_creator_rlshp_ibfk_4` FOREIGN KEY (`agent_software_id`) REFERENCES `agent_software` (`id`), + CONSTRAINT `classification_term_creator_rlshp_ibfk_5` FOREIGN KEY (`classification_term_id`) REFERENCES `classification_term` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `classification_term_creator_rlshp` +-- + +LOCK TABLES `classification_term_creator_rlshp` WRITE; +/*!40000 ALTER TABLE `classification_term_creator_rlshp` DISABLE KEYS */; +/*!40000 ALTER TABLE `classification_term_creator_rlshp` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `collection_management` +-- + +DROP TABLE IF EXISTS `collection_management`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `collection_management` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `accession_id` int(11) DEFAULT NULL, + `resource_id` int(11) DEFAULT NULL, + `digital_object_id` int(11) DEFAULT NULL, + `processing_hours_per_foot_estimate` varchar(255) DEFAULT NULL, + `processing_total_extent` varchar(255) DEFAULT NULL, + `processing_total_extent_type_id` int(11) DEFAULT NULL, + `processing_hours_total` varchar(255) DEFAULT NULL, + `processing_plan` text, + `processing_priority_id` int(11) DEFAULT NULL, + `processing_status_id` int(11) DEFAULT NULL, + `processing_funding_source` text, + `processors` text, + `rights_determined` int(11) NOT NULL DEFAULT '0', + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `processing_total_extent_type_id` (`processing_total_extent_type_id`), + KEY `processing_priority_id` (`processing_priority_id`), + KEY `processing_status_id` (`processing_status_id`), + KEY `collection_management_system_mtime_index` (`system_mtime`), + KEY `collection_management_user_mtime_index` (`user_mtime`), + KEY `accession_id` (`accession_id`), + KEY `resource_id` (`resource_id`), + KEY `digital_object_id` (`digital_object_id`), + CONSTRAINT `collection_management_ibfk_1` FOREIGN KEY (`processing_total_extent_type_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `collection_management_ibfk_2` FOREIGN KEY (`processing_priority_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `collection_management_ibfk_3` FOREIGN KEY (`processing_status_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `collection_management_ibfk_4` FOREIGN KEY (`accession_id`) REFERENCES `accession` (`id`), + CONSTRAINT `collection_management_ibfk_5` FOREIGN KEY (`resource_id`) REFERENCES `resource` (`id`), + CONSTRAINT `collection_management_ibfk_6` FOREIGN KEY (`digital_object_id`) REFERENCES `digital_object` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `collection_management` +-- + +LOCK TABLES `collection_management` WRITE; +/*!40000 ALTER TABLE `collection_management` DISABLE KEYS */; +/*!40000 ALTER TABLE `collection_management` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `container_profile` +-- + +DROP TABLE IF EXISTS `container_profile`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `container_profile` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `name` varchar(255) DEFAULT NULL, + `url` varchar(255) DEFAULT NULL, + `extent_dimension` varchar(255) DEFAULT NULL, + `dimension_units_id` int(11) DEFAULT NULL, + `height` varchar(255) DEFAULT NULL, + `width` varchar(255) DEFAULT NULL, + `depth` varchar(255) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `stacking_limit` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `container_profile_name_uniq` (`name`), + KEY `dimension_units_id` (`dimension_units_id`), + KEY `container_profile_system_mtime_index` (`system_mtime`), + KEY `container_profile_user_mtime_index` (`user_mtime`), + CONSTRAINT `container_profile_ibfk_1` FOREIGN KEY (`dimension_units_id`) REFERENCES `enumeration_value` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `container_profile` +-- + +LOCK TABLES `container_profile` WRITE; +/*!40000 ALTER TABLE `container_profile` DISABLE KEYS */; +/*!40000 ALTER TABLE `container_profile` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `date` +-- + +DROP TABLE IF EXISTS `date`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `date` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `accession_id` int(11) DEFAULT NULL, + `deaccession_id` int(11) DEFAULT NULL, + `archival_object_id` int(11) DEFAULT NULL, + `resource_id` int(11) DEFAULT NULL, + `event_id` int(11) DEFAULT NULL, + `digital_object_id` int(11) DEFAULT NULL, + `digital_object_component_id` int(11) DEFAULT NULL, + `related_agents_rlshp_id` int(11) DEFAULT NULL, + `agent_person_id` int(11) DEFAULT NULL, + `agent_family_id` int(11) DEFAULT NULL, + `agent_corporate_entity_id` int(11) DEFAULT NULL, + `agent_software_id` int(11) DEFAULT NULL, + `name_person_id` int(11) DEFAULT NULL, + `name_family_id` int(11) DEFAULT NULL, + `name_corporate_entity_id` int(11) DEFAULT NULL, + `name_software_id` int(11) DEFAULT NULL, + `date_type_id` int(11) DEFAULT NULL, + `label_id` int(11) NOT NULL, + `certainty_id` int(11) DEFAULT NULL, + `expression` varchar(255) DEFAULT NULL, + `begin` varchar(255) DEFAULT NULL, + `end` varchar(255) DEFAULT NULL, + `era_id` int(11) DEFAULT NULL, + `calendar_id` int(11) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `date_type_id` (`date_type_id`), + KEY `label_id` (`label_id`), + KEY `certainty_id` (`certainty_id`), + KEY `era_id` (`era_id`), + KEY `calendar_id` (`calendar_id`), + KEY `date_system_mtime_index` (`system_mtime`), + KEY `date_user_mtime_index` (`user_mtime`), + KEY `accession_id` (`accession_id`), + KEY `archival_object_id` (`archival_object_id`), + KEY `resource_id` (`resource_id`), + KEY `event_id` (`event_id`), + KEY `deaccession_id` (`deaccession_id`), + KEY `related_agents_rlshp_id` (`related_agents_rlshp_id`), + KEY `digital_object_id` (`digital_object_id`), + KEY `digital_object_component_id` (`digital_object_component_id`), + KEY `agent_person_date_fk` (`agent_person_id`), + KEY `agent_family_date_fk` (`agent_family_id`), + KEY `agent_corporate_entity_date_fk` (`agent_corporate_entity_id`), + KEY `agent_software_date_fk` (`agent_software_id`), + KEY `name_person_date_fk` (`name_person_id`), + KEY `name_family_date_fk` (`name_family_id`), + KEY `name_corporate_entity_date_fk` (`name_corporate_entity_id`), + KEY `name_software_date_fk` (`name_software_id`), + CONSTRAINT `name_software_date_fk` FOREIGN KEY (`name_software_id`) REFERENCES `name_software` (`id`), + CONSTRAINT `agent_corporate_entity_date_fk` FOREIGN KEY (`agent_corporate_entity_id`) REFERENCES `agent_corporate_entity` (`id`), + CONSTRAINT `agent_family_date_fk` FOREIGN KEY (`agent_family_id`) REFERENCES `agent_family` (`id`), + CONSTRAINT `agent_person_date_fk` FOREIGN KEY (`agent_person_id`) REFERENCES `agent_person` (`id`), + CONSTRAINT `agent_software_date_fk` FOREIGN KEY (`agent_software_id`) REFERENCES `agent_software` (`id`), + CONSTRAINT `date_ibfk_1` FOREIGN KEY (`date_type_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `date_ibfk_10` FOREIGN KEY (`deaccession_id`) REFERENCES `deaccession` (`id`), + CONSTRAINT `date_ibfk_11` FOREIGN KEY (`related_agents_rlshp_id`) REFERENCES `related_agents_rlshp` (`id`), + CONSTRAINT `date_ibfk_12` FOREIGN KEY (`digital_object_id`) REFERENCES `digital_object` (`id`), + CONSTRAINT `date_ibfk_13` FOREIGN KEY (`digital_object_component_id`) REFERENCES `digital_object_component` (`id`), + CONSTRAINT `date_ibfk_2` FOREIGN KEY (`label_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `date_ibfk_3` FOREIGN KEY (`certainty_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `date_ibfk_4` FOREIGN KEY (`era_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `date_ibfk_5` FOREIGN KEY (`calendar_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `date_ibfk_6` FOREIGN KEY (`accession_id`) REFERENCES `accession` (`id`), + CONSTRAINT `date_ibfk_7` FOREIGN KEY (`archival_object_id`) REFERENCES `archival_object` (`id`), + CONSTRAINT `date_ibfk_8` FOREIGN KEY (`resource_id`) REFERENCES `resource` (`id`), + CONSTRAINT `date_ibfk_9` FOREIGN KEY (`event_id`) REFERENCES `event` (`id`), + CONSTRAINT `name_corporate_entity_date_fk` FOREIGN KEY (`name_corporate_entity_id`) REFERENCES `name_corporate_entity` (`id`), + CONSTRAINT `name_family_date_fk` FOREIGN KEY (`name_family_id`) REFERENCES `name_family` (`id`), + CONSTRAINT `name_person_date_fk` FOREIGN KEY (`name_person_id`) REFERENCES `name_person` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `date` +-- + +LOCK TABLES `date` WRITE; +/*!40000 ALTER TABLE `date` DISABLE KEYS */; +/*!40000 ALTER TABLE `date` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `deaccession` +-- + +DROP TABLE IF EXISTS `deaccession`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `deaccession` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `accession_id` int(11) DEFAULT NULL, + `resource_id` int(11) DEFAULT NULL, + `scope_id` int(11) NOT NULL, + `description` text NOT NULL, + `reason` text, + `disposition` text, + `notification` int(11) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `scope_id` (`scope_id`), + KEY `deaccession_system_mtime_index` (`system_mtime`), + KEY `deaccession_user_mtime_index` (`user_mtime`), + KEY `accession_id` (`accession_id`), + KEY `resource_id` (`resource_id`), + CONSTRAINT `deaccession_ibfk_3` FOREIGN KEY (`resource_id`) REFERENCES `resource` (`id`), + CONSTRAINT `deaccession_ibfk_1` FOREIGN KEY (`scope_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `deaccession_ibfk_2` FOREIGN KEY (`accession_id`) REFERENCES `accession` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `deaccession` +-- + +LOCK TABLES `deaccession` WRITE; +/*!40000 ALTER TABLE `deaccession` DISABLE KEYS */; +/*!40000 ALTER TABLE `deaccession` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `default_values` +-- + +DROP TABLE IF EXISTS `default_values`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `default_values` ( + `lock_version` int(11) NOT NULL DEFAULT '0', + `id` varchar(255) NOT NULL, + `blob` blob NOT NULL, + `repo_id` int(11) NOT NULL, + `record_type` varchar(255) NOT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `default_values_system_mtime_index` (`system_mtime`), + KEY `default_values_user_mtime_index` (`user_mtime`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `default_values` +-- + +LOCK TABLES `default_values` WRITE; +/*!40000 ALTER TABLE `default_values` DISABLE KEYS */; +/*!40000 ALTER TABLE `default_values` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `deleted_records` +-- + +DROP TABLE IF EXISTS `deleted_records`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `deleted_records` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `uri` varchar(255) NOT NULL, + `operator` varchar(255) NOT NULL, + `timestamp` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `deleted_records` +-- + +LOCK TABLES `deleted_records` WRITE; +/*!40000 ALTER TABLE `deleted_records` DISABLE KEYS */; +/*!40000 ALTER TABLE `deleted_records` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `digital_object` +-- + +DROP TABLE IF EXISTS `digital_object`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `digital_object` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `repo_id` int(11) NOT NULL, + `digital_object_id` varchar(255) NOT NULL, + `title` varchar(8704) DEFAULT NULL, + `level_id` int(11) DEFAULT NULL, + `digital_object_type_id` int(11) DEFAULT NULL, + `language_id` int(11) DEFAULT NULL, + `publish` int(11) DEFAULT NULL, + `restrictions` int(11) DEFAULT NULL, + `system_generated` int(11) DEFAULT '0', + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `suppressed` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `digital_object_repo_id_digital_object_id_index` (`repo_id`,`digital_object_id`), + KEY `level_id` (`level_id`), + KEY `digital_object_type_id` (`digital_object_type_id`), + KEY `language_id` (`language_id`), + KEY `digital_object_system_mtime_index` (`system_mtime`), + KEY `digital_object_user_mtime_index` (`user_mtime`), + CONSTRAINT `digital_object_ibfk_1` FOREIGN KEY (`level_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `digital_object_ibfk_2` FOREIGN KEY (`digital_object_type_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `digital_object_ibfk_3` FOREIGN KEY (`language_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `digital_object_ibfk_4` FOREIGN KEY (`repo_id`) REFERENCES `repository` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `digital_object` +-- + +LOCK TABLES `digital_object` WRITE; +/*!40000 ALTER TABLE `digital_object` DISABLE KEYS */; +/*!40000 ALTER TABLE `digital_object` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `digital_object_component` +-- + +DROP TABLE IF EXISTS `digital_object_component`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `digital_object_component` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `repo_id` int(11) NOT NULL, + `root_record_id` int(11) DEFAULT NULL, + `parent_id` int(11) DEFAULT NULL, + `position` int(11) NOT NULL, + `parent_name` varchar(255) DEFAULT NULL, + `publish` int(11) DEFAULT NULL, + `component_id` varchar(255) DEFAULT NULL, + `title` varchar(8704) DEFAULT NULL, + `display_string` text, + `label` varchar(255) DEFAULT NULL, + `language_id` int(11) DEFAULT NULL, + `system_generated` int(11) DEFAULT '0', + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `suppressed` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `doc_unique_identifier` (`repo_id`,`component_id`), + UNIQUE KEY `uniq_do_pos` (`parent_name`,`position`), + KEY `language_id` (`language_id`), + KEY `digital_object_component_system_mtime_index` (`system_mtime`), + KEY `digital_object_component_user_mtime_index` (`user_mtime`), + KEY `root_record_id` (`root_record_id`), + KEY `parent_id` (`parent_id`), + KEY `digital_object_component_component_id_index` (`component_id`), + CONSTRAINT `digital_object_component_ibfk_1` FOREIGN KEY (`language_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `digital_object_component_ibfk_2` FOREIGN KEY (`repo_id`) REFERENCES `repository` (`id`), + CONSTRAINT `digital_object_component_ibfk_3` FOREIGN KEY (`root_record_id`) REFERENCES `digital_object` (`id`), + CONSTRAINT `digital_object_component_ibfk_4` FOREIGN KEY (`parent_id`) REFERENCES `digital_object_component` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `digital_object_component` +-- + +LOCK TABLES `digital_object_component` WRITE; +/*!40000 ALTER TABLE `digital_object_component` DISABLE KEYS */; +/*!40000 ALTER TABLE `digital_object_component` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `enumeration` +-- + +DROP TABLE IF EXISTS `enumeration`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `enumeration` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `name` varchar(255) NOT NULL, + `default_value` int(11) DEFAULT NULL, + `editable` int(11) DEFAULT '1', + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`), + KEY `enumeration_system_mtime_index` (`system_mtime`), + KEY `enumeration_user_mtime_index` (`user_mtime`), + KEY `default_value` (`default_value`), + CONSTRAINT `enumeration_ibfk_1` FOREIGN KEY (`default_value`) REFERENCES `enumeration_value` (`id`) ON DELETE SET NULL +) ENGINE=InnoDB AUTO_INCREMENT=74 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `enumeration` +-- + +LOCK TABLES `enumeration` WRITE; +/*!40000 ALTER TABLE `enumeration` DISABLE KEYS */; +INSERT INTO `enumeration` VALUES (1,0,1,'linked_agent_archival_record_relators',NULL,1,NULL,NULL,'2017-10-10 13:52:39','2017-10-10 13:52:39','2017-10-10 13:52:39'),(2,0,1,'linked_event_archival_record_roles',NULL,0,NULL,NULL,'2017-10-10 13:52:47','2017-10-10 13:52:47','2017-10-10 13:52:47'),(3,0,1,'linked_agent_event_roles',NULL,1,NULL,NULL,'2017-10-10 13:52:47','2017-10-10 13:52:47','2017-10-10 13:52:47'),(4,0,1,'name_source',NULL,1,NULL,NULL,'2017-10-10 13:52:48','2017-10-10 13:52:48','2017-10-10 13:52:48'),(5,0,1,'name_rule',NULL,1,NULL,NULL,'2017-10-10 13:52:48','2017-10-10 13:52:48','2017-10-10 13:52:48'),(6,0,1,'accession_acquisition_type',NULL,1,NULL,NULL,'2017-10-10 13:52:48','2017-10-10 13:52:48','2017-10-10 13:52:48'),(7,0,1,'accession_resource_type',NULL,1,NULL,NULL,'2017-10-10 13:52:48','2017-10-10 13:52:48','2017-10-10 13:52:48'),(8,0,1,'collection_management_processing_priority',NULL,1,NULL,NULL,'2017-10-10 13:52:49','2017-10-10 13:52:49','2017-10-10 13:52:49'),(9,0,1,'collection_management_processing_status',NULL,1,NULL,NULL,'2017-10-10 13:52:49','2017-10-10 13:52:49','2017-10-10 13:52:49'),(10,0,1,'date_era',NULL,1,NULL,NULL,'2017-10-10 13:52:49','2017-10-10 13:52:49','2017-10-10 13:52:49'),(11,0,1,'date_calendar',NULL,1,NULL,NULL,'2017-10-10 13:52:49','2017-10-10 13:52:49','2017-10-10 13:52:49'),(12,0,1,'digital_object_digital_object_type',NULL,1,NULL,NULL,'2017-10-10 13:52:49','2017-10-10 13:52:49','2017-10-10 13:52:49'),(13,0,1,'digital_object_level',NULL,1,NULL,NULL,'2017-10-10 13:52:49','2017-10-10 13:52:49','2017-10-10 13:52:49'),(14,0,1,'extent_extent_type',NULL,1,NULL,NULL,'2017-10-10 13:52:50','2017-10-10 13:52:50','2017-10-10 13:52:50'),(15,0,1,'event_event_type',NULL,1,NULL,NULL,'2017-10-10 13:52:50','2017-10-10 13:52:50','2017-10-10 13:52:50'),(16,0,1,'container_type',NULL,1,NULL,NULL,'2017-10-10 13:52:51','2017-10-10 13:52:51','2017-10-10 13:52:51'),(17,0,1,'agent_contact_salutation',NULL,1,NULL,NULL,'2017-10-10 13:52:51','2017-10-10 13:52:51','2017-10-10 13:52:51'),(18,0,1,'event_outcome',NULL,1,NULL,NULL,'2017-10-10 13:52:52','2017-10-10 13:52:52','2017-10-10 13:52:52'),(19,0,1,'resource_resource_type',NULL,1,NULL,NULL,'2017-10-10 13:52:52','2017-10-10 13:52:52','2017-10-10 13:52:52'),(20,0,1,'resource_finding_aid_description_rules',NULL,1,NULL,NULL,'2017-10-10 13:52:52','2017-10-10 13:52:52','2017-10-10 13:52:52'),(21,0,1,'resource_finding_aid_status',NULL,1,NULL,NULL,'2017-10-10 13:52:52','2017-10-10 13:52:52','2017-10-10 13:52:52'),(22,0,1,'instance_instance_type',NULL,1,NULL,NULL,'2017-10-10 13:52:53','2017-10-10 13:52:53','2017-10-10 13:52:53'),(23,0,1,'subject_source',NULL,1,NULL,NULL,'2017-10-10 13:52:53','2017-10-10 13:52:53','2017-10-10 13:52:53'),(24,0,1,'file_version_use_statement',NULL,1,NULL,NULL,'2017-10-10 13:52:53','2017-10-10 13:52:53','2017-10-10 13:52:53'),(25,0,1,'file_version_checksum_methods',NULL,1,NULL,NULL,'2017-10-10 13:52:54','2017-10-10 13:52:54','2017-10-10 13:52:54'),(26,0,1,'language_iso639_2',NULL,0,NULL,NULL,'2017-10-10 13:52:54','2017-10-10 13:52:54','2017-10-10 13:52:54'),(27,0,1,'linked_agent_role',NULL,0,NULL,NULL,'2017-10-10 13:53:14','2017-10-10 13:53:14','2017-10-10 13:53:14'),(28,0,1,'agent_relationship_associative_relator',NULL,0,NULL,NULL,'2017-10-10 13:53:14','2017-10-10 13:53:14','2017-10-10 13:53:14'),(29,0,1,'agent_relationship_earlierlater_relator',NULL,0,NULL,NULL,'2017-10-10 13:53:14','2017-10-10 13:53:14','2017-10-10 13:53:14'),(30,0,1,'agent_relationship_parentchild_relator',NULL,0,NULL,NULL,'2017-10-10 13:53:15','2017-10-10 13:53:15','2017-10-10 13:53:15'),(31,0,1,'agent_relationship_subordinatesuperior_relator',NULL,0,NULL,NULL,'2017-10-10 13:53:15','2017-10-10 13:53:15','2017-10-10 13:53:15'),(32,0,1,'archival_record_level',NULL,0,NULL,NULL,'2017-10-10 13:53:15','2017-10-10 13:53:15','2017-10-10 13:53:15'),(33,0,1,'container_location_status',899,0,NULL,NULL,'2017-10-10 13:53:16','2017-10-10 13:53:16','2017-10-10 13:53:16'),(34,0,1,'date_type',NULL,0,NULL,NULL,'2017-10-10 13:53:16','2017-10-10 13:53:16','2017-10-10 13:53:16'),(35,0,1,'date_label',NULL,1,NULL,NULL,'2017-10-10 13:53:16','2017-10-10 13:53:16','2017-10-10 13:53:16'),(36,0,1,'date_certainty',NULL,0,NULL,NULL,'2017-10-10 13:53:17','2017-10-10 13:53:17','2017-10-10 13:53:17'),(37,0,1,'deaccession_scope',921,0,NULL,NULL,'2017-10-10 13:53:17','2017-10-10 13:53:17','2017-10-10 13:53:17'),(38,0,1,'extent_portion',923,0,NULL,NULL,'2017-10-10 13:53:17','2017-10-10 13:53:17','2017-10-10 13:53:17'),(39,0,1,'file_version_xlink_actuate_attribute',NULL,0,NULL,NULL,'2017-10-10 13:53:17','2017-10-10 13:53:17','2017-10-10 13:53:17'),(40,0,1,'file_version_xlink_show_attribute',NULL,0,NULL,NULL,'2017-10-10 13:53:17','2017-10-10 13:53:17','2017-10-10 13:53:17'),(41,0,1,'file_version_file_format_name',NULL,1,NULL,NULL,'2017-10-10 13:53:18','2017-10-10 13:53:18','2017-10-10 13:53:18'),(42,0,1,'location_temporary',NULL,1,NULL,NULL,'2017-10-10 13:53:18','2017-10-10 13:53:18','2017-10-10 13:53:18'),(43,0,1,'name_person_name_order',946,0,NULL,NULL,'2017-10-10 13:53:18','2017-10-10 13:53:18','2017-10-10 13:53:18'),(44,0,1,'note_digital_object_type',NULL,0,NULL,NULL,'2017-10-10 13:53:18','2017-10-10 13:53:18','2017-10-10 13:53:18'),(45,0,1,'note_multipart_type',NULL,0,NULL,NULL,'2017-10-10 13:53:19','2017-10-10 13:53:19','2017-10-10 13:53:19'),(46,0,1,'note_orderedlist_enumeration',NULL,0,NULL,NULL,'2017-10-10 13:53:20','2017-10-10 13:53:20','2017-10-10 13:53:20'),(47,0,1,'note_singlepart_type',NULL,0,NULL,NULL,'2017-10-10 13:53:20','2017-10-10 13:53:20','2017-10-10 13:53:20'),(48,0,1,'note_bibliography_type',NULL,0,NULL,NULL,'2017-10-10 13:53:21','2017-10-10 13:53:21','2017-10-10 13:53:21'),(49,0,1,'note_index_type',NULL,0,NULL,NULL,'2017-10-10 13:53:21','2017-10-10 13:53:21','2017-10-10 13:53:21'),(50,0,1,'note_index_item_type',NULL,0,NULL,NULL,'2017-10-10 13:53:21','2017-10-10 13:53:21','2017-10-10 13:53:21'),(51,0,1,'country_iso_3166',NULL,0,NULL,NULL,'2017-10-10 13:53:21','2017-10-10 13:53:21','2017-10-10 13:53:21'),(52,0,1,'rights_statement_rights_type',NULL,0,NULL,NULL,'2017-10-10 13:53:35','2017-10-10 13:53:35','2017-10-10 13:53:35'),(53,0,1,'rights_statement_ip_status',NULL,0,NULL,NULL,'2017-10-10 13:53:35','2017-10-10 13:53:35','2017-10-10 13:53:35'),(54,0,1,'subject_term_type',NULL,0,NULL,NULL,'2017-10-10 13:53:35','2017-10-10 13:53:35','2017-10-10 13:53:35'),(55,0,1,'user_defined_enum_1',NULL,1,NULL,NULL,'2017-10-10 13:53:57','2017-10-10 13:53:57','2017-10-10 13:53:57'),(56,0,1,'user_defined_enum_2',NULL,1,NULL,NULL,'2017-10-10 13:53:57','2017-10-10 13:53:57','2017-10-10 13:53:57'),(57,0,1,'user_defined_enum_3',NULL,1,NULL,NULL,'2017-10-10 13:53:57','2017-10-10 13:53:57','2017-10-10 13:53:57'),(58,0,1,'user_defined_enum_4',NULL,1,NULL,NULL,'2017-10-10 13:53:57','2017-10-10 13:53:57','2017-10-10 13:53:57'),(59,0,1,'accession_parts_relator',NULL,0,NULL,NULL,'2017-10-10 13:54:27','2017-10-10 13:54:27','2017-10-10 13:54:27'),(60,0,1,'accession_parts_relator_type',NULL,1,NULL,NULL,'2017-10-10 13:54:27','2017-10-10 13:54:27','2017-10-10 13:54:27'),(61,0,1,'accession_sibling_relator',NULL,0,NULL,NULL,'2017-10-10 13:54:27','2017-10-10 13:54:27','2017-10-10 13:54:27'),(62,0,1,'accession_sibling_relator_type',NULL,1,NULL,NULL,'2017-10-10 13:54:27','2017-10-10 13:54:27','2017-10-10 13:54:27'),(64,0,1,'telephone_number_type',NULL,1,NULL,NULL,'2017-10-10 13:55:43','2017-10-10 13:55:43','2017-10-10 13:55:43'),(65,0,1,'restriction_type',NULL,1,NULL,NULL,'2017-10-10 13:55:51','2017-10-10 13:55:51','2017-10-10 13:55:51'),(66,0,1,'dimension_units',NULL,0,NULL,NULL,'2017-10-10 13:55:52','2017-10-10 13:55:52','2017-10-10 13:55:52'),(67,0,1,'location_function_type',NULL,1,NULL,NULL,'2017-10-10 13:56:04','2017-10-10 13:56:04','2017-10-10 13:56:04'),(68,0,1,'rights_statement_act_type',NULL,1,NULL,NULL,'2017-10-10 13:56:10','2017-10-10 13:56:10','2017-10-10 13:56:10'),(69,0,1,'rights_statement_act_restriction',NULL,1,NULL,NULL,'2017-10-10 13:56:10','2017-10-10 13:56:10','2017-10-10 13:56:10'),(70,0,1,'note_rights_statement_act_type',NULL,0,NULL,NULL,'2017-10-10 13:56:10','2017-10-10 13:56:10','2017-10-10 13:56:10'),(71,0,1,'note_rights_statement_type',NULL,0,NULL,NULL,'2017-10-10 13:56:11','2017-10-10 13:56:11','2017-10-10 13:56:11'),(72,0,1,'rights_statement_external_document_identifier_type',NULL,1,NULL,NULL,'2017-10-10 13:56:12','2017-10-10 13:56:12','2017-10-10 13:56:12'),(73,0,1,'rights_statement_other_rights_basis',NULL,1,NULL,NULL,'2017-10-10 13:56:16','2017-10-10 13:56:16','2017-10-10 13:56:16'); +/*!40000 ALTER TABLE `enumeration` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `enumeration_value` +-- + +DROP TABLE IF EXISTS `enumeration_value`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `enumeration_value` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `enumeration_id` int(11) NOT NULL, + `value` varchar(255) COLLATE utf8_bin NOT NULL, + `readonly` int(11) DEFAULT '0', + `position` int(11) NOT NULL DEFAULT '0', + `suppressed` int(11) DEFAULT '0', + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL DEFAULT '1', + `created_by` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `last_modified_by` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `create_time` datetime DEFAULT NULL, + `system_mtime` datetime DEFAULT NULL, + `user_mtime` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `enumeration_value_uniq` (`enumeration_id`,`value`), + UNIQUE KEY `enumeration_position_uniq` (`enumeration_id`,`position`), + KEY `enumeration_value_enumeration_id_index` (`enumeration_id`), + KEY `enumeration_value_value_index` (`value`), + CONSTRAINT `enumeration_value_ibfk_1` FOREIGN KEY (`enumeration_id`) REFERENCES `enumeration` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=1486 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `enumeration_value` +-- + +LOCK TABLES `enumeration_value` WRITE; +/*!40000 ALTER TABLE `enumeration_value` DISABLE KEYS */; +INSERT INTO `enumeration_value` VALUES (1,1,'act',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:15','2017-10-10 13:55:15','2017-10-10 13:55:15'),(2,1,'adp',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:15','2017-10-10 13:55:15','2017-10-10 13:55:15'),(3,1,'anl',0,4,0,0,1,NULL,NULL,'2017-10-10 13:55:15','2017-10-10 13:55:15','2017-10-10 13:55:15'),(4,1,'anm',0,5,0,0,1,NULL,NULL,'2017-10-10 13:55:15','2017-10-10 13:55:15','2017-10-10 13:55:15'),(5,1,'ann',0,6,0,0,1,NULL,NULL,'2017-10-10 13:55:15','2017-10-10 13:55:15','2017-10-10 13:55:15'),(6,1,'app',0,8,0,0,1,NULL,NULL,'2017-10-10 13:55:15','2017-10-10 13:55:15','2017-10-10 13:55:15'),(7,1,'arc',0,10,0,0,1,NULL,NULL,'2017-10-10 13:55:15','2017-10-10 13:55:15','2017-10-10 13:55:15'),(8,1,'arr',0,12,0,0,1,NULL,NULL,'2017-10-10 13:55:16','2017-10-10 13:55:16','2017-10-10 13:55:16'),(9,1,'acp',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:15','2017-10-10 13:55:15','2017-10-10 13:55:15'),(10,1,'art',0,13,0,0,1,NULL,NULL,'2017-10-10 13:55:16','2017-10-10 13:55:16','2017-10-10 13:55:16'),(11,1,'ard',0,11,0,0,1,NULL,NULL,'2017-10-10 13:55:15','2017-10-10 13:55:15','2017-10-10 13:55:15'),(12,1,'asg',0,14,0,0,1,NULL,NULL,'2017-10-10 13:55:16','2017-10-10 13:55:16','2017-10-10 13:55:16'),(13,1,'asn',0,15,0,0,1,NULL,NULL,'2017-10-10 13:55:16','2017-10-10 13:55:16','2017-10-10 13:55:16'),(14,1,'att',0,16,0,0,1,NULL,NULL,'2017-10-10 13:55:16','2017-10-10 13:55:16','2017-10-10 13:55:16'),(15,1,'auc',0,17,0,0,1,NULL,NULL,'2017-10-10 13:55:16','2017-10-10 13:55:16','2017-10-10 13:55:16'),(16,1,'aut',0,21,0,0,1,NULL,NULL,'2017-10-10 13:55:16','2017-10-10 13:55:16','2017-10-10 13:55:16'),(17,1,'aqt',0,9,0,0,1,NULL,NULL,'2017-10-10 13:55:15','2017-10-10 13:55:15','2017-10-10 13:55:15'),(18,1,'aft',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:15','2017-10-10 13:55:15','2017-10-10 13:55:15'),(19,1,'aud',0,18,0,0,1,NULL,NULL,'2017-10-10 13:55:16','2017-10-10 13:55:16','2017-10-10 13:55:16'),(20,1,'aui',0,19,0,0,1,NULL,NULL,'2017-10-10 13:55:16','2017-10-10 13:55:16','2017-10-10 13:55:16'),(21,1,'aus',0,20,0,0,1,NULL,NULL,'2017-10-10 13:55:16','2017-10-10 13:55:16','2017-10-10 13:55:16'),(22,1,'ant',0,7,0,0,1,NULL,NULL,'2017-10-10 13:55:15','2017-10-10 13:55:15','2017-10-10 13:55:15'),(23,1,'bnd',0,27,0,0,1,NULL,NULL,'2017-10-10 13:55:16','2017-10-10 13:55:16','2017-10-10 13:55:16'),(24,1,'bdd',0,22,0,0,1,NULL,NULL,'2017-10-10 13:55:16','2017-10-10 13:55:16','2017-10-10 13:55:16'),(25,1,'blw',0,26,0,0,1,NULL,NULL,'2017-10-10 13:55:16','2017-10-10 13:55:16','2017-10-10 13:55:16'),(26,1,'bkd',0,24,0,0,1,NULL,NULL,'2017-10-10 13:55:16','2017-10-10 13:55:16','2017-10-10 13:55:16'),(27,1,'bkp',0,25,0,0,1,NULL,NULL,'2017-10-10 13:55:16','2017-10-10 13:55:16','2017-10-10 13:55:16'),(28,1,'bjd',0,23,0,0,1,NULL,NULL,'2017-10-10 13:55:16','2017-10-10 13:55:16','2017-10-10 13:55:16'),(29,1,'bpd',0,28,0,0,1,NULL,NULL,'2017-10-10 13:55:16','2017-10-10 13:55:16','2017-10-10 13:55:16'),(30,1,'bsl',0,29,0,0,1,NULL,NULL,'2017-10-10 13:55:17','2017-10-10 13:55:17','2017-10-10 13:55:17'),(31,1,'cll',0,34,0,0,1,NULL,NULL,'2017-10-10 13:55:17','2017-10-10 13:55:17','2017-10-10 13:55:17'),(32,1,'ctg',0,63,0,0,1,NULL,NULL,'2017-10-10 13:55:19','2017-10-10 13:55:19','2017-10-10 13:55:19'),(33,1,'cns',0,42,0,0,1,NULL,NULL,'2017-10-10 13:55:18','2017-10-10 13:55:18','2017-10-10 13:55:18'),(34,1,'chr',0,31,0,0,1,NULL,NULL,'2017-10-10 13:55:17','2017-10-10 13:55:17','2017-10-10 13:55:17'),(35,1,'cng',0,41,0,0,1,NULL,NULL,'2017-10-10 13:55:18','2017-10-10 13:55:18','2017-10-10 13:55:18'),(36,1,'cli',0,33,0,0,1,NULL,NULL,'2017-10-10 13:55:17','2017-10-10 13:55:17','2017-10-10 13:55:17'),(37,1,'clb',0,32,0,0,1,NULL,NULL,'2017-10-10 13:55:17','2017-10-10 13:55:17','2017-10-10 13:55:17'),(38,1,'col',0,44,0,0,1,NULL,NULL,'2017-10-10 13:55:18','2017-10-10 13:55:18','2017-10-10 13:55:18'),(39,1,'clt',0,36,0,0,1,NULL,NULL,'2017-10-10 13:55:17','2017-10-10 13:55:17','2017-10-10 13:55:17'),(40,1,'clr',0,35,0,0,1,NULL,NULL,'2017-10-10 13:55:17','2017-10-10 13:55:17','2017-10-10 13:55:17'),(41,1,'cmm',0,37,0,0,1,NULL,NULL,'2017-10-10 13:55:17','2017-10-10 13:55:17','2017-10-10 13:55:17'),(42,1,'cwt',0,68,0,0,1,NULL,NULL,'2017-10-10 13:55:19','2017-10-10 13:55:19','2017-10-10 13:55:19'),(43,1,'com',0,45,0,0,1,NULL,NULL,'2017-10-10 13:55:18','2017-10-10 13:55:18','2017-10-10 13:55:18'),(44,1,'cpl',0,53,0,0,1,NULL,NULL,'2017-10-10 13:55:19','2017-10-10 13:55:19','2017-10-10 13:55:19'),(45,1,'cpt',0,54,0,0,1,NULL,NULL,'2017-10-10 13:55:19','2017-10-10 13:55:19','2017-10-10 13:55:19'),(46,1,'cpe',0,51,0,0,1,NULL,NULL,'2017-10-10 13:55:19','2017-10-10 13:55:19','2017-10-10 13:55:19'),(47,1,'cmp',0,38,0,0,1,NULL,NULL,'2017-10-10 13:55:17','2017-10-10 13:55:17','2017-10-10 13:55:17'),(48,1,'cmt',0,39,0,0,1,NULL,NULL,'2017-10-10 13:55:17','2017-10-10 13:55:17','2017-10-10 13:55:17'),(49,1,'ccp',0,30,0,0,1,NULL,NULL,'2017-10-10 13:55:17','2017-10-10 13:55:17','2017-10-10 13:55:17'),(50,1,'cnd',0,40,0,0,1,NULL,NULL,'2017-10-10 13:55:18','2017-10-10 13:55:18','2017-10-10 13:55:18'),(51,1,'con',0,46,0,0,1,NULL,NULL,'2017-10-10 13:55:18','2017-10-10 13:55:18','2017-10-10 13:55:18'),(52,1,'csl',0,58,0,0,1,NULL,NULL,'2017-10-10 13:55:19','2017-10-10 13:55:19','2017-10-10 13:55:19'),(53,1,'csp',0,59,0,0,1,NULL,NULL,'2017-10-10 13:55:19','2017-10-10 13:55:19','2017-10-10 13:55:19'),(54,1,'cos',0,47,0,0,1,NULL,NULL,'2017-10-10 13:55:18','2017-10-10 13:55:18','2017-10-10 13:55:18'),(55,1,'cot',0,48,0,0,1,NULL,NULL,'2017-10-10 13:55:18','2017-10-10 13:55:18','2017-10-10 13:55:18'),(56,1,'coe',0,43,0,0,1,NULL,NULL,'2017-10-10 13:55:18','2017-10-10 13:55:18','2017-10-10 13:55:18'),(57,1,'cts',0,65,0,0,1,NULL,NULL,'2017-10-10 13:55:19','2017-10-10 13:55:19','2017-10-10 13:55:19'),(58,1,'ctt',0,66,0,0,1,NULL,NULL,'2017-10-10 13:55:19','2017-10-10 13:55:19','2017-10-10 13:55:19'),(59,1,'cte',0,62,0,0,1,NULL,NULL,'2017-10-10 13:55:19','2017-10-10 13:55:19','2017-10-10 13:55:19'),(60,1,'ctr',0,64,0,0,1,NULL,NULL,'2017-10-10 13:55:19','2017-10-10 13:55:19','2017-10-10 13:55:19'),(61,1,'ctb',0,61,0,0,1,NULL,NULL,'2017-10-10 13:55:19','2017-10-10 13:55:19','2017-10-10 13:55:19'),(62,1,'cpc',0,50,0,0,1,NULL,NULL,'2017-10-10 13:55:18','2017-10-10 13:55:18','2017-10-10 13:55:18'),(63,1,'cph',0,52,0,0,1,NULL,NULL,'2017-10-10 13:55:19','2017-10-10 13:55:19','2017-10-10 13:55:19'),(64,1,'crr',0,57,0,0,1,NULL,NULL,'2017-10-10 13:55:19','2017-10-10 13:55:19','2017-10-10 13:55:19'),(65,1,'crp',0,56,0,0,1,NULL,NULL,'2017-10-10 13:55:19','2017-10-10 13:55:19','2017-10-10 13:55:19'),(66,1,'cst',0,60,0,0,1,NULL,NULL,'2017-10-10 13:55:19','2017-10-10 13:55:19','2017-10-10 13:55:19'),(67,1,'cov',0,49,0,0,1,NULL,NULL,'2017-10-10 13:55:18','2017-10-10 13:55:18','2017-10-10 13:55:18'),(68,1,'cre',0,55,0,0,1,NULL,NULL,'2017-10-10 13:55:19','2017-10-10 13:55:19','2017-10-10 13:55:19'),(69,1,'cur',0,67,0,0,1,NULL,NULL,'2017-10-10 13:55:19','2017-10-10 13:55:19','2017-10-10 13:55:19'),(70,1,'dnc',0,76,0,0,1,NULL,NULL,'2017-10-10 13:55:20','2017-10-10 13:55:20','2017-10-10 13:55:20'),(71,1,'dtc',0,84,0,0,1,NULL,NULL,'2017-10-10 13:55:20','2017-10-10 13:55:20','2017-10-10 13:55:20'),(72,1,'dtm',0,86,0,0,1,NULL,NULL,'2017-10-10 13:55:20','2017-10-10 13:55:20','2017-10-10 13:55:20'),(73,1,'dte',0,85,0,0,1,NULL,NULL,'2017-10-10 13:55:20','2017-10-10 13:55:20','2017-10-10 13:55:20'),(74,1,'dto',0,87,0,0,1,NULL,NULL,'2017-10-10 13:55:20','2017-10-10 13:55:20','2017-10-10 13:55:20'),(75,1,'dfd',0,70,0,0,1,NULL,NULL,'2017-10-10 13:55:20','2017-10-10 13:55:20','2017-10-10 13:55:20'),(76,1,'dft',0,72,0,0,1,NULL,NULL,'2017-10-10 13:55:20','2017-10-10 13:55:20','2017-10-10 13:55:20'),(77,1,'dfe',0,71,0,0,1,NULL,NULL,'2017-10-10 13:55:20','2017-10-10 13:55:20','2017-10-10 13:55:20'),(78,1,'dgg',0,73,0,0,1,NULL,NULL,'2017-10-10 13:55:20','2017-10-10 13:55:20','2017-10-10 13:55:20'),(79,1,'dln',0,75,0,0,1,NULL,NULL,'2017-10-10 13:55:20','2017-10-10 13:55:20','2017-10-10 13:55:20'),(80,1,'dpc',0,78,0,0,1,NULL,NULL,'2017-10-10 13:55:20','2017-10-10 13:55:20','2017-10-10 13:55:20'),(81,1,'dpt',0,79,0,0,1,NULL,NULL,'2017-10-10 13:55:20','2017-10-10 13:55:20','2017-10-10 13:55:20'),(82,1,'dsr',0,82,0,0,1,NULL,NULL,'2017-10-10 13:55:20','2017-10-10 13:55:20','2017-10-10 13:55:20'),(83,1,'drt',0,81,0,0,1,NULL,NULL,'2017-10-10 13:55:20','2017-10-10 13:55:20','2017-10-10 13:55:20'),(84,1,'dis',0,74,0,0,1,NULL,NULL,'2017-10-10 13:55:20','2017-10-10 13:55:20','2017-10-10 13:55:20'),(85,1,'dbp',0,69,0,0,1,NULL,NULL,'2017-10-10 13:55:20','2017-10-10 13:55:20','2017-10-10 13:55:20'),(86,1,'dst',0,83,0,0,1,NULL,NULL,'2017-10-10 13:55:20','2017-10-10 13:55:20','2017-10-10 13:55:20'),(87,1,'drm',0,80,0,0,1,NULL,NULL,'2017-10-10 13:55:20','2017-10-10 13:55:20','2017-10-10 13:55:20'),(88,1,'dub',0,88,0,0,1,NULL,NULL,'2017-10-10 13:55:20','2017-10-10 13:55:20','2017-10-10 13:55:20'),(89,1,'edt',0,89,0,0,1,NULL,NULL,'2017-10-10 13:55:20','2017-10-10 13:55:20','2017-10-10 13:55:20'),(90,1,'elg',0,91,0,0,1,NULL,NULL,'2017-10-10 13:55:20','2017-10-10 13:55:20','2017-10-10 13:55:20'),(91,1,'elt',0,92,0,0,1,NULL,NULL,'2017-10-10 13:55:21','2017-10-10 13:55:21','2017-10-10 13:55:21'),(92,1,'eng',0,93,0,0,1,NULL,NULL,'2017-10-10 13:55:21','2017-10-10 13:55:21','2017-10-10 13:55:21'),(93,1,'egr',0,90,0,0,1,NULL,NULL,'2017-10-10 13:55:20','2017-10-10 13:55:20','2017-10-10 13:55:20'),(94,1,'etr',0,94,0,0,1,NULL,NULL,'2017-10-10 13:55:21','2017-10-10 13:55:21','2017-10-10 13:55:21'),(95,1,'evp',0,95,0,0,1,NULL,NULL,'2017-10-10 13:55:21','2017-10-10 13:55:21','2017-10-10 13:55:21'),(96,1,'exp',0,96,0,0,1,NULL,NULL,'2017-10-10 13:55:21','2017-10-10 13:55:21','2017-10-10 13:55:21'),(97,1,'fac',0,97,0,0,1,NULL,NULL,'2017-10-10 13:55:21','2017-10-10 13:55:21','2017-10-10 13:55:21'),(98,1,'fld',0,98,0,0,1,NULL,NULL,'2017-10-10 13:55:21','2017-10-10 13:55:21','2017-10-10 13:55:21'),(99,1,'flm',0,99,0,0,1,NULL,NULL,'2017-10-10 13:55:21','2017-10-10 13:55:21','2017-10-10 13:55:21'),(100,1,'fpy',0,102,0,0,1,NULL,NULL,'2017-10-10 13:55:21','2017-10-10 13:55:21','2017-10-10 13:55:21'),(101,1,'frg',0,103,0,0,1,NULL,NULL,'2017-10-10 13:55:21','2017-10-10 13:55:21','2017-10-10 13:55:21'),(102,1,'fmo',0,100,0,0,1,NULL,NULL,'2017-10-10 13:55:21','2017-10-10 13:55:21','2017-10-10 13:55:21'),(103,1,'dnr',0,77,0,0,1,NULL,NULL,'2017-10-10 13:55:20','2017-10-10 13:55:20','2017-10-10 13:55:20'),(104,1,'fnd',0,101,0,0,1,NULL,NULL,'2017-10-10 13:55:21','2017-10-10 13:55:21','2017-10-10 13:55:21'),(105,1,'gis',0,104,0,0,1,NULL,NULL,'2017-10-10 13:55:21','2017-10-10 13:55:21','2017-10-10 13:55:21'),(106,1,'grt',0,105,0,0,1,NULL,NULL,'2017-10-10 13:55:21','2017-10-10 13:55:21','2017-10-10 13:55:21'),(107,1,'hnr',0,106,0,0,1,NULL,NULL,'2017-10-10 13:55:21','2017-10-10 13:55:21','2017-10-10 13:55:21'),(108,1,'hst',0,107,0,0,1,NULL,NULL,'2017-10-10 13:55:21','2017-10-10 13:55:21','2017-10-10 13:55:21'),(109,1,'ilu',0,109,0,0,1,NULL,NULL,'2017-10-10 13:55:21','2017-10-10 13:55:21','2017-10-10 13:55:21'),(110,1,'ill',0,108,0,0,1,NULL,NULL,'2017-10-10 13:55:21','2017-10-10 13:55:21','2017-10-10 13:55:21'),(111,1,'ins',0,110,0,0,1,NULL,NULL,'2017-10-10 13:55:21','2017-10-10 13:55:21','2017-10-10 13:55:21'),(112,1,'itr',0,112,0,0,1,NULL,NULL,'2017-10-10 13:55:21','2017-10-10 13:55:21','2017-10-10 13:55:21'),(113,1,'ive',0,113,0,0,1,NULL,NULL,'2017-10-10 13:55:21','2017-10-10 13:55:21','2017-10-10 13:55:21'),(114,1,'ivr',0,114,0,0,1,NULL,NULL,'2017-10-10 13:55:21','2017-10-10 13:55:21','2017-10-10 13:55:21'),(115,1,'inv',0,111,0,0,1,NULL,NULL,'2017-10-10 13:55:21','2017-10-10 13:55:21','2017-10-10 13:55:21'),(116,1,'lbr',0,115,0,0,1,NULL,NULL,'2017-10-10 13:55:21','2017-10-10 13:55:21','2017-10-10 13:55:21'),(117,1,'ldr',0,117,0,0,1,NULL,NULL,'2017-10-10 13:55:22','2017-10-10 13:55:22','2017-10-10 13:55:22'),(118,1,'lsa',0,127,0,0,1,NULL,NULL,'2017-10-10 13:55:22','2017-10-10 13:55:22','2017-10-10 13:55:22'),(119,1,'led',0,118,0,0,1,NULL,NULL,'2017-10-10 13:55:22','2017-10-10 13:55:22','2017-10-10 13:55:22'),(120,1,'len',0,121,0,0,1,NULL,NULL,'2017-10-10 13:55:22','2017-10-10 13:55:22','2017-10-10 13:55:22'),(121,1,'lil',0,125,0,0,1,NULL,NULL,'2017-10-10 13:55:22','2017-10-10 13:55:22','2017-10-10 13:55:22'),(122,1,'lit',0,126,0,0,1,NULL,NULL,'2017-10-10 13:55:22','2017-10-10 13:55:22','2017-10-10 13:55:22'),(123,1,'lie',0,124,0,0,1,NULL,NULL,'2017-10-10 13:55:22','2017-10-10 13:55:22','2017-10-10 13:55:22'),(124,1,'lel',0,120,0,0,1,NULL,NULL,'2017-10-10 13:55:22','2017-10-10 13:55:22','2017-10-10 13:55:22'),(125,1,'let',0,122,0,0,1,NULL,NULL,'2017-10-10 13:55:22','2017-10-10 13:55:22','2017-10-10 13:55:22'),(126,1,'lee',0,119,0,0,1,NULL,NULL,'2017-10-10 13:55:22','2017-10-10 13:55:22','2017-10-10 13:55:22'),(127,1,'lbt',0,116,0,0,1,NULL,NULL,'2017-10-10 13:55:21','2017-10-10 13:55:21','2017-10-10 13:55:21'),(128,1,'lse',0,128,0,0,1,NULL,NULL,'2017-10-10 13:55:22','2017-10-10 13:55:22','2017-10-10 13:55:22'),(129,1,'lso',0,129,0,0,1,NULL,NULL,'2017-10-10 13:55:22','2017-10-10 13:55:22','2017-10-10 13:55:22'),(130,1,'lgd',0,123,0,0,1,NULL,NULL,'2017-10-10 13:55:22','2017-10-10 13:55:22','2017-10-10 13:55:22'),(131,1,'ltg',0,130,0,0,1,NULL,NULL,'2017-10-10 13:55:22','2017-10-10 13:55:22','2017-10-10 13:55:22'),(132,1,'lyr',0,131,0,0,1,NULL,NULL,'2017-10-10 13:55:22','2017-10-10 13:55:22','2017-10-10 13:55:22'),(133,1,'mfp',0,134,0,0,1,NULL,NULL,'2017-10-10 13:55:22','2017-10-10 13:55:22','2017-10-10 13:55:22'),(134,1,'mfr',0,135,0,0,1,NULL,NULL,'2017-10-10 13:55:23','2017-10-10 13:55:23','2017-10-10 13:55:23'),(135,1,'mrb',0,138,0,0,1,NULL,NULL,'2017-10-10 13:55:23','2017-10-10 13:55:23','2017-10-10 13:55:23'),(136,1,'mrk',0,139,0,0,1,NULL,NULL,'2017-10-10 13:55:23','2017-10-10 13:55:23','2017-10-10 13:55:23'),(137,1,'mdc',0,133,0,0,1,NULL,NULL,'2017-10-10 13:55:22','2017-10-10 13:55:22','2017-10-10 13:55:22'),(138,1,'mte',0,141,0,0,1,NULL,NULL,'2017-10-10 13:55:23','2017-10-10 13:55:23','2017-10-10 13:55:23'),(139,1,'mod',0,136,0,0,1,NULL,NULL,'2017-10-10 13:55:23','2017-10-10 13:55:23','2017-10-10 13:55:23'),(140,1,'mon',0,137,0,0,1,NULL,NULL,'2017-10-10 13:55:23','2017-10-10 13:55:23','2017-10-10 13:55:23'),(141,1,'mcp',0,132,0,0,1,NULL,NULL,'2017-10-10 13:55:22','2017-10-10 13:55:22','2017-10-10 13:55:22'),(142,1,'msd',0,140,0,0,1,NULL,NULL,'2017-10-10 13:55:23','2017-10-10 13:55:23','2017-10-10 13:55:23'),(143,1,'mus',0,142,0,0,1,NULL,NULL,'2017-10-10 13:55:23','2017-10-10 13:55:23','2017-10-10 13:55:23'),(144,1,'nrt',0,143,0,0,1,NULL,NULL,'2017-10-10 13:55:23','2017-10-10 13:55:23','2017-10-10 13:55:23'),(145,1,'opn',0,144,0,0,1,NULL,NULL,'2017-10-10 13:55:23','2017-10-10 13:55:23','2017-10-10 13:55:23'),(146,1,'orm',0,146,0,0,1,NULL,NULL,'2017-10-10 13:55:24','2017-10-10 13:55:24','2017-10-10 13:55:24'),(147,1,'org',0,145,0,0,1,NULL,NULL,'2017-10-10 13:55:23','2017-10-10 13:55:23','2017-10-10 13:55:23'),(148,1,'oth',0,147,0,0,1,NULL,NULL,'2017-10-10 13:55:24','2017-10-10 13:55:24','2017-10-10 13:55:24'),(149,1,'own',0,148,0,0,1,NULL,NULL,'2017-10-10 13:55:24','2017-10-10 13:55:24','2017-10-10 13:55:24'),(150,1,'ppm',0,159,0,0,1,NULL,NULL,'2017-10-10 13:55:24','2017-10-10 13:55:24','2017-10-10 13:55:24'),(151,1,'pta',0,170,0,0,1,NULL,NULL,'2017-10-10 13:55:25','2017-10-10 13:55:25','2017-10-10 13:55:25'),(152,1,'pth',0,173,0,0,1,NULL,NULL,'2017-10-10 13:55:25','2017-10-10 13:55:25','2017-10-10 13:55:25'),(153,1,'pat',0,149,0,0,1,NULL,NULL,'2017-10-10 13:55:24','2017-10-10 13:55:24','2017-10-10 13:55:24'),(154,1,'prf',0,163,0,0,1,NULL,NULL,'2017-10-10 13:55:24','2017-10-10 13:55:24','2017-10-10 13:55:24'),(155,1,'pma',0,156,0,0,1,NULL,NULL,'2017-10-10 13:55:24','2017-10-10 13:55:24','2017-10-10 13:55:24'),(156,1,'pht',0,154,0,0,1,NULL,NULL,'2017-10-10 13:55:24','2017-10-10 13:55:24','2017-10-10 13:55:24'),(157,1,'ptf',0,172,0,0,1,NULL,NULL,'2017-10-10 13:55:25','2017-10-10 13:55:25','2017-10-10 13:55:25'),(158,1,'ptt',0,174,0,0,1,NULL,NULL,'2017-10-10 13:55:25','2017-10-10 13:55:25','2017-10-10 13:55:25'),(159,1,'pte',0,171,0,0,1,NULL,NULL,'2017-10-10 13:55:25','2017-10-10 13:55:25','2017-10-10 13:55:25'),(160,1,'plt',0,155,0,0,1,NULL,NULL,'2017-10-10 13:55:24','2017-10-10 13:55:24','2017-10-10 13:55:24'),(161,1,'prt',0,168,0,0,1,NULL,NULL,'2017-10-10 13:55:25','2017-10-10 13:55:25','2017-10-10 13:55:25'),(162,1,'pop',0,158,0,0,1,NULL,NULL,'2017-10-10 13:55:24','2017-10-10 13:55:24','2017-10-10 13:55:24'),(163,1,'prm',0,165,0,0,1,NULL,NULL,'2017-10-10 13:55:24','2017-10-10 13:55:24','2017-10-10 13:55:24'),(164,1,'prc',0,161,0,0,1,NULL,NULL,'2017-10-10 13:55:24','2017-10-10 13:55:24','2017-10-10 13:55:24'),(165,1,'pro',0,166,0,0,1,NULL,NULL,'2017-10-10 13:55:24','2017-10-10 13:55:24','2017-10-10 13:55:24'),(166,1,'pmn',0,157,0,0,1,NULL,NULL,'2017-10-10 13:55:24','2017-10-10 13:55:24','2017-10-10 13:55:24'),(167,1,'prd',0,162,0,0,1,NULL,NULL,'2017-10-10 13:55:24','2017-10-10 13:55:24','2017-10-10 13:55:24'),(168,1,'prp',0,167,0,0,1,NULL,NULL,'2017-10-10 13:55:24','2017-10-10 13:55:24','2017-10-10 13:55:24'),(169,1,'prg',0,164,0,0,1,NULL,NULL,'2017-10-10 13:55:24','2017-10-10 13:55:24','2017-10-10 13:55:24'),(170,1,'pdr',0,152,0,0,1,NULL,NULL,'2017-10-10 13:55:24','2017-10-10 13:55:24','2017-10-10 13:55:24'),(171,1,'pfr',0,153,0,0,1,NULL,NULL,'2017-10-10 13:55:24','2017-10-10 13:55:24','2017-10-10 13:55:24'),(172,1,'prv',0,169,0,0,1,NULL,NULL,'2017-10-10 13:55:25','2017-10-10 13:55:25','2017-10-10 13:55:25'),(173,1,'pup',0,175,0,0,1,NULL,NULL,'2017-10-10 13:55:25','2017-10-10 13:55:25','2017-10-10 13:55:25'),(174,1,'pbl',0,151,0,0,1,NULL,NULL,'2017-10-10 13:55:24','2017-10-10 13:55:24','2017-10-10 13:55:24'),(175,1,'pbd',0,150,0,0,1,NULL,NULL,'2017-10-10 13:55:24','2017-10-10 13:55:24','2017-10-10 13:55:24'),(176,1,'ppt',0,160,0,0,1,NULL,NULL,'2017-10-10 13:55:24','2017-10-10 13:55:24','2017-10-10 13:55:24'),(177,1,'rcp',0,179,0,0,1,NULL,NULL,'2017-10-10 13:55:25','2017-10-10 13:55:25','2017-10-10 13:55:25'),(178,1,'rce',0,178,0,0,1,NULL,NULL,'2017-10-10 13:55:25','2017-10-10 13:55:25','2017-10-10 13:55:25'),(179,1,'rcd',0,177,0,0,1,NULL,NULL,'2017-10-10 13:55:25','2017-10-10 13:55:25','2017-10-10 13:55:25'),(180,1,'red',0,180,0,0,1,NULL,NULL,'2017-10-10 13:55:25','2017-10-10 13:55:25','2017-10-10 13:55:25'),(181,1,'ren',0,181,0,0,1,NULL,NULL,'2017-10-10 13:55:25','2017-10-10 13:55:25','2017-10-10 13:55:25'),(182,1,'rpt',0,185,0,0,1,NULL,NULL,'2017-10-10 13:55:25','2017-10-10 13:55:25','2017-10-10 13:55:25'),(183,1,'rps',0,184,0,0,1,NULL,NULL,'2017-10-10 13:55:25','2017-10-10 13:55:25','2017-10-10 13:55:25'),(184,1,'rth',0,191,0,0,1,NULL,NULL,'2017-10-10 13:55:26','2017-10-10 13:55:26','2017-10-10 13:55:26'),(185,1,'rtm',0,192,0,0,1,NULL,NULL,'2017-10-10 13:55:26','2017-10-10 13:55:26','2017-10-10 13:55:26'),(186,1,'res',0,182,0,0,1,NULL,NULL,'2017-10-10 13:55:25','2017-10-10 13:55:25','2017-10-10 13:55:25'),(187,1,'rsp',0,189,0,0,1,NULL,NULL,'2017-10-10 13:55:26','2017-10-10 13:55:26','2017-10-10 13:55:26'),(188,1,'rst',0,190,0,0,1,NULL,NULL,'2017-10-10 13:55:26','2017-10-10 13:55:26','2017-10-10 13:55:26'),(189,1,'rse',0,187,0,0,1,NULL,NULL,'2017-10-10 13:55:25','2017-10-10 13:55:25','2017-10-10 13:55:25'),(190,1,'rpy',0,186,0,0,1,NULL,NULL,'2017-10-10 13:55:25','2017-10-10 13:55:25','2017-10-10 13:55:25'),(191,1,'rsg',0,188,0,0,1,NULL,NULL,'2017-10-10 13:55:25','2017-10-10 13:55:25','2017-10-10 13:55:25'),(192,1,'rev',0,183,0,0,1,NULL,NULL,'2017-10-10 13:55:25','2017-10-10 13:55:25','2017-10-10 13:55:25'),(193,1,'rbr',0,176,0,0,1,NULL,NULL,'2017-10-10 13:55:25','2017-10-10 13:55:25','2017-10-10 13:55:25'),(194,1,'sce',0,194,0,0,1,NULL,NULL,'2017-10-10 13:55:26','2017-10-10 13:55:26','2017-10-10 13:55:26'),(195,1,'sad',0,193,0,0,1,NULL,NULL,'2017-10-10 13:55:26','2017-10-10 13:55:26','2017-10-10 13:55:26'),(196,1,'scr',0,196,0,0,1,NULL,NULL,'2017-10-10 13:55:26','2017-10-10 13:55:26','2017-10-10 13:55:26'),(197,1,'scl',0,195,0,0,1,NULL,NULL,'2017-10-10 13:55:26','2017-10-10 13:55:26','2017-10-10 13:55:26'),(198,1,'spy',0,204,0,0,1,NULL,NULL,'2017-10-10 13:55:26','2017-10-10 13:55:26','2017-10-10 13:55:26'),(199,1,'sec',0,198,0,0,1,NULL,NULL,'2017-10-10 13:55:26','2017-10-10 13:55:26','2017-10-10 13:55:26'),(200,1,'std',0,206,0,0,1,NULL,NULL,'2017-10-10 13:55:26','2017-10-10 13:55:26','2017-10-10 13:55:26'),(201,1,'stg',0,207,0,0,1,NULL,NULL,'2017-10-10 13:55:26','2017-10-10 13:55:26','2017-10-10 13:55:26'),(202,1,'sgn',0,199,0,0,1,NULL,NULL,'2017-10-10 13:55:26','2017-10-10 13:55:26','2017-10-10 13:55:26'),(203,1,'sng',0,201,0,0,1,NULL,NULL,'2017-10-10 13:55:26','2017-10-10 13:55:26','2017-10-10 13:55:26'),(204,1,'sds',0,197,0,0,1,NULL,NULL,'2017-10-10 13:55:26','2017-10-10 13:55:26','2017-10-10 13:55:26'),(205,1,'spk',0,202,0,0,1,NULL,NULL,'2017-10-10 13:55:26','2017-10-10 13:55:26','2017-10-10 13:55:26'),(206,1,'spn',0,203,0,0,1,NULL,NULL,'2017-10-10 13:55:26','2017-10-10 13:55:26','2017-10-10 13:55:26'),(207,1,'stm',0,209,0,0,1,NULL,NULL,'2017-10-10 13:55:26','2017-10-10 13:55:26','2017-10-10 13:55:26'),(208,1,'stn',0,210,0,0,1,NULL,NULL,'2017-10-10 13:55:26','2017-10-10 13:55:26','2017-10-10 13:55:26'),(209,1,'str',0,211,0,0,1,NULL,NULL,'2017-10-10 13:55:26','2017-10-10 13:55:26','2017-10-10 13:55:26'),(210,1,'stl',0,208,0,0,1,NULL,NULL,'2017-10-10 13:55:26','2017-10-10 13:55:26','2017-10-10 13:55:26'),(211,1,'sht',0,200,0,0,1,NULL,NULL,'2017-10-10 13:55:26','2017-10-10 13:55:26','2017-10-10 13:55:26'),(212,1,'srv',0,205,0,0,1,NULL,NULL,'2017-10-10 13:55:26','2017-10-10 13:55:26','2017-10-10 13:55:26'),(213,1,'tch',0,213,0,0,1,NULL,NULL,'2017-10-10 13:55:26','2017-10-10 13:55:26','2017-10-10 13:55:26'),(214,1,'tcd',0,212,0,0,1,NULL,NULL,'2017-10-10 13:55:26','2017-10-10 13:55:26','2017-10-10 13:55:26'),(215,1,'ths',0,214,0,0,1,NULL,NULL,'2017-10-10 13:55:26','2017-10-10 13:55:26','2017-10-10 13:55:26'),(216,1,'trc',0,215,0,0,1,NULL,NULL,'2017-10-10 13:55:27','2017-10-10 13:55:27','2017-10-10 13:55:27'),(217,1,'trl',0,216,0,0,1,NULL,NULL,'2017-10-10 13:55:27','2017-10-10 13:55:27','2017-10-10 13:55:27'),(218,1,'tyd',0,217,0,0,1,NULL,NULL,'2017-10-10 13:55:27','2017-10-10 13:55:27','2017-10-10 13:55:27'),(219,1,'tyg',0,218,0,0,1,NULL,NULL,'2017-10-10 13:55:27','2017-10-10 13:55:27','2017-10-10 13:55:27'),(220,1,'uvp',0,219,0,0,1,NULL,NULL,'2017-10-10 13:55:27','2017-10-10 13:55:27','2017-10-10 13:55:27'),(221,1,'vdg',0,220,0,0,1,NULL,NULL,'2017-10-10 13:55:27','2017-10-10 13:55:27','2017-10-10 13:55:27'),(222,1,'voc',0,221,0,0,1,NULL,NULL,'2017-10-10 13:55:27','2017-10-10 13:55:27','2017-10-10 13:55:27'),(223,1,'wit',0,225,0,0,1,NULL,NULL,'2017-10-10 13:55:27','2017-10-10 13:55:27','2017-10-10 13:55:27'),(224,1,'wde',0,224,0,0,1,NULL,NULL,'2017-10-10 13:55:27','2017-10-10 13:55:27','2017-10-10 13:55:27'),(225,1,'wdc',0,223,0,0,1,NULL,NULL,'2017-10-10 13:55:27','2017-10-10 13:55:27','2017-10-10 13:55:27'),(226,1,'wam',0,222,0,0,1,NULL,NULL,'2017-10-10 13:55:27','2017-10-10 13:55:27','2017-10-10 13:55:27'),(227,2,'source',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:36','2017-10-10 13:55:36','2017-10-10 13:55:36'),(228,2,'outcome',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:36','2017-10-10 13:55:36','2017-10-10 13:55:36'),(229,2,'transfer',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:36','2017-10-10 13:55:36','2017-10-10 13:55:36'),(230,3,'authorizer',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:29','2017-10-10 13:55:29','2017-10-10 13:55:29'),(231,3,'executing_program',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:29','2017-10-10 13:55:29','2017-10-10 13:55:29'),(232,3,'implementer',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:29','2017-10-10 13:55:29','2017-10-10 13:55:29'),(233,3,'recipient',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:29','2017-10-10 13:55:29','2017-10-10 13:55:29'),(234,3,'transmitter',0,4,0,0,1,NULL,NULL,'2017-10-10 13:55:29','2017-10-10 13:55:29','2017-10-10 13:55:29'),(235,3,'validator',0,5,0,0,1,NULL,NULL,'2017-10-10 13:55:29','2017-10-10 13:55:29','2017-10-10 13:55:29'),(236,4,'local',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:35','2017-10-10 13:55:35','2017-10-10 13:55:35'),(237,4,'naf',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:35','2017-10-10 13:55:35','2017-10-10 13:55:35'),(238,4,'nad',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:35','2017-10-10 13:55:35','2017-10-10 13:55:35'),(239,4,'ulan',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:35','2017-10-10 13:55:35','2017-10-10 13:55:35'),(240,5,'local',0,2,0,0,1,NULL,NULL,'2017-10-10 13:54:47','2017-10-10 13:54:47','2017-10-10 13:54:47'),(241,5,'aacr',0,0,0,0,1,NULL,NULL,'2017-10-10 13:54:47','2017-10-10 13:54:47','2017-10-10 13:54:47'),(242,5,'dacs',0,1,0,0,1,NULL,NULL,'2017-10-10 13:54:47','2017-10-10 13:54:47','2017-10-10 13:54:47'),(243,5,'rda',0,3,0,0,1,NULL,NULL,'2017-10-10 13:54:47','2017-10-10 13:54:47','2017-10-10 13:54:47'),(244,6,'deposit',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:34','2017-10-10 13:55:34','2017-10-10 13:55:34'),(245,6,'gift',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:34','2017-10-10 13:55:34','2017-10-10 13:55:34'),(246,6,'purchase',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:34','2017-10-10 13:55:34','2017-10-10 13:55:34'),(247,6,'transfer',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:34','2017-10-10 13:55:34','2017-10-10 13:55:34'),(248,7,'collection',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:32','2017-10-10 13:55:32','2017-10-10 13:55:32'),(249,7,'publications',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:32','2017-10-10 13:55:32','2017-10-10 13:55:32'),(250,7,'papers',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:32','2017-10-10 13:55:32','2017-10-10 13:55:32'),(251,7,'records',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:32','2017-10-10 13:55:32','2017-10-10 13:55:32'),(252,8,'high',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:35','2017-10-10 13:55:35','2017-10-10 13:55:35'),(253,8,'medium',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:35','2017-10-10 13:55:35','2017-10-10 13:55:35'),(254,8,'low',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:35','2017-10-10 13:55:35','2017-10-10 13:55:35'),(255,9,'new',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:32','2017-10-10 13:55:32','2017-10-10 13:55:32'),(256,9,'in_progress',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:32','2017-10-10 13:55:32','2017-10-10 13:55:32'),(257,9,'completed',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:32','2017-10-10 13:55:32','2017-10-10 13:55:32'),(258,10,'ce',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:31','2017-10-10 13:55:31','2017-10-10 13:55:31'),(259,11,'gregorian',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:35','2017-10-10 13:55:35','2017-10-10 13:55:35'),(260,12,'cartographic',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:30','2017-10-10 13:55:30','2017-10-10 13:55:30'),(261,12,'mixed_materials',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:30','2017-10-10 13:55:30','2017-10-10 13:55:30'),(262,12,'moving_image',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:30','2017-10-10 13:55:30','2017-10-10 13:55:30'),(263,12,'notated_music',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:30','2017-10-10 13:55:30','2017-10-10 13:55:30'),(264,12,'software_multimedia',0,4,0,0,1,NULL,NULL,'2017-10-10 13:55:30','2017-10-10 13:55:30','2017-10-10 13:55:30'),(265,12,'sound_recording',0,5,0,0,1,NULL,NULL,'2017-10-10 13:55:30','2017-10-10 13:55:30','2017-10-10 13:55:30'),(266,12,'sound_recording_musical',0,6,0,0,1,NULL,NULL,'2017-10-10 13:55:30','2017-10-10 13:55:30','2017-10-10 13:55:30'),(267,12,'sound_recording_nonmusical',0,7,0,0,1,NULL,NULL,'2017-10-10 13:55:30','2017-10-10 13:55:30','2017-10-10 13:55:30'),(268,12,'still_image',0,8,0,0,1,NULL,NULL,'2017-10-10 13:55:30','2017-10-10 13:55:30','2017-10-10 13:55:30'),(269,12,'text',0,9,0,0,1,NULL,NULL,'2017-10-10 13:55:30','2017-10-10 13:55:30','2017-10-10 13:55:30'),(270,13,'collection',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:31','2017-10-10 13:55:31','2017-10-10 13:55:31'),(271,13,'work',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:32','2017-10-10 13:55:32','2017-10-10 13:55:32'),(272,13,'image',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:31','2017-10-10 13:55:31','2017-10-10 13:55:31'),(273,14,'cassettes',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:30','2017-10-10 13:55:30','2017-10-10 13:55:30'),(274,14,'cubic_feet',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:31','2017-10-10 13:55:31','2017-10-10 13:55:31'),(275,14,'gigabytes',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:31','2017-10-10 13:55:31','2017-10-10 13:55:31'),(276,14,'leaves',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:31','2017-10-10 13:55:31','2017-10-10 13:55:31'),(277,14,'linear_feet',0,4,0,0,1,NULL,NULL,'2017-10-10 13:55:31','2017-10-10 13:55:31','2017-10-10 13:55:31'),(278,14,'megabytes',0,5,0,0,1,NULL,NULL,'2017-10-10 13:55:31','2017-10-10 13:55:31','2017-10-10 13:55:31'),(279,14,'photographic_prints',0,6,0,0,1,NULL,NULL,'2017-10-10 13:55:31','2017-10-10 13:55:31','2017-10-10 13:55:31'),(280,14,'photographic_slides',0,7,0,0,1,NULL,NULL,'2017-10-10 13:55:31','2017-10-10 13:55:31','2017-10-10 13:55:31'),(281,14,'reels',0,8,0,0,1,NULL,NULL,'2017-10-10 13:55:31','2017-10-10 13:55:31','2017-10-10 13:55:31'),(282,14,'sheets',0,9,0,0,1,NULL,NULL,'2017-10-10 13:55:31','2017-10-10 13:55:31','2017-10-10 13:55:31'),(283,14,'terabytes',0,10,0,0,1,NULL,NULL,'2017-10-10 13:55:31','2017-10-10 13:55:31','2017-10-10 13:55:31'),(284,14,'volumes',0,11,0,0,1,NULL,NULL,'2017-10-10 13:55:31','2017-10-10 13:55:31','2017-10-10 13:55:31'),(285,15,'accession',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:11','2017-10-10 13:55:11','2017-10-10 13:55:11'),(286,15,'accumulation',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:11','2017-10-10 13:55:11','2017-10-10 13:55:11'),(287,15,'acknowledgement_sent',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:11','2017-10-10 13:55:11','2017-10-10 13:55:11'),(288,15,'acknowledgement_received',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:11','2017-10-10 13:55:11','2017-10-10 13:55:11'),(289,15,'agreement_signed',0,6,0,0,1,NULL,NULL,'2017-10-10 13:55:11','2017-10-10 13:55:11','2017-10-10 13:55:11'),(290,15,'agreement_received',0,4,0,0,1,NULL,NULL,'2017-10-10 13:55:11','2017-10-10 13:55:11','2017-10-10 13:55:11'),(291,15,'agreement_sent',0,5,0,0,1,NULL,NULL,'2017-10-10 13:55:11','2017-10-10 13:55:11','2017-10-10 13:55:11'),(292,15,'appraisal',0,7,0,0,1,NULL,NULL,'2017-10-10 13:55:11','2017-10-10 13:55:11','2017-10-10 13:55:11'),(293,15,'assessment',0,8,0,0,1,NULL,NULL,'2017-10-10 13:55:11','2017-10-10 13:55:11','2017-10-10 13:55:11'),(294,15,'capture',0,9,0,0,1,NULL,NULL,'2017-10-10 13:55:11','2017-10-10 13:55:11','2017-10-10 13:55:11'),(295,15,'cataloged',0,10,0,0,1,NULL,NULL,'2017-10-10 13:55:11','2017-10-10 13:55:11','2017-10-10 13:55:11'),(296,15,'collection',0,11,0,0,1,NULL,NULL,'2017-10-10 13:55:11','2017-10-10 13:55:11','2017-10-10 13:55:11'),(297,15,'compression',0,13,0,0,1,NULL,NULL,'2017-10-10 13:55:11','2017-10-10 13:55:11','2017-10-10 13:55:11'),(298,15,'contribution',0,14,0,0,1,NULL,NULL,'2017-10-10 13:55:11','2017-10-10 13:55:11','2017-10-10 13:55:11'),(299,15,'component_transfer',0,12,0,0,1,NULL,NULL,'2017-10-10 13:55:11','2017-10-10 13:55:11','2017-10-10 13:55:11'),(300,15,'copyright_transfer',0,15,0,0,1,NULL,NULL,'2017-10-10 13:55:11','2017-10-10 13:55:11','2017-10-10 13:55:11'),(301,15,'custody_transfer',0,16,0,0,1,NULL,NULL,'2017-10-10 13:55:11','2017-10-10 13:55:11','2017-10-10 13:55:11'),(302,15,'deaccession',0,17,0,0,1,NULL,NULL,'2017-10-10 13:55:11','2017-10-10 13:55:11','2017-10-10 13:55:11'),(303,15,'decompression',0,18,0,0,1,NULL,NULL,'2017-10-10 13:55:12','2017-10-10 13:55:12','2017-10-10 13:55:12'),(304,15,'decryption',0,19,0,0,1,NULL,NULL,'2017-10-10 13:55:12','2017-10-10 13:55:12','2017-10-10 13:55:12'),(305,15,'deletion',0,20,0,0,1,NULL,NULL,'2017-10-10 13:55:12','2017-10-10 13:55:12','2017-10-10 13:55:12'),(306,15,'digital_signature_validation',0,21,0,0,1,NULL,NULL,'2017-10-10 13:55:12','2017-10-10 13:55:12','2017-10-10 13:55:12'),(307,15,'fixity_check',0,22,0,0,1,NULL,NULL,'2017-10-10 13:55:12','2017-10-10 13:55:12','2017-10-10 13:55:12'),(308,15,'ingestion',0,23,0,0,1,NULL,NULL,'2017-10-10 13:55:12','2017-10-10 13:55:12','2017-10-10 13:55:12'),(309,15,'message_digest_calculation',0,24,0,0,1,NULL,NULL,'2017-10-10 13:55:12','2017-10-10 13:55:12','2017-10-10 13:55:12'),(310,15,'migration',0,25,0,0,1,NULL,NULL,'2017-10-10 13:55:12','2017-10-10 13:55:12','2017-10-10 13:55:12'),(311,15,'normalization',0,26,0,0,1,NULL,NULL,'2017-10-10 13:55:12','2017-10-10 13:55:12','2017-10-10 13:55:12'),(312,15,'processed',0,27,0,0,1,NULL,NULL,'2017-10-10 13:55:12','2017-10-10 13:55:12','2017-10-10 13:55:12'),(313,15,'publication',0,28,0,0,1,NULL,NULL,'2017-10-10 13:55:13','2017-10-10 13:55:13','2017-10-10 13:55:13'),(314,15,'replication',0,29,0,0,1,NULL,NULL,'2017-10-10 13:55:13','2017-10-10 13:55:13','2017-10-10 13:55:13'),(315,15,'validation',0,30,0,0,1,NULL,NULL,'2017-10-10 13:55:13','2017-10-10 13:55:13','2017-10-10 13:55:13'),(316,15,'virus_check',0,31,0,0,1,NULL,NULL,'2017-10-10 13:55:13','2017-10-10 13:55:13','2017-10-10 13:55:13'),(317,16,'box',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:30','2017-10-10 13:55:30','2017-10-10 13:55:30'),(318,16,'carton',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:30','2017-10-10 13:55:30','2017-10-10 13:55:30'),(319,16,'case',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:30','2017-10-10 13:55:30','2017-10-10 13:55:30'),(320,16,'folder',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:30','2017-10-10 13:55:30','2017-10-10 13:55:30'),(321,16,'frame',0,4,0,0,1,NULL,NULL,'2017-10-10 13:55:30','2017-10-10 13:55:30','2017-10-10 13:55:30'),(322,16,'object',0,5,0,0,1,NULL,NULL,'2017-10-10 13:55:30','2017-10-10 13:55:30','2017-10-10 13:55:30'),(323,16,'reel',0,6,0,0,1,NULL,NULL,'2017-10-10 13:55:30','2017-10-10 13:55:30','2017-10-10 13:55:30'),(324,17,'mr',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:36','2017-10-10 13:55:36','2017-10-10 13:55:36'),(325,17,'mrs',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:36','2017-10-10 13:55:36','2017-10-10 13:55:36'),(326,17,'ms',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:36','2017-10-10 13:55:36','2017-10-10 13:55:36'),(327,17,'madame',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:36','2017-10-10 13:55:36','2017-10-10 13:55:36'),(328,17,'sir',0,4,0,0,1,NULL,NULL,'2017-10-10 13:55:36','2017-10-10 13:55:36','2017-10-10 13:55:36'),(329,18,'pass',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:34','2017-10-10 13:55:34','2017-10-10 13:55:34'),(330,18,'partial pass',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:34','2017-10-10 13:55:34','2017-10-10 13:55:34'),(331,18,'fail',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:34','2017-10-10 13:55:34','2017-10-10 13:55:34'),(332,19,'collection',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:32','2017-10-10 13:55:32','2017-10-10 13:55:32'),(333,19,'publications',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:32','2017-10-10 13:55:32','2017-10-10 13:55:32'),(334,19,'papers',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:32','2017-10-10 13:55:32','2017-10-10 13:55:32'),(335,19,'records',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:32','2017-10-10 13:55:32','2017-10-10 13:55:32'),(336,20,'aacr',0,0,0,0,1,NULL,NULL,'2017-10-10 13:54:47','2017-10-10 13:54:47','2017-10-10 13:54:47'),(337,20,'cco',0,1,0,0,1,NULL,NULL,'2017-10-10 13:54:47','2017-10-10 13:54:47','2017-10-10 13:54:47'),(338,20,'dacs',0,2,0,0,1,NULL,NULL,'2017-10-10 13:54:47','2017-10-10 13:54:47','2017-10-10 13:54:47'),(339,20,'rad',0,4,0,0,1,NULL,NULL,'2017-10-10 13:54:47','2017-10-10 13:54:47','2017-10-10 13:54:47'),(340,20,'isadg',0,3,0,0,1,NULL,NULL,'2017-10-10 13:54:47','2017-10-10 13:54:47','2017-10-10 13:54:47'),(341,21,'completed',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:32','2017-10-10 13:55:32','2017-10-10 13:55:32'),(342,21,'in_progress',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:32','2017-10-10 13:55:32','2017-10-10 13:55:32'),(343,21,'under_revision',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:32','2017-10-10 13:55:32','2017-10-10 13:55:32'),(344,21,'unprocessed',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:32','2017-10-10 13:55:32','2017-10-10 13:55:32'),(345,22,'accession',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:13','2017-10-10 13:55:13','2017-10-10 13:55:13'),(346,22,'audio',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:13','2017-10-10 13:55:13','2017-10-10 13:55:13'),(347,22,'books',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:13','2017-10-10 13:55:13','2017-10-10 13:55:13'),(348,22,'computer_disks',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:13','2017-10-10 13:55:13','2017-10-10 13:55:13'),(349,22,'digital_object',0,4,0,0,1,NULL,NULL,'2017-10-10 13:55:13','2017-10-10 13:55:13','2017-10-10 13:55:13'),(350,22,'graphic_materials',0,5,0,0,1,NULL,NULL,'2017-10-10 13:55:13','2017-10-10 13:55:13','2017-10-10 13:55:13'),(351,22,'maps',0,6,0,0,1,NULL,NULL,'2017-10-10 13:55:13','2017-10-10 13:55:13','2017-10-10 13:55:13'),(352,22,'microform',0,7,0,0,1,NULL,NULL,'2017-10-10 13:55:13','2017-10-10 13:55:13','2017-10-10 13:55:13'),(353,22,'mixed_materials',0,8,0,0,1,NULL,NULL,'2017-10-10 13:55:13','2017-10-10 13:55:13','2017-10-10 13:55:13'),(354,22,'moving_images',0,9,0,0,1,NULL,NULL,'2017-10-10 13:55:13','2017-10-10 13:55:13','2017-10-10 13:55:13'),(355,22,'realia',0,10,0,0,1,NULL,NULL,'2017-10-10 13:55:13','2017-10-10 13:55:13','2017-10-10 13:55:13'),(356,22,'text',0,11,0,0,1,NULL,NULL,'2017-10-10 13:55:13','2017-10-10 13:55:13','2017-10-10 13:55:13'),(357,23,'aat',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:10','2017-10-10 13:55:10','2017-10-10 13:55:10'),(358,23,'rbgenr',0,5,0,0,1,NULL,NULL,'2017-10-10 13:55:10','2017-10-10 13:55:10','2017-10-10 13:55:10'),(359,23,'tgn',0,6,0,0,1,NULL,NULL,'2017-10-10 13:55:10','2017-10-10 13:55:10','2017-10-10 13:55:10'),(360,23,'lcsh',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:10','2017-10-10 13:55:10','2017-10-10 13:55:10'),(361,23,'local',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:10','2017-10-10 13:55:10','2017-10-10 13:55:10'),(362,23,'mesh',0,4,0,0,1,NULL,NULL,'2017-10-10 13:55:10','2017-10-10 13:55:10','2017-10-10 13:55:10'),(363,23,'gmgpc',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:10','2017-10-10 13:55:10','2017-10-10 13:55:10'),(364,24,'application',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:28','2017-10-10 13:55:28','2017-10-10 13:55:28'),(365,24,'application-pdf',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:28','2017-10-10 13:55:28','2017-10-10 13:55:28'),(366,24,'audio-clip',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:28','2017-10-10 13:55:28','2017-10-10 13:55:28'),(367,24,'audio-master',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:28','2017-10-10 13:55:28','2017-10-10 13:55:28'),(368,24,'audio-master-edited',0,4,0,0,1,NULL,NULL,'2017-10-10 13:55:28','2017-10-10 13:55:28','2017-10-10 13:55:28'),(369,24,'audio-service',0,5,0,0,1,NULL,NULL,'2017-10-10 13:55:28','2017-10-10 13:55:28','2017-10-10 13:55:28'),(370,24,'image-master',0,6,0,0,1,NULL,NULL,'2017-10-10 13:55:28','2017-10-10 13:55:28','2017-10-10 13:55:28'),(371,24,'image-master-edited',0,7,0,0,1,NULL,NULL,'2017-10-10 13:55:28','2017-10-10 13:55:28','2017-10-10 13:55:28'),(372,24,'image-service',0,8,0,0,1,NULL,NULL,'2017-10-10 13:55:28','2017-10-10 13:55:28','2017-10-10 13:55:28'),(373,24,'image-service-edited',0,9,0,0,1,NULL,NULL,'2017-10-10 13:55:28','2017-10-10 13:55:28','2017-10-10 13:55:28'),(374,24,'image-thumbnail',0,10,0,0,1,NULL,NULL,'2017-10-10 13:55:28','2017-10-10 13:55:28','2017-10-10 13:55:28'),(375,24,'text-codebook',0,12,0,0,1,NULL,NULL,'2017-10-10 13:55:28','2017-10-10 13:55:28','2017-10-10 13:55:28'),(376,24,'test-data',0,11,0,0,1,NULL,NULL,'2017-10-10 13:55:28','2017-10-10 13:55:28','2017-10-10 13:55:28'),(377,24,'text-data_definition',0,13,0,0,1,NULL,NULL,'2017-10-10 13:55:28','2017-10-10 13:55:28','2017-10-10 13:55:28'),(378,24,'text-georeference',0,14,0,0,1,NULL,NULL,'2017-10-10 13:55:29','2017-10-10 13:55:29','2017-10-10 13:55:29'),(379,24,'text-ocr-edited',0,15,0,0,1,NULL,NULL,'2017-10-10 13:55:29','2017-10-10 13:55:29','2017-10-10 13:55:29'),(380,24,'text-ocr-unedited',0,16,0,0,1,NULL,NULL,'2017-10-10 13:55:29','2017-10-10 13:55:29','2017-10-10 13:55:29'),(381,24,'text-tei-transcripted',0,17,0,0,1,NULL,NULL,'2017-10-10 13:55:29','2017-10-10 13:55:29','2017-10-10 13:55:29'),(382,24,'text-tei-translated',0,18,0,0,1,NULL,NULL,'2017-10-10 13:55:29','2017-10-10 13:55:29','2017-10-10 13:55:29'),(383,24,'video-clip',0,19,0,0,1,NULL,NULL,'2017-10-10 13:55:29','2017-10-10 13:55:29','2017-10-10 13:55:29'),(384,24,'video-master',0,20,0,0,1,NULL,NULL,'2017-10-10 13:55:29','2017-10-10 13:55:29','2017-10-10 13:55:29'),(385,24,'video-master-edited',0,21,0,0,1,NULL,NULL,'2017-10-10 13:55:29','2017-10-10 13:55:29','2017-10-10 13:55:29'),(386,24,'video-service',0,22,0,0,1,NULL,NULL,'2017-10-10 13:55:29','2017-10-10 13:55:29','2017-10-10 13:55:29'),(387,24,'video-streaming',0,23,0,0,1,NULL,NULL,'2017-10-10 13:55:29','2017-10-10 13:55:29','2017-10-10 13:55:29'),(388,25,'md5',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:36','2017-10-10 13:55:36','2017-10-10 13:55:36'),(389,25,'sha-1',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:36','2017-10-10 13:55:36','2017-10-10 13:55:36'),(390,25,'sha-256',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:36','2017-10-10 13:55:36','2017-10-10 13:55:36'),(391,25,'sha-384',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:36','2017-10-10 13:55:36','2017-10-10 13:55:36'),(392,25,'sha-512',0,4,0,0,1,NULL,NULL,'2017-10-10 13:55:36','2017-10-10 13:55:36','2017-10-10 13:55:36'),(393,26,'aar',0,0,0,0,1,NULL,NULL,'2017-10-10 13:54:47','2017-10-10 13:54:47','2017-10-10 13:54:47'),(394,26,'abk',0,1,0,0,1,NULL,NULL,'2017-10-10 13:54:47','2017-10-10 13:54:47','2017-10-10 13:54:47'),(395,26,'ace',0,2,0,0,1,NULL,NULL,'2017-10-10 13:54:47','2017-10-10 13:54:47','2017-10-10 13:54:47'),(396,26,'ach',0,3,0,0,1,NULL,NULL,'2017-10-10 13:54:47','2017-10-10 13:54:47','2017-10-10 13:54:47'),(397,26,'ada',0,4,0,0,1,NULL,NULL,'2017-10-10 13:54:47','2017-10-10 13:54:47','2017-10-10 13:54:47'),(398,26,'ady',0,5,0,0,1,NULL,NULL,'2017-10-10 13:54:47','2017-10-10 13:54:47','2017-10-10 13:54:47'),(399,26,'afa',0,6,0,0,1,NULL,NULL,'2017-10-10 13:54:47','2017-10-10 13:54:47','2017-10-10 13:54:47'),(400,26,'afh',0,7,0,0,1,NULL,NULL,'2017-10-10 13:54:48','2017-10-10 13:54:48','2017-10-10 13:54:48'),(401,26,'afr',0,8,0,0,1,NULL,NULL,'2017-10-10 13:54:48','2017-10-10 13:54:48','2017-10-10 13:54:48'),(402,26,'ain',0,9,0,0,1,NULL,NULL,'2017-10-10 13:54:48','2017-10-10 13:54:48','2017-10-10 13:54:48'),(403,26,'aka',0,10,0,0,1,NULL,NULL,'2017-10-10 13:54:48','2017-10-10 13:54:48','2017-10-10 13:54:48'),(404,26,'akk',0,11,0,0,1,NULL,NULL,'2017-10-10 13:54:48','2017-10-10 13:54:48','2017-10-10 13:54:48'),(405,26,'alb',0,12,0,0,1,NULL,NULL,'2017-10-10 13:54:48','2017-10-10 13:54:48','2017-10-10 13:54:48'),(406,26,'ale',0,13,0,0,1,NULL,NULL,'2017-10-10 13:54:48','2017-10-10 13:54:48','2017-10-10 13:54:48'),(407,26,'alg',0,14,0,0,1,NULL,NULL,'2017-10-10 13:54:48','2017-10-10 13:54:48','2017-10-10 13:54:48'),(408,26,'alt',0,15,0,0,1,NULL,NULL,'2017-10-10 13:54:48','2017-10-10 13:54:48','2017-10-10 13:54:48'),(409,26,'amh',0,16,0,0,1,NULL,NULL,'2017-10-10 13:54:48','2017-10-10 13:54:48','2017-10-10 13:54:48'),(410,26,'ang',0,17,0,0,1,NULL,NULL,'2017-10-10 13:54:48','2017-10-10 13:54:48','2017-10-10 13:54:48'),(411,26,'anp',0,18,0,0,1,NULL,NULL,'2017-10-10 13:54:48','2017-10-10 13:54:48','2017-10-10 13:54:48'),(412,26,'apa',0,19,0,0,1,NULL,NULL,'2017-10-10 13:54:48','2017-10-10 13:54:48','2017-10-10 13:54:48'),(413,26,'ara',0,20,0,0,1,NULL,NULL,'2017-10-10 13:54:48','2017-10-10 13:54:48','2017-10-10 13:54:48'),(414,26,'arc',0,21,0,0,1,NULL,NULL,'2017-10-10 13:54:48','2017-10-10 13:54:48','2017-10-10 13:54:48'),(415,26,'arg',0,22,0,0,1,NULL,NULL,'2017-10-10 13:54:48','2017-10-10 13:54:48','2017-10-10 13:54:48'),(416,26,'arm',0,23,0,0,1,NULL,NULL,'2017-10-10 13:54:48','2017-10-10 13:54:48','2017-10-10 13:54:48'),(417,26,'arn',0,24,0,0,1,NULL,NULL,'2017-10-10 13:54:48','2017-10-10 13:54:48','2017-10-10 13:54:48'),(418,26,'arp',0,25,0,0,1,NULL,NULL,'2017-10-10 13:54:48','2017-10-10 13:54:48','2017-10-10 13:54:48'),(419,26,'art',0,26,0,0,1,NULL,NULL,'2017-10-10 13:54:48','2017-10-10 13:54:48','2017-10-10 13:54:48'),(420,26,'arw',0,27,0,0,1,NULL,NULL,'2017-10-10 13:54:48','2017-10-10 13:54:48','2017-10-10 13:54:48'),(421,26,'asm',0,28,0,0,1,NULL,NULL,'2017-10-10 13:54:48','2017-10-10 13:54:48','2017-10-10 13:54:48'),(422,26,'ast',0,29,0,0,1,NULL,NULL,'2017-10-10 13:54:48','2017-10-10 13:54:48','2017-10-10 13:54:48'),(423,26,'ath',0,30,0,0,1,NULL,NULL,'2017-10-10 13:54:48','2017-10-10 13:54:48','2017-10-10 13:54:48'),(424,26,'aus',0,31,0,0,1,NULL,NULL,'2017-10-10 13:54:49','2017-10-10 13:54:49','2017-10-10 13:54:49'),(425,26,'ava',0,32,0,0,1,NULL,NULL,'2017-10-10 13:54:49','2017-10-10 13:54:49','2017-10-10 13:54:49'),(426,26,'ave',0,33,0,0,1,NULL,NULL,'2017-10-10 13:54:49','2017-10-10 13:54:49','2017-10-10 13:54:49'),(427,26,'awa',0,34,0,0,1,NULL,NULL,'2017-10-10 13:54:49','2017-10-10 13:54:49','2017-10-10 13:54:49'),(428,26,'aym',0,35,0,0,1,NULL,NULL,'2017-10-10 13:54:49','2017-10-10 13:54:49','2017-10-10 13:54:49'),(429,26,'aze',0,36,0,0,1,NULL,NULL,'2017-10-10 13:54:49','2017-10-10 13:54:49','2017-10-10 13:54:49'),(430,26,'bad',0,37,0,0,1,NULL,NULL,'2017-10-10 13:54:49','2017-10-10 13:54:49','2017-10-10 13:54:49'),(431,26,'bai',0,38,0,0,1,NULL,NULL,'2017-10-10 13:54:49','2017-10-10 13:54:49','2017-10-10 13:54:49'),(432,26,'bak',0,39,0,0,1,NULL,NULL,'2017-10-10 13:54:49','2017-10-10 13:54:49','2017-10-10 13:54:49'),(433,26,'bal',0,40,0,0,1,NULL,NULL,'2017-10-10 13:54:49','2017-10-10 13:54:49','2017-10-10 13:54:49'),(434,26,'bam',0,41,0,0,1,NULL,NULL,'2017-10-10 13:54:49','2017-10-10 13:54:49','2017-10-10 13:54:49'),(435,26,'ban',0,42,0,0,1,NULL,NULL,'2017-10-10 13:54:49','2017-10-10 13:54:49','2017-10-10 13:54:49'),(436,26,'baq',0,43,0,0,1,NULL,NULL,'2017-10-10 13:54:49','2017-10-10 13:54:49','2017-10-10 13:54:49'),(437,26,'bas',0,44,0,0,1,NULL,NULL,'2017-10-10 13:54:49','2017-10-10 13:54:49','2017-10-10 13:54:49'),(438,26,'bat',0,45,0,0,1,NULL,NULL,'2017-10-10 13:54:49','2017-10-10 13:54:49','2017-10-10 13:54:49'),(439,26,'bej',0,46,0,0,1,NULL,NULL,'2017-10-10 13:54:49','2017-10-10 13:54:49','2017-10-10 13:54:49'),(440,26,'bel',0,47,0,0,1,NULL,NULL,'2017-10-10 13:54:49','2017-10-10 13:54:49','2017-10-10 13:54:49'),(441,26,'bem',0,48,0,0,1,NULL,NULL,'2017-10-10 13:54:49','2017-10-10 13:54:49','2017-10-10 13:54:49'),(442,26,'ben',0,49,0,0,1,NULL,NULL,'2017-10-10 13:54:49','2017-10-10 13:54:49','2017-10-10 13:54:49'),(443,26,'ber',0,50,0,0,1,NULL,NULL,'2017-10-10 13:54:49','2017-10-10 13:54:49','2017-10-10 13:54:49'),(444,26,'bho',0,51,0,0,1,NULL,NULL,'2017-10-10 13:54:49','2017-10-10 13:54:49','2017-10-10 13:54:49'),(445,26,'bih',0,52,0,0,1,NULL,NULL,'2017-10-10 13:54:50','2017-10-10 13:54:50','2017-10-10 13:54:50'),(446,26,'bik',0,53,0,0,1,NULL,NULL,'2017-10-10 13:54:50','2017-10-10 13:54:50','2017-10-10 13:54:50'),(447,26,'bin',0,54,0,0,1,NULL,NULL,'2017-10-10 13:54:50','2017-10-10 13:54:50','2017-10-10 13:54:50'),(448,26,'bis',0,55,0,0,1,NULL,NULL,'2017-10-10 13:54:50','2017-10-10 13:54:50','2017-10-10 13:54:50'),(449,26,'bla',0,56,0,0,1,NULL,NULL,'2017-10-10 13:54:50','2017-10-10 13:54:50','2017-10-10 13:54:50'),(450,26,'bnt',0,57,0,0,1,NULL,NULL,'2017-10-10 13:54:50','2017-10-10 13:54:50','2017-10-10 13:54:50'),(451,26,'bos',0,58,0,0,1,NULL,NULL,'2017-10-10 13:54:50','2017-10-10 13:54:50','2017-10-10 13:54:50'),(452,26,'bra',0,59,0,0,1,NULL,NULL,'2017-10-10 13:54:50','2017-10-10 13:54:50','2017-10-10 13:54:50'),(453,26,'bre',0,60,0,0,1,NULL,NULL,'2017-10-10 13:54:50','2017-10-10 13:54:50','2017-10-10 13:54:50'),(454,26,'btk',0,61,0,0,1,NULL,NULL,'2017-10-10 13:54:50','2017-10-10 13:54:50','2017-10-10 13:54:50'),(455,26,'bua',0,62,0,0,1,NULL,NULL,'2017-10-10 13:54:50','2017-10-10 13:54:50','2017-10-10 13:54:50'),(456,26,'bug',0,63,0,0,1,NULL,NULL,'2017-10-10 13:54:51','2017-10-10 13:54:51','2017-10-10 13:54:51'),(457,26,'bul',0,64,0,0,1,NULL,NULL,'2017-10-10 13:54:51','2017-10-10 13:54:51','2017-10-10 13:54:51'),(458,26,'bur',0,65,0,0,1,NULL,NULL,'2017-10-10 13:54:51','2017-10-10 13:54:51','2017-10-10 13:54:51'),(459,26,'byn',0,66,0,0,1,NULL,NULL,'2017-10-10 13:54:51','2017-10-10 13:54:51','2017-10-10 13:54:51'),(460,26,'cad',0,67,0,0,1,NULL,NULL,'2017-10-10 13:54:51','2017-10-10 13:54:51','2017-10-10 13:54:51'),(461,26,'cai',0,68,0,0,1,NULL,NULL,'2017-10-10 13:54:51','2017-10-10 13:54:51','2017-10-10 13:54:51'),(462,26,'car',0,69,0,0,1,NULL,NULL,'2017-10-10 13:54:51','2017-10-10 13:54:51','2017-10-10 13:54:51'),(463,26,'cat',0,70,0,0,1,NULL,NULL,'2017-10-10 13:54:51','2017-10-10 13:54:51','2017-10-10 13:54:51'),(464,26,'cau',0,71,0,0,1,NULL,NULL,'2017-10-10 13:54:51','2017-10-10 13:54:51','2017-10-10 13:54:51'),(465,26,'ceb',0,72,0,0,1,NULL,NULL,'2017-10-10 13:54:51','2017-10-10 13:54:51','2017-10-10 13:54:51'),(466,26,'cel',0,73,0,0,1,NULL,NULL,'2017-10-10 13:54:51','2017-10-10 13:54:51','2017-10-10 13:54:51'),(467,26,'cha',0,74,0,0,1,NULL,NULL,'2017-10-10 13:54:51','2017-10-10 13:54:51','2017-10-10 13:54:51'),(468,26,'chb',0,75,0,0,1,NULL,NULL,'2017-10-10 13:54:51','2017-10-10 13:54:51','2017-10-10 13:54:51'),(469,26,'che',0,76,0,0,1,NULL,NULL,'2017-10-10 13:54:51','2017-10-10 13:54:51','2017-10-10 13:54:51'),(470,26,'chg',0,77,0,0,1,NULL,NULL,'2017-10-10 13:54:51','2017-10-10 13:54:51','2017-10-10 13:54:51'),(471,26,'chi',0,78,0,0,1,NULL,NULL,'2017-10-10 13:54:52','2017-10-10 13:54:52','2017-10-10 13:54:52'),(472,26,'chk',0,79,0,0,1,NULL,NULL,'2017-10-10 13:54:52','2017-10-10 13:54:52','2017-10-10 13:54:52'),(473,26,'chm',0,80,0,0,1,NULL,NULL,'2017-10-10 13:54:52','2017-10-10 13:54:52','2017-10-10 13:54:52'),(474,26,'chn',0,81,0,0,1,NULL,NULL,'2017-10-10 13:54:52','2017-10-10 13:54:52','2017-10-10 13:54:52'),(475,26,'cho',0,82,0,0,1,NULL,NULL,'2017-10-10 13:54:52','2017-10-10 13:54:52','2017-10-10 13:54:52'),(476,26,'chp',0,83,0,0,1,NULL,NULL,'2017-10-10 13:54:52','2017-10-10 13:54:52','2017-10-10 13:54:52'),(477,26,'chr',0,84,0,0,1,NULL,NULL,'2017-10-10 13:54:52','2017-10-10 13:54:52','2017-10-10 13:54:52'),(478,26,'chu',0,85,0,0,1,NULL,NULL,'2017-10-10 13:54:52','2017-10-10 13:54:52','2017-10-10 13:54:52'),(479,26,'chv',0,86,0,0,1,NULL,NULL,'2017-10-10 13:54:52','2017-10-10 13:54:52','2017-10-10 13:54:52'),(480,26,'chy',0,87,0,0,1,NULL,NULL,'2017-10-10 13:54:52','2017-10-10 13:54:52','2017-10-10 13:54:52'),(481,26,'cmc',0,88,0,0,1,NULL,NULL,'2017-10-10 13:54:52','2017-10-10 13:54:52','2017-10-10 13:54:52'),(482,26,'cop',0,89,0,0,1,NULL,NULL,'2017-10-10 13:54:52','2017-10-10 13:54:52','2017-10-10 13:54:52'),(483,26,'cor',0,90,0,0,1,NULL,NULL,'2017-10-10 13:54:52','2017-10-10 13:54:52','2017-10-10 13:54:52'),(484,26,'cos',0,91,0,0,1,NULL,NULL,'2017-10-10 13:54:52','2017-10-10 13:54:52','2017-10-10 13:54:52'),(485,26,'cpe',0,92,0,0,1,NULL,NULL,'2017-10-10 13:54:52','2017-10-10 13:54:52','2017-10-10 13:54:52'),(486,26,'cpf',0,93,0,0,1,NULL,NULL,'2017-10-10 13:54:52','2017-10-10 13:54:52','2017-10-10 13:54:52'),(487,26,'cpp',0,94,0,0,1,NULL,NULL,'2017-10-10 13:54:53','2017-10-10 13:54:53','2017-10-10 13:54:53'),(488,26,'cre',0,95,0,0,1,NULL,NULL,'2017-10-10 13:54:53','2017-10-10 13:54:53','2017-10-10 13:54:53'),(489,26,'crh',0,96,0,0,1,NULL,NULL,'2017-10-10 13:54:53','2017-10-10 13:54:53','2017-10-10 13:54:53'),(490,26,'crp',0,97,0,0,1,NULL,NULL,'2017-10-10 13:54:53','2017-10-10 13:54:53','2017-10-10 13:54:53'),(491,26,'csb',0,98,0,0,1,NULL,NULL,'2017-10-10 13:54:53','2017-10-10 13:54:53','2017-10-10 13:54:53'),(492,26,'cus',0,99,0,0,1,NULL,NULL,'2017-10-10 13:54:53','2017-10-10 13:54:53','2017-10-10 13:54:53'),(493,26,'cze',0,100,0,0,1,NULL,NULL,'2017-10-10 13:54:53','2017-10-10 13:54:53','2017-10-10 13:54:53'),(494,26,'dak',0,101,0,0,1,NULL,NULL,'2017-10-10 13:54:53','2017-10-10 13:54:53','2017-10-10 13:54:53'),(495,26,'dan',0,102,0,0,1,NULL,NULL,'2017-10-10 13:54:53','2017-10-10 13:54:53','2017-10-10 13:54:53'),(496,26,'dar',0,103,0,0,1,NULL,NULL,'2017-10-10 13:54:53','2017-10-10 13:54:53','2017-10-10 13:54:53'),(497,26,'day',0,104,0,0,1,NULL,NULL,'2017-10-10 13:54:53','2017-10-10 13:54:53','2017-10-10 13:54:53'),(498,26,'del',0,105,0,0,1,NULL,NULL,'2017-10-10 13:54:53','2017-10-10 13:54:53','2017-10-10 13:54:53'),(499,26,'den',0,106,0,0,1,NULL,NULL,'2017-10-10 13:54:53','2017-10-10 13:54:53','2017-10-10 13:54:53'),(500,26,'dgr',0,107,0,0,1,NULL,NULL,'2017-10-10 13:54:53','2017-10-10 13:54:53','2017-10-10 13:54:53'),(501,26,'din',0,108,0,0,1,NULL,NULL,'2017-10-10 13:54:53','2017-10-10 13:54:53','2017-10-10 13:54:53'),(502,26,'div',0,109,0,0,1,NULL,NULL,'2017-10-10 13:54:53','2017-10-10 13:54:53','2017-10-10 13:54:53'),(503,26,'doi',0,110,0,0,1,NULL,NULL,'2017-10-10 13:54:54','2017-10-10 13:54:54','2017-10-10 13:54:54'),(504,26,'dra',0,111,0,0,1,NULL,NULL,'2017-10-10 13:54:54','2017-10-10 13:54:54','2017-10-10 13:54:54'),(505,26,'dsb',0,112,0,0,1,NULL,NULL,'2017-10-10 13:54:54','2017-10-10 13:54:54','2017-10-10 13:54:54'),(506,26,'dua',0,113,0,0,1,NULL,NULL,'2017-10-10 13:54:54','2017-10-10 13:54:54','2017-10-10 13:54:54'),(507,26,'dum',0,114,0,0,1,NULL,NULL,'2017-10-10 13:54:54','2017-10-10 13:54:54','2017-10-10 13:54:54'),(508,26,'dut',0,115,0,0,1,NULL,NULL,'2017-10-10 13:54:54','2017-10-10 13:54:54','2017-10-10 13:54:54'),(509,26,'dyu',0,116,0,0,1,NULL,NULL,'2017-10-10 13:54:54','2017-10-10 13:54:54','2017-10-10 13:54:54'),(510,26,'dzo',0,117,0,0,1,NULL,NULL,'2017-10-10 13:54:54','2017-10-10 13:54:54','2017-10-10 13:54:54'),(511,26,'efi',0,118,0,0,1,NULL,NULL,'2017-10-10 13:54:54','2017-10-10 13:54:54','2017-10-10 13:54:54'),(512,26,'egy',0,119,0,0,1,NULL,NULL,'2017-10-10 13:54:54','2017-10-10 13:54:54','2017-10-10 13:54:54'),(513,26,'eka',0,120,0,0,1,NULL,NULL,'2017-10-10 13:54:54','2017-10-10 13:54:54','2017-10-10 13:54:54'),(514,26,'elx',0,121,0,0,1,NULL,NULL,'2017-10-10 13:54:54','2017-10-10 13:54:54','2017-10-10 13:54:54'),(515,26,'eng',0,122,0,0,1,NULL,NULL,'2017-10-10 13:54:54','2017-10-10 13:54:54','2017-10-10 13:54:54'),(516,26,'enm',0,123,0,0,1,NULL,NULL,'2017-10-10 13:54:54','2017-10-10 13:54:54','2017-10-10 13:54:54'),(517,26,'epo',0,124,0,0,1,NULL,NULL,'2017-10-10 13:54:55','2017-10-10 13:54:55','2017-10-10 13:54:55'),(518,26,'est',0,125,0,0,1,NULL,NULL,'2017-10-10 13:54:55','2017-10-10 13:54:55','2017-10-10 13:54:55'),(519,26,'ewe',0,126,0,0,1,NULL,NULL,'2017-10-10 13:54:55','2017-10-10 13:54:55','2017-10-10 13:54:55'),(520,26,'ewo',0,127,0,0,1,NULL,NULL,'2017-10-10 13:54:55','2017-10-10 13:54:55','2017-10-10 13:54:55'),(521,26,'fan',0,128,0,0,1,NULL,NULL,'2017-10-10 13:54:55','2017-10-10 13:54:55','2017-10-10 13:54:55'),(522,26,'fao',0,129,0,0,1,NULL,NULL,'2017-10-10 13:54:55','2017-10-10 13:54:55','2017-10-10 13:54:55'),(523,26,'fat',0,130,0,0,1,NULL,NULL,'2017-10-10 13:54:55','2017-10-10 13:54:55','2017-10-10 13:54:55'),(524,26,'fij',0,131,0,0,1,NULL,NULL,'2017-10-10 13:54:55','2017-10-10 13:54:55','2017-10-10 13:54:55'),(525,26,'fil',0,132,0,0,1,NULL,NULL,'2017-10-10 13:54:55','2017-10-10 13:54:55','2017-10-10 13:54:55'),(526,26,'fin',0,133,0,0,1,NULL,NULL,'2017-10-10 13:54:55','2017-10-10 13:54:55','2017-10-10 13:54:55'),(527,26,'fiu',0,134,0,0,1,NULL,NULL,'2017-10-10 13:54:55','2017-10-10 13:54:55','2017-10-10 13:54:55'),(528,26,'fon',0,135,0,0,1,NULL,NULL,'2017-10-10 13:54:55','2017-10-10 13:54:55','2017-10-10 13:54:55'),(529,26,'fre',0,136,0,0,1,NULL,NULL,'2017-10-10 13:54:55','2017-10-10 13:54:55','2017-10-10 13:54:55'),(530,26,'frm',0,137,0,0,1,NULL,NULL,'2017-10-10 13:54:55','2017-10-10 13:54:55','2017-10-10 13:54:55'),(531,26,'fro',0,138,0,0,1,NULL,NULL,'2017-10-10 13:54:55','2017-10-10 13:54:55','2017-10-10 13:54:55'),(532,26,'frr',0,139,0,0,1,NULL,NULL,'2017-10-10 13:54:55','2017-10-10 13:54:55','2017-10-10 13:54:55'),(533,26,'frs',0,140,0,0,1,NULL,NULL,'2017-10-10 13:54:55','2017-10-10 13:54:55','2017-10-10 13:54:55'),(534,26,'fry',0,141,0,0,1,NULL,NULL,'2017-10-10 13:54:55','2017-10-10 13:54:55','2017-10-10 13:54:55'),(535,26,'ful',0,142,0,0,1,NULL,NULL,'2017-10-10 13:54:55','2017-10-10 13:54:55','2017-10-10 13:54:55'),(536,26,'fur',0,143,0,0,1,NULL,NULL,'2017-10-10 13:54:56','2017-10-10 13:54:56','2017-10-10 13:54:56'),(537,26,'gaa',0,144,0,0,1,NULL,NULL,'2017-10-10 13:54:56','2017-10-10 13:54:56','2017-10-10 13:54:56'),(538,26,'gay',0,145,0,0,1,NULL,NULL,'2017-10-10 13:54:56','2017-10-10 13:54:56','2017-10-10 13:54:56'),(539,26,'gba',0,146,0,0,1,NULL,NULL,'2017-10-10 13:54:56','2017-10-10 13:54:56','2017-10-10 13:54:56'),(540,26,'gem',0,147,0,0,1,NULL,NULL,'2017-10-10 13:54:56','2017-10-10 13:54:56','2017-10-10 13:54:56'),(541,26,'geo',0,148,0,0,1,NULL,NULL,'2017-10-10 13:54:56','2017-10-10 13:54:56','2017-10-10 13:54:56'),(542,26,'ger',0,149,0,0,1,NULL,NULL,'2017-10-10 13:54:56','2017-10-10 13:54:56','2017-10-10 13:54:56'),(543,26,'gez',0,150,0,0,1,NULL,NULL,'2017-10-10 13:54:56','2017-10-10 13:54:56','2017-10-10 13:54:56'),(544,26,'gil',0,151,0,0,1,NULL,NULL,'2017-10-10 13:54:56','2017-10-10 13:54:56','2017-10-10 13:54:56'),(545,26,'gla',0,152,0,0,1,NULL,NULL,'2017-10-10 13:54:56','2017-10-10 13:54:56','2017-10-10 13:54:56'),(546,26,'gle',0,153,0,0,1,NULL,NULL,'2017-10-10 13:54:56','2017-10-10 13:54:56','2017-10-10 13:54:56'),(547,26,'glg',0,154,0,0,1,NULL,NULL,'2017-10-10 13:54:56','2017-10-10 13:54:56','2017-10-10 13:54:56'),(548,26,'glv',0,155,0,0,1,NULL,NULL,'2017-10-10 13:54:56','2017-10-10 13:54:56','2017-10-10 13:54:56'),(549,26,'gmh',0,156,0,0,1,NULL,NULL,'2017-10-10 13:54:56','2017-10-10 13:54:56','2017-10-10 13:54:56'),(550,26,'goh',0,157,0,0,1,NULL,NULL,'2017-10-10 13:54:56','2017-10-10 13:54:56','2017-10-10 13:54:56'),(551,26,'gon',0,158,0,0,1,NULL,NULL,'2017-10-10 13:54:56','2017-10-10 13:54:56','2017-10-10 13:54:56'),(552,26,'gor',0,159,0,0,1,NULL,NULL,'2017-10-10 13:54:57','2017-10-10 13:54:57','2017-10-10 13:54:57'),(553,26,'got',0,160,0,0,1,NULL,NULL,'2017-10-10 13:54:57','2017-10-10 13:54:57','2017-10-10 13:54:57'),(554,26,'grb',0,161,0,0,1,NULL,NULL,'2017-10-10 13:54:57','2017-10-10 13:54:57','2017-10-10 13:54:57'),(555,26,'grc',0,162,0,0,1,NULL,NULL,'2017-10-10 13:54:57','2017-10-10 13:54:57','2017-10-10 13:54:57'),(556,26,'gre',0,163,0,0,1,NULL,NULL,'2017-10-10 13:54:57','2017-10-10 13:54:57','2017-10-10 13:54:57'),(557,26,'grn',0,164,0,0,1,NULL,NULL,'2017-10-10 13:54:57','2017-10-10 13:54:57','2017-10-10 13:54:57'),(558,26,'gsw',0,165,0,0,1,NULL,NULL,'2017-10-10 13:54:57','2017-10-10 13:54:57','2017-10-10 13:54:57'),(559,26,'guj',0,166,0,0,1,NULL,NULL,'2017-10-10 13:54:57','2017-10-10 13:54:57','2017-10-10 13:54:57'),(560,26,'gwi',0,167,0,0,1,NULL,NULL,'2017-10-10 13:54:57','2017-10-10 13:54:57','2017-10-10 13:54:57'),(561,26,'hai',0,168,0,0,1,NULL,NULL,'2017-10-10 13:54:57','2017-10-10 13:54:57','2017-10-10 13:54:57'),(562,26,'hat',0,169,0,0,1,NULL,NULL,'2017-10-10 13:54:57','2017-10-10 13:54:57','2017-10-10 13:54:57'),(563,26,'hau',0,170,0,0,1,NULL,NULL,'2017-10-10 13:54:57','2017-10-10 13:54:57','2017-10-10 13:54:57'),(564,26,'haw',0,171,0,0,1,NULL,NULL,'2017-10-10 13:54:57','2017-10-10 13:54:57','2017-10-10 13:54:57'),(565,26,'heb',0,172,0,0,1,NULL,NULL,'2017-10-10 13:54:57','2017-10-10 13:54:57','2017-10-10 13:54:57'),(566,26,'her',0,173,0,0,1,NULL,NULL,'2017-10-10 13:54:57','2017-10-10 13:54:57','2017-10-10 13:54:57'),(567,26,'hil',0,174,0,0,1,NULL,NULL,'2017-10-10 13:54:57','2017-10-10 13:54:57','2017-10-10 13:54:57'),(568,26,'him',0,175,0,0,1,NULL,NULL,'2017-10-10 13:54:57','2017-10-10 13:54:57','2017-10-10 13:54:57'),(569,26,'hin',0,176,0,0,1,NULL,NULL,'2017-10-10 13:54:57','2017-10-10 13:54:57','2017-10-10 13:54:57'),(570,26,'hit',0,177,0,0,1,NULL,NULL,'2017-10-10 13:54:57','2017-10-10 13:54:57','2017-10-10 13:54:57'),(571,26,'hmn',0,178,0,0,1,NULL,NULL,'2017-10-10 13:54:57','2017-10-10 13:54:57','2017-10-10 13:54:57'),(572,26,'hmo',0,179,0,0,1,NULL,NULL,'2017-10-10 13:54:57','2017-10-10 13:54:57','2017-10-10 13:54:57'),(573,26,'hrv',0,180,0,0,1,NULL,NULL,'2017-10-10 13:54:57','2017-10-10 13:54:57','2017-10-10 13:54:57'),(574,26,'hsb',0,181,0,0,1,NULL,NULL,'2017-10-10 13:54:57','2017-10-10 13:54:57','2017-10-10 13:54:57'),(575,26,'hun',0,182,0,0,1,NULL,NULL,'2017-10-10 13:54:57','2017-10-10 13:54:57','2017-10-10 13:54:57'),(576,26,'hup',0,183,0,0,1,NULL,NULL,'2017-10-10 13:54:58','2017-10-10 13:54:58','2017-10-10 13:54:58'),(577,26,'iba',0,184,0,0,1,NULL,NULL,'2017-10-10 13:54:58','2017-10-10 13:54:58','2017-10-10 13:54:58'),(578,26,'ibo',0,185,0,0,1,NULL,NULL,'2017-10-10 13:54:58','2017-10-10 13:54:58','2017-10-10 13:54:58'),(579,26,'ice',0,186,0,0,1,NULL,NULL,'2017-10-10 13:54:58','2017-10-10 13:54:58','2017-10-10 13:54:58'),(580,26,'ido',0,187,0,0,1,NULL,NULL,'2017-10-10 13:54:58','2017-10-10 13:54:58','2017-10-10 13:54:58'),(581,26,'iii',0,188,0,0,1,NULL,NULL,'2017-10-10 13:54:58','2017-10-10 13:54:58','2017-10-10 13:54:58'),(582,26,'ijo',0,189,0,0,1,NULL,NULL,'2017-10-10 13:54:58','2017-10-10 13:54:58','2017-10-10 13:54:58'),(583,26,'iku',0,190,0,0,1,NULL,NULL,'2017-10-10 13:54:58','2017-10-10 13:54:58','2017-10-10 13:54:58'),(584,26,'ile',0,191,0,0,1,NULL,NULL,'2017-10-10 13:54:58','2017-10-10 13:54:58','2017-10-10 13:54:58'),(585,26,'ilo',0,192,0,0,1,NULL,NULL,'2017-10-10 13:54:58','2017-10-10 13:54:58','2017-10-10 13:54:58'),(586,26,'ina',0,193,0,0,1,NULL,NULL,'2017-10-10 13:54:58','2017-10-10 13:54:58','2017-10-10 13:54:58'),(587,26,'inc',0,194,0,0,1,NULL,NULL,'2017-10-10 13:54:58','2017-10-10 13:54:58','2017-10-10 13:54:58'),(588,26,'ind',0,195,0,0,1,NULL,NULL,'2017-10-10 13:54:58','2017-10-10 13:54:58','2017-10-10 13:54:58'),(589,26,'ine',0,196,0,0,1,NULL,NULL,'2017-10-10 13:54:58','2017-10-10 13:54:58','2017-10-10 13:54:58'),(590,26,'inh',0,197,0,0,1,NULL,NULL,'2017-10-10 13:54:58','2017-10-10 13:54:58','2017-10-10 13:54:58'),(591,26,'ipk',0,198,0,0,1,NULL,NULL,'2017-10-10 13:54:58','2017-10-10 13:54:58','2017-10-10 13:54:58'),(592,26,'ira',0,199,0,0,1,NULL,NULL,'2017-10-10 13:54:58','2017-10-10 13:54:58','2017-10-10 13:54:58'),(593,26,'iro',0,200,0,0,1,NULL,NULL,'2017-10-10 13:54:58','2017-10-10 13:54:58','2017-10-10 13:54:58'),(594,26,'ita',0,201,0,0,1,NULL,NULL,'2017-10-10 13:54:58','2017-10-10 13:54:58','2017-10-10 13:54:58'),(595,26,'jav',0,202,0,0,1,NULL,NULL,'2017-10-10 13:54:58','2017-10-10 13:54:58','2017-10-10 13:54:58'),(596,26,'jbo',0,203,0,0,1,NULL,NULL,'2017-10-10 13:54:58','2017-10-10 13:54:58','2017-10-10 13:54:58'),(597,26,'jpn',0,204,0,0,1,NULL,NULL,'2017-10-10 13:54:58','2017-10-10 13:54:58','2017-10-10 13:54:58'),(598,26,'jpr',0,205,0,0,1,NULL,NULL,'2017-10-10 13:54:58','2017-10-10 13:54:58','2017-10-10 13:54:58'),(599,26,'jrb',0,206,0,0,1,NULL,NULL,'2017-10-10 13:54:58','2017-10-10 13:54:58','2017-10-10 13:54:58'),(600,26,'kaa',0,207,0,0,1,NULL,NULL,'2017-10-10 13:54:59','2017-10-10 13:54:59','2017-10-10 13:54:59'),(601,26,'kab',0,208,0,0,1,NULL,NULL,'2017-10-10 13:54:59','2017-10-10 13:54:59','2017-10-10 13:54:59'),(602,26,'kac',0,209,0,0,1,NULL,NULL,'2017-10-10 13:54:59','2017-10-10 13:54:59','2017-10-10 13:54:59'),(603,26,'kal',0,210,0,0,1,NULL,NULL,'2017-10-10 13:54:59','2017-10-10 13:54:59','2017-10-10 13:54:59'),(604,26,'kam',0,211,0,0,1,NULL,NULL,'2017-10-10 13:54:59','2017-10-10 13:54:59','2017-10-10 13:54:59'),(605,26,'kan',0,212,0,0,1,NULL,NULL,'2017-10-10 13:54:59','2017-10-10 13:54:59','2017-10-10 13:54:59'),(606,26,'kar',0,213,0,0,1,NULL,NULL,'2017-10-10 13:54:59','2017-10-10 13:54:59','2017-10-10 13:54:59'),(607,26,'kas',0,214,0,0,1,NULL,NULL,'2017-10-10 13:54:59','2017-10-10 13:54:59','2017-10-10 13:54:59'),(608,26,'kau',0,215,0,0,1,NULL,NULL,'2017-10-10 13:54:59','2017-10-10 13:54:59','2017-10-10 13:54:59'),(609,26,'kaw',0,216,0,0,1,NULL,NULL,'2017-10-10 13:54:59','2017-10-10 13:54:59','2017-10-10 13:54:59'),(610,26,'kaz',0,217,0,0,1,NULL,NULL,'2017-10-10 13:54:59','2017-10-10 13:54:59','2017-10-10 13:54:59'),(611,26,'kbd',0,218,0,0,1,NULL,NULL,'2017-10-10 13:54:59','2017-10-10 13:54:59','2017-10-10 13:54:59'),(612,26,'kha',0,219,0,0,1,NULL,NULL,'2017-10-10 13:54:59','2017-10-10 13:54:59','2017-10-10 13:54:59'),(613,26,'khi',0,220,0,0,1,NULL,NULL,'2017-10-10 13:54:59','2017-10-10 13:54:59','2017-10-10 13:54:59'),(614,26,'khm',0,221,0,0,1,NULL,NULL,'2017-10-10 13:54:59','2017-10-10 13:54:59','2017-10-10 13:54:59'),(615,26,'kho',0,222,0,0,1,NULL,NULL,'2017-10-10 13:54:59','2017-10-10 13:54:59','2017-10-10 13:54:59'),(616,26,'kik',0,223,0,0,1,NULL,NULL,'2017-10-10 13:54:59','2017-10-10 13:54:59','2017-10-10 13:54:59'),(617,26,'kin',0,224,0,0,1,NULL,NULL,'2017-10-10 13:54:59','2017-10-10 13:54:59','2017-10-10 13:54:59'),(618,26,'kir',0,225,0,0,1,NULL,NULL,'2017-10-10 13:54:59','2017-10-10 13:54:59','2017-10-10 13:54:59'),(619,26,'kmb',0,226,0,0,1,NULL,NULL,'2017-10-10 13:54:59','2017-10-10 13:54:59','2017-10-10 13:54:59'),(620,26,'kok',0,227,0,0,1,NULL,NULL,'2017-10-10 13:54:59','2017-10-10 13:54:59','2017-10-10 13:54:59'),(621,26,'kom',0,228,0,0,1,NULL,NULL,'2017-10-10 13:54:59','2017-10-10 13:54:59','2017-10-10 13:54:59'),(622,26,'kon',0,229,0,0,1,NULL,NULL,'2017-10-10 13:54:59','2017-10-10 13:54:59','2017-10-10 13:54:59'),(623,26,'kor',0,230,0,0,1,NULL,NULL,'2017-10-10 13:55:00','2017-10-10 13:55:00','2017-10-10 13:55:00'),(624,26,'kos',0,231,0,0,1,NULL,NULL,'2017-10-10 13:55:00','2017-10-10 13:55:00','2017-10-10 13:55:00'),(625,26,'kpe',0,232,0,0,1,NULL,NULL,'2017-10-10 13:55:00','2017-10-10 13:55:00','2017-10-10 13:55:00'),(626,26,'krc',0,233,0,0,1,NULL,NULL,'2017-10-10 13:55:00','2017-10-10 13:55:00','2017-10-10 13:55:00'),(627,26,'krl',0,234,0,0,1,NULL,NULL,'2017-10-10 13:55:00','2017-10-10 13:55:00','2017-10-10 13:55:00'),(628,26,'kro',0,235,0,0,1,NULL,NULL,'2017-10-10 13:55:00','2017-10-10 13:55:00','2017-10-10 13:55:00'),(629,26,'kru',0,236,0,0,1,NULL,NULL,'2017-10-10 13:55:00','2017-10-10 13:55:00','2017-10-10 13:55:00'),(630,26,'kua',0,237,0,0,1,NULL,NULL,'2017-10-10 13:55:00','2017-10-10 13:55:00','2017-10-10 13:55:00'),(631,26,'kum',0,238,0,0,1,NULL,NULL,'2017-10-10 13:55:00','2017-10-10 13:55:00','2017-10-10 13:55:00'),(632,26,'kur',0,239,0,0,1,NULL,NULL,'2017-10-10 13:55:00','2017-10-10 13:55:00','2017-10-10 13:55:00'),(633,26,'kut',0,240,0,0,1,NULL,NULL,'2017-10-10 13:55:00','2017-10-10 13:55:00','2017-10-10 13:55:00'),(634,26,'lad',0,241,0,0,1,NULL,NULL,'2017-10-10 13:55:00','2017-10-10 13:55:00','2017-10-10 13:55:00'),(635,26,'lah',0,242,0,0,1,NULL,NULL,'2017-10-10 13:55:00','2017-10-10 13:55:00','2017-10-10 13:55:00'),(636,26,'lam',0,243,0,0,1,NULL,NULL,'2017-10-10 13:55:00','2017-10-10 13:55:00','2017-10-10 13:55:00'),(637,26,'lao',0,244,0,0,1,NULL,NULL,'2017-10-10 13:55:00','2017-10-10 13:55:00','2017-10-10 13:55:00'),(638,26,'lat',0,245,0,0,1,NULL,NULL,'2017-10-10 13:55:00','2017-10-10 13:55:00','2017-10-10 13:55:00'),(639,26,'lav',0,246,0,0,1,NULL,NULL,'2017-10-10 13:55:00','2017-10-10 13:55:00','2017-10-10 13:55:00'),(640,26,'lez',0,247,0,0,1,NULL,NULL,'2017-10-10 13:55:00','2017-10-10 13:55:00','2017-10-10 13:55:00'),(641,26,'lim',0,248,0,0,1,NULL,NULL,'2017-10-10 13:55:00','2017-10-10 13:55:00','2017-10-10 13:55:00'),(642,26,'lin',0,249,0,0,1,NULL,NULL,'2017-10-10 13:55:00','2017-10-10 13:55:00','2017-10-10 13:55:00'),(643,26,'lit',0,250,0,0,1,NULL,NULL,'2017-10-10 13:55:00','2017-10-10 13:55:00','2017-10-10 13:55:00'),(644,26,'lol',0,251,0,0,1,NULL,NULL,'2017-10-10 13:55:00','2017-10-10 13:55:00','2017-10-10 13:55:00'),(645,26,'loz',0,252,0,0,1,NULL,NULL,'2017-10-10 13:55:01','2017-10-10 13:55:01','2017-10-10 13:55:01'),(646,26,'ltz',0,253,0,0,1,NULL,NULL,'2017-10-10 13:55:01','2017-10-10 13:55:01','2017-10-10 13:55:01'),(647,26,'lua',0,254,0,0,1,NULL,NULL,'2017-10-10 13:55:01','2017-10-10 13:55:01','2017-10-10 13:55:01'),(648,26,'lub',0,255,0,0,1,NULL,NULL,'2017-10-10 13:55:01','2017-10-10 13:55:01','2017-10-10 13:55:01'),(649,26,'lug',0,256,0,0,1,NULL,NULL,'2017-10-10 13:55:01','2017-10-10 13:55:01','2017-10-10 13:55:01'),(650,26,'lui',0,257,0,0,1,NULL,NULL,'2017-10-10 13:55:01','2017-10-10 13:55:01','2017-10-10 13:55:01'),(651,26,'lun',0,258,0,0,1,NULL,NULL,'2017-10-10 13:55:01','2017-10-10 13:55:01','2017-10-10 13:55:01'),(652,26,'luo',0,259,0,0,1,NULL,NULL,'2017-10-10 13:55:01','2017-10-10 13:55:01','2017-10-10 13:55:01'),(653,26,'lus',0,260,0,0,1,NULL,NULL,'2017-10-10 13:55:01','2017-10-10 13:55:01','2017-10-10 13:55:01'),(654,26,'mac',0,261,0,0,1,NULL,NULL,'2017-10-10 13:55:01','2017-10-10 13:55:01','2017-10-10 13:55:01'),(655,26,'mad',0,262,0,0,1,NULL,NULL,'2017-10-10 13:55:01','2017-10-10 13:55:01','2017-10-10 13:55:01'),(656,26,'mag',0,263,0,0,1,NULL,NULL,'2017-10-10 13:55:01','2017-10-10 13:55:01','2017-10-10 13:55:01'),(657,26,'mah',0,264,0,0,1,NULL,NULL,'2017-10-10 13:55:02','2017-10-10 13:55:02','2017-10-10 13:55:02'),(658,26,'mai',0,265,0,0,1,NULL,NULL,'2017-10-10 13:55:02','2017-10-10 13:55:02','2017-10-10 13:55:02'),(659,26,'mak',0,266,0,0,1,NULL,NULL,'2017-10-10 13:55:02','2017-10-10 13:55:02','2017-10-10 13:55:02'),(660,26,'mal',0,267,0,0,1,NULL,NULL,'2017-10-10 13:55:02','2017-10-10 13:55:02','2017-10-10 13:55:02'),(661,26,'man',0,268,0,0,1,NULL,NULL,'2017-10-10 13:55:02','2017-10-10 13:55:02','2017-10-10 13:55:02'),(662,26,'mao',0,269,0,0,1,NULL,NULL,'2017-10-10 13:55:02','2017-10-10 13:55:02','2017-10-10 13:55:02'),(663,26,'map',0,270,0,0,1,NULL,NULL,'2017-10-10 13:55:02','2017-10-10 13:55:02','2017-10-10 13:55:02'),(664,26,'mar',0,271,0,0,1,NULL,NULL,'2017-10-10 13:55:02','2017-10-10 13:55:02','2017-10-10 13:55:02'),(665,26,'mas',0,272,0,0,1,NULL,NULL,'2017-10-10 13:55:02','2017-10-10 13:55:02','2017-10-10 13:55:02'),(666,26,'may',0,273,0,0,1,NULL,NULL,'2017-10-10 13:55:02','2017-10-10 13:55:02','2017-10-10 13:55:02'),(667,26,'mdf',0,274,0,0,1,NULL,NULL,'2017-10-10 13:55:02','2017-10-10 13:55:02','2017-10-10 13:55:02'),(668,26,'mdr',0,275,0,0,1,NULL,NULL,'2017-10-10 13:55:02','2017-10-10 13:55:02','2017-10-10 13:55:02'),(669,26,'men',0,276,0,0,1,NULL,NULL,'2017-10-10 13:55:02','2017-10-10 13:55:02','2017-10-10 13:55:02'),(670,26,'mga',0,277,0,0,1,NULL,NULL,'2017-10-10 13:55:02','2017-10-10 13:55:02','2017-10-10 13:55:02'),(671,26,'mic',0,278,0,0,1,NULL,NULL,'2017-10-10 13:55:02','2017-10-10 13:55:02','2017-10-10 13:55:02'),(672,26,'min',0,279,0,0,1,NULL,NULL,'2017-10-10 13:55:02','2017-10-10 13:55:02','2017-10-10 13:55:02'),(673,26,'mis',0,280,0,0,1,NULL,NULL,'2017-10-10 13:55:02','2017-10-10 13:55:02','2017-10-10 13:55:02'),(674,26,'mkh',0,281,0,0,1,NULL,NULL,'2017-10-10 13:55:02','2017-10-10 13:55:02','2017-10-10 13:55:02'),(675,26,'mlg',0,282,0,0,1,NULL,NULL,'2017-10-10 13:55:02','2017-10-10 13:55:02','2017-10-10 13:55:02'),(676,26,'mlt',0,283,0,0,1,NULL,NULL,'2017-10-10 13:55:02','2017-10-10 13:55:02','2017-10-10 13:55:02'),(677,26,'mnc',0,284,0,0,1,NULL,NULL,'2017-10-10 13:55:02','2017-10-10 13:55:02','2017-10-10 13:55:02'),(678,26,'mni',0,285,0,0,1,NULL,NULL,'2017-10-10 13:55:02','2017-10-10 13:55:02','2017-10-10 13:55:02'),(679,26,'mno',0,286,0,0,1,NULL,NULL,'2017-10-10 13:55:03','2017-10-10 13:55:03','2017-10-10 13:55:03'),(680,26,'moh',0,287,0,0,1,NULL,NULL,'2017-10-10 13:55:03','2017-10-10 13:55:03','2017-10-10 13:55:03'),(681,26,'mon',0,288,0,0,1,NULL,NULL,'2017-10-10 13:55:03','2017-10-10 13:55:03','2017-10-10 13:55:03'),(682,26,'mos',0,289,0,0,1,NULL,NULL,'2017-10-10 13:55:03','2017-10-10 13:55:03','2017-10-10 13:55:03'),(683,26,'mul',0,290,0,0,1,NULL,NULL,'2017-10-10 13:55:03','2017-10-10 13:55:03','2017-10-10 13:55:03'),(684,26,'mun',0,291,0,0,1,NULL,NULL,'2017-10-10 13:55:03','2017-10-10 13:55:03','2017-10-10 13:55:03'),(685,26,'mus',0,292,0,0,1,NULL,NULL,'2017-10-10 13:55:03','2017-10-10 13:55:03','2017-10-10 13:55:03'),(686,26,'mwl',0,293,0,0,1,NULL,NULL,'2017-10-10 13:55:03','2017-10-10 13:55:03','2017-10-10 13:55:03'),(687,26,'mwr',0,294,0,0,1,NULL,NULL,'2017-10-10 13:55:03','2017-10-10 13:55:03','2017-10-10 13:55:03'),(688,26,'myn',0,295,0,0,1,NULL,NULL,'2017-10-10 13:55:03','2017-10-10 13:55:03','2017-10-10 13:55:03'),(689,26,'myv',0,296,0,0,1,NULL,NULL,'2017-10-10 13:55:03','2017-10-10 13:55:03','2017-10-10 13:55:03'),(690,26,'nah',0,297,0,0,1,NULL,NULL,'2017-10-10 13:55:03','2017-10-10 13:55:03','2017-10-10 13:55:03'),(691,26,'nai',0,298,0,0,1,NULL,NULL,'2017-10-10 13:55:03','2017-10-10 13:55:03','2017-10-10 13:55:03'),(692,26,'nap',0,299,0,0,1,NULL,NULL,'2017-10-10 13:55:03','2017-10-10 13:55:03','2017-10-10 13:55:03'),(693,26,'nau',0,300,0,0,1,NULL,NULL,'2017-10-10 13:55:03','2017-10-10 13:55:03','2017-10-10 13:55:03'),(694,26,'nav',0,301,0,0,1,NULL,NULL,'2017-10-10 13:55:03','2017-10-10 13:55:03','2017-10-10 13:55:03'),(695,26,'nbl',0,302,0,0,1,NULL,NULL,'2017-10-10 13:55:03','2017-10-10 13:55:03','2017-10-10 13:55:03'),(696,26,'nde',0,303,0,0,1,NULL,NULL,'2017-10-10 13:55:03','2017-10-10 13:55:03','2017-10-10 13:55:03'),(697,26,'ndo',0,304,0,0,1,NULL,NULL,'2017-10-10 13:55:03','2017-10-10 13:55:03','2017-10-10 13:55:03'),(698,26,'nds',0,305,0,0,1,NULL,NULL,'2017-10-10 13:55:03','2017-10-10 13:55:03','2017-10-10 13:55:03'),(699,26,'nep',0,306,0,0,1,NULL,NULL,'2017-10-10 13:55:03','2017-10-10 13:55:03','2017-10-10 13:55:03'),(700,26,'new',0,307,0,0,1,NULL,NULL,'2017-10-10 13:55:03','2017-10-10 13:55:03','2017-10-10 13:55:03'),(701,26,'nia',0,308,0,0,1,NULL,NULL,'2017-10-10 13:55:03','2017-10-10 13:55:03','2017-10-10 13:55:03'),(702,26,'nic',0,309,0,0,1,NULL,NULL,'2017-10-10 13:55:03','2017-10-10 13:55:03','2017-10-10 13:55:03'),(703,26,'niu',0,310,0,0,1,NULL,NULL,'2017-10-10 13:55:03','2017-10-10 13:55:03','2017-10-10 13:55:03'),(704,26,'nno',0,311,0,0,1,NULL,NULL,'2017-10-10 13:55:03','2017-10-10 13:55:03','2017-10-10 13:55:03'),(705,26,'nob',0,312,0,0,1,NULL,NULL,'2017-10-10 13:55:04','2017-10-10 13:55:04','2017-10-10 13:55:04'),(706,26,'nog',0,313,0,0,1,NULL,NULL,'2017-10-10 13:55:04','2017-10-10 13:55:04','2017-10-10 13:55:04'),(707,26,'non',0,314,0,0,1,NULL,NULL,'2017-10-10 13:55:04','2017-10-10 13:55:04','2017-10-10 13:55:04'),(708,26,'nor',0,315,0,0,1,NULL,NULL,'2017-10-10 13:55:04','2017-10-10 13:55:04','2017-10-10 13:55:04'),(709,26,'nqo',0,316,0,0,1,NULL,NULL,'2017-10-10 13:55:04','2017-10-10 13:55:04','2017-10-10 13:55:04'),(710,26,'nso',0,317,0,0,1,NULL,NULL,'2017-10-10 13:55:04','2017-10-10 13:55:04','2017-10-10 13:55:04'),(711,26,'nub',0,318,0,0,1,NULL,NULL,'2017-10-10 13:55:04','2017-10-10 13:55:04','2017-10-10 13:55:04'),(712,26,'nwc',0,319,0,0,1,NULL,NULL,'2017-10-10 13:55:04','2017-10-10 13:55:04','2017-10-10 13:55:04'),(713,26,'nya',0,320,0,0,1,NULL,NULL,'2017-10-10 13:55:04','2017-10-10 13:55:04','2017-10-10 13:55:04'),(714,26,'nym',0,321,0,0,1,NULL,NULL,'2017-10-10 13:55:04','2017-10-10 13:55:04','2017-10-10 13:55:04'),(715,26,'nyn',0,322,0,0,1,NULL,NULL,'2017-10-10 13:55:04','2017-10-10 13:55:04','2017-10-10 13:55:04'),(716,26,'nyo',0,323,0,0,1,NULL,NULL,'2017-10-10 13:55:04','2017-10-10 13:55:04','2017-10-10 13:55:04'),(717,26,'nzi',0,324,0,0,1,NULL,NULL,'2017-10-10 13:55:04','2017-10-10 13:55:04','2017-10-10 13:55:04'),(718,26,'oci',0,325,0,0,1,NULL,NULL,'2017-10-10 13:55:04','2017-10-10 13:55:04','2017-10-10 13:55:04'),(719,26,'oji',0,326,0,0,1,NULL,NULL,'2017-10-10 13:55:04','2017-10-10 13:55:04','2017-10-10 13:55:04'),(720,26,'ori',0,327,0,0,1,NULL,NULL,'2017-10-10 13:55:04','2017-10-10 13:55:04','2017-10-10 13:55:04'),(721,26,'orm',0,328,0,0,1,NULL,NULL,'2017-10-10 13:55:04','2017-10-10 13:55:04','2017-10-10 13:55:04'),(722,26,'osa',0,329,0,0,1,NULL,NULL,'2017-10-10 13:55:04','2017-10-10 13:55:04','2017-10-10 13:55:04'),(723,26,'oss',0,330,0,0,1,NULL,NULL,'2017-10-10 13:55:04','2017-10-10 13:55:04','2017-10-10 13:55:04'),(724,26,'ota',0,331,0,0,1,NULL,NULL,'2017-10-10 13:55:04','2017-10-10 13:55:04','2017-10-10 13:55:04'),(725,26,'oto',0,332,0,0,1,NULL,NULL,'2017-10-10 13:55:04','2017-10-10 13:55:04','2017-10-10 13:55:04'),(726,26,'paa',0,333,0,0,1,NULL,NULL,'2017-10-10 13:55:04','2017-10-10 13:55:04','2017-10-10 13:55:04'),(727,26,'pag',0,334,0,0,1,NULL,NULL,'2017-10-10 13:55:04','2017-10-10 13:55:04','2017-10-10 13:55:04'),(728,26,'pal',0,335,0,0,1,NULL,NULL,'2017-10-10 13:55:04','2017-10-10 13:55:04','2017-10-10 13:55:04'),(729,26,'pam',0,336,0,0,1,NULL,NULL,'2017-10-10 13:55:04','2017-10-10 13:55:04','2017-10-10 13:55:04'),(730,26,'pan',0,337,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(731,26,'pap',0,338,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(732,26,'pau',0,339,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(733,26,'peo',0,340,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(734,26,'per',0,341,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(735,26,'phi',0,342,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(736,26,'phn',0,343,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(737,26,'pli',0,344,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(738,26,'pol',0,345,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(739,26,'pon',0,346,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(740,26,'por',0,347,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(741,26,'pra',0,348,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(742,26,'pro',0,349,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(743,26,'pus',0,350,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(744,26,'qaa-qtz',0,351,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(745,26,'que',0,352,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(746,26,'raj',0,353,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(747,26,'rap',0,354,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(748,26,'rar',0,355,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(749,26,'roa',0,356,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(750,26,'roh',0,357,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(751,26,'rom',0,358,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(752,26,'rum',0,359,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(753,26,'run',0,360,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(754,26,'rup',0,361,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(755,26,'rus',0,362,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(756,26,'sad',0,363,0,0,1,NULL,NULL,'2017-10-10 13:55:05','2017-10-10 13:55:05','2017-10-10 13:55:05'),(757,26,'sag',0,364,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(758,26,'sah',0,365,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(759,26,'sai',0,366,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(760,26,'sal',0,367,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(761,26,'sam',0,368,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(762,26,'san',0,369,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(763,26,'sas',0,370,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(764,26,'sat',0,371,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(765,26,'scn',0,372,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(766,26,'sco',0,373,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(767,26,'sel',0,374,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(768,26,'sem',0,375,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(769,26,'sga',0,376,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(770,26,'sgn',0,377,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(771,26,'shn',0,378,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(772,26,'sid',0,379,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(773,26,'sin',0,380,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(774,26,'sio',0,381,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(775,26,'sit',0,382,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(776,26,'sla',0,383,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(777,26,'slo',0,384,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(778,26,'slv',0,385,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(779,26,'sma',0,386,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(780,26,'sme',0,387,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(781,26,'smi',0,388,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(782,26,'smj',0,389,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(783,26,'smn',0,390,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(784,26,'smo',0,391,0,0,1,NULL,NULL,'2017-10-10 13:55:06','2017-10-10 13:55:06','2017-10-10 13:55:06'),(785,26,'sms',0,392,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(786,26,'sna',0,393,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(787,26,'snd',0,394,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(788,26,'snk',0,395,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(789,26,'sog',0,396,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(790,26,'som',0,397,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(791,26,'son',0,398,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(792,26,'sot',0,399,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(793,26,'spa',0,400,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(794,26,'srd',0,401,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(795,26,'srn',0,402,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(796,26,'srp',0,403,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(797,26,'srr',0,404,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(798,26,'ssa',0,405,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(799,26,'ssw',0,406,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(800,26,'suk',0,407,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(801,26,'sun',0,408,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(802,26,'sus',0,409,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(803,26,'sux',0,410,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(804,26,'swa',0,411,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(805,26,'swe',0,412,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(806,26,'syc',0,413,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(807,26,'syr',0,414,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(808,26,'tah',0,415,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(809,26,'tai',0,416,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(810,26,'tam',0,417,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(811,26,'tat',0,418,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(812,26,'tel',0,419,0,0,1,NULL,NULL,'2017-10-10 13:55:07','2017-10-10 13:55:07','2017-10-10 13:55:07'),(813,26,'tem',0,420,0,0,1,NULL,NULL,'2017-10-10 13:55:08','2017-10-10 13:55:08','2017-10-10 13:55:08'),(814,26,'ter',0,421,0,0,1,NULL,NULL,'2017-10-10 13:55:08','2017-10-10 13:55:08','2017-10-10 13:55:08'),(815,26,'tet',0,422,0,0,1,NULL,NULL,'2017-10-10 13:55:08','2017-10-10 13:55:08','2017-10-10 13:55:08'),(816,26,'tgk',0,423,0,0,1,NULL,NULL,'2017-10-10 13:55:08','2017-10-10 13:55:08','2017-10-10 13:55:08'),(817,26,'tgl',0,424,0,0,1,NULL,NULL,'2017-10-10 13:55:08','2017-10-10 13:55:08','2017-10-10 13:55:08'),(818,26,'tha',0,425,0,0,1,NULL,NULL,'2017-10-10 13:55:08','2017-10-10 13:55:08','2017-10-10 13:55:08'),(819,26,'tib',0,426,0,0,1,NULL,NULL,'2017-10-10 13:55:08','2017-10-10 13:55:08','2017-10-10 13:55:08'),(820,26,'tig',0,427,0,0,1,NULL,NULL,'2017-10-10 13:55:08','2017-10-10 13:55:08','2017-10-10 13:55:08'),(821,26,'tir',0,428,0,0,1,NULL,NULL,'2017-10-10 13:55:08','2017-10-10 13:55:08','2017-10-10 13:55:08'),(822,26,'tiv',0,429,0,0,1,NULL,NULL,'2017-10-10 13:55:08','2017-10-10 13:55:08','2017-10-10 13:55:08'),(823,26,'tkl',0,430,0,0,1,NULL,NULL,'2017-10-10 13:55:08','2017-10-10 13:55:08','2017-10-10 13:55:08'),(824,26,'tlh',0,431,0,0,1,NULL,NULL,'2017-10-10 13:55:08','2017-10-10 13:55:08','2017-10-10 13:55:08'),(825,26,'tli',0,432,0,0,1,NULL,NULL,'2017-10-10 13:55:08','2017-10-10 13:55:08','2017-10-10 13:55:08'),(826,26,'tmh',0,433,0,0,1,NULL,NULL,'2017-10-10 13:55:08','2017-10-10 13:55:08','2017-10-10 13:55:08'),(827,26,'tog',0,434,0,0,1,NULL,NULL,'2017-10-10 13:55:08','2017-10-10 13:55:08','2017-10-10 13:55:08'),(828,26,'ton',0,435,0,0,1,NULL,NULL,'2017-10-10 13:55:08','2017-10-10 13:55:08','2017-10-10 13:55:08'),(829,26,'tpi',0,436,0,0,1,NULL,NULL,'2017-10-10 13:55:08','2017-10-10 13:55:08','2017-10-10 13:55:08'),(830,26,'tsi',0,437,0,0,1,NULL,NULL,'2017-10-10 13:55:08','2017-10-10 13:55:08','2017-10-10 13:55:08'),(831,26,'tsn',0,438,0,0,1,NULL,NULL,'2017-10-10 13:55:08','2017-10-10 13:55:08','2017-10-10 13:55:08'),(832,26,'tso',0,439,0,0,1,NULL,NULL,'2017-10-10 13:55:08','2017-10-10 13:55:08','2017-10-10 13:55:08'),(833,26,'tuk',0,440,0,0,1,NULL,NULL,'2017-10-10 13:55:08','2017-10-10 13:55:08','2017-10-10 13:55:08'),(834,26,'tum',0,441,0,0,1,NULL,NULL,'2017-10-10 13:55:08','2017-10-10 13:55:08','2017-10-10 13:55:08'),(835,26,'tup',0,442,0,0,1,NULL,NULL,'2017-10-10 13:55:08','2017-10-10 13:55:08','2017-10-10 13:55:08'),(836,26,'tur',0,443,0,0,1,NULL,NULL,'2017-10-10 13:55:08','2017-10-10 13:55:08','2017-10-10 13:55:08'),(837,26,'tut',0,444,0,0,1,NULL,NULL,'2017-10-10 13:55:09','2017-10-10 13:55:09','2017-10-10 13:55:09'),(838,26,'tvl',0,445,0,0,1,NULL,NULL,'2017-10-10 13:55:09','2017-10-10 13:55:09','2017-10-10 13:55:09'),(839,26,'twi',0,446,0,0,1,NULL,NULL,'2017-10-10 13:55:09','2017-10-10 13:55:09','2017-10-10 13:55:09'),(840,26,'tyv',0,447,0,0,1,NULL,NULL,'2017-10-10 13:55:09','2017-10-10 13:55:09','2017-10-10 13:55:09'),(841,26,'udm',0,448,0,0,1,NULL,NULL,'2017-10-10 13:55:09','2017-10-10 13:55:09','2017-10-10 13:55:09'),(842,26,'uga',0,449,0,0,1,NULL,NULL,'2017-10-10 13:55:09','2017-10-10 13:55:09','2017-10-10 13:55:09'),(843,26,'uig',0,450,0,0,1,NULL,NULL,'2017-10-10 13:55:09','2017-10-10 13:55:09','2017-10-10 13:55:09'),(844,26,'ukr',0,451,0,0,1,NULL,NULL,'2017-10-10 13:55:09','2017-10-10 13:55:09','2017-10-10 13:55:09'),(845,26,'umb',0,452,0,0,1,NULL,NULL,'2017-10-10 13:55:09','2017-10-10 13:55:09','2017-10-10 13:55:09'),(846,26,'und',0,453,0,0,1,NULL,NULL,'2017-10-10 13:55:09','2017-10-10 13:55:09','2017-10-10 13:55:09'),(847,26,'urd',0,454,0,0,1,NULL,NULL,'2017-10-10 13:55:09','2017-10-10 13:55:09','2017-10-10 13:55:09'),(848,26,'uzb',0,455,0,0,1,NULL,NULL,'2017-10-10 13:55:09','2017-10-10 13:55:09','2017-10-10 13:55:09'),(849,26,'vai',0,456,0,0,1,NULL,NULL,'2017-10-10 13:55:09','2017-10-10 13:55:09','2017-10-10 13:55:09'),(850,26,'ven',0,457,0,0,1,NULL,NULL,'2017-10-10 13:55:09','2017-10-10 13:55:09','2017-10-10 13:55:09'),(851,26,'vie',0,458,0,0,1,NULL,NULL,'2017-10-10 13:55:09','2017-10-10 13:55:09','2017-10-10 13:55:09'),(852,26,'vol',0,459,0,0,1,NULL,NULL,'2017-10-10 13:55:09','2017-10-10 13:55:09','2017-10-10 13:55:09'),(853,26,'vot',0,460,0,0,1,NULL,NULL,'2017-10-10 13:55:09','2017-10-10 13:55:09','2017-10-10 13:55:09'),(854,26,'wak',0,461,0,0,1,NULL,NULL,'2017-10-10 13:55:09','2017-10-10 13:55:09','2017-10-10 13:55:09'),(855,26,'wal',0,462,0,0,1,NULL,NULL,'2017-10-10 13:55:09','2017-10-10 13:55:09','2017-10-10 13:55:09'),(856,26,'war',0,463,0,0,1,NULL,NULL,'2017-10-10 13:55:09','2017-10-10 13:55:09','2017-10-10 13:55:09'),(857,26,'was',0,464,0,0,1,NULL,NULL,'2017-10-10 13:55:09','2017-10-10 13:55:09','2017-10-10 13:55:09'),(858,26,'wel',0,465,0,0,1,NULL,NULL,'2017-10-10 13:55:09','2017-10-10 13:55:09','2017-10-10 13:55:09'),(859,26,'wen',0,466,0,0,1,NULL,NULL,'2017-10-10 13:55:09','2017-10-10 13:55:09','2017-10-10 13:55:09'),(860,26,'wln',0,467,0,0,1,NULL,NULL,'2017-10-10 13:55:09','2017-10-10 13:55:09','2017-10-10 13:55:09'),(861,26,'wol',0,468,0,0,1,NULL,NULL,'2017-10-10 13:55:09','2017-10-10 13:55:09','2017-10-10 13:55:09'),(862,26,'xal',0,469,0,0,1,NULL,NULL,'2017-10-10 13:55:10','2017-10-10 13:55:10','2017-10-10 13:55:10'),(863,26,'xho',0,470,0,0,1,NULL,NULL,'2017-10-10 13:55:10','2017-10-10 13:55:10','2017-10-10 13:55:10'),(864,26,'yao',0,471,0,0,1,NULL,NULL,'2017-10-10 13:55:10','2017-10-10 13:55:10','2017-10-10 13:55:10'),(865,26,'yap',0,472,0,0,1,NULL,NULL,'2017-10-10 13:55:10','2017-10-10 13:55:10','2017-10-10 13:55:10'),(866,26,'yid',0,473,0,0,1,NULL,NULL,'2017-10-10 13:55:10','2017-10-10 13:55:10','2017-10-10 13:55:10'),(867,26,'yor',0,474,0,0,1,NULL,NULL,'2017-10-10 13:55:10','2017-10-10 13:55:10','2017-10-10 13:55:10'),(868,26,'ypk',0,475,0,0,1,NULL,NULL,'2017-10-10 13:55:10','2017-10-10 13:55:10','2017-10-10 13:55:10'),(869,26,'zap',0,476,0,0,1,NULL,NULL,'2017-10-10 13:55:10','2017-10-10 13:55:10','2017-10-10 13:55:10'),(870,26,'zbl',0,477,0,0,1,NULL,NULL,'2017-10-10 13:55:10','2017-10-10 13:55:10','2017-10-10 13:55:10'),(871,26,'zen',0,478,0,0,1,NULL,NULL,'2017-10-10 13:55:10','2017-10-10 13:55:10','2017-10-10 13:55:10'),(872,26,'zha',0,479,0,0,1,NULL,NULL,'2017-10-10 13:55:10','2017-10-10 13:55:10','2017-10-10 13:55:10'),(873,26,'znd',0,480,0,0,1,NULL,NULL,'2017-10-10 13:55:10','2017-10-10 13:55:10','2017-10-10 13:55:10'),(874,26,'zul',0,481,0,0,1,NULL,NULL,'2017-10-10 13:55:10','2017-10-10 13:55:10','2017-10-10 13:55:10'),(875,26,'zun',0,482,0,0,1,NULL,NULL,'2017-10-10 13:55:10','2017-10-10 13:55:10','2017-10-10 13:55:10'),(876,26,'zxx',0,483,0,0,1,NULL,NULL,'2017-10-10 13:55:10','2017-10-10 13:55:10','2017-10-10 13:55:10'),(877,26,'zza',0,484,0,0,1,NULL,NULL,'2017-10-10 13:55:10','2017-10-10 13:55:10','2017-10-10 13:55:10'),(878,27,'creator',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:33','2017-10-10 13:55:33','2017-10-10 13:55:33'),(879,27,'source',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:33','2017-10-10 13:55:33','2017-10-10 13:55:33'),(880,27,'subject',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:33','2017-10-10 13:55:33','2017-10-10 13:55:33'),(881,28,'is_associative_with',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:35','2017-10-10 13:55:35','2017-10-10 13:55:35'),(882,29,'is_earlier_form_of',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:35','2017-10-10 13:55:35','2017-10-10 13:55:35'),(883,29,'is_later_form_of',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:35','2017-10-10 13:55:35','2017-10-10 13:55:35'),(884,30,'is_parent_of',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:35','2017-10-10 13:55:35','2017-10-10 13:55:35'),(885,30,'is_child_of',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:35','2017-10-10 13:55:35','2017-10-10 13:55:35'),(886,31,'is_subordinate_to',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:35','2017-10-10 13:55:35','2017-10-10 13:55:35'),(887,31,'is_superior_of',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:35','2017-10-10 13:55:35','2017-10-10 13:55:35'),(888,32,'class',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:31','2017-10-10 13:55:31','2017-10-10 13:55:31'),(889,32,'collection',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:31','2017-10-10 13:55:31','2017-10-10 13:55:31'),(890,32,'file',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:31','2017-10-10 13:55:31','2017-10-10 13:55:31'),(891,32,'fonds',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:31','2017-10-10 13:55:31','2017-10-10 13:55:31'),(892,32,'item',0,4,0,0,1,NULL,NULL,'2017-10-10 13:55:31','2017-10-10 13:55:31','2017-10-10 13:55:31'),(893,32,'otherlevel',0,5,0,0,1,NULL,NULL,'2017-10-10 13:55:31','2017-10-10 13:55:31','2017-10-10 13:55:31'),(894,32,'recordgrp',0,6,0,0,1,NULL,NULL,'2017-10-10 13:55:31','2017-10-10 13:55:31','2017-10-10 13:55:31'),(895,32,'series',0,7,0,0,1,NULL,NULL,'2017-10-10 13:55:31','2017-10-10 13:55:31','2017-10-10 13:55:31'),(896,32,'subfonds',0,8,0,0,1,NULL,NULL,'2017-10-10 13:55:31','2017-10-10 13:55:31','2017-10-10 13:55:31'),(897,32,'subgrp',0,9,0,0,1,NULL,NULL,'2017-10-10 13:55:31','2017-10-10 13:55:31','2017-10-10 13:55:31'),(898,32,'subseries',0,10,0,0,1,NULL,NULL,'2017-10-10 13:55:31','2017-10-10 13:55:31','2017-10-10 13:55:31'),(899,33,'current',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:34','2017-10-10 13:55:34','2017-10-10 13:55:34'),(900,33,'previous',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:34','2017-10-10 13:55:34','2017-10-10 13:55:34'),(901,34,'single',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:30','2017-10-10 13:55:30','2017-10-10 13:55:30'),(902,34,'bulk',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:30','2017-10-10 13:55:30','2017-10-10 13:55:30'),(903,34,'inclusive',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:30','2017-10-10 13:55:30','2017-10-10 13:55:30'),(904,35,'broadcast',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:27','2017-10-10 13:55:27','2017-10-10 13:55:27'),(905,35,'copyright',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:27','2017-10-10 13:55:27','2017-10-10 13:55:27'),(906,35,'creation',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:27','2017-10-10 13:55:27','2017-10-10 13:55:27'),(907,35,'deaccession',0,4,0,0,1,NULL,NULL,'2017-10-10 13:55:27','2017-10-10 13:55:27','2017-10-10 13:55:27'),(908,35,'digitized',0,5,0,0,1,NULL,NULL,'2017-10-10 13:55:27','2017-10-10 13:55:27','2017-10-10 13:55:27'),(909,35,'event',0,6,0,0,1,NULL,NULL,'2017-10-10 13:55:27','2017-10-10 13:55:27','2017-10-10 13:55:27'),(910,35,'issued',0,8,0,0,1,NULL,NULL,'2017-10-10 13:55:27','2017-10-10 13:55:27','2017-10-10 13:55:27'),(911,35,'modified',0,9,0,0,1,NULL,NULL,'2017-10-10 13:55:27','2017-10-10 13:55:27','2017-10-10 13:55:27'),(912,35,'publication',0,11,0,0,1,NULL,NULL,'2017-10-10 13:55:28','2017-10-10 13:55:28','2017-10-10 13:55:28'),(913,35,'agent_relation',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:27','2017-10-10 13:55:27','2017-10-10 13:55:27'),(914,35,'other',0,10,0,0,1,NULL,NULL,'2017-10-10 13:55:28','2017-10-10 13:55:28','2017-10-10 13:55:28'),(915,35,'usage',0,13,0,0,1,NULL,NULL,'2017-10-10 13:55:28','2017-10-10 13:55:28','2017-10-10 13:55:28'),(916,35,'existence',0,7,0,0,1,NULL,NULL,'2017-10-10 13:55:27','2017-10-10 13:55:27','2017-10-10 13:55:27'),(917,35,'record_keeping',0,12,0,0,1,NULL,NULL,'2017-10-10 13:55:28','2017-10-10 13:55:28','2017-10-10 13:55:28'),(918,36,'approximate',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:29','2017-10-10 13:55:29','2017-10-10 13:55:29'),(919,36,'inferred',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:29','2017-10-10 13:55:29','2017-10-10 13:55:29'),(920,36,'questionable',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:29','2017-10-10 13:55:29','2017-10-10 13:55:29'),(921,37,'whole',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:36','2017-10-10 13:55:36','2017-10-10 13:55:36'),(922,37,'part',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:36','2017-10-10 13:55:36','2017-10-10 13:55:36'),(923,38,'whole',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:37','2017-10-10 13:55:37','2017-10-10 13:55:37'),(924,38,'part',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:36','2017-10-10 13:55:36','2017-10-10 13:55:36'),(925,39,'none',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:36','2017-10-10 13:55:36','2017-10-10 13:55:36'),(926,39,'other',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:36','2017-10-10 13:55:36','2017-10-10 13:55:36'),(927,39,'onLoad',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:36','2017-10-10 13:55:36','2017-10-10 13:55:36'),(928,39,'onRequest',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:36','2017-10-10 13:55:36','2017-10-10 13:55:36'),(929,40,'new',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:34','2017-10-10 13:55:34','2017-10-10 13:55:34'),(930,40,'replace',0,4,0,0,1,NULL,NULL,'2017-10-10 13:55:34','2017-10-10 13:55:34','2017-10-10 13:55:34'),(931,40,'embed',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:34','2017-10-10 13:55:34','2017-10-10 13:55:34'),(932,40,'other',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:34','2017-10-10 13:55:34','2017-10-10 13:55:34'),(933,40,'none',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:34','2017-10-10 13:55:34','2017-10-10 13:55:34'),(934,41,'aiff',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:28','2017-10-10 13:55:28','2017-10-10 13:55:28'),(935,41,'avi',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:28','2017-10-10 13:55:28','2017-10-10 13:55:28'),(936,41,'gif',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:28','2017-10-10 13:55:28','2017-10-10 13:55:28'),(937,41,'jpeg',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:28','2017-10-10 13:55:28','2017-10-10 13:55:28'),(938,41,'mp3',0,4,0,0,1,NULL,NULL,'2017-10-10 13:55:28','2017-10-10 13:55:28','2017-10-10 13:55:28'),(939,41,'pdf',0,5,0,0,1,NULL,NULL,'2017-10-10 13:55:28','2017-10-10 13:55:28','2017-10-10 13:55:28'),(940,41,'tiff',0,6,0,0,1,NULL,NULL,'2017-10-10 13:55:28','2017-10-10 13:55:28','2017-10-10 13:55:28'),(941,41,'txt',0,7,0,0,1,NULL,NULL,'2017-10-10 13:55:28','2017-10-10 13:55:28','2017-10-10 13:55:28'),(942,42,'conservation',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:32','2017-10-10 13:55:32','2017-10-10 13:55:32'),(943,42,'exhibit',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:32','2017-10-10 13:55:32','2017-10-10 13:55:32'),(944,42,'loan',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:32','2017-10-10 13:55:32','2017-10-10 13:55:32'),(945,42,'reading_room',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:32','2017-10-10 13:55:32','2017-10-10 13:55:32'),(946,43,'inverted',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:34','2017-10-10 13:55:34','2017-10-10 13:55:34'),(947,43,'direct',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:34','2017-10-10 13:55:34','2017-10-10 13:55:34'),(948,44,'summary',0,17,0,0,1,NULL,NULL,'2017-10-10 13:55:14','2017-10-10 13:55:14','2017-10-10 13:55:14'),(949,44,'bioghist',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:13','2017-10-10 13:55:13','2017-10-10 13:55:13'),(950,44,'accessrestrict',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:13','2017-10-10 13:55:13','2017-10-10 13:55:13'),(951,44,'userestrict',0,18,0,0,1,NULL,NULL,'2017-10-10 13:55:14','2017-10-10 13:55:14','2017-10-10 13:55:14'),(952,44,'custodhist',0,4,0,0,1,NULL,NULL,'2017-10-10 13:55:13','2017-10-10 13:55:13','2017-10-10 13:55:13'),(953,44,'dimensions',0,5,0,0,1,NULL,NULL,'2017-10-10 13:55:13','2017-10-10 13:55:13','2017-10-10 13:55:13'),(954,44,'edition',0,6,0,0,1,NULL,NULL,'2017-10-10 13:55:14','2017-10-10 13:55:14','2017-10-10 13:55:14'),(955,44,'extent',0,7,0,0,1,NULL,NULL,'2017-10-10 13:55:14','2017-10-10 13:55:14','2017-10-10 13:55:14'),(956,44,'altformavail',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:13','2017-10-10 13:55:13','2017-10-10 13:55:13'),(957,44,'originalsloc',0,12,0,0,1,NULL,NULL,'2017-10-10 13:55:14','2017-10-10 13:55:14','2017-10-10 13:55:14'),(958,44,'note',0,11,0,0,1,NULL,NULL,'2017-10-10 13:55:14','2017-10-10 13:55:14','2017-10-10 13:55:14'),(959,44,'acqinfo',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:13','2017-10-10 13:55:13','2017-10-10 13:55:13'),(960,44,'inscription',0,8,0,0,1,NULL,NULL,'2017-10-10 13:55:14','2017-10-10 13:55:14','2017-10-10 13:55:14'),(961,44,'langmaterial',0,9,0,0,1,NULL,NULL,'2017-10-10 13:55:14','2017-10-10 13:55:14','2017-10-10 13:55:14'),(962,44,'legalstatus',0,10,0,0,1,NULL,NULL,'2017-10-10 13:55:14','2017-10-10 13:55:14','2017-10-10 13:55:14'),(963,44,'physdesc',0,13,0,0,1,NULL,NULL,'2017-10-10 13:55:14','2017-10-10 13:55:14','2017-10-10 13:55:14'),(964,44,'prefercite',0,14,0,0,1,NULL,NULL,'2017-10-10 13:55:14','2017-10-10 13:55:14','2017-10-10 13:55:14'),(965,44,'processinfo',0,15,0,0,1,NULL,NULL,'2017-10-10 13:55:14','2017-10-10 13:55:14','2017-10-10 13:55:14'),(966,44,'relatedmaterial',0,16,0,0,1,NULL,NULL,'2017-10-10 13:55:14','2017-10-10 13:55:14','2017-10-10 13:55:14'),(967,45,'accruals',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:14','2017-10-10 13:55:14','2017-10-10 13:55:14'),(968,45,'appraisal',0,4,0,0,1,NULL,NULL,'2017-10-10 13:55:14','2017-10-10 13:55:14','2017-10-10 13:55:14'),(969,45,'arrangement',0,5,0,0,1,NULL,NULL,'2017-10-10 13:55:14','2017-10-10 13:55:14','2017-10-10 13:55:14'),(970,45,'bioghist',0,6,0,0,1,NULL,NULL,'2017-10-10 13:55:14','2017-10-10 13:55:14','2017-10-10 13:55:14'),(971,45,'accessrestrict',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:14','2017-10-10 13:55:14','2017-10-10 13:55:14'),(972,45,'userestrict',0,20,0,0,1,NULL,NULL,'2017-10-10 13:55:15','2017-10-10 13:55:15','2017-10-10 13:55:15'),(973,45,'custodhist',0,7,0,0,1,NULL,NULL,'2017-10-10 13:55:14','2017-10-10 13:55:14','2017-10-10 13:55:14'),(974,45,'dimensions',0,8,0,0,1,NULL,NULL,'2017-10-10 13:55:15','2017-10-10 13:55:15','2017-10-10 13:55:15'),(975,45,'altformavail',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:14','2017-10-10 13:55:14','2017-10-10 13:55:14'),(976,45,'originalsloc',0,12,0,0,1,NULL,NULL,'2017-10-10 13:55:15','2017-10-10 13:55:15','2017-10-10 13:55:15'),(977,45,'fileplan',0,9,0,0,1,NULL,NULL,'2017-10-10 13:55:15','2017-10-10 13:55:15','2017-10-10 13:55:15'),(978,45,'odd',0,11,0,0,1,NULL,NULL,'2017-10-10 13:55:15','2017-10-10 13:55:15','2017-10-10 13:55:15'),(979,45,'acqinfo',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:14','2017-10-10 13:55:14','2017-10-10 13:55:14'),(980,45,'legalstatus',0,10,0,0,1,NULL,NULL,'2017-10-10 13:55:15','2017-10-10 13:55:15','2017-10-10 13:55:15'),(981,45,'otherfindaid',0,13,0,0,1,NULL,NULL,'2017-10-10 13:55:15','2017-10-10 13:55:15','2017-10-10 13:55:15'),(982,45,'phystech',0,14,0,0,1,NULL,NULL,'2017-10-10 13:55:15','2017-10-10 13:55:15','2017-10-10 13:55:15'),(983,45,'prefercite',0,15,0,0,1,NULL,NULL,'2017-10-10 13:55:15','2017-10-10 13:55:15','2017-10-10 13:55:15'),(984,45,'processinfo',0,16,0,0,1,NULL,NULL,'2017-10-10 13:55:15','2017-10-10 13:55:15','2017-10-10 13:55:15'),(985,45,'relatedmaterial',0,17,0,0,1,NULL,NULL,'2017-10-10 13:55:15','2017-10-10 13:55:15','2017-10-10 13:55:15'),(986,45,'scopecontent',0,18,0,0,1,NULL,NULL,'2017-10-10 13:55:15','2017-10-10 13:55:15','2017-10-10 13:55:15'),(987,45,'separatedmaterial',0,19,0,0,1,NULL,NULL,'2017-10-10 13:55:15','2017-10-10 13:55:15','2017-10-10 13:55:15'),(988,46,'arabic',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:29','2017-10-10 13:55:29','2017-10-10 13:55:29'),(989,46,'loweralpha',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:29','2017-10-10 13:55:29','2017-10-10 13:55:29'),(990,46,'upperalpha',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:29','2017-10-10 13:55:29','2017-10-10 13:55:29'),(991,46,'lowerroman',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:29','2017-10-10 13:55:29','2017-10-10 13:55:29'),(992,46,'upperroman',0,4,0,0,1,NULL,NULL,'2017-10-10 13:55:29','2017-10-10 13:55:29','2017-10-10 13:55:29'),(993,47,'abstract',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:10','2017-10-10 13:55:10','2017-10-10 13:55:10'),(994,47,'physdesc',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:11','2017-10-10 13:55:11','2017-10-10 13:55:11'),(995,47,'langmaterial',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:11','2017-10-10 13:55:11','2017-10-10 13:55:11'),(996,47,'physloc',0,5,0,0,1,NULL,NULL,'2017-10-10 13:55:11','2017-10-10 13:55:11','2017-10-10 13:55:11'),(997,47,'materialspec',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:11','2017-10-10 13:55:11','2017-10-10 13:55:11'),(998,47,'physfacet',0,4,0,0,1,NULL,NULL,'2017-10-10 13:55:11','2017-10-10 13:55:11','2017-10-10 13:55:11'),(999,48,'bibliography',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:30','2017-10-10 13:55:30','2017-10-10 13:55:30'),(1000,49,'index',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:35','2017-10-10 13:55:35','2017-10-10 13:55:35'),(1001,50,'name',0,5,0,0,1,NULL,NULL,'2017-10-10 13:55:33','2017-10-10 13:55:33','2017-10-10 13:55:33'),(1002,50,'person',0,7,0,0,1,NULL,NULL,'2017-10-10 13:55:33','2017-10-10 13:55:33','2017-10-10 13:55:33'),(1003,50,'family',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:33','2017-10-10 13:55:33','2017-10-10 13:55:33'),(1004,50,'corporate_entity',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:32','2017-10-10 13:55:32','2017-10-10 13:55:32'),(1005,50,'subject',0,8,0,0,1,NULL,NULL,'2017-10-10 13:55:33','2017-10-10 13:55:33','2017-10-10 13:55:33'),(1006,50,'function',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:33','2017-10-10 13:55:33','2017-10-10 13:55:33'),(1007,50,'occupation',0,6,0,0,1,NULL,NULL,'2017-10-10 13:55:33','2017-10-10 13:55:33','2017-10-10 13:55:33'),(1008,50,'title',0,9,0,0,1,NULL,NULL,'2017-10-10 13:55:33','2017-10-10 13:55:33','2017-10-10 13:55:33'),(1009,50,'geographic_name',0,4,0,0,1,NULL,NULL,'2017-10-10 13:55:33','2017-10-10 13:55:33','2017-10-10 13:55:33'),(1010,50,'genre_form',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:33','2017-10-10 13:55:33','2017-10-10 13:55:33'),(1011,51,'AF',0,2,0,0,1,NULL,NULL,'2017-10-10 13:54:36','2017-10-10 13:54:36','2017-10-10 13:54:36'),(1012,51,'AX',0,14,0,0,1,NULL,NULL,'2017-10-10 13:54:37','2017-10-10 13:54:37','2017-10-10 13:54:37'),(1013,51,'AL',0,5,0,0,1,NULL,NULL,'2017-10-10 13:54:36','2017-10-10 13:54:36','2017-10-10 13:54:36'),(1014,51,'DZ',0,61,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1015,51,'AS',0,10,0,0,1,NULL,NULL,'2017-10-10 13:54:36','2017-10-10 13:54:36','2017-10-10 13:54:36'),(1016,51,'AD',0,0,0,0,1,NULL,NULL,'2017-10-10 13:54:35','2017-10-10 13:54:35','2017-10-10 13:54:35'),(1017,51,'AO',0,7,0,0,1,NULL,NULL,'2017-10-10 13:54:36','2017-10-10 13:54:36','2017-10-10 13:54:36'),(1018,51,'AI',0,4,0,0,1,NULL,NULL,'2017-10-10 13:54:36','2017-10-10 13:54:36','2017-10-10 13:54:36'),(1019,51,'AQ',0,8,0,0,1,NULL,NULL,'2017-10-10 13:54:36','2017-10-10 13:54:36','2017-10-10 13:54:36'),(1020,51,'AG',0,3,0,0,1,NULL,NULL,'2017-10-10 13:54:36','2017-10-10 13:54:36','2017-10-10 13:54:36'),(1021,51,'AR',0,9,0,0,1,NULL,NULL,'2017-10-10 13:54:36','2017-10-10 13:54:36','2017-10-10 13:54:36'),(1022,51,'AM',0,6,0,0,1,NULL,NULL,'2017-10-10 13:54:36','2017-10-10 13:54:36','2017-10-10 13:54:36'),(1023,51,'AW',0,13,0,0,1,NULL,NULL,'2017-10-10 13:54:37','2017-10-10 13:54:37','2017-10-10 13:54:37'),(1024,51,'AU',0,12,0,0,1,NULL,NULL,'2017-10-10 13:54:36','2017-10-10 13:54:36','2017-10-10 13:54:36'),(1025,51,'AT',0,11,0,0,1,NULL,NULL,'2017-10-10 13:54:36','2017-10-10 13:54:36','2017-10-10 13:54:36'),(1026,51,'AZ',0,15,0,0,1,NULL,NULL,'2017-10-10 13:54:37','2017-10-10 13:54:37','2017-10-10 13:54:37'),(1027,51,'BS',0,31,0,0,1,NULL,NULL,'2017-10-10 13:54:38','2017-10-10 13:54:38','2017-10-10 13:54:38'),(1028,51,'BH',0,22,0,0,1,NULL,NULL,'2017-10-10 13:54:38','2017-10-10 13:54:38','2017-10-10 13:54:38'),(1029,51,'BD',0,18,0,0,1,NULL,NULL,'2017-10-10 13:54:37','2017-10-10 13:54:37','2017-10-10 13:54:37'),(1030,51,'BB',0,17,0,0,1,NULL,NULL,'2017-10-10 13:54:37','2017-10-10 13:54:37','2017-10-10 13:54:37'),(1031,51,'BY',0,35,0,0,1,NULL,NULL,'2017-10-10 13:54:38','2017-10-10 13:54:38','2017-10-10 13:54:38'),(1032,51,'BE',0,19,0,0,1,NULL,NULL,'2017-10-10 13:54:37','2017-10-10 13:54:37','2017-10-10 13:54:37'),(1033,51,'BZ',0,36,0,0,1,NULL,NULL,'2017-10-10 13:54:38','2017-10-10 13:54:38','2017-10-10 13:54:38'),(1034,51,'BJ',0,24,0,0,1,NULL,NULL,'2017-10-10 13:54:38','2017-10-10 13:54:38','2017-10-10 13:54:38'),(1035,51,'BM',0,26,0,0,1,NULL,NULL,'2017-10-10 13:54:38','2017-10-10 13:54:38','2017-10-10 13:54:38'),(1036,51,'BT',0,32,0,0,1,NULL,NULL,'2017-10-10 13:54:38','2017-10-10 13:54:38','2017-10-10 13:54:38'),(1037,51,'BO',0,28,0,0,1,NULL,NULL,'2017-10-10 13:54:38','2017-10-10 13:54:38','2017-10-10 13:54:38'),(1038,51,'BQ',0,29,0,0,1,NULL,NULL,'2017-10-10 13:54:38','2017-10-10 13:54:38','2017-10-10 13:54:38'),(1039,51,'BA',0,16,0,0,1,NULL,NULL,'2017-10-10 13:54:37','2017-10-10 13:54:37','2017-10-10 13:54:37'),(1040,51,'BW',0,34,0,0,1,NULL,NULL,'2017-10-10 13:54:38','2017-10-10 13:54:38','2017-10-10 13:54:38'),(1041,51,'BV',0,33,0,0,1,NULL,NULL,'2017-10-10 13:54:38','2017-10-10 13:54:38','2017-10-10 13:54:38'),(1042,51,'BR',0,30,0,0,1,NULL,NULL,'2017-10-10 13:54:38','2017-10-10 13:54:38','2017-10-10 13:54:38'),(1043,51,'IO',0,105,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1044,51,'BN',0,27,0,0,1,NULL,NULL,'2017-10-10 13:54:38','2017-10-10 13:54:38','2017-10-10 13:54:38'),(1045,51,'BG',0,21,0,0,1,NULL,NULL,'2017-10-10 13:54:37','2017-10-10 13:54:37','2017-10-10 13:54:37'),(1046,51,'BF',0,20,0,0,1,NULL,NULL,'2017-10-10 13:54:37','2017-10-10 13:54:37','2017-10-10 13:54:37'),(1047,51,'BI',0,23,0,0,1,NULL,NULL,'2017-10-10 13:54:38','2017-10-10 13:54:38','2017-10-10 13:54:38'),(1048,51,'KH',0,116,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1049,51,'CM',0,46,0,0,1,NULL,NULL,'2017-10-10 13:54:39','2017-10-10 13:54:39','2017-10-10 13:54:39'),(1050,51,'CA',0,37,0,0,1,NULL,NULL,'2017-10-10 13:54:38','2017-10-10 13:54:38','2017-10-10 13:54:38'),(1051,51,'CV',0,51,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1052,51,'KY',0,123,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1053,51,'CF',0,40,0,0,1,NULL,NULL,'2017-10-10 13:54:39','2017-10-10 13:54:39','2017-10-10 13:54:39'),(1054,51,'TD',0,214,0,0,1,NULL,NULL,'2017-10-10 13:54:45','2017-10-10 13:54:45','2017-10-10 13:54:45'),(1055,51,'CL',0,45,0,0,1,NULL,NULL,'2017-10-10 13:54:39','2017-10-10 13:54:39','2017-10-10 13:54:39'),(1056,51,'CN',0,47,0,0,1,NULL,NULL,'2017-10-10 13:54:39','2017-10-10 13:54:39','2017-10-10 13:54:39'),(1057,51,'CX',0,53,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1058,51,'CC',0,38,0,0,1,NULL,NULL,'2017-10-10 13:54:39','2017-10-10 13:54:39','2017-10-10 13:54:39'),(1059,51,'CO',0,48,0,0,1,NULL,NULL,'2017-10-10 13:54:39','2017-10-10 13:54:39','2017-10-10 13:54:39'),(1060,51,'KM',0,118,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1061,51,'CG',0,41,0,0,1,NULL,NULL,'2017-10-10 13:54:39','2017-10-10 13:54:39','2017-10-10 13:54:39'),(1062,51,'CD',0,39,0,0,1,NULL,NULL,'2017-10-10 13:54:39','2017-10-10 13:54:39','2017-10-10 13:54:39'),(1063,51,'CK',0,44,0,0,1,NULL,NULL,'2017-10-10 13:54:39','2017-10-10 13:54:39','2017-10-10 13:54:39'),(1064,51,'CR',0,49,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1065,51,'CI',0,43,0,0,1,NULL,NULL,'2017-10-10 13:54:39','2017-10-10 13:54:39','2017-10-10 13:54:39'),(1066,51,'HR',0,97,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1067,51,'CU',0,50,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1068,51,'CW',0,52,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1069,51,'CY',0,54,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1070,51,'CZ',0,55,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1071,51,'DK',0,58,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1072,51,'DJ',0,57,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1073,51,'DM',0,59,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1074,51,'DO',0,60,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1075,51,'EC',0,62,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1076,51,'EG',0,64,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1077,51,'SV',0,209,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1078,51,'GQ',0,87,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1079,51,'ER',0,66,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1080,51,'EE',0,63,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1081,51,'ET',0,68,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1082,51,'FK',0,71,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1083,51,'FO',0,73,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1084,51,'FJ',0,70,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1085,51,'FI',0,69,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1086,51,'FR',0,74,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1087,51,'GF',0,79,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1088,51,'PF',0,174,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1089,51,'TF',0,215,0,0,1,NULL,NULL,'2017-10-10 13:54:45','2017-10-10 13:54:45','2017-10-10 13:54:45'),(1090,51,'GA',0,75,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1091,51,'GM',0,84,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1092,51,'GE',0,78,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1093,51,'DE',0,56,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1094,51,'GH',0,81,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1095,51,'GI',0,82,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1096,51,'GR',0,88,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1097,51,'GL',0,83,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1098,51,'GD',0,77,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1099,51,'GP',0,86,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1100,51,'GU',0,91,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1101,51,'GT',0,90,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1102,51,'GG',0,80,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1103,51,'GN',0,85,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1104,51,'GW',0,92,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1105,51,'GY',0,93,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1106,51,'HT',0,98,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1107,51,'HM',0,95,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1108,51,'VA',0,235,0,0,1,NULL,NULL,'2017-10-10 13:54:46','2017-10-10 13:54:46','2017-10-10 13:54:46'),(1109,51,'HN',0,96,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1110,51,'HK',0,94,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1111,51,'HU',0,99,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1112,51,'IS',0,108,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1113,51,'IN',0,104,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1114,51,'ID',0,100,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1115,51,'IR',0,107,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1116,51,'IQ',0,106,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1117,51,'IE',0,101,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1118,51,'IM',0,103,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1119,51,'IL',0,102,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1120,51,'IT',0,109,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1121,51,'JM',0,111,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1122,51,'JP',0,113,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1123,51,'JE',0,110,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1124,51,'JO',0,112,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1125,51,'KZ',0,124,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1126,51,'KE',0,114,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1127,51,'KI',0,117,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1128,51,'KP',0,120,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1129,51,'KR',0,121,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1130,51,'KW',0,122,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1131,51,'KG',0,115,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1132,51,'LA',0,125,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1133,51,'LV',0,134,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1134,51,'LB',0,126,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1135,51,'LS',0,131,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1136,51,'LR',0,130,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1137,51,'LY',0,135,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1138,51,'LI',0,128,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1139,51,'LT',0,132,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1140,51,'LU',0,133,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1141,51,'MO',0,147,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1142,51,'MK',0,143,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1143,51,'MG',0,141,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1144,51,'MW',0,155,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1145,51,'MY',0,157,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1146,51,'MV',0,154,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1147,51,'ML',0,144,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1148,51,'MT',0,152,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1149,51,'MH',0,142,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1150,51,'MQ',0,149,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1151,51,'MR',0,150,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1152,51,'MU',0,153,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1153,51,'YT',0,245,0,0,1,NULL,NULL,'2017-10-10 13:54:47','2017-10-10 13:54:47','2017-10-10 13:54:47'),(1154,51,'MX',0,156,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1155,51,'FM',0,72,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1156,51,'MD',0,138,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1157,51,'MC',0,137,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1158,51,'MN',0,146,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1159,51,'ME',0,139,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1160,51,'MS',0,151,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1161,51,'MA',0,136,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1162,51,'MZ',0,158,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1163,51,'MM',0,145,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1164,51,'NA',0,159,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1165,51,'NR',0,168,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1166,51,'NP',0,167,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1167,51,'NL',0,165,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1168,51,'NC',0,160,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1169,51,'NZ',0,170,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1170,51,'NI',0,164,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1171,51,'NE',0,161,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1172,51,'NG',0,163,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1173,51,'NU',0,169,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1174,51,'NF',0,162,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1175,51,'MP',0,148,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1176,51,'NO',0,166,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1177,51,'OM',0,171,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1178,51,'PK',0,177,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1179,51,'PW',0,184,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1180,51,'PS',0,182,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1181,51,'PA',0,172,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1182,51,'PG',0,175,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1183,51,'PY',0,185,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1184,51,'PE',0,173,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1185,51,'PH',0,176,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1186,51,'PN',0,180,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1187,51,'PL',0,178,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1188,51,'PT',0,183,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1189,51,'PR',0,181,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1190,51,'QA',0,186,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1191,51,'RE',0,187,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1192,51,'RO',0,188,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1193,51,'RU',0,190,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1194,51,'RW',0,191,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1195,51,'BL',0,25,0,0,1,NULL,NULL,'2017-10-10 13:54:38','2017-10-10 13:54:38','2017-10-10 13:54:38'),(1196,51,'SH',0,198,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1197,51,'KN',0,119,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1198,51,'LC',0,127,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1199,51,'MF',0,140,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1200,51,'PM',0,179,0,0,1,NULL,NULL,'2017-10-10 13:54:43','2017-10-10 13:54:43','2017-10-10 13:54:43'),(1201,51,'VC',0,236,0,0,1,NULL,NULL,'2017-10-10 13:54:46','2017-10-10 13:54:46','2017-10-10 13:54:46'),(1202,51,'WS',0,243,0,0,1,NULL,NULL,'2017-10-10 13:54:46','2017-10-10 13:54:46','2017-10-10 13:54:46'),(1203,51,'SM',0,203,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1204,51,'ST',0,208,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1205,51,'SA',0,192,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1206,51,'SN',0,204,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1207,51,'RS',0,189,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1208,51,'SC',0,194,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1209,51,'SL',0,202,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1210,51,'SG',0,197,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1211,51,'SX',0,210,0,0,1,NULL,NULL,'2017-10-10 13:54:45','2017-10-10 13:54:45','2017-10-10 13:54:45'),(1212,51,'SK',0,201,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1213,51,'SI',0,199,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1214,51,'SB',0,193,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1215,51,'SO',0,205,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1216,51,'ZA',0,246,0,0,1,NULL,NULL,'2017-10-10 13:54:47','2017-10-10 13:54:47','2017-10-10 13:54:47'),(1217,51,'GS',0,89,0,0,1,NULL,NULL,'2017-10-10 13:54:41','2017-10-10 13:54:41','2017-10-10 13:54:41'),(1218,51,'SS',0,207,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1219,51,'ES',0,67,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1220,51,'LK',0,129,0,0,1,NULL,NULL,'2017-10-10 13:54:42','2017-10-10 13:54:42','2017-10-10 13:54:42'),(1221,51,'SD',0,195,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1222,51,'SR',0,206,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1223,51,'SJ',0,200,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1224,51,'SZ',0,212,0,0,1,NULL,NULL,'2017-10-10 13:54:45','2017-10-10 13:54:45','2017-10-10 13:54:45'),(1225,51,'SE',0,196,0,0,1,NULL,NULL,'2017-10-10 13:54:44','2017-10-10 13:54:44','2017-10-10 13:54:44'),(1226,51,'CH',0,42,0,0,1,NULL,NULL,'2017-10-10 13:54:39','2017-10-10 13:54:39','2017-10-10 13:54:39'),(1227,51,'SY',0,211,0,0,1,NULL,NULL,'2017-10-10 13:54:45','2017-10-10 13:54:45','2017-10-10 13:54:45'),(1228,51,'TW',0,227,0,0,1,NULL,NULL,'2017-10-10 13:54:45','2017-10-10 13:54:45','2017-10-10 13:54:45'),(1229,51,'TJ',0,218,0,0,1,NULL,NULL,'2017-10-10 13:54:45','2017-10-10 13:54:45','2017-10-10 13:54:45'),(1230,51,'TZ',0,228,0,0,1,NULL,NULL,'2017-10-10 13:54:45','2017-10-10 13:54:45','2017-10-10 13:54:45'),(1231,51,'TH',0,217,0,0,1,NULL,NULL,'2017-10-10 13:54:45','2017-10-10 13:54:45','2017-10-10 13:54:45'),(1232,51,'TL',0,220,0,0,1,NULL,NULL,'2017-10-10 13:54:45','2017-10-10 13:54:45','2017-10-10 13:54:45'),(1233,51,'TG',0,216,0,0,1,NULL,NULL,'2017-10-10 13:54:45','2017-10-10 13:54:45','2017-10-10 13:54:45'),(1234,51,'TK',0,219,0,0,1,NULL,NULL,'2017-10-10 13:54:45','2017-10-10 13:54:45','2017-10-10 13:54:45'),(1235,51,'TO',0,223,0,0,1,NULL,NULL,'2017-10-10 13:54:45','2017-10-10 13:54:45','2017-10-10 13:54:45'),(1236,51,'TT',0,225,0,0,1,NULL,NULL,'2017-10-10 13:54:45','2017-10-10 13:54:45','2017-10-10 13:54:45'),(1237,51,'TN',0,222,0,0,1,NULL,NULL,'2017-10-10 13:54:45','2017-10-10 13:54:45','2017-10-10 13:54:45'),(1238,51,'TR',0,224,0,0,1,NULL,NULL,'2017-10-10 13:54:45','2017-10-10 13:54:45','2017-10-10 13:54:45'),(1239,51,'TM',0,221,0,0,1,NULL,NULL,'2017-10-10 13:54:45','2017-10-10 13:54:45','2017-10-10 13:54:45'),(1240,51,'TC',0,213,0,0,1,NULL,NULL,'2017-10-10 13:54:45','2017-10-10 13:54:45','2017-10-10 13:54:45'),(1241,51,'TV',0,226,0,0,1,NULL,NULL,'2017-10-10 13:54:45','2017-10-10 13:54:45','2017-10-10 13:54:45'),(1242,51,'UG',0,230,0,0,1,NULL,NULL,'2017-10-10 13:54:46','2017-10-10 13:54:46','2017-10-10 13:54:46'),(1243,51,'UA',0,229,0,0,1,NULL,NULL,'2017-10-10 13:54:45','2017-10-10 13:54:45','2017-10-10 13:54:45'),(1244,51,'AE',0,1,0,0,1,NULL,NULL,'2017-10-10 13:54:35','2017-10-10 13:54:35','2017-10-10 13:54:35'),(1245,51,'GB',0,76,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1246,51,'US',0,232,0,0,1,NULL,NULL,'2017-10-10 13:54:46','2017-10-10 13:54:46','2017-10-10 13:54:46'),(1247,51,'UM',0,231,0,0,1,NULL,NULL,'2017-10-10 13:54:46','2017-10-10 13:54:46','2017-10-10 13:54:46'),(1248,51,'UY',0,233,0,0,1,NULL,NULL,'2017-10-10 13:54:46','2017-10-10 13:54:46','2017-10-10 13:54:46'),(1249,51,'UZ',0,234,0,0,1,NULL,NULL,'2017-10-10 13:54:46','2017-10-10 13:54:46','2017-10-10 13:54:46'),(1250,51,'VU',0,241,0,0,1,NULL,NULL,'2017-10-10 13:54:46','2017-10-10 13:54:46','2017-10-10 13:54:46'),(1251,51,'VE',0,237,0,0,1,NULL,NULL,'2017-10-10 13:54:46','2017-10-10 13:54:46','2017-10-10 13:54:46'),(1252,51,'VN',0,240,0,0,1,NULL,NULL,'2017-10-10 13:54:46','2017-10-10 13:54:46','2017-10-10 13:54:46'),(1253,51,'VG',0,238,0,0,1,NULL,NULL,'2017-10-10 13:54:46','2017-10-10 13:54:46','2017-10-10 13:54:46'),(1254,51,'VI',0,239,0,0,1,NULL,NULL,'2017-10-10 13:54:46','2017-10-10 13:54:46','2017-10-10 13:54:46'),(1255,51,'WF',0,242,0,0,1,NULL,NULL,'2017-10-10 13:54:46','2017-10-10 13:54:46','2017-10-10 13:54:46'),(1256,51,'EH',0,65,0,0,1,NULL,NULL,'2017-10-10 13:54:40','2017-10-10 13:54:40','2017-10-10 13:54:40'),(1257,51,'YE',0,244,0,0,1,NULL,NULL,'2017-10-10 13:54:46','2017-10-10 13:54:46','2017-10-10 13:54:46'),(1258,51,'ZM',0,247,0,0,1,NULL,NULL,'2017-10-10 13:54:47','2017-10-10 13:54:47','2017-10-10 13:54:47'),(1259,51,'ZW',0,248,0,0,1,NULL,NULL,'2017-10-10 13:54:47','2017-10-10 13:54:47','2017-10-10 13:54:47'),(1260,52,'copyright',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:35','2017-10-10 13:55:35','2017-10-10 13:55:35'),(1261,52,'license',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:35','2017-10-10 13:55:35','2017-10-10 13:55:35'),(1262,52,'statute',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:35','2017-10-10 13:55:35','2017-10-10 13:55:35'),(1263,52,'other',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:35','2017-10-10 13:55:35','2017-10-10 13:55:35'),(1264,53,'copyrighted',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:32','2017-10-10 13:55:32','2017-10-10 13:55:32'),(1265,53,'public_domain',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:32','2017-10-10 13:55:32','2017-10-10 13:55:32'),(1266,53,'unknown',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:32','2017-10-10 13:55:32','2017-10-10 13:55:32'),(1267,54,'cultural_context',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:33','2017-10-10 13:55:33','2017-10-10 13:55:33'),(1268,54,'function',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:33','2017-10-10 13:55:33','2017-10-10 13:55:33'),(1269,54,'geographic',0,3,0,0,1,NULL,NULL,'2017-10-10 13:55:33','2017-10-10 13:55:33','2017-10-10 13:55:33'),(1270,54,'genre_form',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:33','2017-10-10 13:55:33','2017-10-10 13:55:33'),(1271,54,'occupation',0,4,0,0,1,NULL,NULL,'2017-10-10 13:55:33','2017-10-10 13:55:33','2017-10-10 13:55:33'),(1272,54,'style_period',0,5,0,0,1,NULL,NULL,'2017-10-10 13:55:33','2017-10-10 13:55:33','2017-10-10 13:55:33'),(1273,54,'technique',0,6,0,0,1,NULL,NULL,'2017-10-10 13:55:33','2017-10-10 13:55:33','2017-10-10 13:55:33'),(1274,54,'temporal',0,7,0,0,1,NULL,NULL,'2017-10-10 13:55:33','2017-10-10 13:55:33','2017-10-10 13:55:33'),(1275,54,'topical',0,8,0,0,1,NULL,NULL,'2017-10-10 13:55:34','2017-10-10 13:55:34','2017-10-10 13:55:34'),(1276,54,'uniform_title',0,9,0,0,1,NULL,NULL,'2017-10-10 13:55:34','2017-10-10 13:55:34','2017-10-10 13:55:34'),(1277,55,'novalue',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:36','2017-10-10 13:55:36','2017-10-10 13:55:36'),(1278,56,'novalue',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:36','2017-10-10 13:55:36','2017-10-10 13:55:36'),(1279,57,'novalue',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:36','2017-10-10 13:55:36','2017-10-10 13:55:36'),(1280,58,'novalue',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:36','2017-10-10 13:55:36','2017-10-10 13:55:36'),(1281,34,'range',0,2,0,0,1,NULL,NULL,'2017-10-10 13:55:30','2017-10-10 13:55:30','2017-10-10 13:55:30'),(1282,59,'has_part',0,1,0,0,1,NULL,NULL,'2017-10-10 13:55:35','2017-10-10 13:55:35','2017-10-10 13:55:35'),(1283,59,'forms_part_of',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:35','2017-10-10 13:55:35','2017-10-10 13:55:35'),(1284,60,'part',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:36','2017-10-10 13:55:36','2017-10-10 13:55:36'),(1285,61,'sibling_of',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:37','2017-10-10 13:55:37','2017-10-10 13:55:37'),(1286,62,'bound_with',0,0,0,0,1,NULL,NULL,'2017-10-10 13:55:30','2017-10-10 13:55:30','2017-10-10 13:55:30'),(1290,1,'abr',0,226,0,0,1,NULL,NULL,NULL,NULL,NULL),(1291,1,'adi',0,227,0,0,1,NULL,NULL,NULL,NULL,NULL),(1292,1,'ape',0,228,0,0,1,NULL,NULL,NULL,NULL,NULL),(1293,1,'apl',0,229,0,0,1,NULL,NULL,NULL,NULL,NULL),(1294,1,'ato',0,230,0,0,1,NULL,NULL,NULL,NULL,NULL),(1295,1,'brd',0,231,0,0,1,NULL,NULL,NULL,NULL,NULL),(1296,1,'brl',0,232,0,0,1,NULL,NULL,NULL,NULL,NULL),(1297,1,'cas',0,233,0,0,1,NULL,NULL,NULL,NULL,NULL),(1298,1,'cor',0,234,0,0,1,NULL,NULL,NULL,NULL,NULL),(1299,1,'cou',0,235,0,0,1,NULL,NULL,NULL,NULL,NULL),(1300,1,'crt',0,236,0,0,1,NULL,NULL,NULL,NULL,NULL),(1301,1,'dgs',0,237,0,0,1,NULL,NULL,NULL,NULL,NULL),(1302,1,'edc',0,238,0,0,1,NULL,NULL,NULL,NULL,NULL),(1303,1,'edm',0,239,0,0,1,NULL,NULL,NULL,NULL,NULL),(1304,1,'enj',0,240,0,0,1,NULL,NULL,NULL,NULL,NULL),(1305,1,'fds',0,241,0,0,1,NULL,NULL,NULL,NULL,NULL),(1306,1,'fmd',0,242,0,0,1,NULL,NULL,NULL,NULL,NULL),(1307,1,'fmk',0,243,0,0,1,NULL,NULL,NULL,NULL,NULL),(1308,1,'fmp',0,244,0,0,1,NULL,NULL,NULL,NULL,NULL),(1309,1,'-grt',0,245,0,0,1,NULL,NULL,NULL,NULL,NULL),(1310,1,'his',0,246,0,0,1,NULL,NULL,NULL,NULL,NULL),(1311,1,'isb',0,247,0,0,1,NULL,NULL,NULL,NULL,NULL),(1312,1,'jud',0,248,0,0,1,NULL,NULL,NULL,NULL,NULL),(1313,1,'jug',0,249,0,0,1,NULL,NULL,NULL,NULL,NULL),(1314,1,'med',0,250,0,0,1,NULL,NULL,NULL,NULL,NULL),(1315,1,'mtk',0,251,0,0,1,NULL,NULL,NULL,NULL,NULL),(1316,1,'osp',0,252,0,0,1,NULL,NULL,NULL,NULL,NULL),(1317,1,'pan',0,253,0,0,1,NULL,NULL,NULL,NULL,NULL),(1318,1,'pra',0,254,0,0,1,NULL,NULL,NULL,NULL,NULL),(1319,1,'pre',0,255,0,0,1,NULL,NULL,NULL,NULL,NULL),(1320,1,'prn',0,256,0,0,1,NULL,NULL,NULL,NULL,NULL),(1321,1,'prs',0,257,0,0,1,NULL,NULL,NULL,NULL,NULL),(1322,1,'rdd',0,258,0,0,1,NULL,NULL,NULL,NULL,NULL),(1323,1,'rpc',0,259,0,0,1,NULL,NULL,NULL,NULL,NULL),(1324,1,'rsr',0,260,0,0,1,NULL,NULL,NULL,NULL,NULL),(1325,1,'sgd',0,261,0,0,1,NULL,NULL,NULL,NULL,NULL),(1326,1,'sll',0,262,0,0,1,NULL,NULL,NULL,NULL,NULL),(1327,1,'tld',0,263,0,0,1,NULL,NULL,NULL,NULL,NULL),(1328,1,'tlp',0,264,0,0,1,NULL,NULL,NULL,NULL,NULL),(1329,1,'vac',0,265,0,0,1,NULL,NULL,NULL,NULL,NULL),(1330,1,'wac',0,266,0,0,1,NULL,NULL,NULL,NULL,NULL),(1331,1,'wal',0,267,0,0,1,NULL,NULL,NULL,NULL,NULL),(1332,1,'wat',0,268,0,0,1,NULL,NULL,NULL,NULL,NULL),(1333,1,'win',0,269,0,0,1,NULL,NULL,NULL,NULL,NULL),(1334,1,'wpr',0,270,0,0,1,NULL,NULL,NULL,NULL,NULL),(1335,1,'wst',0,271,0,0,1,NULL,NULL,NULL,NULL,NULL),(1336,64,'business',0,0,0,0,1,NULL,NULL,NULL,NULL,NULL),(1337,64,'home',0,1,0,0,1,NULL,NULL,NULL,NULL,NULL),(1338,64,'cell',0,2,0,0,1,NULL,NULL,NULL,NULL,NULL),(1339,64,'fax',0,3,0,0,1,NULL,NULL,NULL,NULL,NULL),(1340,15,'processing_started',0,33,0,0,1,NULL,NULL,NULL,NULL,NULL),(1341,15,'processing_completed',0,34,0,0,1,NULL,NULL,NULL,NULL,NULL),(1342,15,'processing_in_progress',0,35,0,0,1,NULL,NULL,NULL,NULL,NULL),(1343,15,'processing_new',0,36,0,0,1,NULL,NULL,NULL,NULL,NULL),(1344,65,'RestrictedSpecColl',0,0,0,0,1,NULL,NULL,NULL,NULL,NULL),(1345,65,'RestrictedCurApprSpecColl',0,1,0,0,1,NULL,NULL,NULL,NULL,NULL),(1346,65,'RestrictedFragileSpecColl',0,2,0,0,1,NULL,NULL,NULL,NULL,NULL),(1347,65,'InProcessSpecColl',0,3,0,0,1,NULL,NULL,NULL,NULL,NULL),(1348,65,'ColdStorageBrbl',0,4,0,0,1,NULL,NULL,NULL,NULL,NULL),(1349,66,'inches',0,0,0,0,1,NULL,NULL,NULL,NULL,NULL),(1350,66,'feet',0,1,0,0,1,NULL,NULL,NULL,NULL,NULL),(1351,66,'yards',0,2,0,0,1,NULL,NULL,NULL,NULL,NULL),(1352,66,'millimeters',0,3,0,0,1,NULL,NULL,NULL,NULL,NULL),(1353,66,'centimeters',0,4,0,0,1,NULL,NULL,NULL,NULL,NULL),(1354,66,'meters',0,5,0,0,1,NULL,NULL,NULL,NULL,NULL),(1357,67,'av_materials',0,0,0,0,1,NULL,NULL,NULL,NULL,NULL),(1358,67,'arrivals',0,1,0,0,1,NULL,NULL,NULL,NULL,NULL),(1359,67,'shared',0,2,0,0,1,NULL,NULL,NULL,NULL,NULL),(1360,68,'delete',0,0,0,0,1,NULL,NULL,NULL,NULL,NULL),(1361,68,'disseminate',0,1,0,0,1,NULL,NULL,NULL,NULL,NULL),(1362,68,'migrate',0,2,0,0,1,NULL,NULL,NULL,NULL,NULL),(1363,68,'modify',0,3,0,0,1,NULL,NULL,NULL,NULL,NULL),(1364,68,'replicate',0,4,0,0,1,NULL,NULL,NULL,NULL,NULL),(1365,68,'use',0,5,0,0,1,NULL,NULL,NULL,NULL,NULL),(1366,69,'allow',0,0,0,0,1,NULL,NULL,NULL,NULL,NULL),(1367,69,'disallow',0,1,0,0,1,NULL,NULL,NULL,NULL,NULL),(1368,69,'conditional',0,2,0,0,1,NULL,NULL,NULL,NULL,NULL),(1369,70,'permissions',0,0,0,0,1,NULL,NULL,NULL,NULL,NULL),(1370,70,'restrictions',0,1,0,0,1,NULL,NULL,NULL,NULL,NULL),(1371,70,'extension',0,2,0,0,1,NULL,NULL,NULL,NULL,NULL),(1372,70,'expiration',0,3,0,0,1,NULL,NULL,NULL,NULL,NULL),(1373,70,'additional_information',0,4,0,0,1,NULL,NULL,NULL,NULL,NULL),(1374,71,'materials',0,0,0,0,1,NULL,NULL,NULL,NULL,NULL),(1375,71,'type_note',0,1,0,0,1,NULL,NULL,NULL,NULL,NULL),(1376,71,'additional_information',0,2,0,0,1,NULL,NULL,NULL,NULL,NULL),(1377,72,'agrovoc',0,0,0,0,1,NULL,NULL,NULL,NULL,NULL),(1378,72,'allmovie',0,1,0,0,1,NULL,NULL,NULL,NULL,NULL),(1379,72,'allmusic',0,2,0,0,1,NULL,NULL,NULL,NULL,NULL),(1380,72,'allocine',0,3,0,0,1,NULL,NULL,NULL,NULL,NULL),(1381,72,'amnbo',0,4,0,0,1,NULL,NULL,NULL,NULL,NULL),(1382,72,'ansi',0,5,0,0,1,NULL,NULL,NULL,NULL,NULL),(1383,72,'artsy',0,6,0,0,1,NULL,NULL,NULL,NULL,NULL),(1384,72,'bdusc',0,7,0,0,1,NULL,NULL,NULL,NULL,NULL),(1385,72,'bfi',0,8,0,0,1,NULL,NULL,NULL,NULL,NULL),(1386,72,'bnfcg',0,9,0,0,1,NULL,NULL,NULL,NULL,NULL),(1387,72,'cantic',0,10,0,0,1,NULL,NULL,NULL,NULL,NULL),(1388,72,'cgndb',0,11,0,0,1,NULL,NULL,NULL,NULL,NULL),(1389,72,'danacode',0,12,0,0,1,NULL,NULL,NULL,NULL,NULL),(1390,72,'datoses',0,13,0,0,1,NULL,NULL,NULL,NULL,NULL),(1391,72,'discogs',0,14,0,0,1,NULL,NULL,NULL,NULL,NULL),(1392,72,'dkfilm',0,15,0,0,1,NULL,NULL,NULL,NULL,NULL),(1393,72,'doi',0,16,0,0,1,NULL,NULL,NULL,NULL,NULL),(1394,72,'ean',0,17,0,0,1,NULL,NULL,NULL,NULL,NULL),(1395,72,'eidr',0,18,0,0,1,NULL,NULL,NULL,NULL,NULL),(1396,72,'fast',0,19,0,0,1,NULL,NULL,NULL,NULL,NULL),(1397,72,'filmport',0,20,0,0,1,NULL,NULL,NULL,NULL,NULL),(1398,72,'findagr',0,21,0,0,1,NULL,NULL,NULL,NULL,NULL),(1399,72,'freebase',0,22,0,0,1,NULL,NULL,NULL,NULL,NULL),(1400,72,'gec',0,23,0,0,1,NULL,NULL,NULL,NULL,NULL),(1401,72,'geogndb',0,24,0,0,1,NULL,NULL,NULL,NULL,NULL),(1402,72,'geonames',0,25,0,0,1,NULL,NULL,NULL,NULL,NULL),(1403,72,'gettytgn',0,26,0,0,1,NULL,NULL,NULL,NULL,NULL),(1404,72,'gettyulan',0,27,0,0,1,NULL,NULL,NULL,NULL,NULL),(1405,72,'gnd',0,28,0,0,1,NULL,NULL,NULL,NULL,NULL),(1406,72,'gnis',0,29,0,0,1,NULL,NULL,NULL,NULL,NULL),(1407,72,'gtin-14',0,30,0,0,1,NULL,NULL,NULL,NULL,NULL),(1408,72,'hdl',0,31,0,0,1,NULL,NULL,NULL,NULL,NULL),(1409,72,'ibdb',0,32,0,0,1,NULL,NULL,NULL,NULL,NULL),(1410,72,'idref',0,33,0,0,1,NULL,NULL,NULL,NULL,NULL),(1411,72,'imdb',0,34,0,0,1,NULL,NULL,NULL,NULL,NULL),(1412,72,'isan',0,35,0,0,1,NULL,NULL,NULL,NULL,NULL),(1413,72,'isbn',0,36,0,0,1,NULL,NULL,NULL,NULL,NULL),(1414,72,'isbn-a',0,37,0,0,1,NULL,NULL,NULL,NULL,NULL),(1415,72,'isbnre',0,38,0,0,1,NULL,NULL,NULL,NULL,NULL),(1416,72,'isil',0,39,0,0,1,NULL,NULL,NULL,NULL,NULL),(1417,72,'ismn',0,40,0,0,1,NULL,NULL,NULL,NULL,NULL),(1418,72,'isni',0,41,0,0,1,NULL,NULL,NULL,NULL,NULL),(1419,72,'iso',0,42,0,0,1,NULL,NULL,NULL,NULL,NULL),(1420,72,'isrc',0,43,0,0,1,NULL,NULL,NULL,NULL,NULL),(1421,72,'issn',0,44,0,0,1,NULL,NULL,NULL,NULL,NULL),(1422,72,'issn-l',0,45,0,0,1,NULL,NULL,NULL,NULL,NULL),(1423,72,'issue-number',0,46,0,0,1,NULL,NULL,NULL,NULL,NULL),(1424,72,'istc',0,47,0,0,1,NULL,NULL,NULL,NULL,NULL),(1425,72,'iswc',0,48,0,0,1,NULL,NULL,NULL,NULL,NULL),(1426,72,'itar',0,49,0,0,1,NULL,NULL,NULL,NULL,NULL),(1427,72,'kinopo',0,50,0,0,1,NULL,NULL,NULL,NULL,NULL),(1428,72,'lccn',0,51,0,0,1,NULL,NULL,NULL,NULL,NULL),(1429,72,'lcmd',0,52,0,0,1,NULL,NULL,NULL,NULL,NULL),(1430,72,'lcmpt',0,53,0,0,1,NULL,NULL,NULL,NULL,NULL),(1431,72,'libaus',0,54,0,0,1,NULL,NULL,NULL,NULL,NULL),(1432,72,'local',0,55,0,0,1,NULL,NULL,NULL,NULL,NULL),(1433,72,'matrix-number',0,56,0,0,1,NULL,NULL,NULL,NULL,NULL),(1434,72,'moma',0,57,0,0,1,NULL,NULL,NULL,NULL,NULL),(1435,72,'munzing',0,58,0,0,1,NULL,NULL,NULL,NULL,NULL),(1436,72,'music-plate',0,59,0,0,1,NULL,NULL,NULL,NULL,NULL),(1437,72,'music-publisher',0,60,0,0,1,NULL,NULL,NULL,NULL,NULL),(1438,72,'musicb',0,61,0,0,1,NULL,NULL,NULL,NULL,NULL),(1439,72,'natgazfid',0,62,0,0,1,NULL,NULL,NULL,NULL,NULL),(1440,72,'nga',0,63,0,0,1,NULL,NULL,NULL,NULL,NULL),(1441,72,'nipo',0,64,0,0,1,NULL,NULL,NULL,NULL,NULL),(1442,72,'nndb',0,65,0,0,1,NULL,NULL,NULL,NULL,NULL),(1443,72,'npg',0,66,0,0,1,NULL,NULL,NULL,NULL,NULL),(1444,72,'odnb',0,67,0,0,1,NULL,NULL,NULL,NULL,NULL),(1445,72,'opensm',0,68,0,0,1,NULL,NULL,NULL,NULL,NULL),(1446,72,'orcid',0,69,0,0,1,NULL,NULL,NULL,NULL,NULL),(1447,72,'oxforddnb',0,70,0,0,1,NULL,NULL,NULL,NULL,NULL),(1448,72,'porthu',0,71,0,0,1,NULL,NULL,NULL,NULL,NULL),(1449,72,'rbmsbt',0,72,0,0,1,NULL,NULL,NULL,NULL,NULL),(1450,72,'rbmsgt',0,73,0,0,1,NULL,NULL,NULL,NULL,NULL),(1451,72,'rbmspe',0,74,0,0,1,NULL,NULL,NULL,NULL,NULL),(1452,72,'rbmsppe',0,75,0,0,1,NULL,NULL,NULL,NULL,NULL),(1453,72,'rbmspt',0,76,0,0,1,NULL,NULL,NULL,NULL,NULL),(1454,72,'rbmsrd',0,77,0,0,1,NULL,NULL,NULL,NULL,NULL),(1455,72,'rbmste',0,78,0,0,1,NULL,NULL,NULL,NULL,NULL),(1456,72,'rid',0,79,0,0,1,NULL,NULL,NULL,NULL,NULL),(1457,72,'rkda',0,80,0,0,1,NULL,NULL,NULL,NULL,NULL),(1458,72,'saam',0,81,0,0,1,NULL,NULL,NULL,NULL,NULL),(1459,72,'scholaru',0,82,0,0,1,NULL,NULL,NULL,NULL,NULL),(1460,72,'scope',0,83,0,0,1,NULL,NULL,NULL,NULL,NULL),(1461,72,'scopus',0,84,0,0,1,NULL,NULL,NULL,NULL,NULL),(1462,72,'sici',0,85,0,0,1,NULL,NULL,NULL,NULL,NULL),(1463,72,'spotify',0,86,0,0,1,NULL,NULL,NULL,NULL,NULL),(1464,72,'sprfbsb',0,87,0,0,1,NULL,NULL,NULL,NULL,NULL),(1465,72,'sprfbsk',0,88,0,0,1,NULL,NULL,NULL,NULL,NULL),(1466,72,'sprfcbb',0,89,0,0,1,NULL,NULL,NULL,NULL,NULL),(1467,72,'sprfcfb',0,90,0,0,1,NULL,NULL,NULL,NULL,NULL),(1468,72,'sprfhoc',0,91,0,0,1,NULL,NULL,NULL,NULL,NULL),(1469,72,'sprfoly',0,92,0,0,1,NULL,NULL,NULL,NULL,NULL),(1470,72,'sprfpfb',0,93,0,0,1,NULL,NULL,NULL,NULL,NULL),(1471,72,'stock-number',0,94,0,0,1,NULL,NULL,NULL,NULL,NULL),(1472,72,'strn',0,95,0,0,1,NULL,NULL,NULL,NULL,NULL),(1473,72,'svfilm',0,96,0,0,1,NULL,NULL,NULL,NULL,NULL),(1474,72,'tatearid',0,97,0,0,1,NULL,NULL,NULL,NULL,NULL),(1475,72,'theatr',0,98,0,0,1,NULL,NULL,NULL,NULL,NULL),(1476,72,'trove',0,99,0,0,1,NULL,NULL,NULL,NULL,NULL),(1477,72,'upc',0,100,0,0,1,NULL,NULL,NULL,NULL,NULL),(1478,72,'uri',0,101,0,0,1,NULL,NULL,NULL,NULL,NULL),(1479,72,'urn',0,102,0,0,1,NULL,NULL,NULL,NULL,NULL),(1480,72,'viaf',0,103,0,0,1,NULL,NULL,NULL,NULL,NULL),(1481,72,'videorecording-identifier',0,104,0,0,1,NULL,NULL,NULL,NULL,NULL),(1482,72,'wikidata',0,105,0,0,1,NULL,NULL,NULL,NULL,NULL),(1483,72,'wndla',0,106,0,0,1,NULL,NULL,NULL,NULL,NULL),(1484,73,'donor',0,0,0,0,1,NULL,NULL,NULL,NULL,NULL),(1485,73,'policy',0,1,0,0,1,NULL,NULL,NULL,NULL,NULL); +/*!40000 ALTER TABLE `enumeration_value` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `event` +-- + +DROP TABLE IF EXISTS `event`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `event` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `suppressed` int(11) NOT NULL DEFAULT '0', + `repo_id` int(11) NOT NULL, + `event_type_id` int(11) NOT NULL, + `outcome_id` int(11) DEFAULT NULL, + `outcome_note` varchar(17408) DEFAULT NULL, + `timestamp` datetime DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `event_type_id` (`event_type_id`), + KEY `outcome_id` (`outcome_id`), + KEY `event_system_mtime_index` (`system_mtime`), + KEY `event_user_mtime_index` (`user_mtime`), + KEY `event_suppressed_index` (`suppressed`), + KEY `repo_id` (`repo_id`), + CONSTRAINT `event_ibfk_3` FOREIGN KEY (`repo_id`) REFERENCES `repository` (`id`), + CONSTRAINT `event_ibfk_1` FOREIGN KEY (`event_type_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `event_ibfk_2` FOREIGN KEY (`outcome_id`) REFERENCES `enumeration_value` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `event` +-- + +LOCK TABLES `event` WRITE; +/*!40000 ALTER TABLE `event` DISABLE KEYS */; +INSERT INTO `event` VALUES (1,0,1,0,1,295,NULL,NULL,'2017-10-10 13:57:47',NULL,NULL,'2017-10-10 13:57:47','2017-10-10 13:57:47','2017-10-10 13:57:47'),(2,0,1,0,1,295,NULL,NULL,'2017-10-10 13:57:47',NULL,NULL,'2017-10-10 13:57:47','2017-10-10 13:57:47','2017-10-10 13:57:47'); +/*!40000 ALTER TABLE `event` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `event_link_rlshp` +-- + +DROP TABLE IF EXISTS `event_link_rlshp`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `event_link_rlshp` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `accession_id` int(11) DEFAULT NULL, + `resource_id` int(11) DEFAULT NULL, + `archival_object_id` int(11) DEFAULT NULL, + `digital_object_id` int(11) DEFAULT NULL, + `digital_object_component_id` int(11) DEFAULT NULL, + `agent_person_id` int(11) DEFAULT NULL, + `agent_family_id` int(11) DEFAULT NULL, + `agent_corporate_entity_id` int(11) DEFAULT NULL, + `agent_software_id` int(11) DEFAULT NULL, + `event_id` int(11) DEFAULT NULL, + `aspace_relationship_position` int(11) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `role_id` int(11) DEFAULT NULL, + `suppressed` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `role_id` (`role_id`), + KEY `event_link_rlshp_system_mtime_index` (`system_mtime`), + KEY `event_link_rlshp_user_mtime_index` (`user_mtime`), + KEY `accession_id` (`accession_id`), + KEY `resource_id` (`resource_id`), + KEY `archival_object_id` (`archival_object_id`), + KEY `digital_object_id` (`digital_object_id`), + KEY `agent_person_id` (`agent_person_id`), + KEY `agent_family_id` (`agent_family_id`), + KEY `agent_corporate_entity_id` (`agent_corporate_entity_id`), + KEY `agent_software_id` (`agent_software_id`), + KEY `event_id` (`event_id`), + CONSTRAINT `event_link_rlshp_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `event_link_rlshp_ibfk_10` FOREIGN KEY (`event_id`) REFERENCES `event` (`id`), + CONSTRAINT `event_link_rlshp_ibfk_2` FOREIGN KEY (`accession_id`) REFERENCES `accession` (`id`), + CONSTRAINT `event_link_rlshp_ibfk_3` FOREIGN KEY (`resource_id`) REFERENCES `resource` (`id`), + CONSTRAINT `event_link_rlshp_ibfk_4` FOREIGN KEY (`archival_object_id`) REFERENCES `archival_object` (`id`), + CONSTRAINT `event_link_rlshp_ibfk_5` FOREIGN KEY (`digital_object_id`) REFERENCES `digital_object` (`id`), + CONSTRAINT `event_link_rlshp_ibfk_6` FOREIGN KEY (`agent_person_id`) REFERENCES `agent_person` (`id`), + CONSTRAINT `event_link_rlshp_ibfk_7` FOREIGN KEY (`agent_family_id`) REFERENCES `agent_family` (`id`), + CONSTRAINT `event_link_rlshp_ibfk_8` FOREIGN KEY (`agent_corporate_entity_id`) REFERENCES `agent_corporate_entity` (`id`), + CONSTRAINT `event_link_rlshp_ibfk_9` FOREIGN KEY (`agent_software_id`) REFERENCES `agent_software` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `event_link_rlshp` +-- + +LOCK TABLES `event_link_rlshp` WRITE; +/*!40000 ALTER TABLE `event_link_rlshp` DISABLE KEYS */; +/*!40000 ALTER TABLE `event_link_rlshp` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `extent` +-- + +DROP TABLE IF EXISTS `extent`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `extent` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `accession_id` int(11) DEFAULT NULL, + `deaccession_id` int(11) DEFAULT NULL, + `archival_object_id` int(11) DEFAULT NULL, + `resource_id` int(11) DEFAULT NULL, + `digital_object_id` int(11) DEFAULT NULL, + `digital_object_component_id` int(11) DEFAULT NULL, + `portion_id` int(11) NOT NULL, + `number` varchar(255) NOT NULL, + `extent_type_id` int(11) NOT NULL, + `container_summary` text, + `physical_details` text, + `dimensions` varchar(255) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `extent_type_id` (`extent_type_id`), + KEY `extent_system_mtime_index` (`system_mtime`), + KEY `extent_user_mtime_index` (`user_mtime`), + KEY `accession_id` (`accession_id`), + KEY `archival_object_id` (`archival_object_id`), + KEY `resource_id` (`resource_id`), + KEY `deaccession_id` (`deaccession_id`), + KEY `digital_object_id` (`digital_object_id`), + KEY `digital_object_component_id` (`digital_object_component_id`), + CONSTRAINT `extent_ibfk_7` FOREIGN KEY (`digital_object_component_id`) REFERENCES `digital_object_component` (`id`), + CONSTRAINT `extent_ibfk_1` FOREIGN KEY (`extent_type_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `extent_ibfk_2` FOREIGN KEY (`accession_id`) REFERENCES `accession` (`id`), + CONSTRAINT `extent_ibfk_3` FOREIGN KEY (`archival_object_id`) REFERENCES `archival_object` (`id`), + CONSTRAINT `extent_ibfk_4` FOREIGN KEY (`resource_id`) REFERENCES `resource` (`id`), + CONSTRAINT `extent_ibfk_5` FOREIGN KEY (`deaccession_id`) REFERENCES `deaccession` (`id`), + CONSTRAINT `extent_ibfk_6` FOREIGN KEY (`digital_object_id`) REFERENCES `digital_object` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `extent` +-- + +LOCK TABLES `extent` WRITE; +/*!40000 ALTER TABLE `extent` DISABLE KEYS */; +/*!40000 ALTER TABLE `extent` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `external_document` +-- + +DROP TABLE IF EXISTS `external_document`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `external_document` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `title` varchar(8704) NOT NULL, + `location` varchar(8704) NOT NULL, + `publish` int(11) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `location_sha1` varchar(255) DEFAULT NULL, + `accession_id` int(11) DEFAULT NULL, + `archival_object_id` int(11) DEFAULT NULL, + `resource_id` int(11) DEFAULT NULL, + `subject_id` int(11) DEFAULT NULL, + `agent_person_id` int(11) DEFAULT NULL, + `agent_family_id` int(11) DEFAULT NULL, + `agent_corporate_entity_id` int(11) DEFAULT NULL, + `agent_software_id` int(11) DEFAULT NULL, + `rights_statement_id` int(11) DEFAULT NULL, + `digital_object_id` int(11) DEFAULT NULL, + `digital_object_component_id` int(11) DEFAULT NULL, + `event_id` int(11) DEFAULT NULL, + `identifier_type_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uniq_exdoc_acc` (`accession_id`,`location_sha1`), + UNIQUE KEY `uniq_exdoc_arc_obj` (`archival_object_id`,`location_sha1`), + UNIQUE KEY `uniq_exdoc_res` (`resource_id`,`location_sha1`), + UNIQUE KEY `uniq_exdoc_sub` (`subject_id`,`location_sha1`), + UNIQUE KEY `uniq_exdoc_age_per` (`agent_person_id`,`location_sha1`), + UNIQUE KEY `uniq_exdoc_age_fam` (`agent_family_id`,`location_sha1`), + UNIQUE KEY `uniq_exdoc_age_cor_ent` (`agent_corporate_entity_id`,`location_sha1`), + UNIQUE KEY `uniq_exdoc_age_sof` (`agent_software_id`,`location_sha1`), + UNIQUE KEY `uniq_exdoc_rig_sta` (`rights_statement_id`,`location_sha1`), + UNIQUE KEY `uniq_exdoc_dig_obj` (`digital_object_id`,`location_sha1`), + UNIQUE KEY `uniq_exdoc_dig_obj_com` (`digital_object_component_id`,`location_sha1`), + KEY `external_document_system_mtime_index` (`system_mtime`), + KEY `external_document_user_mtime_index` (`user_mtime`), + KEY `event_external_document_fk` (`event_id`), + KEY `external_document_identifier_type_id_fk` (`identifier_type_id`), + CONSTRAINT `external_document_identifier_type_id_fk` FOREIGN KEY (`identifier_type_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `event_external_document_fk` FOREIGN KEY (`event_id`) REFERENCES `event` (`id`), + CONSTRAINT `external_document_ibfk_1` FOREIGN KEY (`accession_id`) REFERENCES `accession` (`id`), + CONSTRAINT `external_document_ibfk_10` FOREIGN KEY (`digital_object_id`) REFERENCES `digital_object` (`id`), + CONSTRAINT `external_document_ibfk_11` FOREIGN KEY (`digital_object_component_id`) REFERENCES `digital_object_component` (`id`), + CONSTRAINT `external_document_ibfk_2` FOREIGN KEY (`archival_object_id`) REFERENCES `archival_object` (`id`), + CONSTRAINT `external_document_ibfk_3` FOREIGN KEY (`resource_id`) REFERENCES `resource` (`id`), + CONSTRAINT `external_document_ibfk_4` FOREIGN KEY (`subject_id`) REFERENCES `subject` (`id`), + CONSTRAINT `external_document_ibfk_5` FOREIGN KEY (`agent_person_id`) REFERENCES `agent_person` (`id`), + CONSTRAINT `external_document_ibfk_6` FOREIGN KEY (`agent_family_id`) REFERENCES `agent_family` (`id`), + CONSTRAINT `external_document_ibfk_7` FOREIGN KEY (`agent_corporate_entity_id`) REFERENCES `agent_corporate_entity` (`id`), + CONSTRAINT `external_document_ibfk_8` FOREIGN KEY (`agent_software_id`) REFERENCES `agent_software` (`id`), + CONSTRAINT `external_document_ibfk_9` FOREIGN KEY (`rights_statement_id`) REFERENCES `rights_statement` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `external_document` +-- + +LOCK TABLES `external_document` WRITE; +/*!40000 ALTER TABLE `external_document` DISABLE KEYS */; +/*!40000 ALTER TABLE `external_document` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `external_id` +-- + +DROP TABLE IF EXISTS `external_id`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `external_id` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `external_id` varchar(255) NOT NULL, + `source` varchar(255) NOT NULL, + `subject_id` int(11) DEFAULT NULL, + `accession_id` int(11) DEFAULT NULL, + `archival_object_id` int(11) DEFAULT NULL, + `collection_management_id` int(11) DEFAULT NULL, + `digital_object_id` int(11) DEFAULT NULL, + `digital_object_component_id` int(11) DEFAULT NULL, + `event_id` int(11) DEFAULT NULL, + `location_id` int(11) DEFAULT NULL, + `resource_id` int(11) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `external_id_system_mtime_index` (`system_mtime`), + KEY `external_id_user_mtime_index` (`user_mtime`), + KEY `subject_id` (`subject_id`), + KEY `accession_id` (`accession_id`), + KEY `archival_object_id` (`archival_object_id`), + KEY `collection_management_id` (`collection_management_id`), + KEY `digital_object_id` (`digital_object_id`), + KEY `digital_object_component_id` (`digital_object_component_id`), + KEY `event_id` (`event_id`), + KEY `location_id` (`location_id`), + KEY `resource_id` (`resource_id`), + CONSTRAINT `external_id_ibfk_9` FOREIGN KEY (`resource_id`) REFERENCES `resource` (`id`), + CONSTRAINT `external_id_ibfk_1` FOREIGN KEY (`subject_id`) REFERENCES `subject` (`id`), + CONSTRAINT `external_id_ibfk_2` FOREIGN KEY (`accession_id`) REFERENCES `accession` (`id`), + CONSTRAINT `external_id_ibfk_3` FOREIGN KEY (`archival_object_id`) REFERENCES `archival_object` (`id`), + CONSTRAINT `external_id_ibfk_4` FOREIGN KEY (`collection_management_id`) REFERENCES `collection_management` (`id`), + CONSTRAINT `external_id_ibfk_5` FOREIGN KEY (`digital_object_id`) REFERENCES `digital_object` (`id`), + CONSTRAINT `external_id_ibfk_6` FOREIGN KEY (`digital_object_component_id`) REFERENCES `digital_object_component` (`id`), + CONSTRAINT `external_id_ibfk_7` FOREIGN KEY (`event_id`) REFERENCES `event` (`id`), + CONSTRAINT `external_id_ibfk_8` FOREIGN KEY (`location_id`) REFERENCES `location` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `external_id` +-- + +LOCK TABLES `external_id` WRITE; +/*!40000 ALTER TABLE `external_id` DISABLE KEYS */; +/*!40000 ALTER TABLE `external_id` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `file_version` +-- + +DROP TABLE IF EXISTS `file_version`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `file_version` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `digital_object_id` int(11) DEFAULT NULL, + `digital_object_component_id` int(11) DEFAULT NULL, + `use_statement_id` int(11) DEFAULT NULL, + `checksum_method_id` int(11) DEFAULT NULL, + `file_uri` varchar(17408) NOT NULL, + `publish` int(11) DEFAULT NULL, + `xlink_actuate_attribute_id` int(11) DEFAULT NULL, + `xlink_show_attribute_id` int(11) DEFAULT NULL, + `file_format_name_id` int(11) DEFAULT NULL, + `file_format_version` varchar(255) DEFAULT NULL, + `file_size_bytes` int(11) DEFAULT NULL, + `checksum` varchar(255) DEFAULT NULL, + `checksum_method` varchar(255) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `is_representative` int(11) DEFAULT NULL, + `caption` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `digital_object_one_representative_file_version` (`is_representative`,`digital_object_id`), + KEY `use_statement_id` (`use_statement_id`), + KEY `checksum_method_id` (`checksum_method_id`), + KEY `xlink_actuate_attribute_id` (`xlink_actuate_attribute_id`), + KEY `xlink_show_attribute_id` (`xlink_show_attribute_id`), + KEY `file_format_name_id` (`file_format_name_id`), + KEY `file_version_system_mtime_index` (`system_mtime`), + KEY `file_version_user_mtime_index` (`user_mtime`), + KEY `digital_object_id` (`digital_object_id`), + KEY `digital_object_component_id` (`digital_object_component_id`), + CONSTRAINT `file_version_ibfk_1` FOREIGN KEY (`use_statement_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `file_version_ibfk_2` FOREIGN KEY (`checksum_method_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `file_version_ibfk_3` FOREIGN KEY (`xlink_actuate_attribute_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `file_version_ibfk_4` FOREIGN KEY (`xlink_show_attribute_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `file_version_ibfk_5` FOREIGN KEY (`file_format_name_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `file_version_ibfk_6` FOREIGN KEY (`digital_object_id`) REFERENCES `digital_object` (`id`), + CONSTRAINT `file_version_ibfk_7` FOREIGN KEY (`digital_object_component_id`) REFERENCES `digital_object_component` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `file_version` +-- + +LOCK TABLES `file_version` WRITE; +/*!40000 ALTER TABLE `file_version` DISABLE KEYS */; +/*!40000 ALTER TABLE `file_version` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `group` +-- + +DROP TABLE IF EXISTS `group`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `group` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `repo_id` int(11) NOT NULL, + `group_code` varchar(255) NOT NULL, + `group_code_norm` varchar(255) NOT NULL, + `description` text NOT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `group_uniq` (`repo_id`,`group_code_norm`), + KEY `group_system_mtime_index` (`system_mtime`), + KEY `group_user_mtime_index` (`user_mtime`), + CONSTRAINT `group_repo_id_fk` FOREIGN KEY (`repo_id`) REFERENCES `repository` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `group` +-- + +LOCK TABLES `group` WRITE; +/*!40000 ALTER TABLE `group` DISABLE KEYS */; +INSERT INTO `group` VALUES (1,0,1,1,'administrators','administrators','Administrators',NULL,NULL,'2017-10-10 13:57:47','2017-10-10 13:57:47','2017-10-10 13:57:47'),(2,0,1,1,'searchindex','searchindex','Search index',NULL,NULL,'2017-10-10 13:57:49','2017-10-10 13:57:49','2017-10-10 13:57:49'),(3,0,1,1,'publicanonymous','publicanonymous','Public Anonymous',NULL,NULL,'2017-10-10 13:57:49','2017-10-10 13:57:49','2017-10-10 13:57:49'),(4,0,1,1,'staffsystem','staffsystem','Staff System Group',NULL,NULL,'2017-10-10 13:57:49','2017-10-10 13:57:49','2017-10-10 13:57:49'); +/*!40000 ALTER TABLE `group` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `group_permission` +-- + +DROP TABLE IF EXISTS `group_permission`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `group_permission` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `permission_id` int(11) NOT NULL, + `group_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `group_permission_permission_id_group_id_index` (`permission_id`,`group_id`), + KEY `group_permission_permission_id_index` (`permission_id`), + KEY `group_permission_group_id_index` (`group_id`), + CONSTRAINT `group_permission_group_id_fk` FOREIGN KEY (`group_id`) REFERENCES `group` (`id`) ON DELETE CASCADE, + CONSTRAINT `group_permission_ibfk_1` FOREIGN KEY (`permission_id`) REFERENCES `permission` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `group_permission` +-- + +LOCK TABLES `group_permission` WRITE; +/*!40000 ALTER TABLE `group_permission` DISABLE KEYS */; +INSERT INTO `group_permission` VALUES (26,1,1),(27,2,1),(1,3,1),(2,4,1),(3,5,1),(4,6,1),(5,7,1),(40,7,2),(43,7,3),(6,8,1),(7,9,1),(8,10,1),(9,11,1),(41,11,2),(10,12,1),(11,13,1),(12,14,1),(13,15,1),(14,16,1),(15,17,1),(16,18,1),(17,19,1),(18,20,1),(19,21,1),(39,21,2),(20,22,1),(38,22,2),(42,22,3),(21,23,1),(22,24,1),(23,25,1),(44,25,4),(24,26,1),(25,27,1),(28,28,1),(29,29,1),(30,30,1),(31,31,1),(32,32,1),(33,33,1),(34,34,1),(35,35,1),(36,36,1),(37,37,1),(45,38,1),(46,39,1),(47,40,1); +/*!40000 ALTER TABLE `group_permission` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `group_user` +-- + +DROP TABLE IF EXISTS `group_user`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `group_user` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `group_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `group_user_group_id_index` (`group_id`), + KEY `group_user_user_id_index` (`user_id`), + CONSTRAINT `group_user_group_id_fk` FOREIGN KEY (`group_id`) REFERENCES `group` (`id`) ON DELETE CASCADE, + CONSTRAINT `group_user_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `group_user` +-- + +LOCK TABLES `group_user` WRITE; +/*!40000 ALTER TABLE `group_user` DISABLE KEYS */; +INSERT INTO `group_user` VALUES (1,1,1),(2,2,2),(3,3,3),(4,4,4); +/*!40000 ALTER TABLE `group_user` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `instance` +-- + +DROP TABLE IF EXISTS `instance`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `instance` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `resource_id` int(11) DEFAULT NULL, + `archival_object_id` int(11) DEFAULT NULL, + `accession_id` int(11) DEFAULT NULL, + `instance_type_id` int(11) NOT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `is_representative` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `resource_one_representative_instance` (`is_representative`,`resource_id`), + UNIQUE KEY `component_one_representative_instance` (`is_representative`,`archival_object_id`), + KEY `instance_type_id` (`instance_type_id`), + KEY `instance_system_mtime_index` (`system_mtime`), + KEY `instance_user_mtime_index` (`user_mtime`), + KEY `resource_id` (`resource_id`), + KEY `archival_object_id` (`archival_object_id`), + KEY `accession_id` (`accession_id`), + CONSTRAINT `instance_ibfk_1` FOREIGN KEY (`instance_type_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `instance_ibfk_2` FOREIGN KEY (`resource_id`) REFERENCES `resource` (`id`), + CONSTRAINT `instance_ibfk_3` FOREIGN KEY (`archival_object_id`) REFERENCES `archival_object` (`id`), + CONSTRAINT `instance_ibfk_4` FOREIGN KEY (`accession_id`) REFERENCES `accession` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `instance` +-- + +LOCK TABLES `instance` WRITE; +/*!40000 ALTER TABLE `instance` DISABLE KEYS */; +/*!40000 ALTER TABLE `instance` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `instance_do_link_rlshp` +-- + +DROP TABLE IF EXISTS `instance_do_link_rlshp`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `instance_do_link_rlshp` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `digital_object_id` int(11) DEFAULT NULL, + `instance_id` int(11) DEFAULT NULL, + `aspace_relationship_position` int(11) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `suppressed` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `instance_do_link_rlshp_system_mtime_index` (`system_mtime`), + KEY `instance_do_link_rlshp_user_mtime_index` (`user_mtime`), + KEY `digital_object_id` (`digital_object_id`), + KEY `instance_id` (`instance_id`), + CONSTRAINT `instance_do_link_rlshp_ibfk_1` FOREIGN KEY (`digital_object_id`) REFERENCES `digital_object` (`id`), + CONSTRAINT `instance_do_link_rlshp_ibfk_2` FOREIGN KEY (`instance_id`) REFERENCES `instance` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `instance_do_link_rlshp` +-- + +LOCK TABLES `instance_do_link_rlshp` WRITE; +/*!40000 ALTER TABLE `instance_do_link_rlshp` DISABLE KEYS */; +/*!40000 ALTER TABLE `instance_do_link_rlshp` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `job` +-- + +DROP TABLE IF EXISTS `job`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `job` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `repo_id` int(11) NOT NULL, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `job_blob` mediumblob NOT NULL, + `time_submitted` datetime NOT NULL, + `time_started` datetime DEFAULT NULL, + `time_finished` datetime DEFAULT NULL, + `owner_id` int(11) NOT NULL, + `status` varchar(255) NOT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `job_params` varchar(255) DEFAULT NULL, + `job_type` varchar(255) NOT NULL DEFAULT 'unknown_job_type', + PRIMARY KEY (`id`), + KEY `job_system_mtime_index` (`system_mtime`), + KEY `job_user_mtime_index` (`user_mtime`), + KEY `job_status_idx` (`status`), + KEY `job_repo_id_fk` (`repo_id`), + KEY `job_owner_id_fk` (`owner_id`), + CONSTRAINT `job_owner_id_fk` FOREIGN KEY (`owner_id`) REFERENCES `user` (`id`) ON DELETE CASCADE, + CONSTRAINT `job_repo_id_fk` FOREIGN KEY (`repo_id`) REFERENCES `repository` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `job` +-- + +LOCK TABLES `job` WRITE; +/*!40000 ALTER TABLE `job` DISABLE KEYS */; +/*!40000 ALTER TABLE `job` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `job_created_record` +-- + +DROP TABLE IF EXISTS `job_created_record`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `job_created_record` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `job_id` int(11) NOT NULL, + `record_uri` varchar(255) NOT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `job_created_record_system_mtime_index` (`system_mtime`), + KEY `job_created_record_user_mtime_index` (`user_mtime`), + KEY `job_created_record_job_id_fk` (`job_id`), + CONSTRAINT `job_created_record_job_id_fk` FOREIGN KEY (`job_id`) REFERENCES `job` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `job_created_record` +-- + +LOCK TABLES `job_created_record` WRITE; +/*!40000 ALTER TABLE `job_created_record` DISABLE KEYS */; +/*!40000 ALTER TABLE `job_created_record` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `job_input_file` +-- + +DROP TABLE IF EXISTS `job_input_file`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `job_input_file` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `job_id` int(11) NOT NULL, + `file_path` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + KEY `job_input_file_job_id_fk` (`job_id`), + CONSTRAINT `job_input_file_job_id_fk` FOREIGN KEY (`job_id`) REFERENCES `job` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `job_input_file` +-- + +LOCK TABLES `job_input_file` WRITE; +/*!40000 ALTER TABLE `job_input_file` DISABLE KEYS */; +/*!40000 ALTER TABLE `job_input_file` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `job_modified_record` +-- + +DROP TABLE IF EXISTS `job_modified_record`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `job_modified_record` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `job_id` int(11) NOT NULL, + `record_uri` varchar(255) NOT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `job_modified_record_system_mtime_index` (`system_mtime`), + KEY `job_modified_record_user_mtime_index` (`user_mtime`), + KEY `job_modified_record_job_id_fk` (`job_id`), + CONSTRAINT `job_modified_record_job_id_fk` FOREIGN KEY (`job_id`) REFERENCES `job` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `job_modified_record` +-- + +LOCK TABLES `job_modified_record` WRITE; +/*!40000 ALTER TABLE `job_modified_record` DISABLE KEYS */; +/*!40000 ALTER TABLE `job_modified_record` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `linked_agent_term` +-- + +DROP TABLE IF EXISTS `linked_agent_term`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `linked_agent_term` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `linked_agents_rlshp_id` int(11) NOT NULL, + `term_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `term_id` (`term_id`), + KEY `linked_agent_term_idx` (`linked_agents_rlshp_id`,`term_id`), + CONSTRAINT `linked_agent_term_ibfk_2` FOREIGN KEY (`term_id`) REFERENCES `term` (`id`), + CONSTRAINT `linked_agent_term_ibfk_1` FOREIGN KEY (`linked_agents_rlshp_id`) REFERENCES `linked_agents_rlshp` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `linked_agent_term` +-- + +LOCK TABLES `linked_agent_term` WRITE; +/*!40000 ALTER TABLE `linked_agent_term` DISABLE KEYS */; +/*!40000 ALTER TABLE `linked_agent_term` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `linked_agents_rlshp` +-- + +DROP TABLE IF EXISTS `linked_agents_rlshp`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `linked_agents_rlshp` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `agent_person_id` int(11) DEFAULT NULL, + `agent_software_id` int(11) DEFAULT NULL, + `agent_family_id` int(11) DEFAULT NULL, + `agent_corporate_entity_id` int(11) DEFAULT NULL, + `accession_id` int(11) DEFAULT NULL, + `archival_object_id` int(11) DEFAULT NULL, + `digital_object_id` int(11) DEFAULT NULL, + `digital_object_component_id` int(11) DEFAULT NULL, + `event_id` int(11) DEFAULT NULL, + `resource_id` int(11) DEFAULT NULL, + `aspace_relationship_position` int(11) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `role_id` int(11) DEFAULT NULL, + `relator_id` int(11) DEFAULT NULL, + `title` varchar(8704) DEFAULT NULL, + `suppressed` int(11) NOT NULL DEFAULT '0', + `rights_statement_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `role_id` (`role_id`), + KEY `relator_id` (`relator_id`), + KEY `linked_agents_rlshp_system_mtime_index` (`system_mtime`), + KEY `linked_agents_rlshp_user_mtime_index` (`user_mtime`), + KEY `agent_person_id` (`agent_person_id`), + KEY `agent_software_id` (`agent_software_id`), + KEY `agent_family_id` (`agent_family_id`), + KEY `agent_corporate_entity_id` (`agent_corporate_entity_id`), + KEY `accession_id` (`accession_id`), + KEY `archival_object_id` (`archival_object_id`), + KEY `digital_object_id` (`digital_object_id`), + KEY `digital_object_component_id` (`digital_object_component_id`), + KEY `event_id` (`event_id`), + KEY `resource_id` (`resource_id`), + KEY `rights_statement_id` (`rights_statement_id`), + CONSTRAINT `linked_agents_rlshp_ibfk_13` FOREIGN KEY (`rights_statement_id`) REFERENCES `rights_statement` (`id`), + CONSTRAINT `linked_agents_rlshp_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `linked_agents_rlshp_ibfk_10` FOREIGN KEY (`digital_object_component_id`) REFERENCES `digital_object_component` (`id`), + CONSTRAINT `linked_agents_rlshp_ibfk_11` FOREIGN KEY (`event_id`) REFERENCES `event` (`id`), + CONSTRAINT `linked_agents_rlshp_ibfk_12` FOREIGN KEY (`resource_id`) REFERENCES `resource` (`id`), + CONSTRAINT `linked_agents_rlshp_ibfk_2` FOREIGN KEY (`relator_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `linked_agents_rlshp_ibfk_3` FOREIGN KEY (`agent_person_id`) REFERENCES `agent_person` (`id`), + CONSTRAINT `linked_agents_rlshp_ibfk_4` FOREIGN KEY (`agent_software_id`) REFERENCES `agent_software` (`id`), + CONSTRAINT `linked_agents_rlshp_ibfk_5` FOREIGN KEY (`agent_family_id`) REFERENCES `agent_family` (`id`), + CONSTRAINT `linked_agents_rlshp_ibfk_6` FOREIGN KEY (`agent_corporate_entity_id`) REFERENCES `agent_corporate_entity` (`id`), + CONSTRAINT `linked_agents_rlshp_ibfk_7` FOREIGN KEY (`accession_id`) REFERENCES `accession` (`id`), + CONSTRAINT `linked_agents_rlshp_ibfk_8` FOREIGN KEY (`archival_object_id`) REFERENCES `archival_object` (`id`), + CONSTRAINT `linked_agents_rlshp_ibfk_9` FOREIGN KEY (`digital_object_id`) REFERENCES `digital_object` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `linked_agents_rlshp` +-- + +LOCK TABLES `linked_agents_rlshp` WRITE; +/*!40000 ALTER TABLE `linked_agents_rlshp` DISABLE KEYS */; +/*!40000 ALTER TABLE `linked_agents_rlshp` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `location` +-- + +DROP TABLE IF EXISTS `location`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `location` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `building` varchar(255) NOT NULL, + `title` varchar(8704) DEFAULT NULL, + `floor` varchar(255) DEFAULT NULL, + `room` varchar(255) DEFAULT NULL, + `area` varchar(255) DEFAULT NULL, + `barcode` varchar(255) DEFAULT NULL, + `classification` varchar(255) DEFAULT NULL, + `coordinate_1_label` varchar(255) DEFAULT NULL, + `coordinate_1_indicator` varchar(255) DEFAULT NULL, + `coordinate_2_label` varchar(255) DEFAULT NULL, + `coordinate_2_indicator` varchar(255) DEFAULT NULL, + `coordinate_3_label` varchar(255) DEFAULT NULL, + `coordinate_3_indicator` varchar(255) DEFAULT NULL, + `temporary_id` int(11) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `temporary_id` (`temporary_id`), + KEY `location_system_mtime_index` (`system_mtime`), + KEY `location_user_mtime_index` (`user_mtime`), + CONSTRAINT `location_ibfk_1` FOREIGN KEY (`temporary_id`) REFERENCES `enumeration_value` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `location` +-- + +LOCK TABLES `location` WRITE; +/*!40000 ALTER TABLE `location` DISABLE KEYS */; +/*!40000 ALTER TABLE `location` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `location_function` +-- + +DROP TABLE IF EXISTS `location_function`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `location_function` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `location_id` int(11) DEFAULT NULL, + `location_function_type_id` int(11) NOT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `location_function_type_id` (`location_function_type_id`), + KEY `location_function_system_mtime_index` (`system_mtime`), + KEY `location_function_user_mtime_index` (`user_mtime`), + KEY `location_id` (`location_id`), + CONSTRAINT `location_function_ibfk_2` FOREIGN KEY (`location_id`) REFERENCES `location` (`id`), + CONSTRAINT `location_function_ibfk_1` FOREIGN KEY (`location_function_type_id`) REFERENCES `enumeration_value` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `location_function` +-- + +LOCK TABLES `location_function` WRITE; +/*!40000 ALTER TABLE `location_function` DISABLE KEYS */; +/*!40000 ALTER TABLE `location_function` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `location_profile` +-- + +DROP TABLE IF EXISTS `location_profile`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `location_profile` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `name` varchar(255) DEFAULT NULL, + `dimension_units_id` int(11) DEFAULT NULL, + `height` varchar(255) DEFAULT NULL, + `width` varchar(255) DEFAULT NULL, + `depth` varchar(255) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `location_profile_name_uniq` (`name`), + KEY `dimension_units_id` (`dimension_units_id`), + KEY `location_profile_system_mtime_index` (`system_mtime`), + KEY `location_profile_user_mtime_index` (`user_mtime`), + CONSTRAINT `location_profile_ibfk_1` FOREIGN KEY (`dimension_units_id`) REFERENCES `enumeration_value` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `location_profile` +-- + +LOCK TABLES `location_profile` WRITE; +/*!40000 ALTER TABLE `location_profile` DISABLE KEYS */; +/*!40000 ALTER TABLE `location_profile` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `location_profile_rlshp` +-- + +DROP TABLE IF EXISTS `location_profile_rlshp`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `location_profile_rlshp` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `location_id` int(11) DEFAULT NULL, + `location_profile_id` int(11) DEFAULT NULL, + `aspace_relationship_position` int(11) DEFAULT NULL, + `suppressed` int(11) NOT NULL DEFAULT '0', + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `location_profile_rlshp_system_mtime_index` (`system_mtime`), + KEY `location_profile_rlshp_user_mtime_index` (`user_mtime`), + KEY `location_id` (`location_id`), + KEY `location_profile_id` (`location_profile_id`), + CONSTRAINT `location_profile_rlshp_ibfk_2` FOREIGN KEY (`location_profile_id`) REFERENCES `location_profile` (`id`), + CONSTRAINT `location_profile_rlshp_ibfk_1` FOREIGN KEY (`location_id`) REFERENCES `location` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `location_profile_rlshp` +-- + +LOCK TABLES `location_profile_rlshp` WRITE; +/*!40000 ALTER TABLE `location_profile_rlshp` DISABLE KEYS */; +/*!40000 ALTER TABLE `location_profile_rlshp` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `name_authority_id` +-- + +DROP TABLE IF EXISTS `name_authority_id`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `name_authority_id` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `name_person_id` int(11) DEFAULT NULL, + `name_family_id` int(11) DEFAULT NULL, + `name_software_id` int(11) DEFAULT NULL, + `name_corporate_entity_id` int(11) DEFAULT NULL, + `authority_id` varchar(255) NOT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `authority_id` (`authority_id`), + KEY `name_authority_id_system_mtime_index` (`system_mtime`), + KEY `name_authority_id_user_mtime_index` (`user_mtime`), + KEY `name_person_id` (`name_person_id`), + KEY `name_family_id` (`name_family_id`), + KEY `name_software_id` (`name_software_id`), + KEY `name_corporate_entity_id` (`name_corporate_entity_id`), + CONSTRAINT `name_authority_id_ibfk_4` FOREIGN KEY (`name_corporate_entity_id`) REFERENCES `name_corporate_entity` (`id`), + CONSTRAINT `name_authority_id_ibfk_1` FOREIGN KEY (`name_person_id`) REFERENCES `name_person` (`id`), + CONSTRAINT `name_authority_id_ibfk_2` FOREIGN KEY (`name_family_id`) REFERENCES `name_family` (`id`), + CONSTRAINT `name_authority_id_ibfk_3` FOREIGN KEY (`name_software_id`) REFERENCES `name_software` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `name_authority_id` +-- + +LOCK TABLES `name_authority_id` WRITE; +/*!40000 ALTER TABLE `name_authority_id` DISABLE KEYS */; +/*!40000 ALTER TABLE `name_authority_id` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `name_corporate_entity` +-- + +DROP TABLE IF EXISTS `name_corporate_entity`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `name_corporate_entity` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `agent_corporate_entity_id` int(11) NOT NULL, + `primary_name` text NOT NULL, + `subordinate_name_1` text, + `subordinate_name_2` text, + `number` varchar(255) DEFAULT NULL, + `dates` varchar(255) DEFAULT NULL, + `qualifier` text, + `source_id` int(11) DEFAULT NULL, + `rules_id` int(11) DEFAULT NULL, + `sort_name` text NOT NULL, + `sort_name_auto_generate` int(11) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `authorized` int(11) DEFAULT NULL, + `is_display_name` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `corporate_entity_one_authorized` (`authorized`,`agent_corporate_entity_id`), + UNIQUE KEY `corporate_entity_one_display_name` (`is_display_name`,`agent_corporate_entity_id`), + KEY `source_id` (`source_id`), + KEY `rules_id` (`rules_id`), + KEY `name_corporate_entity_system_mtime_index` (`system_mtime`), + KEY `name_corporate_entity_user_mtime_index` (`user_mtime`), + KEY `agent_corporate_entity_id` (`agent_corporate_entity_id`), + CONSTRAINT `name_corporate_entity_ibfk_1` FOREIGN KEY (`source_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `name_corporate_entity_ibfk_2` FOREIGN KEY (`rules_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `name_corporate_entity_ibfk_3` FOREIGN KEY (`agent_corporate_entity_id`) REFERENCES `agent_corporate_entity` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `name_corporate_entity` +-- + +LOCK TABLES `name_corporate_entity` WRITE; +/*!40000 ALTER TABLE `name_corporate_entity` DISABLE KEYS */; +/*!40000 ALTER TABLE `name_corporate_entity` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `name_family` +-- + +DROP TABLE IF EXISTS `name_family`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `name_family` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `agent_family_id` int(11) NOT NULL, + `family_name` text NOT NULL, + `prefix` text, + `dates` varchar(255) DEFAULT NULL, + `qualifier` text, + `source_id` int(11) DEFAULT NULL, + `rules_id` int(11) DEFAULT NULL, + `sort_name` text NOT NULL, + `sort_name_auto_generate` int(11) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `authorized` int(11) DEFAULT NULL, + `is_display_name` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `family_one_authorized` (`authorized`,`agent_family_id`), + UNIQUE KEY `family_one_display_name` (`is_display_name`,`agent_family_id`), + KEY `source_id` (`source_id`), + KEY `rules_id` (`rules_id`), + KEY `name_family_system_mtime_index` (`system_mtime`), + KEY `name_family_user_mtime_index` (`user_mtime`), + KEY `agent_family_id` (`agent_family_id`), + CONSTRAINT `name_family_ibfk_1` FOREIGN KEY (`source_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `name_family_ibfk_2` FOREIGN KEY (`rules_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `name_family_ibfk_3` FOREIGN KEY (`agent_family_id`) REFERENCES `agent_family` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `name_family` +-- + +LOCK TABLES `name_family` WRITE; +/*!40000 ALTER TABLE `name_family` DISABLE KEYS */; +/*!40000 ALTER TABLE `name_family` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `name_person` +-- + +DROP TABLE IF EXISTS `name_person`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `name_person` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `agent_person_id` int(11) NOT NULL, + `primary_name` varchar(255) NOT NULL, + `name_order_id` int(11) NOT NULL, + `title` varchar(8704) DEFAULT NULL, + `prefix` text, + `rest_of_name` text, + `suffix` text, + `fuller_form` text, + `number` varchar(255) DEFAULT NULL, + `dates` varchar(255) DEFAULT NULL, + `qualifier` text, + `source_id` int(11) DEFAULT NULL, + `rules_id` int(11) DEFAULT NULL, + `sort_name` text NOT NULL, + `sort_name_auto_generate` int(11) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `authorized` int(11) DEFAULT NULL, + `is_display_name` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `person_one_authorized` (`authorized`,`agent_person_id`), + UNIQUE KEY `person_one_display_name` (`is_display_name`,`agent_person_id`), + KEY `name_order_id` (`name_order_id`), + KEY `source_id` (`source_id`), + KEY `rules_id` (`rules_id`), + KEY `name_person_system_mtime_index` (`system_mtime`), + KEY `name_person_user_mtime_index` (`user_mtime`), + KEY `agent_person_id` (`agent_person_id`), + CONSTRAINT `name_person_ibfk_1` FOREIGN KEY (`name_order_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `name_person_ibfk_2` FOREIGN KEY (`source_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `name_person_ibfk_3` FOREIGN KEY (`rules_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `name_person_ibfk_4` FOREIGN KEY (`agent_person_id`) REFERENCES `agent_person` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `name_person` +-- + +LOCK TABLES `name_person` WRITE; +/*!40000 ALTER TABLE `name_person` DISABLE KEYS */; +INSERT INTO `name_person` VALUES (1,0,1,1,'Administrator',947,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,236,240,'Administrator',1,NULL,NULL,'2017-10-10 13:57:47','2017-10-10 13:57:47','2017-10-10 13:57:47',1,1); +/*!40000 ALTER TABLE `name_person` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `name_software` +-- + +DROP TABLE IF EXISTS `name_software`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `name_software` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `agent_software_id` int(11) NOT NULL, + `software_name` text NOT NULL, + `version` text, + `manufacturer` text, + `dates` varchar(255) DEFAULT NULL, + `qualifier` text, + `source_id` int(11) DEFAULT NULL, + `rules_id` int(11) DEFAULT NULL, + `sort_name` text NOT NULL, + `sort_name_auto_generate` int(11) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `authorized` int(11) DEFAULT NULL, + `is_display_name` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `software_one_authorized` (`authorized`,`agent_software_id`), + UNIQUE KEY `software_one_display_name` (`is_display_name`,`agent_software_id`), + KEY `source_id` (`source_id`), + KEY `rules_id` (`rules_id`), + KEY `name_software_system_mtime_index` (`system_mtime`), + KEY `name_software_user_mtime_index` (`user_mtime`), + KEY `agent_software_id` (`agent_software_id`), + CONSTRAINT `name_software_ibfk_1` FOREIGN KEY (`source_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `name_software_ibfk_2` FOREIGN KEY (`rules_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `name_software_ibfk_3` FOREIGN KEY (`agent_software_id`) REFERENCES `agent_software` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `name_software` +-- + +LOCK TABLES `name_software` WRITE; +/*!40000 ALTER TABLE `name_software` DISABLE KEYS */; +INSERT INTO `name_software` VALUES (1,1,1,1,'ArchivesSpace','v2.2.0-RC1',NULL,NULL,NULL,236,240,'ArchivesSpace windows_install_fix',1,NULL,NULL,'2017-10-10 13:57:47','2017-10-10 14:08:02','2017-10-10 13:57:47',1,1); +/*!40000 ALTER TABLE `name_software` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `note` +-- + +DROP TABLE IF EXISTS `note`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `note` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '1', + `resource_id` int(11) DEFAULT NULL, + `archival_object_id` int(11) DEFAULT NULL, + `digital_object_id` int(11) DEFAULT NULL, + `digital_object_component_id` int(11) DEFAULT NULL, + `agent_person_id` int(11) DEFAULT NULL, + `agent_corporate_entity_id` int(11) DEFAULT NULL, + `agent_family_id` int(11) DEFAULT NULL, + `agent_software_id` int(11) DEFAULT NULL, + `publish` int(11) DEFAULT NULL, + `notes_json_schema_version` int(11) NOT NULL, + `notes` mediumblob NOT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `rights_statement_act_id` int(11) DEFAULT NULL, + `rights_statement_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `note_system_mtime_index` (`system_mtime`), + KEY `note_user_mtime_index` (`user_mtime`), + KEY `resource_id` (`resource_id`), + KEY `archival_object_id` (`archival_object_id`), + KEY `digital_object_id` (`digital_object_id`), + KEY `digital_object_component_id` (`digital_object_component_id`), + KEY `agent_person_id` (`agent_person_id`), + KEY `agent_corporate_entity_id` (`agent_corporate_entity_id`), + KEY `agent_family_id` (`agent_family_id`), + KEY `agent_software_id` (`agent_software_id`), + KEY `rights_statement_act_id` (`rights_statement_act_id`), + KEY `rights_statement_id` (`rights_statement_id`), + CONSTRAINT `note_ibfk_10` FOREIGN KEY (`rights_statement_id`) REFERENCES `rights_statement` (`id`), + CONSTRAINT `note_ibfk_1` FOREIGN KEY (`resource_id`) REFERENCES `resource` (`id`), + CONSTRAINT `note_ibfk_2` FOREIGN KEY (`archival_object_id`) REFERENCES `archival_object` (`id`), + CONSTRAINT `note_ibfk_3` FOREIGN KEY (`digital_object_id`) REFERENCES `digital_object` (`id`), + CONSTRAINT `note_ibfk_4` FOREIGN KEY (`digital_object_component_id`) REFERENCES `digital_object_component` (`id`), + CONSTRAINT `note_ibfk_5` FOREIGN KEY (`agent_person_id`) REFERENCES `agent_person` (`id`), + CONSTRAINT `note_ibfk_6` FOREIGN KEY (`agent_corporate_entity_id`) REFERENCES `agent_corporate_entity` (`id`), + CONSTRAINT `note_ibfk_7` FOREIGN KEY (`agent_family_id`) REFERENCES `agent_family` (`id`), + CONSTRAINT `note_ibfk_8` FOREIGN KEY (`agent_software_id`) REFERENCES `agent_software` (`id`), + CONSTRAINT `note_ibfk_9` FOREIGN KEY (`rights_statement_act_id`) REFERENCES `rights_statement_act` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `note` +-- + +LOCK TABLES `note` WRITE; +/*!40000 ALTER TABLE `note` DISABLE KEYS */; +/*!40000 ALTER TABLE `note` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `note_persistent_id` +-- + +DROP TABLE IF EXISTS `note_persistent_id`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `note_persistent_id` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `note_id` int(11) NOT NULL, + `persistent_id` varchar(255) NOT NULL, + `parent_type` varchar(255) NOT NULL, + `parent_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `note_id` (`note_id`), + CONSTRAINT `note_persistent_id_ibfk_1` FOREIGN KEY (`note_id`) REFERENCES `note` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `note_persistent_id` +-- + +LOCK TABLES `note_persistent_id` WRITE; +/*!40000 ALTER TABLE `note_persistent_id` DISABLE KEYS */; +/*!40000 ALTER TABLE `note_persistent_id` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `notification` +-- + +DROP TABLE IF EXISTS `notification`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `notification` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `time` datetime NOT NULL, + `code` varchar(255) NOT NULL, + `params` blob NOT NULL, + PRIMARY KEY (`id`), + KEY `notification_time_index` (`time`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `notification` +-- + +LOCK TABLES `notification` WRITE; +/*!40000 ALTER TABLE `notification` DISABLE KEYS */; +INSERT INTO `notification` VALUES (4,'2017-10-10 14:08:06','BACKEND_STARTED','{}'); +/*!40000 ALTER TABLE `notification` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `owner_repo_rlshp` +-- + +DROP TABLE IF EXISTS `owner_repo_rlshp`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `owner_repo_rlshp` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `location_id` int(11) DEFAULT NULL, + `repository_id` int(11) DEFAULT NULL, + `aspace_relationship_position` int(11) DEFAULT NULL, + `suppressed` int(11) NOT NULL DEFAULT '0', + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `owner_repo_rlshp_system_mtime_index` (`system_mtime`), + KEY `owner_repo_rlshp_user_mtime_index` (`user_mtime`), + KEY `location_id` (`location_id`), + KEY `repository_id` (`repository_id`), + CONSTRAINT `owner_repo_rlshp_ibfk_2` FOREIGN KEY (`repository_id`) REFERENCES `repository` (`id`), + CONSTRAINT `owner_repo_rlshp_ibfk_1` FOREIGN KEY (`location_id`) REFERENCES `location` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `owner_repo_rlshp` +-- + +LOCK TABLES `owner_repo_rlshp` WRITE; +/*!40000 ALTER TABLE `owner_repo_rlshp` DISABLE KEYS */; +/*!40000 ALTER TABLE `owner_repo_rlshp` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `permission` +-- + +DROP TABLE IF EXISTS `permission`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `permission` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `permission_code` varchar(255) DEFAULT NULL, + `description` text NOT NULL, + `level` varchar(255) DEFAULT 'repository', + `system` int(11) NOT NULL DEFAULT '0', + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `permission_code` (`permission_code`), + KEY `permission_system_mtime_index` (`system_mtime`), + KEY `permission_user_mtime_index` (`user_mtime`) +) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `permission` +-- + +LOCK TABLES `permission` WRITE; +/*!40000 ALTER TABLE `permission` DISABLE KEYS */; +INSERT INTO `permission` VALUES (1,'create_job','The ability to create background jobs','repository',0,'admin','admin','2017-10-10 13:56:08','2017-10-10 13:56:08','2017-10-10 13:56:08'),(2,'cancel_job','The ability to cancel background jobs','repository',0,'admin','admin','2017-10-10 13:56:08','2017-10-10 13:56:08','2017-10-10 13:56:08'),(3,'system_config','The ability to manage system configuration options','global',0,NULL,NULL,'2017-10-10 13:57:47','2017-10-10 13:57:47','2017-10-10 13:57:47'),(4,'administer_system','The ability to act as a system administrator','global',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(5,'manage_users','The ability to manage user accounts while logged in','global',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(6,'become_user','The ability to masquerade as another user','global',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(7,'view_all_records','The ability to view any record in the system','global',1,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(8,'create_repository','The ability to create new repositories','global',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(9,'delete_repository','The ability to delete a repository','global',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(10,'transfer_repository','The ability to transfer the contents of a repository','repository',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(11,'index_system','The ability to read any record for indexing','global',1,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(12,'manage_repository','The ability to manage a given repository','repository',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(13,'update_accession_record','The ability to create and modify accessions records','repository',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(14,'update_resource_record','The ability to create and modify resources records','repository',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(15,'update_digital_object_record','The ability to create and modify digital objects records','repository',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(16,'update_event_record','The ability to create and modify event records','repository',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(17,'delete_event_record','The ability to delete event records','repository',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(18,'suppress_archival_record','The ability to suppress the major archival record types: accessions/resources/digital objects/components/collection management/events','repository',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(19,'transfer_archival_record','The ability to transfer records between different repositories','repository',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(20,'delete_archival_record','The ability to delete the major archival record types: accessions/resources/digital objects/components/collection management/events','repository',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(21,'view_suppressed','The ability to view suppressed records in a given repository','repository',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(22,'view_repository','The ability to view a given repository','repository',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(23,'update_classification_record','The ability to create and modify classification records','repository',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(24,'delete_classification_record','The ability to delete classification records','repository',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(25,'mediate_edits','Track concurrent updates to records','global',1,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(26,'import_records','The ability to initiate an importer job','repository',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(27,'cancel_importer_job','The ability to cancel a queued or running importer job','repository',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(28,'manage_subject_record','The ability to create, modify and delete a subject record','repository',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(29,'manage_agent_record','The ability to create, modify and delete an agent record','repository',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(30,'manage_vocabulary_record','The ability to create, modify and delete a vocabulary record','repository',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(31,'merge_agents_and_subjects','The ability to merge agent/subject records','repository',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(32,'merge_archival_record','The ability to merge archival records records','repository',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(33,'manage_rde_templates','The ability to create and delete RDE templates','repository',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(34,'update_container_record','The ability to create and update container records','repository',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(35,'manage_container_record','The ability to delete and bulk update container records','repository',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(36,'manage_container_profile_record','The ability to create, modify and delete a container profile record','repository',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(37,'manage_location_profile_record','The ability to create, modify and delete a location profile record','repository',0,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 13:57:48','2017-10-10 13:57:48'),(38,'update_assessment_record','The ability to create and modify assessment records','repository',0,NULL,NULL,'2017-10-10 14:08:04','2017-10-10 14:08:04','2017-10-10 14:08:04'),(39,'delete_assessment_record','The ability to delete assessment records','repository',0,NULL,NULL,'2017-10-10 14:08:04','2017-10-10 14:08:04','2017-10-10 14:08:04'),(40,'manage_assessment_attributes','The ability to managae assessment attribute definitions','repository',0,NULL,NULL,'2017-10-10 14:08:04','2017-10-10 14:08:04','2017-10-10 14:08:04'); +/*!40000 ALTER TABLE `permission` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `preference` +-- + +DROP TABLE IF EXISTS `preference`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `preference` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `repo_id` int(11) NOT NULL, + `user_id` int(11) DEFAULT NULL, + `user_uniq` varchar(255) NOT NULL, + `defaults` mediumblob NOT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `preference_uniq` (`repo_id`,`user_uniq`), + KEY `preference_system_mtime_index` (`system_mtime`), + KEY `preference_user_mtime_index` (`user_mtime`), + KEY `preference_user_id_fk` (`user_id`), + CONSTRAINT `preference_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE, + CONSTRAINT `preference_repo_id_fk` FOREIGN KEY (`repo_id`) REFERENCES `repository` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `preference` +-- + +LOCK TABLES `preference` WRITE; +/*!40000 ALTER TABLE `preference` DISABLE KEYS */; +INSERT INTO `preference` VALUES (1,0,1,1,NULL,'GLOBAL_USER','{}',NULL,NULL,'2017-10-10 13:57:49','2017-10-10 13:57:49','2017-10-10 13:57:49'); +/*!40000 ALTER TABLE `preference` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rde_template` +-- + +DROP TABLE IF EXISTS `rde_template`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rde_template` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `record_type` varchar(255) NOT NULL, + `name` varchar(255) NOT NULL, + `order` blob, + `visible` blob, + `defaults` blob, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `rde_template_system_mtime_index` (`system_mtime`), + KEY `rde_template_user_mtime_index` (`user_mtime`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rde_template` +-- + +LOCK TABLES `rde_template` WRITE; +/*!40000 ALTER TABLE `rde_template` DISABLE KEYS */; +/*!40000 ALTER TABLE `rde_template` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `related_accession_rlshp` +-- + +DROP TABLE IF EXISTS `related_accession_rlshp`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `related_accession_rlshp` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `accession_id_0` int(11) DEFAULT NULL, + `accession_id_1` int(11) DEFAULT NULL, + `suppressed` int(11) NOT NULL DEFAULT '0', + `relator_id` int(11) NOT NULL, + `relator_type_id` int(11) NOT NULL, + `relationship_target_record_type` varchar(255) NOT NULL, + `relationship_target_id` int(11) NOT NULL, + `jsonmodel_type` varchar(255) NOT NULL, + `aspace_relationship_position` int(11) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `relator_id` (`relator_id`), + KEY `relator_type_id` (`relator_type_id`), + KEY `related_accession_rlshp_system_mtime_index` (`system_mtime`), + KEY `related_accession_rlshp_user_mtime_index` (`user_mtime`), + KEY `accession_id_0` (`accession_id_0`), + KEY `accession_id_1` (`accession_id_1`), + CONSTRAINT `related_accession_rlshp_ibfk_4` FOREIGN KEY (`accession_id_1`) REFERENCES `accession` (`id`), + CONSTRAINT `related_accession_rlshp_ibfk_1` FOREIGN KEY (`relator_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `related_accession_rlshp_ibfk_2` FOREIGN KEY (`relator_type_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `related_accession_rlshp_ibfk_3` FOREIGN KEY (`accession_id_0`) REFERENCES `accession` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `related_accession_rlshp` +-- + +LOCK TABLES `related_accession_rlshp` WRITE; +/*!40000 ALTER TABLE `related_accession_rlshp` DISABLE KEYS */; +/*!40000 ALTER TABLE `related_accession_rlshp` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `related_agents_rlshp` +-- + +DROP TABLE IF EXISTS `related_agents_rlshp`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `related_agents_rlshp` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `agent_person_id_0` int(11) DEFAULT NULL, + `agent_person_id_1` int(11) DEFAULT NULL, + `agent_corporate_entity_id_0` int(11) DEFAULT NULL, + `agent_corporate_entity_id_1` int(11) DEFAULT NULL, + `agent_software_id_0` int(11) DEFAULT NULL, + `agent_software_id_1` int(11) DEFAULT NULL, + `agent_family_id_0` int(11) DEFAULT NULL, + `agent_family_id_1` int(11) DEFAULT NULL, + `relator` varchar(255) NOT NULL, + `jsonmodel_type` varchar(255) NOT NULL, + `description` text, + `aspace_relationship_position` int(11) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `suppressed` int(11) NOT NULL DEFAULT '0', + `relationship_target_record_type` varchar(255) NOT NULL, + `relationship_target_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `related_agents_rlshp_system_mtime_index` (`system_mtime`), + KEY `related_agents_rlshp_user_mtime_index` (`user_mtime`), + KEY `agent_person_id_0` (`agent_person_id_0`), + KEY `agent_person_id_1` (`agent_person_id_1`), + KEY `agent_corporate_entity_id_0` (`agent_corporate_entity_id_0`), + KEY `agent_corporate_entity_id_1` (`agent_corporate_entity_id_1`), + KEY `agent_software_id_0` (`agent_software_id_0`), + KEY `agent_software_id_1` (`agent_software_id_1`), + KEY `agent_family_id_0` (`agent_family_id_0`), + KEY `agent_family_id_1` (`agent_family_id_1`), + CONSTRAINT `related_agents_rlshp_ibfk_1` FOREIGN KEY (`agent_person_id_0`) REFERENCES `agent_person` (`id`), + CONSTRAINT `related_agents_rlshp_ibfk_2` FOREIGN KEY (`agent_person_id_1`) REFERENCES `agent_person` (`id`), + CONSTRAINT `related_agents_rlshp_ibfk_3` FOREIGN KEY (`agent_corporate_entity_id_0`) REFERENCES `agent_corporate_entity` (`id`), + CONSTRAINT `related_agents_rlshp_ibfk_4` FOREIGN KEY (`agent_corporate_entity_id_1`) REFERENCES `agent_corporate_entity` (`id`), + CONSTRAINT `related_agents_rlshp_ibfk_5` FOREIGN KEY (`agent_software_id_0`) REFERENCES `agent_software` (`id`), + CONSTRAINT `related_agents_rlshp_ibfk_6` FOREIGN KEY (`agent_software_id_1`) REFERENCES `agent_software` (`id`), + CONSTRAINT `related_agents_rlshp_ibfk_7` FOREIGN KEY (`agent_family_id_0`) REFERENCES `agent_family` (`id`), + CONSTRAINT `related_agents_rlshp_ibfk_8` FOREIGN KEY (`agent_family_id_1`) REFERENCES `agent_family` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `related_agents_rlshp` +-- + +LOCK TABLES `related_agents_rlshp` WRITE; +/*!40000 ALTER TABLE `related_agents_rlshp` DISABLE KEYS */; +/*!40000 ALTER TABLE `related_agents_rlshp` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `repository` +-- + +DROP TABLE IF EXISTS `repository`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `repository` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `repo_code` varchar(255) NOT NULL, + `name` varchar(255) NOT NULL, + `org_code` varchar(255) DEFAULT NULL, + `parent_institution_name` varchar(255) DEFAULT NULL, + `url` varchar(255) DEFAULT NULL, + `image_url` varchar(255) DEFAULT NULL, + `contact_persons` text, + `country_id` int(11) DEFAULT NULL, + `agent_representation_id` int(11) DEFAULT NULL, + `hidden` int(11) DEFAULT '0', + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `publish` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `repo_code` (`repo_code`), + KEY `country_id` (`country_id`), + KEY `repository_system_mtime_index` (`system_mtime`), + KEY `repository_user_mtime_index` (`user_mtime`), + KEY `agent_representation_id` (`agent_representation_id`), + CONSTRAINT `repository_ibfk_1` FOREIGN KEY (`country_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `repository_ibfk_2` FOREIGN KEY (`agent_representation_id`) REFERENCES `agent_corporate_entity` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `repository` +-- + +LOCK TABLES `repository` WRITE; +/*!40000 ALTER TABLE `repository` DISABLE KEYS */; +INSERT INTO `repository` VALUES (1,0,1,'_archivesspace','Global repository',NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,'2017-10-10 13:57:47','2017-10-10 13:57:47','2017-10-10 13:57:47',NULL); +/*!40000 ALTER TABLE `repository` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `resource` +-- + +DROP TABLE IF EXISTS `resource`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `resource` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `repo_id` int(11) NOT NULL, + `accession_id` int(11) DEFAULT NULL, + `title` varchar(8704) NOT NULL, + `identifier` varchar(255) DEFAULT NULL, + `language_id` int(11) DEFAULT NULL, + `level_id` int(11) NOT NULL, + `other_level` varchar(255) DEFAULT NULL, + `resource_type_id` int(11) DEFAULT NULL, + `publish` int(11) DEFAULT NULL, + `restrictions` int(11) DEFAULT NULL, + `repository_processing_note` text, + `ead_id` varchar(255) DEFAULT NULL, + `ead_location` varchar(255) DEFAULT NULL, + `finding_aid_title` text, + `finding_aid_filing_title` text, + `finding_aid_date` varchar(255) DEFAULT NULL, + `finding_aid_author` text, + `finding_aid_description_rules_id` int(11) DEFAULT NULL, + `finding_aid_language` varchar(255) DEFAULT NULL, + `finding_aid_sponsor` text, + `finding_aid_edition_statement` text, + `finding_aid_series_statement` text, + `finding_aid_status_id` int(11) DEFAULT NULL, + `finding_aid_note` text, + `system_generated` int(11) DEFAULT '0', + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `suppressed` int(11) NOT NULL DEFAULT '0', + `finding_aid_subtitle` text, + `finding_aid_sponsor_sha1` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `resource_unique_identifier` (`repo_id`,`identifier`), + UNIQUE KEY `resource_unique_ead_id` (`repo_id`,`ead_id`), + KEY `language_id` (`language_id`), + KEY `level_id` (`level_id`), + KEY `resource_type_id` (`resource_type_id`), + KEY `finding_aid_description_rules_id` (`finding_aid_description_rules_id`), + KEY `finding_aid_status_id` (`finding_aid_status_id`), + KEY `resource_system_mtime_index` (`system_mtime`), + KEY `resource_user_mtime_index` (`user_mtime`), + KEY `accession_id` (`accession_id`), + CONSTRAINT `resource_ibfk_1` FOREIGN KEY (`language_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `resource_ibfk_2` FOREIGN KEY (`level_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `resource_ibfk_3` FOREIGN KEY (`resource_type_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `resource_ibfk_4` FOREIGN KEY (`finding_aid_description_rules_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `resource_ibfk_5` FOREIGN KEY (`finding_aid_status_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `resource_ibfk_6` FOREIGN KEY (`repo_id`) REFERENCES `repository` (`id`), + CONSTRAINT `resource_ibfk_7` FOREIGN KEY (`accession_id`) REFERENCES `accession` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `resource` +-- + +LOCK TABLES `resource` WRITE; +/*!40000 ALTER TABLE `resource` DISABLE KEYS */; +/*!40000 ALTER TABLE `resource` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `revision_statement` +-- + +DROP TABLE IF EXISTS `revision_statement`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `revision_statement` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `resource_id` int(11) DEFAULT NULL, + `date` varchar(255) DEFAULT NULL, + `description` text, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `revision_statement_system_mtime_index` (`system_mtime`), + KEY `revision_statement_user_mtime_index` (`user_mtime`), + KEY `resource_id` (`resource_id`), + CONSTRAINT `revision_statement_ibfk_1` FOREIGN KEY (`resource_id`) REFERENCES `resource` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `revision_statement` +-- + +LOCK TABLES `revision_statement` WRITE; +/*!40000 ALTER TABLE `revision_statement` DISABLE KEYS */; +/*!40000 ALTER TABLE `revision_statement` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rights_restriction` +-- + +DROP TABLE IF EXISTS `rights_restriction`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rights_restriction` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `resource_id` int(11) DEFAULT NULL, + `archival_object_id` int(11) DEFAULT NULL, + `restriction_note_type` varchar(255) DEFAULT NULL, + `begin` date DEFAULT NULL, + `end` date DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `resource_id` (`resource_id`), + KEY `archival_object_id` (`archival_object_id`), + CONSTRAINT `rights_restriction_ibfk_2` FOREIGN KEY (`archival_object_id`) REFERENCES `archival_object` (`id`), + CONSTRAINT `rights_restriction_ibfk_1` FOREIGN KEY (`resource_id`) REFERENCES `resource` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rights_restriction` +-- + +LOCK TABLES `rights_restriction` WRITE; +/*!40000 ALTER TABLE `rights_restriction` DISABLE KEYS */; +/*!40000 ALTER TABLE `rights_restriction` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rights_restriction_type` +-- + +DROP TABLE IF EXISTS `rights_restriction_type`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rights_restriction_type` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `rights_restriction_id` int(11) NOT NULL, + `restriction_type_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `restriction_type_id` (`restriction_type_id`), + KEY `rights_restriction_id` (`rights_restriction_id`), + CONSTRAINT `rights_restriction_type_ibfk_2` FOREIGN KEY (`rights_restriction_id`) REFERENCES `rights_restriction` (`id`) ON DELETE CASCADE, + CONSTRAINT `rights_restriction_type_ibfk_1` FOREIGN KEY (`restriction_type_id`) REFERENCES `enumeration_value` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rights_restriction_type` +-- + +LOCK TABLES `rights_restriction_type` WRITE; +/*!40000 ALTER TABLE `rights_restriction_type` DISABLE KEYS */; +/*!40000 ALTER TABLE `rights_restriction_type` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rights_statement` +-- + +DROP TABLE IF EXISTS `rights_statement`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rights_statement` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `accession_id` int(11) DEFAULT NULL, + `archival_object_id` int(11) DEFAULT NULL, + `resource_id` int(11) DEFAULT NULL, + `digital_object_id` int(11) DEFAULT NULL, + `digital_object_component_id` int(11) DEFAULT NULL, + `repo_id` int(11) DEFAULT NULL, + `identifier` varchar(255) NOT NULL, + `rights_type_id` int(11) NOT NULL, + `statute_citation` varchar(255) DEFAULT NULL, + `jurisdiction_id` int(11) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `status_id` int(11) DEFAULT NULL, + `start_date` date DEFAULT NULL, + `end_date` date DEFAULT NULL, + `determination_date` date DEFAULT NULL, + `license_terms` varchar(255) DEFAULT NULL, + `other_rights_basis_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `rights_type_id` (`rights_type_id`), + KEY `jurisdiction_id` (`jurisdiction_id`), + KEY `rights_statement_system_mtime_index` (`system_mtime`), + KEY `rights_statement_user_mtime_index` (`user_mtime`), + KEY `accession_id` (`accession_id`), + KEY `archival_object_id` (`archival_object_id`), + KEY `resource_id` (`resource_id`), + KEY `digital_object_id` (`digital_object_id`), + KEY `digital_object_component_id` (`digital_object_component_id`), + KEY `rights_statement_status_id_fk` (`status_id`), + KEY `rights_statement_other_rights_basis_id_fk` (`other_rights_basis_id`), + CONSTRAINT `rights_statement_ibfk_1` FOREIGN KEY (`rights_type_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `rights_statement_ibfk_3` FOREIGN KEY (`jurisdiction_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `rights_statement_ibfk_4` FOREIGN KEY (`accession_id`) REFERENCES `accession` (`id`), + CONSTRAINT `rights_statement_ibfk_5` FOREIGN KEY (`archival_object_id`) REFERENCES `archival_object` (`id`), + CONSTRAINT `rights_statement_ibfk_6` FOREIGN KEY (`resource_id`) REFERENCES `resource` (`id`), + CONSTRAINT `rights_statement_ibfk_7` FOREIGN KEY (`digital_object_id`) REFERENCES `digital_object` (`id`), + CONSTRAINT `rights_statement_ibfk_8` FOREIGN KEY (`digital_object_component_id`) REFERENCES `digital_object_component` (`id`), + CONSTRAINT `rights_statement_other_rights_basis_id_fk` FOREIGN KEY (`other_rights_basis_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `rights_statement_status_id_fk` FOREIGN KEY (`status_id`) REFERENCES `enumeration_value` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rights_statement` +-- + +LOCK TABLES `rights_statement` WRITE; +/*!40000 ALTER TABLE `rights_statement` DISABLE KEYS */; +/*!40000 ALTER TABLE `rights_statement` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rights_statement_act` +-- + +DROP TABLE IF EXISTS `rights_statement_act`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rights_statement_act` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `rights_statement_id` int(11) NOT NULL, + `act_type_id` int(11) NOT NULL, + `restriction_id` int(11) NOT NULL, + `start_date` date NOT NULL, + `end_date` date DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `act_type_id` (`act_type_id`), + KEY `restriction_id` (`restriction_id`), + KEY `rights_statement_act_system_mtime_index` (`system_mtime`), + KEY `rights_statement_act_user_mtime_index` (`user_mtime`), + KEY `rights_statement_id` (`rights_statement_id`), + CONSTRAINT `rights_statement_act_ibfk_3` FOREIGN KEY (`rights_statement_id`) REFERENCES `rights_statement` (`id`), + CONSTRAINT `rights_statement_act_ibfk_1` FOREIGN KEY (`act_type_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `rights_statement_act_ibfk_2` FOREIGN KEY (`restriction_id`) REFERENCES `enumeration_value` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rights_statement_act` +-- + +LOCK TABLES `rights_statement_act` WRITE; +/*!40000 ALTER TABLE `rights_statement_act` DISABLE KEYS */; +/*!40000 ALTER TABLE `rights_statement_act` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rights_statement_pre_088` +-- + +DROP TABLE IF EXISTS `rights_statement_pre_088`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rights_statement_pre_088` ( + `id` int(11) NOT NULL DEFAULT '0', + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `accession_id` int(11) DEFAULT NULL, + `archival_object_id` int(11) DEFAULT NULL, + `resource_id` int(11) DEFAULT NULL, + `digital_object_id` int(11) DEFAULT NULL, + `digital_object_component_id` int(11) DEFAULT NULL, + `repo_id` int(11) DEFAULT NULL, + `identifier` varchar(255) NOT NULL, + `rights_type_id` int(11) NOT NULL, + `active` int(11) DEFAULT NULL, + `materials` varchar(255) DEFAULT NULL, + `ip_status_id` int(11) DEFAULT NULL, + `ip_expiration_date` date DEFAULT NULL, + `license_identifier_terms` varchar(255) DEFAULT NULL, + `statute_citation` varchar(255) DEFAULT NULL, + `jurisdiction_id` int(11) DEFAULT NULL, + `type_note` varchar(255) DEFAULT NULL, + `permissions` text, + `restrictions` text, + `restriction_start_date` date DEFAULT NULL, + `restriction_end_date` date DEFAULT NULL, + `granted_note` varchar(255) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `agent_person_id` int(11) DEFAULT NULL, + `agent_family_id` int(11) DEFAULT NULL, + `agent_corporate_entity_id` int(11) DEFAULT NULL, + `agent_software_id` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rights_statement_pre_088` +-- + +LOCK TABLES `rights_statement_pre_088` WRITE; +/*!40000 ALTER TABLE `rights_statement_pre_088` DISABLE KEYS */; +/*!40000 ALTER TABLE `rights_statement_pre_088` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `schema_info` +-- + +DROP TABLE IF EXISTS `schema_info`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `schema_info` ( + `version` int(11) NOT NULL DEFAULT '0' +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `schema_info` +-- + +LOCK TABLES `schema_info` WRITE; +/*!40000 ALTER TABLE `schema_info` DISABLE KEYS */; +INSERT INTO `schema_info` VALUES (93); +/*!40000 ALTER TABLE `schema_info` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `sequence` +-- + +DROP TABLE IF EXISTS `sequence`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `sequence` ( + `sequence_name` varchar(255) NOT NULL, + `value` int(11) NOT NULL, + PRIMARY KEY (`sequence_name`), + KEY `sequence_namevalue_idx` (`sequence_name`,`value`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `sequence` +-- + +LOCK TABLES `sequence` WRITE; +/*!40000 ALTER TABLE `sequence` DISABLE KEYS */; +/*!40000 ALTER TABLE `sequence` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `session` +-- + +DROP TABLE IF EXISTS `session`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `session` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `session_id` varchar(255) NOT NULL, + `system_mtime` datetime NOT NULL, + `expirable` int(11) DEFAULT '1', + `session_data` blob, + PRIMARY KEY (`id`), + UNIQUE KEY `session_id` (`session_id`), + KEY `session_system_mtime_index` (`system_mtime`) +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `session` +-- + +LOCK TABLES `session` WRITE; +/*!40000 ALTER TABLE `session` DISABLE KEYS */; +INSERT INTO `session` VALUES (1,'a44be4f8775c9ebac37e26313ba7127efc6aadc7','2017-10-10 14:06:30',0,'BAh7CDoJdXNlckkiE3NlYXJjaF9pbmRleGVyBjoGRVQ6D2xvZ2luX3RpbWVJ\ndToJVGltZQ1NZR2AmHsq6Qg6DXN1Ym1pY3JvIgYAOgtvZmZzZXRp/sDHOgl6\nb25lSSIIRURUBjsGVDoOZXhwaXJhYmxlRg==\n'),(2,'9d7ec0fa93b4449f0d7e08272e8b03b61e4d6add','2017-10-10 14:06:35',0,'BAh7CDoJdXNlckkiE3NlYXJjaF9pbmRleGVyBjoGRVQ6D2xvZ2luX3RpbWVJ\ndToJVGltZQ1NZR2AWN956Qg6DXN1Ym1pY3JvIgYAOgtvZmZzZXRp/sDHOgl6\nb25lSSIIRURUBjsGVDoOZXhwaXJhYmxlRg==\n'),(3,'1e94d00e8cd8c54d4031625e5b48001a0ab40fb9','2017-10-10 14:06:30',0,'BAh7CDoJdXNlckkiE3NlYXJjaF9pbmRleGVyBjoGRVQ6D2xvZ2luX3RpbWVJ\ndToJVGltZQ1NZR2AsPoJ6wg6DXN1Ym1pY3JvIgYAOgtvZmZzZXRp/sDHOgl6\nb25lSSIIRURUBjsGVDoOZXhwaXJhYmxlRg==\n'),(4,'d1131a0c2dd4fbb78c7f6eccb368fb253b58c118','2017-10-10 14:06:45',0,'BAh7CDoJdXNlckkiEXN0YWZmX3N5c3RlbQY6BkVUOg9sb2dpbl90aW1lSXU6\nCVRpbWUNTWUdgKA+3e0IOg1zdWJtaWNybyIGADoLb2Zmc2V0af7AxzoJem9u\nZUkiCEVEVAY7BlQ6DmV4cGlyYWJsZUY=\n'),(5,'363ad5fdc3af9471fd89668bdf6c13ce9c63f162','2017-10-10 14:38:14',0,'BAh7CDoJdXNlckkiE3NlYXJjaF9pbmRleGVyBjoGRVQ6D2xvZ2luX3RpbWVJ\ndToJVGltZQ1OZR2AyJEFIgg6DXN1Ym1pY3JvIgYAOgtvZmZzZXRp/sDHOgl6\nb25lSSIIRURUBjsGVDoOZXhwaXJhYmxlRg==\n'),(6,'5cb5083f04e6a256a56eadc510b095ee7a67b91a','2017-10-10 14:37:44',0,'BAh7CDoJdXNlckkiE3NlYXJjaF9pbmRleGVyBjoGRVQ6D2xvZ2luX3RpbWVJ\ndToJVGltZQ1OZR2AYNJUIgg6DXN1Ym1pY3JvIgYAOgtvZmZzZXRp/sDHOgl6\nb25lSSIIRURUBjsGVDoOZXhwaXJhYmxlRg==\n'),(7,'2f4647dbfac1cb9818b1c1fa74009f694b19281e','2017-10-10 14:38:14',0,'BAh7CDoJdXNlckkiE3NlYXJjaF9pbmRleGVyBjoGRVQ6D2xvZ2luX3RpbWVJ\ndToJVGltZQ1OZR2AsJskJAg6DXN1Ym1pY3JvIgYAOgtvZmZzZXRp/sDHOgl6\nb25lSSIIRURUBjsGVDoOZXhwaXJhYmxlRg==\n'),(8,'e20610a5232bfe781cad24a7c596e0e6ec5a7ed1','2017-10-10 14:38:14',0,'BAh7CDoJdXNlckkiEXN0YWZmX3N5c3RlbQY6BkVUOg9sb2dpbl90aW1lSXU6\nCVRpbWUNTmUdgKg9hiYIOg1zdWJtaWNybyIGADoLb2Zmc2V0af7AxzoJem9u\nZUkiCEVEVAY7BlQ6DmV4cGlyYWJsZUY=\n'),(9,'79715b34a26582ae49e73916b47b457b7cf3536c','2017-10-10 14:17:58',0,'BAh7CDoJdXNlckkiCmFkbWluBjoGRVQ6D2xvZ2luX3RpbWVJdToJVGltZQ1O\nZR2AiFqJRwg6DXN1Ym1pY3JvIgYAOgtvZmZzZXRp/sDHOgl6b25lSSIIRURU\nBjsGVDoOZXhwaXJhYmxlRg==\n'),(10,'d031205406c3fc050b634ce3cae57495d59ed77e','2017-10-10 14:24:37',0,'BAh7CDoJdXNlckkiCmFkbWluBjoGRVQ6D2xvZ2luX3RpbWVJdToJVGltZQ1O\nZR2AUCJGYgg6DXN1Ym1pY3JvIgYAOgtvZmZzZXRp/sDHOgl6b25lSSIIRURU\nBjsGVDoOZXhwaXJhYmxlRg==\n'); +/*!40000 ALTER TABLE `session` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `spawned_rlshp` +-- + +DROP TABLE IF EXISTS `spawned_rlshp`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `spawned_rlshp` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `accession_id` int(11) DEFAULT NULL, + `resource_id` int(11) DEFAULT NULL, + `aspace_relationship_position` int(11) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `suppressed` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `spawned_rlshp_system_mtime_index` (`system_mtime`), + KEY `spawned_rlshp_user_mtime_index` (`user_mtime`), + KEY `accession_id` (`accession_id`), + KEY `resource_id` (`resource_id`), + CONSTRAINT `spawned_rlshp_ibfk_1` FOREIGN KEY (`accession_id`) REFERENCES `accession` (`id`), + CONSTRAINT `spawned_rlshp_ibfk_2` FOREIGN KEY (`resource_id`) REFERENCES `resource` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `spawned_rlshp` +-- + +LOCK TABLES `spawned_rlshp` WRITE; +/*!40000 ALTER TABLE `spawned_rlshp` DISABLE KEYS */; +/*!40000 ALTER TABLE `spawned_rlshp` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `sub_container` +-- + +DROP TABLE IF EXISTS `sub_container`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `sub_container` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `instance_id` int(11) DEFAULT NULL, + `type_2_id` int(11) DEFAULT NULL, + `indicator_2` varchar(255) DEFAULT NULL, + `type_3_id` int(11) DEFAULT NULL, + `indicator_3` varchar(255) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `type_2_id` (`type_2_id`), + KEY `type_3_id` (`type_3_id`), + KEY `sub_container_system_mtime_index` (`system_mtime`), + KEY `sub_container_user_mtime_index` (`user_mtime`), + KEY `instance_id` (`instance_id`), + CONSTRAINT `sub_container_ibfk_3` FOREIGN KEY (`instance_id`) REFERENCES `instance` (`id`), + CONSTRAINT `sub_container_ibfk_1` FOREIGN KEY (`type_2_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `sub_container_ibfk_2` FOREIGN KEY (`type_3_id`) REFERENCES `enumeration_value` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `sub_container` +-- + +LOCK TABLES `sub_container` WRITE; +/*!40000 ALTER TABLE `sub_container` DISABLE KEYS */; +/*!40000 ALTER TABLE `sub_container` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `subject` +-- + +DROP TABLE IF EXISTS `subject`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `subject` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `vocab_id` int(11) NOT NULL, + `title` varchar(8704) DEFAULT NULL, + `terms_sha1` varchar(255) NOT NULL, + `authority_id` varchar(255) DEFAULT NULL, + `scope_note` text, + `source_id` int(11) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `subj_auth_source_uniq` (`vocab_id`,`authority_id`,`source_id`), + UNIQUE KEY `subj_terms_uniq` (`vocab_id`,`terms_sha1`,`source_id`), + KEY `source_id` (`source_id`), + KEY `subject_terms_sha1_index` (`terms_sha1`), + KEY `subject_system_mtime_index` (`system_mtime`), + KEY `subject_user_mtime_index` (`user_mtime`), + CONSTRAINT `subject_ibfk_2` FOREIGN KEY (`vocab_id`) REFERENCES `vocabulary` (`id`), + CONSTRAINT `subject_ibfk_1` FOREIGN KEY (`source_id`) REFERENCES `enumeration_value` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `subject` +-- + +LOCK TABLES `subject` WRITE; +/*!40000 ALTER TABLE `subject` DISABLE KEYS */; +/*!40000 ALTER TABLE `subject` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `subject_rlshp` +-- + +DROP TABLE IF EXISTS `subject_rlshp`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `subject_rlshp` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `accession_id` int(11) DEFAULT NULL, + `archival_object_id` int(11) DEFAULT NULL, + `resource_id` int(11) DEFAULT NULL, + `digital_object_id` int(11) DEFAULT NULL, + `digital_object_component_id` int(11) DEFAULT NULL, + `subject_id` int(11) DEFAULT NULL, + `aspace_relationship_position` int(11) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `suppressed` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `subject_rlshp_system_mtime_index` (`system_mtime`), + KEY `subject_rlshp_user_mtime_index` (`user_mtime`), + KEY `accession_id` (`accession_id`), + KEY `archival_object_id` (`archival_object_id`), + KEY `resource_id` (`resource_id`), + KEY `digital_object_id` (`digital_object_id`), + KEY `digital_object_component_id` (`digital_object_component_id`), + KEY `subject_id` (`subject_id`), + CONSTRAINT `subject_rlshp_ibfk_1` FOREIGN KEY (`accession_id`) REFERENCES `accession` (`id`), + CONSTRAINT `subject_rlshp_ibfk_2` FOREIGN KEY (`archival_object_id`) REFERENCES `archival_object` (`id`), + CONSTRAINT `subject_rlshp_ibfk_3` FOREIGN KEY (`resource_id`) REFERENCES `resource` (`id`), + CONSTRAINT `subject_rlshp_ibfk_4` FOREIGN KEY (`digital_object_id`) REFERENCES `digital_object` (`id`), + CONSTRAINT `subject_rlshp_ibfk_5` FOREIGN KEY (`digital_object_component_id`) REFERENCES `digital_object_component` (`id`), + CONSTRAINT `subject_rlshp_ibfk_6` FOREIGN KEY (`subject_id`) REFERENCES `subject` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `subject_rlshp` +-- + +LOCK TABLES `subject_rlshp` WRITE; +/*!40000 ALTER TABLE `subject_rlshp` DISABLE KEYS */; +/*!40000 ALTER TABLE `subject_rlshp` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `subject_term` +-- + +DROP TABLE IF EXISTS `subject_term`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `subject_term` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `subject_id` int(11) NOT NULL, + `term_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `term_id` (`term_id`), + KEY `subject_term_idx` (`subject_id`,`term_id`), + CONSTRAINT `subject_term_ibfk_2` FOREIGN KEY (`term_id`) REFERENCES `term` (`id`), + CONSTRAINT `subject_term_ibfk_1` FOREIGN KEY (`subject_id`) REFERENCES `subject` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `subject_term` +-- + +LOCK TABLES `subject_term` WRITE; +/*!40000 ALTER TABLE `subject_term` DISABLE KEYS */; +/*!40000 ALTER TABLE `subject_term` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `subnote_metadata` +-- + +DROP TABLE IF EXISTS `subnote_metadata`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `subnote_metadata` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `note_id` int(11) NOT NULL, + `guid` varchar(255) NOT NULL, + `publish` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `note_id` (`note_id`), + CONSTRAINT `subnote_metadata_ibfk_1` FOREIGN KEY (`note_id`) REFERENCES `note` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `subnote_metadata` +-- + +LOCK TABLES `subnote_metadata` WRITE; +/*!40000 ALTER TABLE `subnote_metadata` DISABLE KEYS */; +/*!40000 ALTER TABLE `subnote_metadata` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `surveyed_by_rlshp` +-- + +DROP TABLE IF EXISTS `surveyed_by_rlshp`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `surveyed_by_rlshp` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `assessment_id` int(11) NOT NULL, + `agent_person_id` int(11) DEFAULT NULL, + `aspace_relationship_position` int(11) DEFAULT NULL, + `suppressed` int(11) NOT NULL DEFAULT '0', + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `surveyed_by_rlshp_system_mtime_index` (`system_mtime`), + KEY `surveyed_by_rlshp_user_mtime_index` (`user_mtime`), + KEY `assessment_id` (`assessment_id`), + KEY `agent_person_id` (`agent_person_id`), + CONSTRAINT `surveyed_by_rlshp_ibfk_2` FOREIGN KEY (`agent_person_id`) REFERENCES `agent_person` (`id`), + CONSTRAINT `surveyed_by_rlshp_ibfk_1` FOREIGN KEY (`assessment_id`) REFERENCES `assessment` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `surveyed_by_rlshp` +-- + +LOCK TABLES `surveyed_by_rlshp` WRITE; +/*!40000 ALTER TABLE `surveyed_by_rlshp` DISABLE KEYS */; +/*!40000 ALTER TABLE `surveyed_by_rlshp` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `system_event` +-- + +DROP TABLE IF EXISTS `system_event`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `system_event` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(255) DEFAULT NULL, + `time` datetime NOT NULL, + `message` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `system_event_time_index` (`time`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `system_event` +-- + +LOCK TABLES `system_event` WRITE; +/*!40000 ALTER TABLE `system_event` DISABLE KEYS */; +/*!40000 ALTER TABLE `system_event` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `telephone` +-- + +DROP TABLE IF EXISTS `telephone`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `telephone` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `agent_contact_id` int(11) DEFAULT NULL, + `number` text NOT NULL, + `ext` text, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `number_type_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `telephone_system_mtime_index` (`system_mtime`), + KEY `telephone_user_mtime_index` (`user_mtime`), + KEY `agent_contact_id` (`agent_contact_id`), + KEY `number_type_id` (`number_type_id`), + CONSTRAINT `telephone_ibfk_2` FOREIGN KEY (`number_type_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `telephone_ibfk_1` FOREIGN KEY (`agent_contact_id`) REFERENCES `agent_contact` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `telephone` +-- + +LOCK TABLES `telephone` WRITE; +/*!40000 ALTER TABLE `telephone` DISABLE KEYS */; +/*!40000 ALTER TABLE `telephone` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `term` +-- + +DROP TABLE IF EXISTS `term`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `term` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `vocab_id` int(11) NOT NULL, + `term` varchar(255) NOT NULL, + `term_type_id` int(11) NOT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `term_vocab_id_term_term_type_id_index` (`vocab_id`,`term`,`term_type_id`), + KEY `term_type_id` (`term_type_id`), + KEY `term_system_mtime_index` (`system_mtime`), + KEY `term_user_mtime_index` (`user_mtime`), + CONSTRAINT `term_ibfk_2` FOREIGN KEY (`vocab_id`) REFERENCES `vocabulary` (`id`), + CONSTRAINT `term_ibfk_1` FOREIGN KEY (`term_type_id`) REFERENCES `enumeration_value` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `term` +-- + +LOCK TABLES `term` WRITE; +/*!40000 ALTER TABLE `term` DISABLE KEYS */; +/*!40000 ALTER TABLE `term` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `top_container` +-- + +DROP TABLE IF EXISTS `top_container`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `top_container` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `repo_id` int(11) NOT NULL, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `barcode` varchar(255) DEFAULT NULL, + `ils_holding_id` varchar(255) DEFAULT NULL, + `ils_item_id` varchar(255) DEFAULT NULL, + `exported_to_ils` datetime DEFAULT NULL, + `indicator` varchar(255) NOT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `type_id` int(11) DEFAULT NULL, + `created_for_collection` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `top_container_uniq_barcode` (`repo_id`,`barcode`), + KEY `top_container_indicator_index` (`indicator`), + KEY `top_container_system_mtime_index` (`system_mtime`), + KEY `top_container_user_mtime_index` (`user_mtime`), + KEY `top_container_type_fk` (`type_id`), + CONSTRAINT `top_container_type_fk` FOREIGN KEY (`type_id`) REFERENCES `enumeration_value` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `top_container` +-- + +LOCK TABLES `top_container` WRITE; +/*!40000 ALTER TABLE `top_container` DISABLE KEYS */; +/*!40000 ALTER TABLE `top_container` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `top_container_housed_at_rlshp` +-- + +DROP TABLE IF EXISTS `top_container_housed_at_rlshp`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `top_container_housed_at_rlshp` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `top_container_id` int(11) DEFAULT NULL, + `location_id` int(11) DEFAULT NULL, + `aspace_relationship_position` int(11) DEFAULT NULL, + `suppressed` int(11) NOT NULL DEFAULT '0', + `jsonmodel_type` varchar(255) NOT NULL DEFAULT 'container_location', + `status` varchar(255) DEFAULT NULL, + `start_date` date DEFAULT NULL, + `end_date` date DEFAULT NULL, + `note` varchar(255) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `top_container_housed_at_rlshp_system_mtime_index` (`system_mtime`), + KEY `top_container_housed_at_rlshp_user_mtime_index` (`user_mtime`), + KEY `top_container_id` (`top_container_id`), + KEY `location_id` (`location_id`), + CONSTRAINT `top_container_housed_at_rlshp_ibfk_2` FOREIGN KEY (`location_id`) REFERENCES `location` (`id`), + CONSTRAINT `top_container_housed_at_rlshp_ibfk_1` FOREIGN KEY (`top_container_id`) REFERENCES `top_container` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `top_container_housed_at_rlshp` +-- + +LOCK TABLES `top_container_housed_at_rlshp` WRITE; +/*!40000 ALTER TABLE `top_container_housed_at_rlshp` DISABLE KEYS */; +/*!40000 ALTER TABLE `top_container_housed_at_rlshp` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `top_container_link_rlshp` +-- + +DROP TABLE IF EXISTS `top_container_link_rlshp`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `top_container_link_rlshp` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `top_container_id` int(11) DEFAULT NULL, + `sub_container_id` int(11) DEFAULT NULL, + `aspace_relationship_position` int(11) DEFAULT NULL, + `suppressed` int(11) NOT NULL DEFAULT '0', + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `top_container_link_rlshp_system_mtime_index` (`system_mtime`), + KEY `top_container_link_rlshp_user_mtime_index` (`user_mtime`), + KEY `top_container_id` (`top_container_id`), + KEY `sub_container_id` (`sub_container_id`), + CONSTRAINT `top_container_link_rlshp_ibfk_2` FOREIGN KEY (`sub_container_id`) REFERENCES `sub_container` (`id`), + CONSTRAINT `top_container_link_rlshp_ibfk_1` FOREIGN KEY (`top_container_id`) REFERENCES `top_container` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `top_container_link_rlshp` +-- + +LOCK TABLES `top_container_link_rlshp` WRITE; +/*!40000 ALTER TABLE `top_container_link_rlshp` DISABLE KEYS */; +/*!40000 ALTER TABLE `top_container_link_rlshp` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `top_container_profile_rlshp` +-- + +DROP TABLE IF EXISTS `top_container_profile_rlshp`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `top_container_profile_rlshp` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `top_container_id` int(11) DEFAULT NULL, + `container_profile_id` int(11) DEFAULT NULL, + `aspace_relationship_position` int(11) DEFAULT NULL, + `suppressed` int(11) NOT NULL DEFAULT '0', + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `top_container_profile_rlshp_system_mtime_index` (`system_mtime`), + KEY `top_container_profile_rlshp_user_mtime_index` (`user_mtime`), + KEY `top_container_id` (`top_container_id`), + KEY `container_profile_id` (`container_profile_id`), + CONSTRAINT `top_container_profile_rlshp_ibfk_2` FOREIGN KEY (`container_profile_id`) REFERENCES `container_profile` (`id`), + CONSTRAINT `top_container_profile_rlshp_ibfk_1` FOREIGN KEY (`top_container_id`) REFERENCES `top_container` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `top_container_profile_rlshp` +-- + +LOCK TABLES `top_container_profile_rlshp` WRITE; +/*!40000 ALTER TABLE `top_container_profile_rlshp` DISABLE KEYS */; +/*!40000 ALTER TABLE `top_container_profile_rlshp` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `user` +-- + +DROP TABLE IF EXISTS `user`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `username` varchar(255) NOT NULL, + `name` varchar(255) NOT NULL, + `source` varchar(255) DEFAULT NULL, + `agent_record_id` int(11) DEFAULT NULL, + `agent_record_type` varchar(255) DEFAULT NULL, + `is_system_user` int(11) NOT NULL DEFAULT '0', + `is_hidden_user` int(11) NOT NULL DEFAULT '0', + `email` varchar(255) DEFAULT NULL, + `first_name` varchar(255) DEFAULT NULL, + `last_name` varchar(255) DEFAULT NULL, + `telephone` varchar(255) DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `department` varchar(255) DEFAULT NULL, + `additional_contact` text, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `username` (`username`), + KEY `user_system_mtime_index` (`system_mtime`), + KEY `user_user_mtime_index` (`user_mtime`), + KEY `agent_record_id` (`agent_record_id`), + CONSTRAINT `user_ibfk_1` FOREIGN KEY (`agent_record_id`) REFERENCES `agent_person` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `user` +-- + +LOCK TABLES `user` WRITE; +/*!40000 ALTER TABLE `user` DISABLE KEYS */; +INSERT INTO `user` VALUES (1,2,1,'admin','Administrator','DBAuth',1,'agent_person',1,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2017-10-10 13:57:47','2017-10-10 14:24:36','2017-10-10 14:24:36'),(2,6,1,'search_indexer','Search Indexer','DBAuth',NULL,NULL,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2017-10-10 13:57:48','2017-10-10 14:09:02','2017-10-10 14:09:02'),(3,0,1,'public_anonymous','Public Interface Anonymous','local',NULL,NULL,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2017-10-10 13:57:49','2017-10-10 13:57:49','2017-10-10 13:57:49'),(4,2,1,'staff_system','Staff System User','DBAuth',NULL,NULL,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2017-10-10 13:57:49','2017-10-10 14:09:40','2017-10-10 14:09:40'); +/*!40000 ALTER TABLE `user` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `user_defined` +-- + +DROP TABLE IF EXISTS `user_defined`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_defined` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `json_schema_version` int(11) NOT NULL, + `accession_id` int(11) DEFAULT NULL, + `resource_id` int(11) DEFAULT NULL, + `digital_object_id` int(11) DEFAULT NULL, + `boolean_1` int(11) DEFAULT NULL, + `boolean_2` int(11) DEFAULT NULL, + `boolean_3` int(11) DEFAULT NULL, + `integer_1` varchar(255) DEFAULT NULL, + `integer_2` varchar(255) DEFAULT NULL, + `integer_3` varchar(255) DEFAULT NULL, + `real_1` varchar(255) DEFAULT NULL, + `real_2` varchar(255) DEFAULT NULL, + `real_3` varchar(255) DEFAULT NULL, + `string_1` varchar(255) DEFAULT NULL, + `string_2` varchar(255) DEFAULT NULL, + `string_3` varchar(255) DEFAULT NULL, + `string_4` varchar(255) DEFAULT NULL, + `text_1` text, + `text_2` text, + `text_3` text, + `text_4` text, + `text_5` text, + `date_1` date DEFAULT NULL, + `date_2` date DEFAULT NULL, + `date_3` date DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + `enum_1_id` int(11) DEFAULT NULL, + `enum_2_id` int(11) DEFAULT NULL, + `enum_3_id` int(11) DEFAULT NULL, + `enum_4_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `user_defined_system_mtime_index` (`system_mtime`), + KEY `user_defined_user_mtime_index` (`user_mtime`), + KEY `accession_id` (`accession_id`), + KEY `resource_id` (`resource_id`), + KEY `digital_object_id` (`digital_object_id`), + KEY `enum_1_id` (`enum_1_id`), + KEY `enum_2_id` (`enum_2_id`), + KEY `enum_3_id` (`enum_3_id`), + KEY `enum_4_id` (`enum_4_id`), + CONSTRAINT `user_defined_ibfk_7` FOREIGN KEY (`enum_4_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `user_defined_ibfk_1` FOREIGN KEY (`accession_id`) REFERENCES `accession` (`id`), + CONSTRAINT `user_defined_ibfk_2` FOREIGN KEY (`resource_id`) REFERENCES `resource` (`id`), + CONSTRAINT `user_defined_ibfk_3` FOREIGN KEY (`digital_object_id`) REFERENCES `digital_object` (`id`), + CONSTRAINT `user_defined_ibfk_4` FOREIGN KEY (`enum_1_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `user_defined_ibfk_5` FOREIGN KEY (`enum_2_id`) REFERENCES `enumeration_value` (`id`), + CONSTRAINT `user_defined_ibfk_6` FOREIGN KEY (`enum_3_id`) REFERENCES `enumeration_value` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `user_defined` +-- + +LOCK TABLES `user_defined` WRITE; +/*!40000 ALTER TABLE `user_defined` DISABLE KEYS */; +/*!40000 ALTER TABLE `user_defined` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `vocabulary` +-- + +DROP TABLE IF EXISTS `vocabulary`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `vocabulary` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lock_version` int(11) NOT NULL DEFAULT '0', + `name` varchar(255) NOT NULL, + `ref_id` varchar(255) NOT NULL, + `created_by` varchar(255) DEFAULT NULL, + `last_modified_by` varchar(255) DEFAULT NULL, + `create_time` datetime NOT NULL, + `system_mtime` datetime NOT NULL, + `user_mtime` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`), + UNIQUE KEY `ref_id` (`ref_id`), + KEY `vocabulary_system_mtime_index` (`system_mtime`), + KEY `vocabulary_user_mtime_index` (`user_mtime`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `vocabulary` +-- + +LOCK TABLES `vocabulary` WRITE; +/*!40000 ALTER TABLE `vocabulary` DISABLE KEYS */; +INSERT INTO `vocabulary` VALUES (1,0,'global','global',NULL,NULL,'2017-10-10 13:51:59','2017-10-10 13:56:18','2017-10-10 13:51:59'); +/*!40000 ALTER TABLE `vocabulary` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Dumping events for database 'archivesspace' +-- + +-- +-- Dumping routines for database 'archivesspace' +-- +/*!50003 DROP FUNCTION IF EXISTS `GetAccessionAcknowledgementSent` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetAccessionAcknowledgementSent`(f_accession_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_value INT; + + SELECT T1.id INTO f_value + FROM + event T1 + INNER JOIN + event_link_rlshp T2 ON T1.id = T2.event_id + WHERE + T2.accession_id = f_accession_id + AND + BINARY GetEnumValue(T1.event_type_id) = BINARY 'acknowledgement_sent'; + + RETURN GetBoolean(f_value); +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetAccessionCataloged` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetAccessionCataloged`(f_accession_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_value INT; + + SELECT T1.id INTO f_value + FROM + event T1 + INNER JOIN + event_link_rlshp T2 ON T1.id = T2.event_id + WHERE ( + T2.accession_id = f_accession_id + AND + BINARY GetEnumValue(T1.event_type_id) = BINARY 'cataloged') + LIMIT 1; + + RETURN GetBoolean(f_value); +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetAccessionCatalogedDate` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetAccessionCatalogedDate`(f_accession_id INT) RETURNS varchar(255) CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_value VARCHAR(255); + + SELECT GetEventDateExpression(T1.event_id) INTO f_value + FROM + event_link_rlshp T1 + INNER JOIN + event T2 ON T1.event_id = T2.id + WHERE + (T1.accession_id = f_accession_id + AND + BINARY GetEnumValue(T2.event_type_id) = BINARY 'cataloged') + LIMIT 1; + + RETURN f_value; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetAccessionContainerSummary` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetAccessionContainerSummary`(f_accession_id INT) RETURNS text CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_value TEXT; + + SELECT T1.container_summary INTO f_value + FROM extent T1 + WHERE T1.accession_id = f_accession_id + LIMIT 1; + + RETURN f_value; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetAccessionDateExpression` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetAccessionDateExpression`(f_record_id INT) RETURNS varchar(255) CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_value VARCHAR(255); + DECLARE f_date VARCHAR(255); + DECLARE f_expression VARCHAR(255); + DECLARE f_begin VARCHAR(255); + DECLARE f_end VARCHAR(255); + + SELECT date.`expression`, date.`begin`, date.`end` + INTO f_expression, f_begin, f_end + FROM + date + WHERE date.`accession_id` = f_record_id + LIMIT 1; + + -- If the expression is null return the concat of begin and end + SET f_date = CONCAT(f_begin, '-', f_end); + + IF f_expression IS NULL THEN + SET f_value = f_date; + ELSEIF f_date IS NOT NULL THEN + SET f_value = CONCAT(f_expression, ' , ', f_date); + ELSE + SET f_value = f_expression; + END IF; + + RETURN f_value; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetAccessionDatePart` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetAccessionDatePart`(f_record_id INT, f_date_type VARCHAR(255), f_part INT) RETURNS varchar(255) CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_value VARCHAR(255); + DECLARE f_expression VARCHAR(255); + DECLARE f_begin VARCHAR(255); + DECLARE f_end VARCHAR(255); + + SELECT + date.`expression`, date.`begin`, date.`end` + INTO + f_expression, f_begin, f_end + FROM + date + WHERE ( + date.`accession_id` = f_record_id + AND + GetEnumValue(date.`date_type_id`) = f_date_type) + LIMIT 1; + + -- return the part we need + IF f_part = 0 THEN + SET f_value = f_expression; + ELSEIF f_part = 1 THEN + SET f_value = f_begin; + ELSE + SET f_value = f_end; + END IF; + + RETURN f_value; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetAccessionExtent` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetAccessionExtent`(f_accession_id INT) RETURNS decimal(10,2) + READS SQL DATA +BEGIN + DECLARE f_total DECIMAL(10,2); + + SELECT + SUM(T1.number) INTO f_total + FROM + extent T1 + WHERE + T1.accession_id = f_accession_id; + + -- Check for null then set it to zero + IF f_total IS NULL THEN + SET f_total = 0; + END IF; + + RETURN f_total; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetAccessionExtentType` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetAccessionExtentType`(f_accession_id INT) RETURNS varchar(255) CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_value VARCHAR(255); + + SELECT + GetEnumValueUF(T1.extent_type_id) INTO f_value + FROM + extent T1 + WHERE + T1.accession_id = f_accession_id + LIMIT 1; + + RETURN f_value; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetAccessionIdForInstance` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetAccessionIdForInstance`(f_record_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_value INT; + + -- get the resource id + SELECT T1.`accession_id` INTO f_value + FROM + instance T1 + WHERE T1.`id` = f_record_id; + + RETURN f_value; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetAccessionProcessed` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetAccessionProcessed`(f_accession_id INT) RETURNS varchar(255) CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_value VARCHAR(255); + + SELECT T1.event_id INTO f_value + FROM + event_link_rlshp T1 + INNER JOIN + event T2 ON T1.event_id = T2.id + WHERE + (T1.accession_id = f_accession_id + AND + BINARY GetEnumValue(T2.event_type_id) = BINARY 'processed') + LIMIT 1; + + RETURN GetBoolean(f_value); +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetAccessionProcessedDate` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetAccessionProcessedDate`(f_accession_id INT) RETURNS varchar(255) CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_value VARCHAR(255); + + SELECT GetEventDateExpression(T1.event_id) INTO f_value + FROM + event_link_rlshp T1 + INNER JOIN + event T2 ON T1.event_id = T2.id + WHERE + (T1.accession_id = f_accession_id + AND + BINARY GetEnumValue(T2.event_type_id) = BINARY 'processed') + LIMIT 1; + + RETURN f_value; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetAccessionRightsTransferred` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetAccessionRightsTransferred`(f_accession_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_value INT; + + SELECT T1.id INTO f_value + FROM + event T1 + INNER JOIN + event_link_rlshp T2 ON T1.id = T2.event_id + WHERE + T2.accession_id = f_accession_id + AND + BINARY GetEnumValue(T1.event_type_id) = BINARY 'rights_transferred'; + + RETURN GetBoolean(f_value); +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetAccessionRightsTransferredNote` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetAccessionRightsTransferredNote`(f_accession_id INT) RETURNS varchar(255) CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_value VARCHAR(255); + + SELECT T1.outcome_note INTO f_value + FROM + event T1 + INNER JOIN + event_link_rlshp T2 ON T1.id = T2.event_id + WHERE + T2.accession_id = f_accession_id + AND + BINARY GetEnumValue(T1.event_type_id) = BINARY 'rights_transferred'; + + RETURN f_value; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetAccessionsCataloged` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetAccessionsCataloged`(f_repo_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_total INT; + + SELECT count(T2.accession_id) INTO f_total + FROM + event T1 + INNER JOIN + event_link_rlshp T2 ON T1.id = T2.event_id + WHERE ( + T1.repo_id = f_repo_id + AND + T2.accession_id IS NOT NULL + AND + BINARY GetEnumValue(T1.event_type_id) = BINARY 'cataloged') + LIMIT 1; + + RETURN f_total; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetAccessionsExtent` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetAccessionsExtent`(f_repo_id INT, f_extent_type_id INT) RETURNS decimal(10,2) + READS SQL DATA +BEGIN + DECLARE f_total DECIMAL(10,2); + + SELECT SUM(T1.number) INTO f_total + FROM extent T1 + INNER JOIN + accession T2 ON T1.accession_id = T2.id + WHERE (T2.repo_id = f_repo_id + AND GetAccessionCataloged(T2.id) = 0 + AND T1.extent_type_id = f_extent_type_id); + + -- Check for null then set it to zero + IF f_total IS NULL THEN + SET f_total = 0; + END IF; + + RETURN f_total; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetAccessionsProcessed` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetAccessionsProcessed`(f_repo_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_total INT; + + SELECT count(T1.id) INTO f_total + FROM + event_link_rlshp T1 + INNER JOIN + event T2 ON T1.event_id = T2.id + WHERE ( + T2.repo_id = f_repo_id + AND + T1.accession_id IS NOT NULL + AND + BINARY GetEnumValue(T2.event_type_id) = BINARY 'processed'); + + RETURN f_total; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetAccessionsWithRestrictions` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetAccessionsWithRestrictions`(f_repo_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_total INT; + + SELECT COUNT(id) INTO f_total + FROM accession + WHERE (accession.`repo_id` = f_repo_id + AND + accession.`use_restrictions` = 1); + + RETURN f_total; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetAccessionsWithRightsTransferred` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetAccessionsWithRightsTransferred`(f_repo_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_total INT; + + SELECT count(T2.accession_id) INTO f_total + FROM + event T1 + INNER JOIN + event_link_rlshp T2 ON T1.id = T2.event_id + WHERE ( + T1.repo_id = f_repo_id + AND + T2.accession_id IS NOT NULL + AND + BINARY GetEnumValue(T1.event_type_id) = BINARY 'rights_transferred'); + + RETURN f_total; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetAgentMatch` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetAgentMatch`(f_agent_type VARCHAR(10), f_agent_id INT, + f_person_id INT, f_family_id INT, f_corporate_id INT, f_software_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_agent_match INT; + + IF f_agent_type = 'Person' AND f_person_id = f_agent_id THEN + SET f_agent_match = 1; + ELSEIF f_agent_type = 'Family' AND f_family_id = f_agent_id THEN + SET f_agent_match = 1; + ELSEIF f_agent_type = 'Corporate' AND f_corporate_id = f_agent_id THEN + SET f_agent_match = 1; + ELSEIF f_agent_type = 'Software' AND f_software_id = f_agent_id THEN + SET f_agent_match = 1; + ELSE + SET f_agent_match = 0; + END IF; + + RETURN f_agent_match; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetAgentsCorporate` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetAgentsCorporate`(f_repo_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_total INT; + + SELECT COUNT(id) INTO f_total + FROM agent_corporate_entity + WHERE agent_corporate_entity.`publish` IS NOT NULL; + + RETURN f_total; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetAgentsFamily` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetAgentsFamily`(f_repo_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_total INT; + + SELECT COUNT(id) INTO f_total + FROM agent_family; + + RETURN f_total; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetAgentSortName` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetAgentSortName`(f_person_id INT, f_family_id INT, f_corporate_id INT) RETURNS varchar(255) CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_value VARCHAR(255); + + IF f_person_id IS NOT NULL THEN + SELECT sort_name INTO f_value FROM name_person WHERE agent_person_id = f_person_id LIMIT 1; + ELSEIF f_family_id IS NOT NULL THEN + SELECT sort_name INTO f_value FROM name_family WHERE agent_family_id = f_family_id LIMIT 1; + ELSEIF f_corporate_id IS NOT NULL THEN + SELECT sort_name INTO f_value FROM name_corporate_entity WHERE agent_corporate_entity_id = f_corporate_id LIMIT 1; + ELSE + SET f_value = 'Unknown'; + END IF; + + RETURN f_value; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetAgentsPersonal` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetAgentsPersonal`(f_repo_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_total INT; + + SELECT COUNT(id) INTO f_total + FROM agent_person + WHERE agent_person.`id` NOT IN ( + SELECT user.`agent_record_id` + FROM + user WHERE + user.`agent_record_id` IS NOT NULL); + + RETURN f_total; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetAgentsSoftware` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetAgentsSoftware`(f_repo_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_total INT; + + SELECT COUNT(id) INTO f_total + FROM agent_software + WHERE agent_software.`system_role` = 'none'; + + RETURN f_total; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetAgentUniqueName` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetAgentUniqueName`(f_person_id INT, f_family_id INT, f_corporate_id INT, f_role_id INT) RETURNS varchar(255) CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_value VARCHAR(255); + + IF f_person_id IS NOT NULL THEN + SELECT sort_name INTO f_value FROM name_person WHERE agent_person_id = f_person_id LIMIT 1; + ELSEIF f_family_id IS NOT NULL THEN + SELECT sort_name INTO f_value FROM name_family WHERE agent_family_id = f_family_id LIMIT 1; + ELSEIF f_corporate_id IS NOT NULL THEN + SELECT sort_name INTO f_value FROM name_corporate_entity WHERE agent_corporate_entity_id = f_corporate_id LIMIT 1; + ELSE + SET f_value = 'Unknown'; + END IF; + + RETURN CONCAT_WS('-',f_value, f_role_id); +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetBoolean` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetBoolean`(f_value INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_boolean INT; + + IF f_value IS NULL THEN + SET f_boolean = 0; + ELSE + SET f_boolean = 1; + END IF; + + RETURN f_boolean; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetCoordinate` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetCoordinate`(f_location_id INT) RETURNS varchar(1020) CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_coordinate VARCHAR(1020); + DECLARE f_coordinate_1 VARCHAR(255); + DECLARE f_coordinate_2 VARCHAR(255); + DECLARE f_coordinate_3 VARCHAR(255); + + -- The three select statements can be combined into 1 query, but for clarity + -- are left separate + SELECT CONCAT(location.`coordinate_1_label`, ' ', location.`coordinate_1_indicator`) + INTO f_coordinate_1 + FROM location + WHERE location.`id` = f_location_id; + + SELECT CONCAT(location.`coordinate_2_label`, ' ', location.`coordinate_2_indicator`) + INTO f_coordinate_2 + FROM location + WHERE location.`id` = f_location_id; + + SELECT CONCAT(location.`coordinate_3_label`, ' ', location.`coordinate_3_indicator`) + INTO f_coordinate_3 + FROM location + WHERE location.`id` = f_location_id; + + SET f_coordinate = CONCAT_WS('/', f_coordinate_1, f_coordinate_2, f_coordinate_3); + + RETURN f_coordinate; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetDeaccessionDate` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetDeaccessionDate`(f_record_id INT) RETURNS varchar(255) CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_value VARCHAR(255); + DECLARE f_expression VARCHAR(255); + DECLARE f_begin VARCHAR(255); + + SELECT date.`expression`, date.`begin` + INTO f_expression, f_begin + FROM + date + WHERE date.`deaccession_id` = f_record_id + LIMIT 1; + + # Just return the date begin + SET f_value = f_begin; + + RETURN f_value; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetDeaccessionExtent` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetDeaccessionExtent`(f_deaccession_id INT) RETURNS decimal(10,2) + READS SQL DATA +BEGIN + DECLARE f_total DECIMAL(10,2); + + SELECT + SUM(T1.number) INTO f_total + FROM + extent T1 + WHERE + T1.deaccession_id = f_deaccession_id; + + -- Check for null then set it to zero + IF f_total IS NULL THEN + SET f_total = 0; + END IF; + + RETURN f_total; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetDeaccessionExtentType` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetDeaccessionExtentType`(f_deaccession_id INT) RETURNS varchar(255) CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_value VARCHAR(255); + + SELECT + GetEnumValueUF(T1.extent_type_id) INTO f_value + FROM + extent T1 + WHERE + T1.deaccession_id = f_deaccession_id + LIMIT 1; + + RETURN f_value; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetDigitalObjectDateExpression` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetDigitalObjectDateExpression`(f_record_id INT) RETURNS varchar(255) CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_value VARCHAR(255); + DECLARE f_date VARCHAR(255); + DECLARE f_expression VARCHAR(255); + DECLARE f_begin VARCHAR(255); + DECLARE f_end VARCHAR(255); + + SELECT date.`expression`, date.`begin`, date.`end` + INTO f_expression, f_begin, f_end + FROM + date + WHERE date.`digital_object_id` = f_record_id + LIMIT 1; + + -- If the expression is null return the concat of begin and end + SET f_date = CONCAT(f_begin, '-', f_end); + + IF f_expression IS NULL THEN + SET f_value = f_date; + ELSEIF f_date IS NOT NULL THEN + SET f_value = CONCAT(f_expression, ' , ', f_date); + ELSE + SET f_value = f_expression; + END IF; + + RETURN f_value; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetDigitalObjectId` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetDigitalObjectId`(f_digital_object_id INT, f_digital_component_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_root_record_id INT; + + IF f_digital_object_id IS NOT NULL THEN + SET f_root_record_id = f_digital_object_id; + ELSE + SELECT digital_object_component.`root_record_id` INTO f_root_record_id + FROM digital_object_component + WHERE digital_object_component.`id` = f_digital_component_id; + END IF; + + RETURN f_root_record_id; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetEnumValue` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetEnumValue`(f_enum_id INT) RETURNS varchar(255) CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_value VARCHAR(255); + SELECT enumeration_value.`value`INTO f_value + FROM enumeration_value + WHERE enumeration_value.`id` = f_enum_id; + RETURN f_value; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetEnumValueUF` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetEnumValueUF`(f_enum_id INT) RETURNS varchar(255) CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_value VARCHAR(255); + DECLARE f_ovalue VARCHAR(255); + SET f_ovalue = GetEnumValue(f_enum_id); + SET f_value = CONCAT(UCASE(LEFT(f_ovalue, 1)), SUBSTRING(f_ovalue, 2)); + RETURN f_value; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetEventDateExpression` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetEventDateExpression`(f_record_id INT) RETURNS varchar(255) CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_value VARCHAR(255); + DECLARE f_date VARCHAR(255); + DECLARE f_expression VARCHAR(255); + DECLARE f_begin VARCHAR(255); + DECLARE f_end VARCHAR(255); + + SELECT date.`expression`, date.`begin`, date.`end` + INTO f_expression, f_begin, f_end + FROM + date + WHERE date.`event_id` = f_record_id + LIMIT 1; + + -- If the expression is null return the concat of begin and end + SET f_date = CONCAT(f_begin, '-', f_end); + + IF f_expression IS NULL THEN + SET f_value = f_date; + ELSEIF f_date IS NOT NULL THEN + SET f_value = CONCAT(f_expression, ' , ', f_date); + ELSE + SET f_value = f_expression; + END IF; + + RETURN f_value; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetFaxNumber` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetFaxNumber`(f_agent_contact_id INT) RETURNS varchar(255) CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_value VARCHAR(255); + + SELECT + telephone.`number`INTO f_value + FROM + telephone + WHERE + telephone.`agent_contact_id` = f_agent_contact_id + AND + BINARY GetEnumValue(telephone.`number_type_id`) = BINARY 'fax' + LIMIT 1; + + RETURN f_value; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetInstanceCount` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetInstanceCount`(f_repo_id INT, f_instance_type_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_total INT DEFAULT 0; + DECLARE f_id INT; + DECLARE done INT DEFAULT 0; + + DECLARE cur CURSOR FOR SELECT T1.`id` + FROM + resource T1 + INNER JOIN + instance T2 ON GetResourceId(T2.`resource_id`, T2.`archival_object_id`) = T1.`id` + WHERE + T1.`repo_id` = f_repo_id + AND + T2.`instance_type_id` = f_instance_type_id + GROUP BY + T1.`id`; + + DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1; + + OPEN cur; + + count_resource: LOOP + FETCH cur INTO f_id; + + IF done = 1 THEN + LEAVE count_resource; + END IF; + + SET f_total = f_total + 1; + + END LOOP count_resource; + + CLOSE cur; + + RETURN f_total; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetLanguageCount` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetLanguageCount`(f_repo_id INT, f_language_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_total INT; + + SELECT COUNT(id) INTO f_total + FROM + resource + WHERE + resource.`language_id` = f_language_id + AND + resource.`repo_id` = f_repo_id; + + RETURN f_total; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetPhoneNumber` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetPhoneNumber`(f_agent_contact_id INT) RETURNS varchar(255) CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_value VARCHAR(255); + + SELECT + telephone.`number`INTO f_value + FROM + telephone + WHERE + telephone.`agent_contact_id` = f_agent_contact_id + AND + BINARY GetEnumValue(telephone.`number_type_id`) != BINARY 'fax' + LIMIT 1; + + RETURN f_value; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetRepositoryName` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetRepositoryName`(f_record_id INT) RETURNS varchar(255) CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_value VARCHAR(255); + + SELECT + `name` INTO f_value + FROM + repository + WHERE + `id` = f_record_id; + + RETURN f_value; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetResourceContainerSummary` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetResourceContainerSummary`(f_resource_id INT) RETURNS text CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_value TEXT; + + SELECT T1.container_summary INTO f_value + FROM extent T1 + WHERE T1.resource_id = f_resource_id + LIMIT 1; + + RETURN f_value; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetResourceCreator` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetResourceCreator`(f_record_id INT) RETURNS varchar(1024) CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_value VARCHAR(1024); + + SELECT + GROUP_CONCAT(GetAgentSortname(T1.`agent_person_id`, T1.`agent_family_id`, T1.`agent_corporate_entity_id`) SEPARATOR '; ') INTO f_value + FROM + `linked_agents_rlshp` T1 + WHERE + GetResourceId(T1.`resource_id`, T1.`archival_object_id`) = f_record_id + AND + BINARY GetEnumValue(T1.`role_id`) = BINARY 'creator'; + + RETURN f_value; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetResourceDateExpression` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetResourceDateExpression`(f_record_id INT) RETURNS varchar(255) CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_value VARCHAR(255); + DECLARE f_date VARCHAR(255); + DECLARE f_expression VARCHAR(255); + DECLARE f_begin VARCHAR(255); + DECLARE f_end VARCHAR(255); + + SELECT date.`expression`, date.`begin`, date.`end` + INTO f_expression, f_begin, f_end + FROM + date + WHERE date.`resource_id` = f_record_id + LIMIT 1; + + -- If the expression is null return the concat of begin and end + SET f_date = CONCAT(f_begin, '-', f_end); + + IF f_expression IS NULL THEN + SET f_value = f_date; + ELSEIF f_date IS NOT NULL THEN + SET f_value = CONCAT(f_expression, ' , ', f_date); + ELSE + SET f_value = f_expression; + END IF; + + RETURN f_value; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetResourceDeaccessionExtent` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetResourceDeaccessionExtent`(f_resource_id INT) RETURNS decimal(10,2) + READS SQL DATA +BEGIN + DECLARE f_total DECIMAL(10,2); + + SELECT + SUM(T2.number) INTO f_total + FROM + deaccession T1 + INNER JOIN + extent T2 ON T1.id = T2.deaccession_id + WHERE + T1.resource_id = f_resource_id; + + -- Check for null then set it to zero + IF f_total IS NULL THEN + SET f_total = 0; + END IF; + + RETURN f_total; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetResourceExtent` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetResourceExtent`(f_resource_id INT) RETURNS decimal(10,2) + READS SQL DATA +BEGIN + DECLARE f_total DECIMAL(10,2); + + SELECT + SUM(T1.number) INTO f_total + FROM + extent T1 + WHERE + T1.resource_id = f_resource_id; + + -- Check for null then set it to zero + IF f_total IS NULL THEN + SET f_total = 0; + END IF; + + RETURN f_total; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetResourceExtentType` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetResourceExtentType`(f_resource_id INT) RETURNS varchar(255) CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_value VARCHAR(255); + + SELECT GetEnumValueUF(T1.extent_type_id) INTO f_value + FROM extent T1 + WHERE T1.resource_id = f_resource_id + LIMIT 1; + + RETURN f_value; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetResourceHasCreator` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetResourceHasCreator`(f_record_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_value INT; + + SELECT + T1.`id` INTO f_value + FROM + `linked_agents_rlshp` T1 + WHERE + GetResourceId(T1.`resource_id`, T1.`archival_object_id`) = f_record_id + AND + BINARY GetEnumValue(T1.`role_id`) = BINARY 'creator' + LIMIT 1; + + RETURN GetBoolean(f_value); +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetResourceHasDeaccession` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetResourceHasDeaccession`(f_record_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_value INT; + + SELECT + T1.`id` INTO f_value + FROM + `deaccession` T1 + WHERE + T1.`resource_id` = f_record_id + LIMIT 1; + + RETURN GetBoolean(f_value); +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetResourceHasSource` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetResourceHasSource`(f_record_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_value INT; + + SELECT + T1.`id` INTO f_value + FROM + `linked_agents_rlshp` T1 + WHERE + GetResourceId(T1.`resource_id`, T1.`archival_object_id`) = f_record_id + AND + BINARY GetEnumValue(T1.`role_id`) = BINARY 'source' + LIMIT 1; + + RETURN GetBoolean(f_value); +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetResourceId` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetResourceId`(f_resource_id INT, f_archival_object_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_root_record_id INT; + + IF f_resource_id IS NOT NULL THEN + SET f_root_record_id = f_resource_id; + ELSE + SELECT archival_object.`root_record_id` INTO f_root_record_id + FROM archival_object + WHERE archival_object.`id` = f_archival_object_id; + END IF; + + RETURN f_root_record_id; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetResourceIdentiferForInstance` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetResourceIdentiferForInstance`(f_record_id INT) RETURNS varchar(255) CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_value VARCHAR(255); + + -- get the resource id + SELECT T2.`identifier` INTO f_value + FROM + instance T1 + INNER JOIN + resource T2 ON GetResourceID(T1.`resource_id`, T1.`archival_object_id`) = T2.`id` + WHERE T1.`id` = f_record_id; + + RETURN f_value; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetResourceIdForInstance` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetResourceIdForInstance`(f_record_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_value INT; + + -- get the resource id + SELECT + T2.`id` INTO f_value + FROM + instance T1 + INNER JOIN + resource T2 ON GetResourceID(T1.`resource_id`, T1.`archival_object_id`) = T2.`id` + WHERE + T1.`id` = f_record_id; + + RETURN f_value; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetResourcesExtent` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetResourcesExtent`(f_repo_id INT, f_extent_type_id INT) RETURNS decimal(10,2) + READS SQL DATA +BEGIN + DECLARE f_total DECIMAL(10,2); + + SELECT + SUM(T1.number) INTO f_total + FROM + extent T1 + INNER JOIN + resource T2 ON GetResourceId(T1.resource_id, T1.archival_object_id) = T2.id + WHERE + (T2.repo_id = f_repo_id AND T1.extent_type_id = f_extent_type_id); + + -- Check for null then set it to zero + IF f_total IS NULL THEN + SET f_total = 0; + END IF; + + RETURN f_total; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetResourcesWithFindingAids` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetResourcesWithFindingAids`(f_repo_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_total INT; + + SELECT COUNT(id) INTO f_total + FROM resource + WHERE (resource.`repo_id` = f_repo_id + AND + resource.`ead_id` IS NOT NULL); + + RETURN f_total; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetResourcesWithRestrictions` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetResourcesWithRestrictions`(f_repo_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_total INT; + + SELECT COUNT(id) INTO f_total + FROM resource + WHERE (resource.`repo_id` = f_repo_id + AND + resource.`restrictions` = 1); + + RETURN f_total; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetResourceTitleForInstance` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetResourceTitleForInstance`(f_record_id INT) RETURNS varchar(255) CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_value VARCHAR(255); + + -- get the resource id + SELECT + T2.`title` INTO f_value + FROM + instance T1 + INNER JOIN + resource T2 ON GetResourceID(T1.`resource_id`, T1.`archival_object_id`) = T2.`id` + WHERE + T1.`id` = f_record_id; + + RETURN f_value; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetStatusCount` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetStatusCount`(f_repo_id INT, f_status_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_total INT; + + SELECT COUNT(id) INTO f_total + FROM + resource + WHERE + resource.`finding_aid_status_id` = f_status_id + AND + resource.`repo_id` = f_repo_id; + + RETURN f_total; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetTermType` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetTermType`(f_subject_id INT) RETURNS varchar(255) CHARSET utf8 + READS SQL DATA +BEGIN + DECLARE f_term_type VARCHAR(255) DEFAULT ""; + + SELECT enumeration_value.`value` INTO f_term_type + FROM term + INNER JOIN enumeration_value + ON term.`term_type_id` = enumeration_value.`id` + WHERE term.`id` + IN (SELECT subject_term.`term_id` + FROM subject_term + WHERE subject_term.`subject_id` = f_subject_id) + LIMIT 1; + + RETURN f_term_type; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetTermTypeCount` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetTermTypeCount`(f_term_type_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_total INT DEFAULT 0; + + SELECT COUNT(*) INTO f_total + FROM ( + SELECT T1.`id` + FROM + term T1 + INNER JOIN + subject_term T2 ON T1.`id` = T2.`term_id` + WHERE + T1.`term_type_id` = f_term_type_id + GROUP BY + T2.`subject_id` + ) AS t; + + RETURN f_total; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetTotalAccessions` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetTotalAccessions`(f_repo_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_total INT; + + SELECT COUNT(id) INTO f_total + FROM accession + WHERE accession.`repo_id` = f_repo_id; + + RETURN f_total; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetTotalResources` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetTotalResources`(f_repo_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_total INT; + + SELECT COUNT(id) INTO f_total + FROM resource + WHERE resource.`repo_id` = f_repo_id; + + RETURN f_total; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetTotalResourcesItems` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetTotalResourcesItems`(f_repo_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_total INT; + + SELECT COUNT(id) INTO f_total + FROM resource + WHERE (resource.`repo_id` = f_repo_id + AND + BINARY GetEnumValue(resource.`level_id`) = BINARY 'item'); + + RETURN f_total; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP FUNCTION IF EXISTS `GetTotalSubjects` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES' */ ; +DELIMITER ;; +CREATE DEFINER=`AS_user`@`localhost` FUNCTION `GetTotalSubjects`(f_repo_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE f_total INT; + + SELECT COUNT(id) INTO f_total + FROM subject; + + RETURN f_total; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2017-10-10 10:38:26 From 67cc1c79df8c92c258eb514b37a07cb0a1f07075 Mon Sep 17 00:00:00 2001 From: Sarah Morrissey Date: Mon, 23 Oct 2017 09:57:15 -0400 Subject: [PATCH 12/19] added a few things to save uri map that weren't there before ad fixed a couple other issues --- .../archiviststoolkit/plugin/dbCopyFrame.java | 32 ++++----- .../plugin/utils/aspace/ASpaceClient.java | 6 +- .../plugin/utils/aspace/ASpaceCopyUtil.java | 69 ++++--------------- .../plugin/utils/aspace/ASpaceMapper.java | 17 +++++ .../aspace/IntentionalExitException.java | 6 ++ .../utils/aspace/TopContainerMapper.java | 18 ++++- 6 files changed, 67 insertions(+), 81 deletions(-) diff --git a/src/org/archiviststoolkit/plugin/dbCopyFrame.java b/src/org/archiviststoolkit/plugin/dbCopyFrame.java index 3e8077b..0f551d5 100644 --- a/src/org/archiviststoolkit/plugin/dbCopyFrame.java +++ b/src/org/archiviststoolkit/plugin/dbCopyFrame.java @@ -123,10 +123,10 @@ private void hideAdvanceFeatures() { //ignoreUnlinkedSubjectsCheckBox.setVisible(false); //publishPanel.setVisible(false); batchImportCheckBox.setVisible(false); - deleteResourcesCheckBox.setVisible(false); +// deleteResourcesCheckBox.setVisible(false); numResourceToCopyLabel.setVisible(false); numResourceToCopyTextField.setVisible(false); - deleteResourcesCheckBox.setVisible(false); +// deleteResourcesCheckBox.setVisible(false); //resourcesToCopyTextField.setVisible(false); recordURIComboBox.setVisible(false); paramsLabel.setVisible(false); @@ -310,7 +310,6 @@ public void run() { } // check the current aspace version to make sure - //will need to modify this String aspaceVersion = ascopy.getASpaceVersion(); //Check if working @@ -367,10 +366,6 @@ public void run() { if (!copyStopped) ascopy.copyAccessionRecords(); if (!copyStopped) ascopy.copyDigitalObjectRecords(); - // save the record maps for possible future use -// ascopy.saveURIMaps(); -// } - // get the number of resources to copy here to allow it to be reset while the migration // has been started, but migration of resources has not yet started int resourcesToCopy = 1000000; @@ -378,9 +373,9 @@ public void run() { try { boolean useBatchImport = batchImportCheckBox.isSelected(); - boolean deleteSavedResources = deleteResourcesCheckBox.isSelected(); +// boolean deleteSavedResources = deleteResourcesCheckBox.isSelected(); ascopy.setUseBatchImport(useBatchImport); - ascopy.setDeleteSavedResources(deleteSavedResources); +// ascopy.setDeleteSavedResources(deleteSavedResources); // get the number of threads to run the copy process in threads = Integer.parseInt(threadsTextField.getText()); @@ -391,8 +386,7 @@ public void run() { } else { resourcesToCopy = resourcesIDsList.size(); } - } catch (NumberFormatException nfe) { - } + } catch (NumberFormatException nfe) {} // check to make sure we didn't stop the copy process or resource to copy is // not set to zero. Setting resources to copy to zero is a convenient way @@ -402,8 +396,6 @@ public void run() { ascopy.copyResourceRecords(resourcesToCopy, threads); } -// if (!copyStopped) ascopy.addContainerData(); - if (!copyStopped) ascopy.addAssessments(); ascopy.cleanUp(); @@ -414,9 +406,9 @@ public void run() { migrationErrors = ascopy.getSaveErrorMessages() + "\n\nTotal errors/warnings: " + errorCount; } catch (IntentionalExitException e) { consoleTextArea.setText(e.getMessage()); - consoleTextArea.append("Will attempt to save URI maps ..."); + consoleTextArea.append("\nWill attempt to save URI maps ..."); if (ascopy != null) ascopy.saveURIMaps(); - else consoleTextArea.append("Could not save URI maps ...\nMigration will need to be restarted ..."); + else consoleTextArea.append("\nCould not save URI maps ...\nMigration will need to be restarted ..."); } catch (Exception e) { consoleTextArea.setText("Unrecoverable exception, migration stopped ...\n\n"); @@ -802,7 +794,7 @@ private void initComponents() { batchImportCheckBox = new JCheckBox(); numResourceToCopyLabel = new JLabel(); numResourceToCopyTextField = new JTextField(); - deleteResourcesCheckBox = new JCheckBox(); +// deleteResourcesCheckBox = new JCheckBox(); resourcesToCopyTextField = new JTextField(); outputConsoleLabel = new JLabel(); copyProgressBar = new JProgressBar(); @@ -1112,9 +1104,9 @@ public void actionPerformed(ActionEvent e) { numResourceToCopyTextField.setText("100000"); contentPanel.add(numResourceToCopyTextField, cc.xywh(9, 19, 5, 1)); - //---- deleteResourcesCheckBox ---- - deleteResourcesCheckBox.setText("Delete Previously Saved Resources"); - contentPanel.add(deleteResourcesCheckBox, cc.xy(1, 21)); +// //---- deleteResourcesCheckBox ---- +// deleteResourcesCheckBox.setText("Delete Previously Saved Resources"); +// contentPanel.add(deleteResourcesCheckBox, cc.xy(1, 21)); //---- resourcesToCopyTextField ---- resourcesToCopyTextField.setText("-refid_unique, -term_default"); @@ -1312,7 +1304,7 @@ public void actionPerformed(ActionEvent e) { private JCheckBox batchImportCheckBox; private JLabel numResourceToCopyLabel; private JTextField numResourceToCopyTextField; - private JCheckBox deleteResourcesCheckBox; +// private JCheckBox deleteResourcesCheckBox; private JTextField resourcesToCopyTextField; private JLabel outputConsoleLabel; private JProgressBar copyProgressBar; diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceClient.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceClient.java index 7a45fb2..180cc6e 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceClient.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceClient.java @@ -212,6 +212,7 @@ private String executePost(PostMethod post, String idName, String atId, String j try { statusCode = httpclient.executeMethod(post); if (statusCode == HttpStatus.SC_INTERNAL_SERVER_ERROR) { + appendToErrorBuffer("Problem connecting to server"); throw new IntentionalExitException("Could not connect to server ...\nFix connection then resume ..."); } } catch (ConnectException e) { @@ -228,6 +229,7 @@ private String executePost(PostMethod post, String idName, String atId, String j if (result == JOptionPane.YES_OPTION) { ready = true; } else if (result == JOptionPane.NO_OPTION) { + appendToErrorBuffer("Problem connecting to ArchivesSpace"); throw new IntentionalExitException(); } } @@ -364,7 +366,7 @@ public String get(String endpoint, NameValuePair[] params) throws Exception { if (debug) System.out.println("get: " + fullUrl); int statusCode = httpclient.executeMethod(get); -//bookmark + String statusMessage = "Status code: " + statusCode + "\nStatus text: " + get.getStatusText(); @@ -427,9 +429,7 @@ public HashMap loadRepositories() { try { String jsonText = get(REPOSITORY_ENDPOINT, null); - System.out.println(jsonText); JSONArray jsonArray = new JSONArray(jsonText); - System.out.println(jsonArray); if (jsonArray.length() != 0) { for (int i = 0; i < jsonArray.length(); i++) { diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java index 7d79cdc..3bb2823 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java @@ -196,9 +196,6 @@ public String getURIMapping(DomainObject record) { // Specifies whether to use the batch import functionality of aspace private boolean useBatchImport = false; - // Specifies whether to delete the previously saved resource records. Useful for testing purposes - private boolean deleteSavedResources = false; - // this list is used to copy a specific resource private ArrayList resourcesIDsList; @@ -279,6 +276,7 @@ private void init() { lookupListMap.put("subject term source", ASpaceClient.VOCABULARY_ENDPOINT); TopContainerMapper.setaSpaceCopyUtil(this); + TopContainerMapper.clearAlreadyAdded(); recordsToCopy = new LinkedList(); recordsToCopy.add("Lookup List"); @@ -709,8 +707,6 @@ public void copyLocationRecords() throws Exception { records = new ArrayList(records.subList(numAttempted, total)); - updateProgress("Locations", total, count); - for (Locations location : records) { if(stopCopy) return; @@ -933,6 +929,8 @@ public void copyNameRecords() throws Exception { if(ignoreNames && name.getArchDescriptionNames().size() == 0) { unlinkedCount++; numUnlinked++; + count++; + numAttempted++; print("Not Copying Unlinked Name: " + name); continue; } @@ -1184,6 +1182,8 @@ public void copySubjectRecords() throws Exception { if(ignoreSubjects && subject.getArchDescriptionSubjects().size() == 0) { unlinkedCount++; numUnlinked++; + count++; + numAttempted++; print("Not Copying Unlinked Subject: " + subject); continue; } @@ -1568,7 +1568,7 @@ public void copyResourceRecords(int max, int threads) throws Exception { // print("Copying " + records.size() + " Resource records ..."); - copyCount = 0; // keep track of the number of resource records copied + copyCount = numSuccessful; // keep track of the number of resource records copied // these are used to update the progress bar int total = records.size(); @@ -1733,7 +1733,6 @@ public void copyResourceRecords(int max, int threads) throws Exception { if(!bids.equals(NO_ID) && bids.length() != 0) { if(!simulateRESTCalls) { - System.out.println("bids: " + bids); JSONObject bidsJS = new JSONObject(bids); resourceURI = (new JSONArray(bidsJS.getString(resourceURI))).getString(0); @@ -2237,44 +2236,6 @@ private synchronized void incrementCopyCount() { if (!simulateRESTCalls) numSuccessful++; } - /** - * Method to delete any previously saved resource records on the ASpace backend. - * Useful for testing purposes, but not much else - */ - private void deleteSavedResources() { - print("\nNumber of Resources to Delete: " + resourceURIMap.size()); - ArrayList deletedKeys = new ArrayList(); - - // initialize the progress bar - updateProgress("Resource", resourceURIMap.size(), -1); - - int count = 1; - for(Long key: resourceURIMap.keySet()) { - try { - String uri = resourceURIMap.get(key); - print("Deleting Resource: " + uri); - - String message = aspaceClient.deleteRecord(uri); - print(message + "\n"); - deletedKeys.add(key); - - // update the progress bar - updateProgress("Resource", 0, count); - count++; - } catch (Exception e) { - e.printStackTrace(); - print("Error deleting ... \n" + e.getMessage()); - } - } - - // remove the deleted keys now, since we can't modify a - // hashmap while we still iterating over it - for(Long key: deletedKeys) { - resourceURIMap.remove(key); - } - - } - /** * Method to return the new repository for a given domain object. * @@ -2692,6 +2653,9 @@ private void freeMemory() { * Method to save the URI maps to a binary file */ public void saveURIMaps() { + + if (simulateRESTCalls) return; + HashMap uriMap = new HashMap(); uriMap.put(REPOSITORY_KEY, repositoryURIMap); @@ -2730,6 +2694,8 @@ public void saveURIMaps() { uriMap.put(REPOSITORY_MISMATCH_KEY, repositoryMismatchMap); } + uriMap.put("IDs", mapper.getIDs()); + // save to file system now print("\nSaving URI Maps ..."); @@ -2737,7 +2703,6 @@ public void saveURIMaps() { ScriptDataUtils.saveScriptData(uriMapFile, uriMap); } catch (Exception e) { print("Unable to save URI map file " + uriMapFile.getName()); - System.out.println(e.getMessage()); } } @@ -2780,6 +2745,9 @@ public void loadURIMaps() { repositoryMismatchMap = (HashMap)uriMap.get(REPOSITORY_MISMATCH_KEY); } + HashMap> iDs = (HashMap>) uriMap.get("IDs"); + mapper.setIDs(iDs); + // load the record totals so far if(uriMap.containsKey(RECORD_TOTAL_KEY)) { recordTotals = (ArrayList)uriMap.get(RECORD_TOTAL_KEY); @@ -2848,15 +2816,6 @@ public void setUseBatchImport(boolean useBatchImport) { this.useBatchImport = useBatchImport; } - /** - * Method to specify whether to delete the save resources. - * - * @param deleteSavedResources - */ - public void setDeleteSavedResources(boolean deleteSavedResources) { - this.deleteSavedResources = deleteSavedResources; - } - /** * Method to set the resources to copy * diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java index ed081ff..4d5a72e 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java @@ -46,6 +46,23 @@ public class ASpaceMapper { private ArrayList resourceIDs = new ArrayList(); private ArrayList eadIDs = new ArrayList(); + //TODO implement this and have these be saved with uri maps + public void setIDs(HashMap> iDs) { + digitalObjectIDs = iDs.get("digital object"); + accessionIDs = iDs.get("accession"); + resourceIDs = iDs.get("resource"); + eadIDs = iDs.get("ead"); + } + + public HashMap> getIDs() { + HashMap> iDs = new HashMap>(); + iDs.put("digital object", digitalObjectIDs); + iDs.put("accession", accessionIDs); + iDs.put("resource", resourceIDs); + iDs.put("ead", eadIDs); + return iDs; + } + // variable names in bean shell script that will indicate whether it can override // the default mapping operation with itself private static final String SUBJECT_MAPPER = "@subject"; diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/IntentionalExitException.java b/src/org/archiviststoolkit/plugin/utils/aspace/IntentionalExitException.java index 0665257..b138974 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/IntentionalExitException.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/IntentionalExitException.java @@ -1,5 +1,11 @@ package org.archiviststoolkit.plugin.utils.aspace; +/** + * this exists as an easy way to immediately end the copy process and save URI maps when a problem is identified + * + * @author sarah morrissey + * @version 2.2 + */ public class IntentionalExitException extends Exception { public IntentionalExitException() { diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java b/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java index 33c0a34..c21cefd 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/TopContainerMapper.java @@ -280,13 +280,18 @@ private static class MiniContainer { MiniContainer(String ... args) { this.parentRepoURI = args[0]; this.indicator = args[1]; - this.type = args[2]; - this.barcode = args[3]; + if (args.length > 2) { + if (args[2].contains("type: ")) { + this.type = args[2].substring(6); + if (args.length > 3) this.barcode = args[3]; + } + else this.barcode = args[2]; + } } @Override public String toString() { - return parentRepoURI + SEPARATOR + indicator + SEPARATOR + type + SEPARATOR + barcode; + return parentRepoURI + SEPARATOR + indicator + SEPARATOR + "type: " + type + SEPARATOR + barcode; } @Override @@ -346,6 +351,9 @@ private static String[] fromString(String stringForm) { public static HashMap getAlreadyAddedStringForm() { HashMap alreadyAddedStringForm = new HashMap(); + for (MiniContainer container : alreadyAdded.keySet()) { + alreadyAddedStringForm.put(container.toString(), alreadyAdded.get(container).toString()); + } return alreadyAddedStringForm; } @@ -356,4 +364,8 @@ public static void setAlreadyAdded(HashMap topContainerURIMap) { alreadyAdded.put(miniContainer, info); } } + + public static void clearAlreadyAdded() { + alreadyAdded = new HashMap(); + } } From 05a60b9fa36dd41b6ac8d1c89213289785e59d65 Mon Sep 17 00:00:00 2001 From: Sarah Morrissey Date: Mon, 23 Oct 2017 14:15:12 -0400 Subject: [PATCH 13/19] fixed issue with mismatched assessment repositories --- .../plugin/utils/aspace/ASpaceClient.java | 4 + .../plugin/utils/aspace/ASpaceCopyUtil.java | 81 ++++++++++++++----- .../plugin/utils/aspace/ASpaceMapper.java | 55 ++++++++----- 3 files changed, 100 insertions(+), 40 deletions(-) diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceClient.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceClient.java index 180cc6e..bafd5e4 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceClient.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceClient.java @@ -262,6 +262,10 @@ private String executePost(PostMethod post, String idName, String atId, String j JSONArray responseJA = new JSONArray(responseBody); response = responseJA.getJSONObject(responseJA.length() - 1); + if (response.toString().contains("Server error: Failed to connect to the database")) { + throw new IntentionalExitException("Could not connect to server ...\nFix connection then resume ..."); + } + errorBuffer.append("Endpoint: ").append(post.getURI()).append("\n"). append("AT Identifier: ").append(atId).append("\n"). append(statusMessage).append("\n\n").append(response.toString(2)).append("\n"); diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java index 3bb2823..99b8cb1 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java @@ -980,7 +980,7 @@ public void copyNameRecords() throws Exception { numAttempted = 0; numSuccessful = 0; - updateRecordTotals("Names", total, success); + updateRecordTotals("Names", total, success, unlinkedCount); // add error message indicating any records that were not copied because they // were not linked to any other records @@ -1035,25 +1035,58 @@ public void addAssessments() throws Exception { for (Assessments assessment : records) { if (stopCopy) return; - - String repoURI = getRemappedRepositoryURI("assessment", assessment.getIdentifier(), assessment.getRepository()); - String uri = repoURI + ASpaceClient.ASSESSMENT_ENDPOINT; String jsonText = (String) mapper.convert(assessment); - if (jsonText != null) { - String id = saveRecord(uri, jsonText, "Assessment->" + assessment.getAssessmentId()); - if(!id.equalsIgnoreCase(NO_ID)) { - uri = uri + "/" + id; - assessmentURIMap.put(assessment.getIdentifier(), uri); - print("Copied Assessment: " + assessment + " :: " + id); - success++; - numSuccessful++; + boolean successful = true; + + HashSet linkedRepos = new HashSet(); + + for (AssessmentsDigitalObjects digitalObject : assessment.getDigitalObjects()) { + linkedRepos.add(digitalObject.getDigitalObject().getRepository()); + } + for (AssessmentsResources resource : assessment.getResources()) { + linkedRepos.add(resource.getResource().getRepository()); + } + for (AssessmentsAccessions accession : assessment.getAccessions()) { + linkedRepos.add(accession.getAccession().getRepository()); + } + + /* + since the repositories of all records attached to an assessment must be the same as the assessment's + repository it is necessary to add a separate assessment for each linked repository + */ + for (Repositories repo: linkedRepos) { + + assessment.setRepository(repo); + + String repoURI = getRemappedRepositoryURI("assessment", assessment.getIdentifier(), assessment.getRepository()); + String uri = repoURI + ASpaceClient.ASSESSMENT_ENDPOINT; + + String repoJSON = mapper.addAssessmentsRecords(jsonText, assessment); +// String jsonText = (String) mapper.convert(assessment); + if (jsonText != null) { + String id = saveRecord(uri, repoJSON, "Assessment->" + assessment.getAssessmentId()); + + if(!id.equalsIgnoreCase(NO_ID)) { + uri = uri + "/" + id; + assessmentURIMap.put(assessment.getIdentifier(), uri); + print("Copied Assessment: " + assessment + " :: " + id); +// success++; +// numSuccessful++; + } else { + print("Fail -- Assessment: " + assessment); + successful = false; + } } else { - print("Fail -- Assessment: " + assessment); + print("Fail -- Assessment to JSON: " + assessment); + successful = false; } - } else { - print("Fail -- Assessment to JSON: " + assessment); + } + + if (successful) { + success++; + numSuccessful++; } count++; @@ -1220,7 +1253,7 @@ public void copySubjectRecords() throws Exception { numAttempted = 0; numSuccessful = 0; - updateRecordTotals("Subjects", total, success); + updateRecordTotals("Subjects", total, success, unlinkedCount); // add error message indicating any records that were not copied because they // were not linked to any other records @@ -1568,13 +1601,13 @@ public void copyResourceRecords(int max, int threads) throws Exception { // print("Copying " + records.size() + " Resource records ..."); - copyCount = numSuccessful; // keep track of the number of resource records copied + copyCount = 0;//numSuccessful; // keep track of the number of resource records copied // these are used to update the progress bar int total = records.size(); - int count = numAttempted; + int count = 0;//numAttempted; - records = new ArrayList(records.subList(numAttempted, total)); +// records = new ArrayList(records.subList(numAttempted, total)); print("Copying " + records.size() + " Resource records ..."); @@ -2421,9 +2454,11 @@ private synchronized void updateProgress(String recordType, int total, int count * @param total * @param success */ - private synchronized void updateRecordTotals(String recordType, int total, int success) { + private synchronized void updateRecordTotals(String recordType, int total, int success, int unlinkedCount) { float percent = (new Float(success)/new Float(total))*100.0f; - String info = recordType + " : " + success + " / " + total + " (" + String.format("%.2f", percent) + "%)"; + String unlinkedMessage = ""; + if (unlinkedCount != 0) unlinkedMessage += " ---" + unlinkedCount + " unlinked--- "; + String info = recordType + " : " + success + " / " + total + unlinkedMessage + " (" + String.format("%.2f", percent) + "%)"; if (recordType.equals("Resource Records") && recordTotals.size() > 8) { recordTotals.set(8, info); @@ -2437,6 +2472,10 @@ private synchronized void updateRecordTotals(String recordType, int total, int s // } } + private synchronized void updateRecordTotals(String recordType, int total, int success) { + updateRecordTotals(recordType, total, success, 0); + } + /** * Method to return the number of errors when saving records * diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java index 4d5a72e..eb0af9a 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java @@ -1648,24 +1648,6 @@ private String convertAssessment(Assessments record) throws Exception { addExternalId(record, json, "assessment"); - JSONArray recordsJA = new JSONArray(); - - String recordUri; - for (AssessmentsAccessions accession : record.getAccessions()) { - recordUri = aspaceCopyUtil.getURIMapping(accession.getAccession()); - recordsJA.put(getReferenceObject(recordUri)); - } - for (AssessmentsDigitalObjects digitalObject: record.getDigitalObjects()) { - recordUri = aspaceCopyUtil.getURIMapping(digitalObject.getDigitalObject()); - recordsJA.put(getReferenceObject(recordUri)); - } - for (AssessmentsResources resource : record.getResources()) { - recordUri = aspaceCopyUtil.getURIMapping(resource.getResource()); - recordsJA.put(getReferenceObject(recordUri)); - } - - json.put("records", recordsJA); - print("Adding agent record for who did survey ..."); json.put("surveyed_by", addAssessmentsAgent(record.getWhoDidSurvey(), record)); @@ -1706,6 +1688,40 @@ private String convertAssessment(Assessments record) throws Exception { return json.toString(); } + public String addAssessmentsRecords(String jsonText, Assessments record) throws Exception { + + JSONObject json = new JSONObject(jsonText); + + JSONArray recordsJA = new JSONArray(); + + String recordUri; + for (AssessmentsAccessions accession : record.getAccessions()) { + Accessions accessionRecord = accession.getAccession(); + if (accessionRecord.getRepository().equals(record.getRepository())) { + recordUri = aspaceCopyUtil.getURIMapping(accessionRecord); + recordsJA.put(getReferenceObject(recordUri)); + } + } + for (AssessmentsDigitalObjects digitalObject: record.getDigitalObjects()) { + DigitalObjects digitalObjectRecord = digitalObject.getDigitalObject(); + if (digitalObjectRecord.getRepository().equals(record.getRepository())) { + recordUri = aspaceCopyUtil.getURIMapping(digitalObjectRecord); + recordsJA.put(getReferenceObject(recordUri)); + } + } + for (AssessmentsResources resource : record.getResources()) { + Resources resourceRecord = resource.getResource(); + if (resourceRecord.getRepository().equals(record.getRepository())) { + recordUri = aspaceCopyUtil.getURIMapping(resourceRecord); + recordsJA.put(getReferenceObject(recordUri)); + } + } + + json.put("records", recordsJA); + + return json.toString(); + } + private JSONArray addAssessmentsAgent(String name, Assessments assessment) throws Exception { JSONObject json = new JSONObject(); @@ -2860,7 +2876,8 @@ private String getUniqueID(String endpoint, String id, String[] idParts) { } else if(endpoint.equals(ASpaceClient.RESOURCE_ENDPOINT)) { String message = null; - if(!resourceIDs.contains(id)) { + //I think its fine without checking for duplicate resource IDs and this causes a problem if checked + if(true) {//!resourceIDs.contains(id)) { resourceIDs.add(id); } else { String fullId = ""; From 120579f35e7ad03048dba4772c73c7ff2137b371 Mon Sep 17 00:00:00 2001 From: Sarah Morrissey Date: Tue, 24 Oct 2017 11:28:54 -0400 Subject: [PATCH 14/19] subjects can have multiple term types --- README.md | 7 ++- dbcopy.properties | 2 +- .../archiviststoolkit/plugin/dbCopyCLI.java | 6 +- .../plugin/utils/aspace/ASpaceClient.java | 6 +- .../plugin/utils/aspace/ASpaceCopyUtil.java | 32 ++++++++--- .../plugin/utils/aspace/ASpaceEnumUtil.java | 6 ++ .../plugin/utils/aspace/ASpaceMapper.java | 57 +++++++++++++++++-- .../aspace/IntentionalExitException.java | 4 ++ 8 files changed, 100 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 5c37eea..8b9f86a 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ NOTES ON RUNNING THE PLUGIN IN COMMAND LINE MODE 1. Edit the dbcopy.properties to point to the desired AT database and ASpace Instance 2. Run the "dbCopyCLI" class making sure all the *.jar files in "lib" are in the Classpath. -NOTES ON DATA MIGRATION DEFAULTS +NOTES ON DATA MIGRATION 1. If a date is missing in AT but is required for AS the default date will be set to 1/1/1900 or 0 for integer dates. 2. The start date specified for a container location is the creation date of the associated resource/accession. @@ -60,6 +60,11 @@ allowed in AS so the default for AS will be "unknown_item" so that the indicator a container 3 is specified without a container 2. 4. Some IDs are checked for uniqueness in AS but not AT. In these cases if an ID is not unique the problem will be corrected by adding ## along with some random string to the ID. +5. If an assessment is linked to records from multiple repositories, duplicate assessments are created - one for +each linked repository. +6. If a problem occurs during migration, URI maps should be saved and allow you to continue from where you left +off by checking the 'continue previous migration' box. This should work fairly seamlessly, but you should check the +record migration stopped at as the migrator may correct for a duplicate ID where there is not actually one. HOW TOP CONTAINER UNIQUENESS IS DETERMINED diff --git a/dbcopy.properties b/dbcopy.properties index 9325bae..18a5208 100644 --- a/dbcopy.properties +++ b/dbcopy.properties @@ -13,7 +13,7 @@ clientThreads=1 checkRepositoryMismatch=false # specify whether to continue from resource records in case the data migration was cut short -continueFromResources=false +continueFromURIMaps=false # specify the reset password for all user record resetPassword=archive diff --git a/src/org/archiviststoolkit/plugin/dbCopyCLI.java b/src/org/archiviststoolkit/plugin/dbCopyCLI.java index c7dc56e..931dac4 100644 --- a/src/org/archiviststoolkit/plugin/dbCopyCLI.java +++ b/src/org/archiviststoolkit/plugin/dbCopyCLI.java @@ -26,7 +26,7 @@ public class dbCopyCLI { private int clientThreads = 1; - private boolean continueFromResources = false; + private boolean continueFromURIMaps = false; private String resetPassword = "archive"; @@ -91,7 +91,7 @@ public dbCopyCLI(Properties properties) throws Exception { tracerDatabase = properties.getProperty("tracerDatabase"); clientThreads = new Integer(properties.getProperty("clientThreads")); checkRepositoryMismatch = new Boolean(properties.getProperty("checkRepositoryMismatch")); - continueFromResources = new Boolean(properties.getProperty("continueFromResources")); + continueFromURIMaps = new Boolean(properties.getProperty("continueFromURIMaps")); resetPassword = properties.getProperty("resetPassword"); simulateRESTCalls = new Boolean(properties.getProperty("simulateRESTCalls")); ignoreUnlinkedNames = new Boolean(properties.getProperty("ignoreUnlinkedNames")); @@ -241,7 +241,7 @@ private void startASpaceCopyProcess() { // // first load the notes etc types and resource from the destination database // ascopy.loadRepositories(); - if (continueFromResources && ascopy.uriMapFileExist()) { + if (continueFromURIMaps && ascopy.uriMapFileExist()) { ascopy.loadURIMaps(); } else { ascopy.loadRepositories(); diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceClient.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceClient.java index bafd5e4..ba25199 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceClient.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceClient.java @@ -213,7 +213,7 @@ private String executePost(PostMethod post, String idName, String atId, String j statusCode = httpclient.executeMethod(post); if (statusCode == HttpStatus.SC_INTERNAL_SERVER_ERROR) { appendToErrorBuffer("Problem connecting to server"); - throw new IntentionalExitException("Could not connect to server ...\nFix connection then resume ..."); + throw new IntentionalExitException("Could not connect to server ...\nFix connection then resume ...", atId); } } catch (ConnectException e) { boolean ready = false; @@ -230,7 +230,7 @@ private String executePost(PostMethod post, String idName, String atId, String j ready = true; } else if (result == JOptionPane.NO_OPTION) { appendToErrorBuffer("Problem connecting to ArchivesSpace"); - throw new IntentionalExitException(); + throw new IntentionalExitException("Problem connecting to ArchivesSpace ...\nFix connection then resume ...", atId); } } @@ -263,7 +263,7 @@ private String executePost(PostMethod post, String idName, String atId, String j response = responseJA.getJSONObject(responseJA.length() - 1); if (response.toString().contains("Server error: Failed to connect to the database")) { - throw new IntentionalExitException("Could not connect to server ...\nFix connection then resume ..."); + throw new IntentionalExitException("Could not connect to server ...\nFix connection then resume ...", atId); } errorBuffer.append("Endpoint: ").append(post.getURI()).append("\n"). diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java index 99b8cb1..32c795e 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java @@ -70,6 +70,8 @@ public class ASpaceCopyUtil { // hashmap that maps subjects from old database with copy in new database private HashMap subjectURIMap = new HashMap(); + private HashMap otherSubjectURIMap = new HashMap(); + // hashmap that maps names from old database with copy in new database private HashMap nameURIMap = new HashMap(); @@ -170,6 +172,7 @@ public String getURIMapping(DomainObject record) { private final String LOCATION_KEY = "locationURIMap"; private final String USER_KEY = "userURIMap"; private final String SUBJECT_KEY = "subjectURIMap"; + private final String OTHER_SUBJECT_KEY = "otherSubjectURIMap"; private final String NAME_KEY = "nameURIMap"; private final String ACCESSION_KEY = "accessionURIMap"; private final String DIGITAL_OBJECT_KEY = "digitalObjectURIMap"; @@ -1227,13 +1230,28 @@ public void copySubjectRecords() throws Exception { continue; } - String jsonText = (String) mapper.convert(subject); + String jsonText; + String otherURIMapKey = subject.getSubjectTerm() + " " + subject.getSubjectSource(); + String uri; + boolean alreadyExists = otherSubjectURIMap.containsKey(otherURIMapKey); + + if (alreadyExists) { + uri = otherSubjectURIMap.get(otherURIMapKey); + JSONObject json = getRecord(uri); + json = mapper.addSubjectTerm(subject, json); + jsonText = json.toString(); + } else { + jsonText = (String) mapper.convert(subject); + uri = ASpaceClient.SUBJECT_ENDPOINT; + } + if (jsonText != null) { - String id = saveRecord(ASpaceClient.SUBJECT_ENDPOINT, jsonText, "Subject->" + subject.getSubjectTerm()); + String id = saveRecord(uri, jsonText, "Subject->" + subject.getSubjectTerm()); if(!id.equalsIgnoreCase(NO_ID)) { - String uri = ASpaceClient.SUBJECT_ENDPOINT + "/" + id; + if (!alreadyExists) uri = ASpaceClient.SUBJECT_ENDPOINT + "/" + id; subjectURIMap.put(subject.getIdentifier(), uri); + if (!alreadyExists) otherSubjectURIMap.put(otherURIMapKey, uri); print("Copied Subject: " + subject + " :: " + id); success++; numSuccessful++; @@ -1241,6 +1259,7 @@ public void copySubjectRecords() throws Exception { print("Fail -- Subject: " + subject); } } else { + print("Fail -- Subject to JSON: " + subject); } @@ -2465,11 +2484,6 @@ private synchronized void updateRecordTotals(String recordType, int total, int s } else { recordTotals.add(info); } -// if(recordTotals.size() <= 8) { -// recordTotals.add(info); -// } else { -// recordTotals.set(8, info); -// } } private synchronized void updateRecordTotals(String recordType, int total, int success) { @@ -2711,6 +2725,7 @@ public void saveURIMaps() { // or we not generating from ASpace backend data uriMap.put(LOCATION_KEY, locationURIMap); uriMap.put(SUBJECT_KEY, subjectURIMap); + uriMap.put(OTHER_SUBJECT_KEY, otherSubjectURIMap); uriMap.put(NAME_KEY, nameURIMap); uriMap.put(ACCESSION_KEY, accessionURIMap); uriMap.put(DIGITAL_OBJECT_KEY, digitalObjectURIMap); @@ -2754,6 +2769,7 @@ public void loadURIMaps() { locationURIMap = (HashMap)uriMap.get(LOCATION_KEY); subjectURIMap = (HashMap)uriMap.get(SUBJECT_KEY); + otherSubjectURIMap = (HashMap)uriMap.get(OTHER_SUBJECT_KEY); nameURIMap = (HashMap)uriMap.get(NAME_KEY); accessionURIMap = (HashMap)uriMap.get(ACCESSION_KEY); digitalObjectURIMap = (HashMap)uriMap.get(DIGITAL_OBJECT_KEY); diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java index 573c33b..17d9248 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java @@ -734,6 +734,12 @@ private Object[] getASpaceEnumValue(String enumListName, String atValue, boolean String value = enumValues.getString(i); if (value.equalsIgnoreCase(atValue)) return new Object[]{value, true}; } + if (!returnATValue) { + for (int i = 0; i < enumValues.length(); i++) { + String value = enumValues.getString(i); + if (atValue.contains(value) || value.contains(atValue)) return new Object[]{value, true}; + } + } //if there is no matching value in ASpace but the list is configurable return the value from AT and false if (returnATValue) { diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java index eb0af9a..513d476 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java @@ -276,6 +276,58 @@ public String convertSubject(Subjects record) throws Exception { json.put("scope_note", record.getSubjectScopeNote()); + json = addSubjectTerm(record, json); +// +// // see if to define term type as untyped +// boolean isDefault = aspaceCopyUtil.isTermTypeDefault(); +// +// // set the subject terms and term type +// String terms = record.getSubjectTerm(); +// String termTypeAT = record.getSubjectTermType(); +// String termType = (String) enumUtil.getASpaceTermType(termTypeAT)[0]; +// +// // check to make sure we have valid term type, +// // otherwise use the default and add warning message +// if(termType == null) { +// String message = record.getSubjectTerm() + " :: Invalid Term Type: \"" + termTypeAT + "\", Changing to topical\n"; +// aspaceCopyUtil.addErrorMessage(message); +// +// // change term type so record can save for now +// termType = "topical"; +// } +// +// String[] sa = terms.split("\\s*--\\s*"); +// JSONArray termsJA = new JSONArray(); +// +// for(int i = 0; i < sa.length; i++) { +// // check to see if to mark term after the first one as untyped +// if(i > 0 && !isDefault) { +// termType = "untyped"; +// } +// +// String term = sa[i]; +// JSONObject termJS = new JSONObject(); +// termJS.put("term", term); +// termJS.put("term_type", termType); +// termJS.put("vocabulary", vocabularyURI); +// +// termsJA.put(termJS); +// } +// +// json.put("terms", termsJA); + json.put("vocabulary", vocabularyURI); + + return json.toString(); + } + + public JSONObject addSubjectTerm(Subjects record, JSONObject json) throws Exception { + JSONArray termsJA; + try { + termsJA = (JSONArray) json.get("terms"); + } catch (JSONException e) { + termsJA = new JSONArray(); + } + // see if to define term type as untyped boolean isDefault = aspaceCopyUtil.isTermTypeDefault(); @@ -295,7 +347,6 @@ public String convertSubject(Subjects record) throws Exception { } String[] sa = terms.split("\\s*--\\s*"); - JSONArray termsJA = new JSONArray(); for(int i = 0; i < sa.length; i++) { // check to see if to mark term after the first one as untyped @@ -313,9 +364,7 @@ public String convertSubject(Subjects record) throws Exception { } json.put("terms", termsJA); - json.put("vocabulary", vocabularyURI); - - return json.toString(); + return json; } /** diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/IntentionalExitException.java b/src/org/archiviststoolkit/plugin/utils/aspace/IntentionalExitException.java index b138974..eaa9183 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/IntentionalExitException.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/IntentionalExitException.java @@ -8,6 +8,10 @@ */ public class IntentionalExitException extends Exception { + public IntentionalExitException(String message, String atID) { + super(message + "\nStopped at AT Identifier: " + atID); + } + public IntentionalExitException() { super("Exiting migration ..."); } From 1f4084749c8cd0476f8efeb2df3a5d4dbe609593 Mon Sep 17 00:00:00 2001 From: Sarah Morrissey Date: Tue, 24 Oct 2017 13:25:48 -0400 Subject: [PATCH 15/19] single part notes can have multipart types --- .../plugin/utils/aspace/ASpaceEnumUtil.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java index 17d9248..e08a3d9 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java @@ -461,7 +461,12 @@ public Object[] getASpaceSinglePartNoteType(String atValue) { } else if(atValue.contains("physical facet")) { atValue = "physfacet"; } - return getASpaceEnumValue(enumName, atValue, false, defaultValue); + Object[] value = getASpaceEnumValue(enumName, atValue, false, defaultValue); + if (value[0].equals(defaultValue)) { + Object[] multiValue = getASpaceMultiPartNoteType(atValue); + if (!(multiValue[0] == null || multiValue[0].equals("odd"))) value = multiValue; + } + return value; } /** From 24640b77f4b486de18ba69a8a93aaa0bf085eaf6 Mon Sep 17 00:00:00 2001 From: Sarah Morrissey Date: Tue, 24 Oct 2017 15:53:16 -0400 Subject: [PATCH 16/19] enum code mappings are saved when migration stops and some documentation improvements --- README.md | 18 ++- .../plugin/utils/aspace/ASpaceCopyUtil.java | 31 +++-- .../plugin/utils/aspace/ASpaceEnumUtil.java | 8 ++ .../plugin/utils/aspace/ASpaceMapper.java | 118 +++++++++--------- 4 files changed, 98 insertions(+), 77 deletions(-) diff --git a/README.md b/README.md index 8b9f86a..538511d 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ NOTES ON RUNNING THE PLUGIN IN COMMAND LINE MODE 1. Edit the dbcopy.properties to point to the desired AT database and ASpace Instance 2. Run the "dbCopyCLI" class making sure all the *.jar files in "lib" are in the Classpath. -NOTES ON DATA MIGRATION +NOTES ON DATA MIGRATION AND DEFAULTS 1. If a date is missing in AT but is required for AS the default date will be set to 1/1/1900 or 0 for integer dates. 2. The start date specified for a container location is the creation date of the associated resource/accession. @@ -62,9 +62,19 @@ a container 3 is specified without a container 2. corrected by adding ## along with some random string to the ID. 5. If an assessment is linked to records from multiple repositories, duplicate assessments are created - one for each linked repository. -6. If a problem occurs during migration, URI maps should be saved and allow you to continue from where you left -off by checking the 'continue previous migration' box. This should work fairly seamlessly, but you should check the -record migration stopped at as the migrator may correct for a duplicate ID where there is not actually one. + +CONTINUING A PREVIOUS MIGRATION + +1. If a problem occurs during migration, URI maps should be saved and allow you to continue from where you left +off by checking the 'continue previous migration' box. +2. If you are running the migration tool as an Archivist's Toolkit plugin and a connection problem occurs and +causes the migration to stop, restart AT before attempting to continue migration. +2. You can also continue a migration if you manually cancel it. +3. This should work fairly seamlessly, but you should check the record the migration stopped at as the migrator +may correct for a duplicate ID where there is not actually one. +4. It is not necessary to run the repository check again when continuing a migration. +5. You should save your error log and repository check report even if you plan to continue a migration, as these +logs reset when you continue a migration. HOW TOP CONTAINER UNIQUENESS IS DETERMINED diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java index 32c795e..adb2397 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java @@ -84,12 +84,17 @@ public class ASpaceCopyUtil { // hashmap that maps resource from old database with copy in new database private HashMap resourceURIMap = new HashMap(); + // maps AT assessment identifier with uri of copy in AS database private HashMap assessmentURIMap = new HashMap(); - private HashMap> assessmentAttributeDefinitions = new HashMap>(); + // hashmap that maps a repo with its term definitions which are in turn mapped with their IDs + private HashMap> assessmentAttributeDefinitions = + new HashMap>(); + // used to determine whether to attempt to copy assessments when ASpace version can not be determined private Boolean copyAssessments; + // returns the uri of a record in ASpace - works with most record types public String getURIMapping(DomainObject record) { Long recordIdentifier = record.getIdentifier(); @@ -184,10 +189,12 @@ public String getURIMapping(DomainObject record) { private final String REPOSITORY_GROUP_KEY = "repositoryGroupMap"; private final String RECORD_TOTAL_KEY = "copyProgress"; private final String RECORD_ATTEMPTED_KEY = "progressBookmark"; + private final String LOOKUP_LIST_VALUES_TO_CODES_KEY = "lookupListValuesToCodes"; // An Array List for storing the total number of main records transferred ArrayList recordTotals = new ArrayList(); + // these are used to keep track of where the migration is so it can be resumed private LinkedList recordsToCopy = new LinkedList(); private int numAttempted = 0; private int numSuccessful = 0; @@ -278,9 +285,11 @@ private void init() { // map used when copying lookup list items to the archive space backend lookupListMap.put("subject term source", ASpaceClient.VOCABULARY_ENDPOINT); + //set static variables in TopContainerMapper TopContainerMapper.setaSpaceCopyUtil(this); TopContainerMapper.clearAlreadyAdded(); + //initialize the default records to copy list with all records recordsToCopy = new LinkedList(); recordsToCopy.add("Lookup List"); recordsToCopy.add("Repositories"); @@ -429,6 +438,9 @@ private void setASpaceVersion() { } catch (Exception e) { } } + /** + * prompts the user to select if they want to copy assessments or not for the case when AS version is unknown + */ public void setCopyAssessments() { if (aspaceVersion.isEmpty()) { String message = "Cannot determine your version of ArchivesSpace. Do you want to attempt to\n" + @@ -548,7 +560,7 @@ public void copyLookupList() throws Exception { } /** - * Method to load the vocabularies from ASpace backend + * Method to load the repositories from ASpace backend * * @return */ @@ -575,10 +587,6 @@ public void copyRepositoryRecords() throws Exception { ArrayList records = sourceRCD.getRepositories(); -// if (recordsToCopy.peek().equals("Repositories")) { -// records = new ArrayList(records.subList(numAttempted, records.size())); -// } - // these are used to update the progress bar int total = records.size(); int count = numAttempted;//0; @@ -699,10 +707,6 @@ public void copyLocationRecords() throws Exception { ArrayList records = sourceRCD.getLocations(); -// if (recordsToCopy.peek().equals("Locations")) { -// records = new ArrayList(records.subList(numAttempted, records.size())); -// } - // these are used to update the progress bar and import log int total = records.size(); int count = numAttempted; @@ -2750,6 +2754,8 @@ public void saveURIMaps() { uriMap.put("IDs", mapper.getIDs()); + uriMap.put(LOOKUP_LIST_VALUES_TO_CODES_KEY, enumUtil.getLookupListValuesToCodes()); + // save to file system now print("\nSaving URI Maps ..."); @@ -2800,9 +2806,12 @@ public void loadURIMaps() { repositoryMismatchMap = (HashMap)uriMap.get(REPOSITORY_MISMATCH_KEY); } - HashMap> iDs = (HashMap>) uriMap.get("IDs"); + HashMap> iDs = (HashMap>) uriMap.get("IDs"); mapper.setIDs(iDs); + HashMap lookupListCodes = (HashMap) uriMap.get(LOOKUP_LIST_VALUES_TO_CODES_KEY); + enumUtil.setLookupListValuesToCodes(lookupListCodes); + // load the record totals so far if(uriMap.containsKey(RECORD_TOTAL_KEY)) { recordTotals = (ArrayList)uriMap.get(RECORD_TOTAL_KEY); diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java index e08a3d9..72d9ae4 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java @@ -30,6 +30,14 @@ public class ASpaceEnumUtil { // Hash map that maps AT values to AT codes private HashMap lookupListValuesToCodes = new HashMap(); + public HashMap getLookupListValuesToCodes() { + return lookupListValuesToCodes; + } + + public void setLookupListValuesToCodes(HashMap lookupListValuesToCodes) { + this.lookupListValuesToCodes = lookupListValuesToCodes; + } + // Array list that hold values that are currently in the ASpace backend // They is needed, because for some reason, there are values in the AT records // which are not in the appropriate LookupListItem table diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java index 513d476..d1695e1 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java @@ -41,21 +41,28 @@ public class ASpaceMapper { // these store the ids of all accessions, resources, and digital objects loaded so we can // check for uniqueness before copying them to the ASpace backend - private ArrayList digitalObjectIDs = new ArrayList(); - private ArrayList accessionIDs = new ArrayList(); - private ArrayList resourceIDs = new ArrayList(); - private ArrayList eadIDs = new ArrayList(); + private HashSet digitalObjectIDs = new HashSet(); + private HashSet accessionIDs = new HashSet(); + private HashSet resourceIDs = new HashSet(); + private HashSet eadIDs = new HashSet(); - //TODO implement this and have these be saved with uri maps - public void setIDs(HashMap> iDs) { + /** + * sets the IDs that are already in use + * @param iDs + */ + public void setIDs(HashMap> iDs) { digitalObjectIDs = iDs.get("digital object"); accessionIDs = iDs.get("accession"); resourceIDs = iDs.get("resource"); eadIDs = iDs.get("ead"); } - public HashMap> getIDs() { - HashMap> iDs = new HashMap>(); + /** + * gets the IDs that are already in use + * @return a hash map where the keys are the types of IDs + */ + public HashMap> getIDs() { + HashMap> iDs = new HashMap>(); iDs.put("digital object", digitalObjectIDs); iDs.put("accession", accessionIDs); iDs.put("resource", resourceIDs); @@ -277,52 +284,23 @@ public String convertSubject(Subjects record) throws Exception { json.put("scope_note", record.getSubjectScopeNote()); json = addSubjectTerm(record, json); -// -// // see if to define term type as untyped -// boolean isDefault = aspaceCopyUtil.isTermTypeDefault(); -// -// // set the subject terms and term type -// String terms = record.getSubjectTerm(); -// String termTypeAT = record.getSubjectTermType(); -// String termType = (String) enumUtil.getASpaceTermType(termTypeAT)[0]; -// -// // check to make sure we have valid term type, -// // otherwise use the default and add warning message -// if(termType == null) { -// String message = record.getSubjectTerm() + " :: Invalid Term Type: \"" + termTypeAT + "\", Changing to topical\n"; -// aspaceCopyUtil.addErrorMessage(message); -// -// // change term type so record can save for now -// termType = "topical"; -// } -// -// String[] sa = terms.split("\\s*--\\s*"); -// JSONArray termsJA = new JSONArray(); -// -// for(int i = 0; i < sa.length; i++) { -// // check to see if to mark term after the first one as untyped -// if(i > 0 && !isDefault) { -// termType = "untyped"; -// } -// -// String term = sa[i]; -// JSONObject termJS = new JSONObject(); -// termJS.put("term", term); -// termJS.put("term_type", termType); -// termJS.put("vocabulary", vocabularyURI); -// -// termsJA.put(termJS); -// } -// -// json.put("terms", termsJA); + json.put("vocabulary", vocabularyURI); return json.toString(); } + /** + * adds subject terms to a json object + * @param record subject from AT + * @param json json object to add terms to + * @return + * @throws Exception + */ public JSONObject addSubjectTerm(Subjects record, JSONObject json) throws Exception { JSONArray termsJA; try { + //if there is already a list with some terms start with it termsJA = (JSONArray) json.get("terms"); } catch (JSONException e) { termsJA = new JSONArray(); @@ -649,7 +627,7 @@ private void addPhoneNumbers(JSONObject contactsJS, String telephone, String fax } /** - * Method to convert an AT subject record to + * Method to convert an AT repository record * * @param record * @return @@ -674,6 +652,12 @@ public String convertRepository(Repositories record) throws Exception { return json.toString(); } + /** + * converts an AT location record + * @param record + * @return + * @throws Exception + */ public String convertLocation(Locations record) throws Exception { // Main json object JSONObject json = new JSONObject(); @@ -709,7 +693,7 @@ public String convertLocation(Locations record) throws Exception { } /** - * Method to convert an AT subject record to + * Method to convert an AT subject record * * @param record * @return @@ -905,11 +889,13 @@ private void addRightsStatementRecord(Accessions record, JSONObject json) throws JSONObject rightStatementJS = new JSONObject(); rightStatementJS.put("rights_type", "other"); rightStatementJS.put("other_rights_basis", enumUtil.getASpaceRightsBasis(null)[0]); -// rightStatementJS.put("status", "copyrighted"); -// rightStatementJS.put("jurisdiction", "US"); // TODO 8/12/2013 this is not suppose to be required + + //add the start date or default date if null Date startDate = record.getRightsTransferredDate(); if (startDate == null) startDate = DEFAULT_DATE; rightStatementJS.put("start_date", startDate.toString()); + + //add the note if there is one JSONArray notesJA = new JSONArray(); String note = record.getRightsTransferredNote(); if (note != null && !(note.isEmpty())) { @@ -922,6 +908,7 @@ private void addRightsStatementRecord(Accessions record, JSONObject json) throws notesJA.put(noteJS); } rightStatementJS.put("notes", notesJA); + rightsStatementJA.put(rightStatementJS); json.put("rights_statements", rightsStatementJA); } @@ -1558,18 +1545,6 @@ public JSONObject convertResource(Resources record) throws Exception { return json; } -// public void addRepositoryProcessingNote(StringBuilder sb, ResourcesComponents component) { -// if (sb.length() >= 65000) return; -// String note = component.getRepositoryProcessingNote(); -// if (note != null && !(note.isEmpty())) { -// sb.append(component); -// sb.append(": "); -// sb.append(note); -// sb.append('\n'); -// } -// for (ResourcesComponents child: component.getResourcesComponents()) addRepositoryProcessingNote(sb, child); -// } - /** * Method to convert a resource record into an archival object * @@ -1737,6 +1712,13 @@ private String convertAssessment(Assessments record) throws Exception { return json.toString(); } + /** + * method to add the linked records with matching repository to an assessment + * @param jsonText + * @param record + * @return + * @throws Exception + */ public String addAssessmentsRecords(String jsonText, Assessments record) throws Exception { JSONObject json = new JSONObject(jsonText); @@ -1771,6 +1753,13 @@ public String addAssessmentsRecords(String jsonText, Assessments record) throws return json.toString(); } + /** + * adds an ASpace agent and gives a reference to it to be used as an assessment agent + * @param name + * @param assessment + * @return + * @throws Exception + */ private JSONArray addAssessmentsAgent(String name, Assessments assessment) throws Exception { JSONObject json = new JSONObject(); @@ -1781,10 +1770,13 @@ private JSONArray addAssessmentsAgent(String name, Assessments assessment) throw name = name.trim(); boolean unknown = false; if (name == null || name.isEmpty()) { + //if a default name 'unknown' has already been added use that instead of adding again if (unknownName != null) return unknownName; name = "unknown"; unknown = true; } + + //map the name to an ASpace agent nameJSON.put("primary_name", name); nameJSON.put("sort_name", name); nameJSON.put("source", enumUtil.getASpaceNameSource(null)[0]); @@ -1792,9 +1784,11 @@ private JSONArray addAssessmentsAgent(String name, Assessments assessment) throw namesJA.put(nameJSON); json.put("names", namesJA); + //save the agent to ASpace String endpoint = "/agents/people"; String id = aspaceCopyUtil.saveRecord(endpoint , json.toString(), "Assessments->" + assessment.getIdentifier()); + //return a JSONArray with a reference to the agent String uri = endpoint + "/" + id; JSONArray ja = new JSONArray(); From c7ad25a5abb557a10f080ea9779237188c19fe34 Mon Sep 17 00:00:00 2001 From: Sarah Morrissey Date: Wed, 25 Oct 2017 09:52:42 -0400 Subject: [PATCH 17/19] made lookuplist values to codes hashmap static --- .../plugin/utils/aspace/ASpaceCopyUtil.java | 18 ++++++++++-------- .../plugin/utils/aspace/ASpaceEnumUtil.java | 18 ++++++++++++------ 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java index adb2397..9e723d3 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java @@ -281,6 +281,7 @@ private void init() { enumUtil.setLanguageCodes(languageCodes); enumUtil.setNameLinkCreatorCodes(nameLinkCreatorCodes); + ASpaceEnumUtil.setLookupListValuesToCodes(new HashMap()); // map used when copying lookup list items to the archive space backend lookupListMap.put("subject term source", ASpaceClient.VOCABULARY_ENDPOINT); @@ -1029,10 +1030,6 @@ public void addAssessments() throws Exception { ArrayList records = sourceRCD.getAssessments(); -// if (recordsToCopy.peek().equals("Assessments")) { -// records = new ArrayList(records.subList(numAttempted, records.size())); -// } - // these are used to update the progress bar int total = records.size(); int count = numAttempted; @@ -1235,15 +1232,20 @@ public void copySubjectRecords() throws Exception { } String jsonText; - String otherURIMapKey = subject.getSubjectTerm() + " " + subject.getSubjectSource(); + String otherURIMapKey = subject.getSubjectTerm() + " " + enumUtil.getASpaceSubjectSource(subject.getSubjectSource())[0]; String uri; boolean alreadyExists = otherSubjectURIMap.containsKey(otherURIMapKey); if (alreadyExists) { uri = otherSubjectURIMap.get(otherURIMapKey); - JSONObject json = getRecord(uri); - json = mapper.addSubjectTerm(subject, json); - jsonText = json.toString(); + try { + JSONObject json = getRecord(uri); + json = mapper.addSubjectTerm(subject, json); + jsonText = json.toString(); + } catch (NullPointerException e) { + jsonText = (String) mapper.convert(subject); + uri = ASpaceClient.SUBJECT_ENDPOINT; + } } else { jsonText = (String) mapper.convert(subject); uri = ASpaceClient.SUBJECT_ENDPOINT; diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java index 72d9ae4..521d9b7 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java @@ -28,14 +28,14 @@ public class ASpaceEnumUtil { private static HashMap dynamicEnums; // Hash map that maps AT values to AT codes - private HashMap lookupListValuesToCodes = new HashMap(); + private static HashMap lookupListValuesToCodes = new HashMap(); - public HashMap getLookupListValuesToCodes() { + public static HashMap getLookupListValuesToCodes() { return lookupListValuesToCodes; } - public void setLookupListValuesToCodes(HashMap lookupListValuesToCodes) { - this.lookupListValuesToCodes = lookupListValuesToCodes; + public static void setLookupListValuesToCodes(HashMap lookupListValuesToCodes) { + ASpaceEnumUtil.lookupListValuesToCodes = lookupListValuesToCodes; } // Array list that hold values that are currently in the ASpace backend @@ -83,6 +83,10 @@ public Object[] getASpaceSubjectSource(String atValue) { String code; + code = lookupListValuesToCodes.get(atValue); + System.out.println(atValue); + System.out.println(code); + atValue = atValue.toLowerCase(); if(atValue.contains("art & architecture thesaurus")) { @@ -93,16 +97,18 @@ public Object[] getASpaceSubjectSource(String atValue) { code = "tgn"; } else if (atValue.contains("library of congress subject headings")) { code = "lcsh"; - } else if (atValue.contains("local")) { + } else if (atValue.equals("local")) { code = "local"; } else if (atValue.contains("medical subject headings")) { code = "mesh"; } else if (atValue.contains("thesaurus for graphic materials")) { code = "gmgpc"; } else { - code = lookupListValuesToCodes.get(atValue); if (code == null || code.isEmpty()) code = "local"; + else code = code.replace(".", ""); } + System.out.println(code); + System.out.println(getASpaceEnumValue("subject_source", code)[0] + "\n"); return getASpaceEnumValue("subject_source", code); } From 3d160ae2e8350ad0d58b09841e5cd1fba9d975b8 Mon Sep 17 00:00:00 2001 From: Sarah Morrissey Date: Wed, 25 Oct 2017 11:30:31 -0400 Subject: [PATCH 18/19] updated makep --- makep | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/makep b/makep index d24af7c..0c8875a 100755 --- a/makep +++ b/makep @@ -1,19 +1,16 @@ #!/bin/sh -#This must be run from the at-migration directory - -# get current working directory -cwd=$(pwd) # copy the plugin.xml file -cp -v plugin.xml out/production/ScriptAT +cp -v plugin.xml out/production/at-migration +cp -v README.md out/production/at-migration -cd out/production/ScriptAT +cd out/production/at-migration -zip -rv scriptAT.zip . -i \*.class *.bsh *.xml -x test/* +zip -rv scriptAT.zip . -i \*.class *.bsh *.xml *.md -x test/* -mv -v scriptAT.zip C:/"Program Files (x86)"/"Archivists Toolkit 2.0"/plugins #This should be wherever AT is installed +mv -v scriptAT.zip C:/"Program Files (x86)"/"Archivists Toolkit 2.0"/plugins # create a zip of the source code -cd ${cwd} +cd ../../.. zip -vr scriptAT_src.zip src -x "*.svn*" "*.DS_Store*" \ No newline at end of file From feaaa8f7abc362db30b22d35d3901bd8a9e58e5b Mon Sep 17 00:00:00 2001 From: Sarah Morrissey Date: Wed, 25 Oct 2017 13:54:11 -0400 Subject: [PATCH 19/19] added publish for digital objects --- .../plugin/utils/aspace/ASpaceEnumUtil.java | 5 +---- .../archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java | 5 +++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java index 521d9b7..c28474d 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceEnumUtil.java @@ -84,8 +84,6 @@ public Object[] getASpaceSubjectSource(String atValue) { String code; code = lookupListValuesToCodes.get(atValue); - System.out.println(atValue); - System.out.println(code); atValue = atValue.toLowerCase(); @@ -107,8 +105,7 @@ public Object[] getASpaceSubjectSource(String atValue) { if (code == null || code.isEmpty()) code = "local"; else code = code.replace(".", ""); } - System.out.println(code); - System.out.println(getASpaceEnumValue("subject_source", code)[0] + "\n"); + return getASpaceEnumValue("subject_source", code); } diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java index d1695e1..9060e58 100644 --- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java +++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceMapper.java @@ -1337,6 +1337,8 @@ public JSONObject convertToDigitalObjectComponent(DigitalObjects record) throws String title = record.getObjectLabel(); json.put("title", fixEmptyString(title)); + json.put("publish", publishHashMap.get("digitalObjects")); + addLanguageCode(json, record.getLanguageCode()); /* add fields required for digital object component*/ @@ -1784,6 +1786,9 @@ private JSONArray addAssessmentsAgent(String name, Assessments assessment) throw namesJA.put(nameJSON); json.put("names", namesJA); + json.put("publish", false); + json.put("agent_type", "agent_person"); + //save the agent to ASpace String endpoint = "/agents/people"; String id = aspaceCopyUtil.saveRecord(endpoint , json.toString(), "Assessments->" + assessment.getIdentifier());