diff --git a/src/org/archiviststoolkit/plugin/dbCopyCLI.java b/src/org/archiviststoolkit/plugin/dbCopyCLI.java
index 99eeba3..c8fc33d 100644
--- a/src/org/archiviststoolkit/plugin/dbCopyCLI.java
+++ b/src/org/archiviststoolkit/plugin/dbCopyCLI.java
@@ -23,8 +23,6 @@ public class dbCopyCLI {
private boolean useTracer = false;
private String tracerDatabase = "";
- private int databaseURLIndex = -2;
-
private int clientThreads = 1;
private boolean continueFromResources = false;
@@ -124,7 +122,7 @@ public Session getDatabaseSession() {
// see whether to connect to the particular index
if(useTracer) {
databaseType = "MySQL";
- atUrl = "jdbc:mysql://tracerdb.cyo37z0ucix8.us-east-1.rds.amazonaws.com/at" + tracerDatabase;
+ atUrl = "jdbc:mysql://test.archivesspace.org/at" + tracerDatabase;
atUsername = "aspace";
atPassword = "clubfoots37@freakiest";
@@ -280,7 +278,7 @@ private void startASpaceCopyProcess() {
migrationErrors = ascopy.getSaveErrorMessages() + "\n\nTotal errors: " + errorCount;
// now save the migration log
- saveLogFile("migration_log.txt", migrationErrors);
+ saveLogFile("migration_log-" + getDatabaseNameFromURL(atUrl) + ".txt", migrationErrors);
} catch (Exception e) {
System.out.println("Unrecoverable exception, migration stopped ...\n\n");
@@ -312,6 +310,16 @@ private void saveLogFile(String logfileName, String logText) {
}
}
+ /**
+ * Return only the name of the database so it can be appended to log file
+ *
+ * @return
+ */
+ public String getDatabaseNameFromURL(String databaseURL) {
+ int begin = databaseURL.lastIndexOf("/") + 1;
+ return databaseURL.substring(begin);
+ }
+
/**
* Method to close the rcd connection
*/
@@ -374,5 +382,7 @@ public static void main(String[] args) {
}
}
}
+
+ System.exit(0);
}
}
diff --git a/src/org/archiviststoolkit/plugin/dbCopyFrame.java b/src/org/archiviststoolkit/plugin/dbCopyFrame.java
index c539fe6..c4241e0 100644
--- a/src/org/archiviststoolkit/plugin/dbCopyFrame.java
+++ b/src/org/archiviststoolkit/plugin/dbCopyFrame.java
@@ -33,7 +33,7 @@
* @author Nathan Stevens
*/
public class dbCopyFrame extends JFrame {
- public static final String VERSION = "Archives Space Data Migrator v1.4.0 (09-29-2015)";
+ public static final String VERSION = "Archives Space Data Migrator v1.4.2 (10-28-2015)";
// The application when running within the AT
private ApplicationFrame mainFrame = null;
@@ -857,7 +857,7 @@ private void initComponents() {
}));
//---- apiLabel ----
- apiLabel.setText(" Archives Space Version: v1.4.0");
+ apiLabel.setText(" Archives Space Version: v1.4.x");
apiLabel.setHorizontalTextPosition(SwingConstants.CENTER);
contentPanel.add(apiLabel, cc.xy(1, 1));
diff --git a/src/org/archiviststoolkit/plugin/dbCopyFrame.jfd b/src/org/archiviststoolkit/plugin/dbCopyFrame.jfd
index 0f2f1ef..6da9379 100644
--- a/src/org/archiviststoolkit/plugin/dbCopyFrame.jfd
+++ b/src/org/archiviststoolkit/plugin/dbCopyFrame.jfd
@@ -51,7 +51,7 @@
javax.swing.JLabel
text
- Archives Space Version: v1.4.0
+ Archives Space Version: v1.4.x
horizontalTextPosition
diff --git a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java
index 184d16f..3ea55c4 100644
--- a/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java
+++ b/src/org/archiviststoolkit/plugin/utils/aspace/ASpaceCopyUtil.java
@@ -25,7 +25,7 @@
* Utility class for copying data from the AT to Archive Space
*/
public class ASpaceCopyUtil {
- public static final String SUPPORTED_ASPACE_VERSION = "v1.3.0,v1.4.0";
+ public static final String SUPPORTED_ASPACE_VERSION = "v1.3,v1.4";
// used to get session from the source and destination databases
private RemoteDBConnectDialogLight sourceRCD;
@@ -364,7 +364,9 @@ public boolean getSession() {
private void setASpaceVersion() {
try {
JSONObject infoJS = new JSONObject(aspaceInformation);
- aspaceVersion = infoJS.getString("archivesSpaceVersion");
+ String version = infoJS.getString("archivesSpaceVersion");
+ int end = version.lastIndexOf(".");
+ aspaceVersion = version.substring(0, end);
} catch (Exception e) { }
}