{
if (!SAIL_TYPE.equals(config.getType())) {
throw new SailConfigException("Invalid Sail type: " + config.getType());
}
AndroidNativeStore nativeStore = new AndroidNativeStore();
if (config instanceof NativeStoreConfig) {
NativeStoreConfig nativeConfig = (NativeStoreConfig)config;
nativeStore.setTripleIndexes(nativeConfig.getTripleIndexes());
nativeStore.setForceSync(nativeConfig.getForceSync());
if (nativeConfig.getValueCacheSize() >= 0) {
nativeStore.setValueCacheSize(nativeConfig.getValueCacheSize());
}
if (nativeConfig.getValueIDCacheSize() >= 0) {
nativeStore.setValueIDCacheSize(nativeConfig.getValueIDCacheSize());
}
if (nativeConfig.getNamespaceCacheSize() >= 0) {
nativeStore.setNamespaceCacheSize(nativeConfig.getNamespaceCacheSize());
}
if (nativeConfig.getNamespaceIDCacheSize() >= 0) {
nativeStore.setNamespaceIDCacheSize(nativeConfig.getNamespaceIDCacheSize());
}
}
return nativeStore;
}