├── doc.zip ├── src ├── overview.html └── gov │ └── nara │ └── nwts │ └── ftapp │ ├── filetest │ ├── package.html │ ├── NameMD5Checksum.java │ ├── NameSha1Checksum.java │ ├── LowercaseTest.java │ ├── NameSha256Checksum.java │ ├── CountByType.java │ ├── NameMatch.java │ ├── BaseNameMatch.java │ ├── ByMD5Checksum.java │ ├── DirMatch.java │ ├── DirTypeNameMatch.java │ ├── ListDirectories.java │ ├── ActionRegistry.java │ ├── FileTest.java │ ├── NameChecksum.java │ ├── RandomFileTest.java │ ├── DefaultFileTest.java │ └── NameValidationTest.java │ ├── nameValidation │ ├── package.html │ ├── RenamePassFail.java │ ├── ValidPattern.java │ ├── InvalidManualPattern.java │ ├── RenameablePattern.java │ ├── CustomPattern.java │ ├── NameValidationPattern.java │ ├── RenameDetails.java │ ├── RenameStatus.java │ └── DirAnalysis.java │ ├── YN.java │ ├── crud │ ├── package.html │ ├── CRUD.java │ └── CRUDDetails.java │ ├── stats │ ├── Randomizer.java │ ├── NameStats.java │ ├── CountStats.java │ ├── Stats.java │ ├── DataStats.java │ ├── NumericStats.java │ ├── FileCountStats.java │ ├── package.html │ ├── RandomStats.java │ ├── CRUDStats.java │ ├── CountAppendStats.java │ ├── DirStats.java │ ├── NameValidationStats.java │ └── DirTypeStats.java │ ├── filter │ ├── TxtFilter.java │ ├── XmlFilter.java │ ├── package.html │ ├── ExcelFilter.java │ ├── CSVFilter.java │ ├── ODSFilter.java │ ├── ImageFileTestFilter.java │ ├── TiffJpegFileTestFilter.java │ ├── AVFileTestFilter.java │ ├── OdsCsvFilter.java │ ├── JpegFileTestFilter.java │ ├── TiffFileTestFilter.java │ ├── FileTestFilter.java │ └── DefaultFileTestFilter.java │ ├── ftprop │ ├── package.html │ ├── FTProp.java │ ├── FTPropString.java │ ├── DefaultFTProp.java │ └── FTPropEnum.java │ ├── importer │ ├── package.html │ ├── Importer.java │ ├── ImporterRegistry.java │ ├── CsvFileImporter.java │ ├── TabSepFileImporter.java │ ├── SemicolonFileImporter.java │ ├── DefaultImporter.java │ ├── FileListImporter.java │ ├── Parser.java │ └── DelimitedFileImporter.java │ ├── package.html │ ├── gui │ ├── package.html │ ├── MyBorderPanel.java │ ├── DirSelect.java │ ├── DirSelectChooser.java │ ├── MyProgress.java │ ├── MyPanel.java │ ├── FileCatalog.java │ ├── FileSelect.java │ ├── GuiFileTraversalSW.java │ ├── FilterPanel.java │ ├── FileSelectChooser.java │ ├── MyTableModel.java │ ├── SummaryPanel.java │ ├── GuiFileTraversal.java │ ├── DetailsPanel.java │ ├── TableSaver.java │ ├── ImportPanel.java │ ├── StatsTable.java │ ├── ProgressPanel.java │ └── CriteriaPanel.java │ ├── Timer.java │ ├── FileAnalyzer.java │ ├── FileAnalyzerMod.java │ ├── MyDirectoryFilter.java │ ├── ResultFilter.java │ ├── ActionResult.java │ ├── MyFilenameFilter.java │ ├── BatchImporter.java │ └── FileTraversal.java ├── bin └── fileAnalyzer.jar ├── samples └── ImageAnalyzer │ ├── src │ └── gov │ │ └── nara │ │ └── nwts │ │ └── ftappImg │ │ ├── tif │ │ ├── package.html │ │ └── TifExtractor.java │ │ ├── jpeg │ │ ├── package.html │ │ └── JpegExtractor.java │ │ ├── tags │ │ ├── package.html │ │ ├── Extractor.java │ │ ├── DefaultExtractor.java │ │ └── XMPExtractor.java │ │ ├── filetest │ │ ├── package.html │ │ ├── tmp0000.html │ │ ├── ImageActionRegistry.java │ │ ├── CountJpeg.java │ │ ├── CountTiff.java │ │ └── GenericImageProperties.java │ │ ├── stats │ │ ├── package.html │ │ ├── GenericImageStats.java │ │ ├── ImageStats.java │ │ └── JpegStats.java │ │ ├── package.html │ │ └── ImageFileAnalyzer.java │ └── README ├── doc └── NARA File Analyzer and Metadata Harvester.doc ├── javadoc.css ├── codeinventory.json ├── LICENSE.md └── README.md /doc.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usnationalarchives/File-Analyzer/HEAD/doc.zip -------------------------------------------------------------------------------- /src/overview.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usnationalarchives/File-Analyzer/HEAD/src/overview.html -------------------------------------------------------------------------------- /bin/fileAnalyzer.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usnationalarchives/File-Analyzer/HEAD/bin/fileAnalyzer.jar -------------------------------------------------------------------------------- /samples/ImageAnalyzer/src/gov/nara/nwts/ftappImg/tif/package.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | Helper classes for parsing TIF metadata. 4 | -------------------------------------------------------------------------------- /samples/ImageAnalyzer/src/gov/nara/nwts/ftappImg/jpeg/package.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Helper classes for parsing jpeg metadata. 4 | 5 | -------------------------------------------------------------------------------- /src/gov/nara/nwts/ftapp/filetest/package.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usnationalarchives/File-Analyzer/HEAD/src/gov/nara/nwts/ftapp/filetest/package.html -------------------------------------------------------------------------------- /doc/NARA File Analyzer and Metadata Harvester.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usnationalarchives/File-Analyzer/HEAD/doc/NARA File Analyzer and Metadata Harvester.doc -------------------------------------------------------------------------------- /samples/ImageAnalyzer/src/gov/nara/nwts/ftappImg/tags/package.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Helper classes for reporting on metadata embedded in images. 4 | 5 | -------------------------------------------------------------------------------- /src/gov/nara/nwts/ftapp/nameValidation/package.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usnationalarchives/File-Analyzer/HEAD/src/gov/nara/nwts/ftapp/nameValidation/package.html -------------------------------------------------------------------------------- /samples/ImageAnalyzer/src/gov/nara/nwts/ftappImg/filetest/package.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | File Test that perform generic image metadata extraction and reporting. 4 | {@link gov.nara.nwts.ftapp.filetest} 5 | -------------------------------------------------------------------------------- /samples/ImageAnalyzer/src/gov/nara/nwts/ftappImg/filetest/tmp0000.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | File Test that perform generic image metadata extraction and reporting. 4 | {@link gov.nara.nwts.ftapp.filetest} 5 | -------------------------------------------------------------------------------- /samples/ImageAnalyzer/src/gov/nara/nwts/ftappImg/stats/package.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | File Test Stats objects supporting File Tests that report on embedded image metadata. 4 | {@link gov.nara.nwts.ftapp.stats} 5 | -------------------------------------------------------------------------------- /src/gov/nara/nwts/ftapp/YN.java: -------------------------------------------------------------------------------- 1 | package gov.nara.nwts.ftapp; 2 | 3 | /** 4 | * Simple enumeration when reporting statistics 5 | * @author TBrady 6 | * 7 | */ 8 | public enum YN implements ComparableThis package contains custom file import rules that can be invoked from the File Analyzer.
4 |The primary reason for providing import functionality is to support the match/merge capabilities of the File Analyzer GUI.
5 |As new import rules are created, the File Analyzer could also serve as an ingest tool.
6 | 7 | -------------------------------------------------------------------------------- /src/gov/nara/nwts/ftapp/filter/ODSFilter.java: -------------------------------------------------------------------------------- 1 | package gov.nara.nwts.ftapp.filter; 2 | 3 | /** 4 | * Filter for Open Office Spreadsheet files 5 | * @author TBrady 6 | * 7 | */ 8 | public class ODSFilter extends DefaultFileTestFilter { 9 | public String getSuffix() { 10 | return ".ods"; 11 | } 12 | public String getName(){return "Open Office Spreadsheet";} 13 | 14 | public String getShortName(){return "ODS";} 15 | } 16 | -------------------------------------------------------------------------------- /samples/ImageAnalyzer/src/gov/nara/nwts/ftappImg/package.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | This package contains File Analyzer objects of general use beyond NARA but which are dependent on 3rd party libraries that extract metadata from image files. 4 |This package contains the main entry points for the File Analyzer as well as the workflow components that are common to both the GUI and the Command line versions of the File Analyzer. 4 |
The contents of this package are intended to be of generic use to other institutions that might use the File Analyzer. The contents of this package should not require any libraries other than the standard Java SE 1.6 or higher.
5 | 6 | -------------------------------------------------------------------------------- /src/gov/nara/nwts/ftapp/filter/TiffFileTestFilter.java: -------------------------------------------------------------------------------- 1 | package gov.nara.nwts.ftapp.filter; 2 | 3 | /** 4 | * Filter for TIF files 5 | * @author TBrady 6 | * 7 | */ 8 | public class TiffFileTestFilter extends DefaultFileTestFilter { 9 | 10 | public String getSuffix() { 11 | return ".tif"; 12 | } 13 | public String getPrefix() { 14 | return "^[^\\.].*"; 15 | } 16 | public boolean isRePrefix() { 17 | return true; 18 | } 19 | public String getName(){return "Tiffs";} 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/gov/nara/nwts/ftapp/gui/package.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |This package contains the Graphical User Interface elements of the File Analyzer.
4 |Note: In order to provide a responsive user experience, long-running actions to be performed within a Java GUI should occur in a worker thread that periodically updates its status to the GUI application thread. Several functions that are straightforward in the command line mode of the File Analyzer, have been decomposed into worker thread and GUI thread actions.
5 | 6 | -------------------------------------------------------------------------------- /samples/ImageAnalyzer/src/gov/nara/nwts/ftappImg/tags/Extractor.java: -------------------------------------------------------------------------------- 1 | package gov.nara.nwts.ftappImg.tags; 2 | 3 | import gov.nara.nwts.ftappImg.tags.ImageTags.DUP; 4 | import gov.nara.nwts.ftappImg.tags.ImageTags.TAGS; 5 | 6 | /** 7 | * Contract for default behavior for an image metadata extractor 8 | * @author TBrady 9 | * 10 | */ 11 | public interface Extractor { 12 | public void close(); 13 | public String getString(DUP tags); 14 | public String getString(DUP tags, boolean b); 15 | public String getString(TAGS tags); 16 | } 17 | -------------------------------------------------------------------------------- /src/gov/nara/nwts/ftapp/Timer.java: -------------------------------------------------------------------------------- 1 | package gov.nara.nwts.ftapp; 2 | 3 | import java.util.Date; 4 | /** 5 | * Helper class to report on the duration of a File Analyzer action. 6 | * @author TBrady 7 | * 8 | */ 9 | public class Timer { 10 | Date start; 11 | Date end; 12 | 13 | public Timer() { 14 | start = new Date(); 15 | } 16 | 17 | public void end() { 18 | end = new Date(); 19 | } 20 | 21 | public double getDuration() { 22 | if (end == null) 23 | end(); 24 | return (end.getTime() - start.getTime())*.001; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/gov/nara/nwts/ftapp/gui/MyBorderPanel.java: -------------------------------------------------------------------------------- 1 | package gov.nara.nwts.ftapp.gui; 2 | 3 | import java.awt.BorderLayout; 4 | 5 | import javax.swing.JPanel; 6 | 7 | /** 8 | * GUI helper class to add a panel with a border layout 9 | * @author TBrady 10 | * 11 | */ 12 | class MyBorderPanel extends MyPanel { 13 | private static final long serialVersionUID = 1L; 14 | MyBorderPanel() { 15 | super(new BorderLayout()); 16 | } 17 | JPanel addPanel(JPanel p, String loc) { 18 | add(p, (loc != null) ? loc : BorderLayout.CENTER); 19 | return p; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/gov/nara/nwts/ftapp/importer/Importer.java: -------------------------------------------------------------------------------- 1 | package gov.nara.nwts.ftapp.importer; 2 | 3 | import gov.nara.nwts.ftapp.ActionResult; 4 | 5 | import java.io.File; 6 | import java.io.IOException; 7 | 8 | /** 9 | * Contract that Importers will fullfill. 10 | * @author TBrady 11 | * 12 | */ 13 | public interface Importer { 14 | public ActionResult importFile(File selectedFile) throws IOException; 15 | public String getDescription(); 16 | public boolean allowForceKey(); 17 | public String getShortName(); 18 | public String getShortNameFormatted(); 19 | public String getShortNameNormalized(); 20 | } 21 | -------------------------------------------------------------------------------- /src/gov/nara/nwts/ftapp/FileAnalyzer.java: -------------------------------------------------------------------------------- 1 | package gov.nara.nwts.ftapp; 2 | 3 | import gov.nara.nwts.ftapp.gui.DirectoryTable; 4 | 5 | import java.io.File; 6 | 7 | /** 8 | * Driver for the GUI version of the file analyzer with file modification rules disabled. 9 | * This application was originally created by Terry Brady in NARA's Digitization Services Branch. 10 | * @author TBrady 11 | * 12 | */ 13 | public class FileAnalyzer { 14 | 15 | public static void main(String[] args) { 16 | if (args.length > 0) 17 | new DirectoryTable(new File(args[0]),false); 18 | else 19 | new DirectoryTable(null,false); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/gov/nara/nwts/ftapp/FileAnalyzerMod.java: -------------------------------------------------------------------------------- 1 | package gov.nara.nwts.ftapp; 2 | 3 | import gov.nara.nwts.ftapp.gui.DirectoryTable; 4 | 5 | import java.io.File; 6 | 7 | /** 8 | * Driver for the GUI version of the file analyzer with file modification rules enabled. 9 | * This application was originally created by Terry Brady in NARA's Digitization Services Branch. 10 | * @author TBrady 11 | * 12 | */ 13 | public class FileAnalyzerMod { 14 | 15 | public static void main(String[] args) { 16 | if (args.length > 0) 17 | new DirectoryTable(new File(args[0]),true); 18 | else 19 | new DirectoryTable(null,true); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/gov/nara/nwts/ftapp/gui/DirSelect.java: -------------------------------------------------------------------------------- 1 | package gov.nara.nwts.ftapp.gui; 2 | 3 | import javax.swing.JFileChooser; 4 | import javax.swing.JFrame; 5 | import javax.swing.JTextField; 6 | 7 | /** 8 | * Displays a directory selection dialog; results will be saved to a specified text field. 9 | * @author TBrady 10 | * 11 | */ 12 | class DirSelect extends FileSelect { 13 | private static final long serialVersionUID = 1L; 14 | 15 | public void configureChooser() { 16 | jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); 17 | } 18 | DirSelect(JFrame parent, JTextField result, String title) { 19 | super(parent, result, title); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/gov/nara/nwts/ftapp/importer/ImporterRegistry.java: -------------------------------------------------------------------------------- 1 | package gov.nara.nwts.ftapp.importer; 2 | 3 | import gov.nara.nwts.ftapp.FTDriver; 4 | 5 | import java.util.Vector; 6 | 7 | /** 8 | * Activates the Importers that will be presented on the Import tab. 9 | * @author TBrady 10 | * 11 | */ 12 | public class ImporterRegistry extends Vector