class HmsInventory {

    public boolean loadInventory( final String inventoryFile )
    {

        // check that inventoryFile is not null or blank
        if ( StringUtils.isBlank( inventoryFile ) )
        {
            logger.warn( "In loadInventory, inventory file is either null or blank." );
            return false;
        }

        /*
         * If inventory is already loaded, then inventoryFile will be set to the inventory file from which inventory was
         * loaded. Log a warning message, if the inventoryFile that was already loaded does not match with the
         * inventoryFile that was asked to load inventory from.
         */
        if ( this.inventoryFile != null && StringUtils.equals( this.inventoryFile, inventoryFile ) )
        {
            logger.warn( "In loadInventory, overwriting inventory loaded from '{}' with inventory from '{}'.",
                         this.inventoryFile, inventoryFile );
        }

        try
        {

            ObjectMapper objectMapper = new ObjectMapper();
            nodeMap = objectMapper.readValue( new File( inventoryFile ),
                                              new TypeReference<ConcurrentHashMap<String, Object[]>>()
                                              {
                                              } );

            // set inventory file
            this.inventoryFile = inventoryFile;
            return true;

        }
        catch ( IOException e )
        {
            logger.error( "In loadInventory, error parsing inventory file '{}'.", inventoryFile );
            return false;
        }
    }

    private  HmsInventory();

}