Class Main


  • public class Main
    extends Object
    • Constructor Detail

      • Main

        public Main()
    • Method Detail

      • parseArgs

        public void parseArgs​(String[] args)
        Parse command line arguments
        Parameters:
        args -
      • loadCosProperties

        protected void loadCosProperties​(String filename)
        Load COS properties from the given properties file
        Parameters:
        filename -
      • loadFhirClientProperties

        protected void loadFhirClientProperties​(String filename)
        Load the FHIR client properties from the given properties file
        Parameters:
        filename -
      • loadDbProperties

        protected void loadDbProperties​(String filename)
        Load DB properties from the given properties file
        Parameters:
        filename -
      • addDbProperty

        protected void addDbProperty​(String arg)
        Add the property from the arg given in the form of: param=value
        Parameters:
        arg -
      • checkConfig

        public void checkConfig()
        Rudimentary check of the configuration to make sure the basics have been provided
      • configure

        public void configure()
        Set up the database configuration we are going to use to coordinate loading activities. Only one instance should be performing the schema update, so we need a special table which can be used to serialize the schema update process and avoid race conditions.
      • setupDerbyRepository

        public void setupDerbyRepository()
        Set up the connection pool and transaction provider for connecting to a Derby database
      • setupDb2Repository

        public void setupDb2Repository()
        Set up the connection pool and transaction provider for connecting to a DB2 database
      • setupPostgresRepository

        public void setupPostgresRepository()
        Set up the connection pool and transaction provider for connecting to a DB2 database
      • createVersionHistoryService

        protected VersionHistoryService createVersionHistoryService()
        Create the version history table and a simple service which is used to access information from it.
        Throws:
        SQLException
      • bootstrapDb

        public void bootstrapDb()
        Create or update the database schema to the latest definition
      • shutdown

        protected void shutdown()
        Called by the shutdown hook to stop everything in an orderly fashion
      • process

        public void process()
        Choose which mode of the program we want to run: - create the schema - scan and load
      • scanAndLoad

        protected void scanAndLoad()
        Start the processing threads and wait until we get told to stop
      • main

        public static void main​(String[] args)
        Parameters:
        args -