Revision 44307 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureStore.java
DefaultFeatureStore.java | ||
---|---|---|
319 | 319 |
|
320 | 320 |
@Override |
321 | 321 |
public DataStoreParameters getParameters() { |
322 |
if( this.parameters==null ) { |
|
323 |
LOG.warn("Store parametes are null"); |
|
324 |
} |
|
322 | 325 |
return parameters; |
323 | 326 |
} |
324 | 327 |
|
... | ... | |
333 | 336 |
|
334 | 337 |
@Override |
335 | 338 |
public UnmodifiableBasicMap<String,DataStore> getChildren() { |
336 |
return this.provider.getChildren(); |
|
339 |
UnmodifiableBasicMap<String, DataStore> children = this.provider.getChildren(); |
|
340 |
if( children == null ) { |
|
341 |
return UnmodifiableBasicMap.EMPTY_UNMODIFIABLEBASICMAP; |
|
342 |
} |
|
343 |
return children; |
|
337 | 344 |
} |
338 | 345 |
|
339 | 346 |
@Override |
... | ... | |
743 | 750 |
); |
744 | 751 |
} |
745 | 752 |
|
746 |
public DataStoreProviderServices getStoreProviderServices() {
|
|
747 |
return this;
|
|
748 |
}
|
|
753 |
public DataStoreProviderServices getStoreProviderServices() {
|
|
754 |
return this;
|
|
755 |
}
|
|
749 | 756 |
|
750 | 757 |
public static void registerPersistenceDefinition() { |
751 | 758 |
PersistenceManager manager = ToolsLocator.getPersistenceManager(); |
... | ... | |
2994 | 3001 |
public StoresRepository getStoresRepository() { |
2995 | 3002 |
final StoresRepository mainRepository = this.dataManager.getStoresRepository(); |
2996 | 3003 |
StoresRepository localRepository = this.provider.getStoresRepository(); |
2997 |
StoresRepository repository = new BaseStoresRepository(this.getName()) { |
|
2998 |
|
|
2999 |
@Override |
|
3000 |
protected DataStoreParameters getMyParameters(String name) { |
|
3001 |
// Uff, esta implementacion no es nada buena |
|
3002 |
UnmodifiableBasicMap<String, DataStore> children = getChildren(); |
|
3003 |
if( children==null ) { |
|
3004 |
return null; |
|
3005 |
} |
|
3006 |
DataStore store = children.get(name); |
|
3007 |
if( store==null ) { |
|
3008 |
return null; |
|
3009 |
} |
|
3010 |
return store.getParameters(); |
|
3011 |
} |
|
3012 |
|
|
3013 |
@Override |
|
3014 |
protected boolean isEmptyMyRepository() { |
|
3015 |
UnmodifiableBasicMap<String, DataStore> children = getChildren(); |
|
3016 |
return children==null || children.isEmpty(); |
|
3017 |
} |
|
3018 |
|
|
3019 |
@Override |
|
3020 |
protected int getMySize() { |
|
3021 |
UnmodifiableBasicMap<String, DataStore> children = getChildren(); |
|
3022 |
if( children==null ) { |
|
3023 |
return 0; |
|
3024 |
} |
|
3025 |
return children.size(); |
|
3026 |
} |
|
3027 |
|
|
3028 |
@Override |
|
3029 |
public void add(String name, DataStoreParameters parameters) { |
|
3030 |
mainRepository.add(name, parameters); |
|
3031 |
} |
|
3032 |
|
|
3033 |
@Override |
|
3034 |
public void remove(String name) { |
|
3035 |
mainRepository.remove(name); |
|
3036 |
} |
|
3037 |
|
|
3038 |
}; |
|
3039 |
if( localRepository!=null ) { |
|
3040 |
repository.addRepository(localRepository); |
|
3004 |
if( localRepository==null ) { |
|
3005 |
return mainRepository; |
|
3041 | 3006 |
} |
3007 |
StoresRepository repository = new BaseStoresRepository(this.getName()); |
|
3008 |
repository.addRepository(localRepository); |
|
3042 | 3009 |
repository.addRepository(mainRepository); |
3043 | 3010 |
return repository; |
3044 | 3011 |
} |
Also available in: Unified diff