Revision 40361 branches/v2_0_0_prep/libraries/libFMap_dal/src/org/gvsig/fmap/dal/DALLibrary.java
DALLibrary.java | ||
---|---|---|
31 | 31 |
|
32 | 32 |
import org.cresques.ProjectionLibrary; |
33 | 33 |
|
34 |
import org.gvsig.fmap.dal.feature.spi.memory.MemoryResource; |
|
35 |
import org.gvsig.fmap.dal.feature.spi.memory.MemoryResourceParameters; |
|
36 | 34 |
import org.gvsig.fmap.dal.resource.ResourceManager; |
37 |
import org.gvsig.fmap.dal.resource.spi.MultiResource; |
|
38 |
import org.gvsig.fmap.dal.resource.spi.MultiResourceParameters; |
|
39 |
import org.gvsig.fmap.dal.resource.spi.ResourceManagerProviderServices; |
|
40 | 35 |
import org.gvsig.fmap.geom.GeometryLibrary; |
41 | 36 |
import org.gvsig.metadata.MetadataLibrary; |
42 | 37 |
import org.gvsig.metadata.MetadataLocator; |
... | ... | |
94 | 89 |
DALLocator.DATA_MANAGER_NAME, DALLocator.getInstance()); |
95 | 90 |
} |
96 | 91 |
|
97 |
ResourceManagerProviderServices resourceManager = |
|
98 |
(ResourceManagerProviderServices) DALLocator.getResourceManager(); |
|
99 |
if (resourceManager == null) { |
|
100 |
throw new ReferenceNotRegisteredException( |
|
101 |
DALLocator.RESOURCE_MANAGER_NAME, DALLocator.getInstance()); |
|
102 |
} |
|
103 |
|
|
104 |
if (!resourceManager.getResourceProviders().contains( |
|
105 |
MultiResource.TYPE_NAME)) { |
|
106 |
resourceManager.register(MultiResource.TYPE_NAME, |
|
107 |
MultiResource.DESCRIPTION, MultiResource.class, |
|
108 |
MultiResourceParameters.class); |
|
109 |
} |
|
110 |
|
|
111 |
if (!resourceManager.getResourceProviders().contains( |
|
112 |
MemoryResource.NAME)) { |
|
113 |
resourceManager.register(MemoryResource.NAME, |
|
114 |
MemoryResource.DESCRIPTION, MemoryResource.class, |
|
115 |
MemoryResourceParameters.class); |
|
116 |
} |
|
117 |
|
|
118 | 92 |
if (exs.size() > 0) { |
119 | 93 |
throw new LibraryException(this.getClass(), exs); |
120 | 94 |
} |
Also available in: Unified diff