improved detection of unformatted SDB store
This commit is contained in:
parent
e028e17010
commit
5dead7cbd5
1 changed files with 11 additions and 6 deletions
|
@ -650,12 +650,17 @@ public class JenaDataSourceSetupSDB extends JenaDataSourceSetupBase implements j
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private boolean isSetUp(Store store) throws SQLException {
|
private boolean isSetUp(Store store) throws SQLException {
|
||||||
return StoreUtils.isFormatted(store);
|
if (!(StoreUtils.isFormatted(store))) {
|
||||||
// try {
|
return false;
|
||||||
// return (SDBFactory.connectNamedModel(store, JenaDataSourceSetupBase.JENA_TBOX_ASSERTIONS_MODEL)).size() > 0;
|
}
|
||||||
// } catch (Exception e) {
|
|
||||||
// return false;
|
// even if the store exists, it may be empty
|
||||||
// }
|
|
||||||
|
try {
|
||||||
|
return (SDBFactory.connectNamedModel(store, JenaDataSourceSetupBase.JENA_TBOX_ASSERTIONS_MODEL)).size() > 0;
|
||||||
|
} catch (Exception e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String STOREDESC_ATTR = "storeDesc";
|
private static final String STOREDESC_ATTR = "storeDesc";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue