Class ImportService
- java.lang.Object
-
- in.cdac.medinfo.csnotk.csnolib.service.ImportService
-
- All Implemented Interfaces:
java.io.Serializable
public class ImportService extends java.lang.Object implements java.io.SerializableProvides 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 booleancheckIndex(java.lang.String indexDir)Check index directory empty or not; if not and write.lock present then delete write.lock it.booleancreateExtensiondb(java.lang.String snomedExtDirPath)This method creates SNOMED CT extension databasebooleancreateRefsetdb(java.lang.String refsetFilePath)This method creates database for given refsetsbooleancreateSimpleMapdb(java.lang.String snomedIntDirPath)booleancreateSNOMEDdb(java.lang.String snomedIntDirPath)This method creates SNOMED CT databasebooleancreateSNOMEDRefsetdb(java.lang.String snomedIntDirPath)This method creates SNOMED CT Refset databasebooleandeleteDataDirectory(java.lang.String dataDir)Delete data directory content at the time Creating International indexingvoidinit()The method will configure the properties to default valuesvoidinit(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
-
-
-
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: 10000suggestReturnlimit- maximum number of record from which suggest should be perform example: 500topSuggestReturnlimit- maximum number of top suggestions that would be return in suggestion list example: 50
-
createSNOMEDdb
public boolean createSNOMEDdb(java.lang.String snomedIntDirPath) throws FullReleaseDirectoryExceptionThis 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 FullReleaseDirectoryExceptionThis 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 FullReleaseDirectoryExceptionThis 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
-
createSimpleMapdb
public boolean createSimpleMapdb(java.lang.String snomedIntDirPath) throws FullReleaseDirectoryException- Throws:
FullReleaseDirectoryException
-
createSNOMEDRefsetdb
public boolean createSNOMEDRefsetdb(java.lang.String snomedIntDirPath) throws FullReleaseDirectoryExceptionThis 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-Stringpass index dir name
-
deleteDataDirectory
public boolean deleteDataDirectory(java.lang.String dataDir) throws java.lang.SecurityException, java.io.IOExceptionDelete data directory content at the time Creating International indexing- Parameters:
dataDir- -StringdataDir path location- Returns:
BooleanTrue/False on the basis of job done- Throws:
java.lang.SecurityException- If file/directory does not allow to delete.java.io.IOException
-
-