maintenance
This commit is contained in:
@@ -42,13 +42,13 @@ public class CropAssetCopyTool {
|
|||||||
private static int skipLines = 0;
|
private static int skipLines = 0;
|
||||||
|
|
||||||
|
|
||||||
private static String toolboxExportFilePath = "C:\\Temp\\Migration CS - PhotoGallery\\export - 2017-08-28 - logos and tags not included in first migration.csv";
|
private static String toolboxExportFilePath = "C:\\Temp\\Migration CS - PhotoGallery\\export - 2017-08-25 - assets not included in first migration.csv";
|
||||||
private static String toolboxExportUpdateFilePath = "C:\\Temp\\Migration CS - PhotoGallery\\export - 2017-08-28 - logos and tags not included in first migration.copytool.csv";
|
private static String toolboxExportUpdateFilePath = "C:\\Temp\\Migration CS - PhotoGallery\\export - 2017-08-25 - assets not included in first migration.copytool.csv";
|
||||||
private static String logfilePath = "C:\\Temp\\Migration CS - PhotoGallery\\export - 2017-08-28 - logos and tags not included in first migration.copytool.log";
|
private static String logfilePath = "C:\\Temp\\Migration CS - PhotoGallery\\export - 2017-08-25 - assets not included in first migration.copytool.log";
|
||||||
private static String assetPath = "D:\\ToolboxLogosAndTags";
|
private static String assetPath = "D:\\ToolboxPhotoGallery-numbered";
|
||||||
// private static String videoPath = "D:\\Toolbox\\Movies\\";
|
// private static String videoPath = "D:\\Toolbox\\Movies\\";
|
||||||
|
|
||||||
private static File targetDir = new File("D:\\ToolboxLogosAndTags-renamed");
|
private static File targetDir = new File("D:\\ToolboxPhotoGallery");
|
||||||
// private static String videoTargetPath = "D:\\UploadVideos";
|
// private static String videoTargetPath = "D:\\UploadVideos";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -27,15 +27,17 @@ import com.univocity.parsers.csv.CsvWriterSettings;
|
|||||||
* @author GEXCE
|
* @author GEXCE
|
||||||
*/
|
*/
|
||||||
public class ToolboxImportFileGenerator {
|
public class ToolboxImportFileGenerator {
|
||||||
|
private static String[] selection = { };
|
||||||
|
|
||||||
private static Logger log = Logger.getLogger(ToolboxImportFileGenerator.class);
|
private static Logger log = Logger.getLogger(ToolboxImportFileGenerator.class);
|
||||||
|
|
||||||
private static String toolboxExportFilePath = "C:\\Temp\\Migration CS - PhotoGallery\\export - 2017-08-28 - logos and tags not included in first migration.copytool.csv";
|
private static String toolboxExportFilePath = "C:\\Temp\\Migration CS - PhotoGallery\\all imported IDs - toolbox export.csvXXX";
|
||||||
private static String logfilePath = "C:\\Temp\\Migration CS - PhotoGallery\\export - 2017-08-28 - logos and tags not included in first migration.copytool.generator.log";
|
private static String logfilePath = "C:\\Temp\\Migration CS - PhotoGallery\\all imported IDs - toolbox export.problem with type import.generator.XXX.log";
|
||||||
private static String licenseGuidsFilePath = "C:\\Temp\\Migration CS - SQL Server\\Release_GUIDs.csv";
|
private static String licenseGuidsFilePath = "C:\\Temp\\Migration CS - SQL Server\\Release_GUIDs.csv";
|
||||||
|
|
||||||
// XXX Spreadsheet needs be be named "Records" in Excel for the importer
|
// XXX Spreadsheet needs be be named "Records" in Excel for the importer
|
||||||
private static String importFilePath = "C:\\Temp\\Migration CS - PhotoGallery\\export - 2017-08-28 - logos and tags not included in first migration.copytool.generator.csv";
|
private static String importFilePath = "C:\\Temp\\Migration CS - PhotoGallery\\all imported IDs - toolbox export.problem with type import.generator.csv";
|
||||||
private static String uploadPath = "/Resources/Upload/ToolboxLogosAndTags";
|
private static String uploadPath = "/Resources/Upload/ToolboxMigration";
|
||||||
|
|
||||||
private static final Map<String, String> brandMap;
|
private static final Map<String, String> brandMap;
|
||||||
private static final Map<String, String> unitMap;
|
private static final Map<String, String> unitMap;
|
||||||
@@ -1139,8 +1141,7 @@ public class ToolboxImportFileGenerator {
|
|||||||
String categoryClassification = targetType.substring(0, targetType.indexOf(" : "));
|
String categoryClassification = targetType.substring(0, targetType.indexOf(" : "));
|
||||||
String subCategoryClassification = targetType.substring(targetType.indexOf(" : ") + 3);
|
String subCategoryClassification = targetType.substring(targetType.indexOf(" : ") + 3);
|
||||||
|
|
||||||
asset.appendClassification = asset.appendClassification
|
asset.appendClassification = "/Bayer/Crop Science/CategoryItem/" + categoryClassification
|
||||||
+ "\n/Bayer/Crop Science/CategoryItem/" + categoryClassification
|
|
||||||
+ "\n/Bayer/Crop Science/CategoryItem/" + categoryClassification + "/" + subCategoryClassification;
|
+ "\n/Bayer/Crop Science/CategoryItem/" + categoryClassification + "/" + subCategoryClassification;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -1244,7 +1245,7 @@ public class ToolboxImportFileGenerator {
|
|||||||
List<Object[]> csvOutputList = new ArrayList<Object[]>();
|
List<Object[]> csvOutputList = new ArrayList<Object[]>();
|
||||||
for (CropScienceAsset asset : assets.values()) {
|
for (CropScienceAsset asset : assets.values()) {
|
||||||
|
|
||||||
// XXX export only assets with license data
|
// // XXX export only assets with license data
|
||||||
// if (asset.licenseRecords.size() == 0)
|
// if (asset.licenseRecords.size() == 0)
|
||||||
// continue;
|
// continue;
|
||||||
|
|
||||||
@@ -1255,6 +1256,16 @@ public class ToolboxImportFileGenerator {
|
|||||||
if (asset.filename.equals("Texas Cotton Growers Achieve Excellence with FiberMax?.mp4"))
|
if (asset.filename.equals("Texas Cotton Growers Achieve Excellence with FiberMax?.mp4"))
|
||||||
asset.filename = "CR0715FIBMAXA232V00R0.MP4";
|
asset.filename = "CR0715FIBMAXA232V00R0.MP4";
|
||||||
|
|
||||||
|
if (selection.length > 0) {
|
||||||
|
boolean found = false;
|
||||||
|
for (String s : selection) {
|
||||||
|
if (s.equals(asset.filename))
|
||||||
|
found = true;
|
||||||
|
}
|
||||||
|
if (!found)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
String brands = "";
|
String brands = "";
|
||||||
for (String brand : asset.brands) {
|
for (String brand : asset.brands) {
|
||||||
if (brands.length() > 0)
|
if (brands.length() > 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user