Revision 45321
Added by Claudio Atzori over 7 years ago
PersistentExistDatabase.java | ||
---|---|---|
15 | 15 |
import org.apache.commons.logging.LogFactory; |
16 | 16 |
import org.springframework.beans.factory.annotation.Required; |
17 | 17 |
|
18 |
import eu.dnetlib.enabling.is.store.BulkResourceImporter;
|
|
18 |
//import eu.dnetlib.enabling.tools.BulkResourceImporter;
|
|
19 | 19 |
|
20 | 20 |
/** |
21 | 21 |
* Persistent exist. |
22 |
*
|
|
22 |
* |
|
23 | 23 |
* TODO: this is copy&paste from TemporaryExistDatase. Refactor common stuff. |
24 |
*
|
|
24 |
* |
|
25 | 25 |
* @author marko |
26 |
*
|
|
26 |
* |
|
27 | 27 |
*/ |
28 |
public class PersistentExistDatabase extends SyncExistDatabase {
|
|
28 |
public class PersistentExistDatabase extends ExistDatabase { |
|
29 | 29 |
|
30 | 30 |
/** |
31 | 31 |
* logger. |
... | ... | |
50 | 50 |
/** |
51 | 51 |
* bulk importer. |
52 | 52 |
*/ |
53 |
private BulkResourceImporter bulkImporter; |
|
53 |
//private BulkResourceImporter bulkImporter;
|
|
54 | 54 |
|
55 | 55 |
/** |
56 | 56 |
* exist config file. |
... | ... | |
64 | 64 |
|
65 | 65 |
/** |
66 | 66 |
* {@inheritDoc} |
67 |
*
|
|
67 |
* |
|
68 | 68 |
* @see eu.dnetlib.xml.database.exist.ExistDatabase#start() |
69 | 69 |
*/ |
70 | 70 |
@Override |
... | ... | |
73 | 73 |
dbDirectory = new File(dbRootPath); |
74 | 74 |
|
75 | 75 |
if (dbDirectory.exists()) { |
76 |
bulkImporter.setEnabled(false); |
|
76 |
//bulkImporter.setEnabled(false);
|
|
77 | 77 |
existConfigFile = new File(dbDirectory, "conf.xml"); |
78 | 78 |
enableJava(existConfigFile, isXQueryJavaEnabled()); |
79 | 79 |
setConfigFile(existConfigFile.getAbsolutePath()); |
... | ... | |
90 | 90 |
super.stop(); |
91 | 91 |
log.info("xmldb closed"); |
92 | 92 |
} |
93 |
|
|
93 |
|
|
94 | 94 |
protected void enableJava(final File conf, final boolean enabled) { |
95 | 95 |
final StringWriter buffer = new StringWriter(); |
96 | 96 |
if (conf.exists()) { |
... | ... | |
170 | 170 |
this.configTemplate = configTemplate; |
171 | 171 |
} |
172 | 172 |
|
173 |
/* |
|
173 | 174 |
public BulkResourceImporter getBulkImporter() { |
174 | 175 |
return bulkImporter; |
175 | 176 |
} |
... | ... | |
178 | 179 |
public void setBulkImporter(final BulkResourceImporter bulkImporter) { |
179 | 180 |
this.bulkImporter = bulkImporter; |
180 | 181 |
} |
182 |
*/ |
|
181 | 183 |
|
182 | 184 |
public File getExistConfigFile() { |
183 | 185 |
return existConfigFile; |
Also available in: Unified diff
migrated to dnet45