Revision 44297 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/DefaultFeatureTypeDefinitionsManager.java
DefaultFeatureTypeDefinitionsManager.java | ||
---|---|---|
35 | 35 |
import org.gvsig.tools.dynobject.DynField_v2; |
36 | 36 |
import org.gvsig.tools.dynobject.DynObjectManager; |
37 | 37 |
import org.gvsig.tools.dynobject.Tags; |
38 |
import org.gvsig.tools.resourcesstorage.ResourcesStorage; |
|
38 | 39 |
import org.gvsig.tools.util.HasAFile; |
39 |
import org.gvsig.tools.util.ResourcesStorage.Resource;
|
|
40 |
import org.gvsig.tools.resourcesstorage.ResourcesStorage.Resource;
|
|
40 | 41 |
import org.slf4j.Logger; |
41 | 42 |
import org.slf4j.LoggerFactory; |
42 | 43 |
|
... | ... | |
151 | 152 |
DataServerExplorer explorer = null; |
152 | 153 |
Resource resource = null; |
153 | 154 |
try { |
154 |
explorer = store.getExplorer(); |
|
155 |
resource = explorer.getResource(store, FILE_EXTENSION); |
|
156 |
if( resource !=null && resource.exists() ) { |
|
157 |
xml = IOUtils.toString(resource.asInputStream()); |
|
155 |
ResourcesStorage resourcesStorage = store.getResourcesStorage(); |
|
156 |
if( resourcesStorage==null ) { |
|
157 |
return this.getDynClass(store, featureType); |
|
158 | 158 |
} else { |
159 |
return this.getDynClass(store, featureType); |
|
159 |
resource = resourcesStorage.getResource(FILE_EXTENSION); |
|
160 |
if( resource !=null && resource.exists() ) { |
|
161 |
xml = IOUtils.toString(resource.asInputStream()); |
|
162 |
} else { |
|
163 |
return this.getDynClass(store, featureType); |
|
164 |
} |
|
160 | 165 |
} |
161 | 166 |
} catch(Exception ex) { |
162 | 167 |
// Do nothing, leave xml to null |
Also available in: Unified diff