Class ImportService

  • All Implemented Interfaces:
    java.io.Serializable

    public class ImportService
    extends java.lang.Object
    implements java.io.Serializable
    Provides methods for index creation.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ImportService()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean checkIndex​(java.lang.String indexDir)
      Check index directory empty or not; if not and write.lock present then delete write.lock it.
      boolean createExtensiondb​(java.lang.String snomedExtDirPath)
      This method creates SNOMED CT extension database
      boolean createRefsetdb​(java.lang.String refsetFilePath)
      This method creates database for given refsets
      boolean createSimpleMapdb​(java.lang.String snomedIntDirPath)  
      boolean createSNOMEDdb​(java.lang.String snomedIntDirPath)
      This method creates SNOMED CT database
      boolean createSNOMEDRefsetdb​(java.lang.String snomedIntDirPath)
      This method creates SNOMED CT Refset database
      boolean deleteDataDirectory​(java.lang.String dataDir)
      Delete data directory content at the time Creating International indexing
      void init()
      The method will configure the properties to default values
      void init​(java.lang.String dataDir, java.lang.String errorLogDir, java.lang.Integer searchReturnlimit, java.lang.Integer suggestReturnlimit, java.lang.Integer topSuggestReturnlimit)
      The method will configure properties by values provided in parameters
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ImportService

        public ImportService()
    • Method Detail

      • init

        public void init()
        The method will configure the properties to default values
      • init

        public void init​(java.lang.String dataDir,
                         java.lang.String errorLogDir,
                         java.lang.Integer searchReturnlimit,
                         java.lang.Integer suggestReturnlimit,
                         java.lang.Integer topSuggestReturnlimit)
        The method will configure properties by values provided in parameters
        Parameters:
        dataDir - location for database and lucene index.
        errorLogDir - location for logs.
        searchReturnlimit - maximum number record from which search should be perform example: 10000
        suggestReturnlimit - maximum number of record from which suggest should be perform example: 500
        topSuggestReturnlimit - maximum number of top suggestions that would be return in suggestion list example: 50
      • createSNOMEDdb

        public boolean createSNOMEDdb​(java.lang.String snomedIntDirPath)
                               throws FullReleaseDirectoryException
        This method creates SNOMED CT database
        Parameters:
        snomedIntDirPath - Directory path for SNOMED CT International Release directory path example: G:\SnomedCT_InternationalRF2_PRODUCTION_20170731T150000Z\Snapshot
        Throws:
        FullReleaseDirectoryException
      • createRefsetdb

        public boolean createRefsetdb​(java.lang.String refsetFilePath)
                               throws FullReleaseDirectoryException
        This method creates database for given refsets
        Parameters:
        refsetFilePath - file path for refset example: G:/SnomedCT_GPFPICPC2_PRODUCTION_20171018T120000Z/Snapshot/Refset/Content/der2_Refset_SimpleSnapshot_INT_20170731.txt
        Throws:
        FullReleaseDirectoryException
      • createExtensiondb

        public boolean createExtensiondb​(java.lang.String snomedExtDirPath)
                                  throws FullReleaseDirectoryException
        This method creates SNOMED CT extension database
        Parameters:
        snomedExtDirPath - Directory path for SNOMED CT extension Release directory path example: G:\SnomedCT_InternationalRF2_PRODUCTION_20170731T150000Z\Snapshot
        Throws:
        FullReleaseDirectoryException
      • createSNOMEDRefsetdb

        public boolean createSNOMEDRefsetdb​(java.lang.String snomedIntDirPath)
                                     throws FullReleaseDirectoryException
        This method creates SNOMED CT Refset database
        Parameters:
        snomedIntDirPath - Directory path for SNOMED CT International Release directory path example: G:\SnomedCT_InternationalRF2_PRODUCTION_20170731T150000Z\Snapshot
        Throws:
        FullReleaseDirectoryException
      • checkIndex

        public boolean checkIndex​(java.lang.String indexDir)
        Check index directory empty or not; if not and write.lock present then delete write.lock it.
        Parameters:
        indexDir - String pass index dir name
      • deleteDataDirectory

        public boolean deleteDataDirectory​(java.lang.String dataDir)
                                    throws java.lang.SecurityException,
                                           java.io.IOException
        Delete data directory content at the time Creating International indexing
        Parameters:
        dataDir - -String dataDir path location
        Returns:
        Boolean True/False on the basis of job done
        Throws:
        java.lang.SecurityException - If file/directory does not allow to delete.
        java.io.IOException