OMERO Import Library ==================== The Import Library is a re-usable framework for building import clients. Several are provided by the OMERO team directly: - the integrated :doc:`importer ` - :doc:`/users/command-line-import` tool Components ---------- The primary classes which make up the Import Library are: - :source:`ImportLibrary.java ` itself, which is the main driver - :source:`ImportCandidates.java ` which takes file paths and determines the proper files to import - :source:`ImportConfig.java `, an extensible mechanism for storing the properties used during import - :source:`ImportEvent.java `, the various events raised during import to ``IObserver``\ and ``IObservable`` implementations - :source:`OMEROMetadataStoreClient.java `, the low-level connection to the server - :source:`OMEROWrapper.java `, the OMERO adapter for the Bio-Formats ``ImageReaders`` class - In OMERO.insight, the main entry point is the importImage method of :source:`OMEROGateway.java ` - In the CLI, the main entry point is the :source:`CommandLineImporter ` class Example ------- The ``CommandLineImporter.java`` class shows a straightforward import. An ``ErrorHandler`` instance is passed both to the ``ImportCandidates`` constructor (since errors can occur while parsing a directory) and to the ``ImportLibrary``. This and other handlers receive ``ImportEvents`` which notify listeners of the state of the current import.