31 |
31 |
import org.apache.commons.io.FilenameUtils;
|
32 |
32 |
import org.apache.commons.lang3.ObjectUtils;
|
33 |
33 |
import org.apache.commons.lang3.StringUtils;
|
|
34 |
import org.slf4j.Logger;
|
|
35 |
import org.slf4j.LoggerFactory;
|
|
36 |
|
34 |
37 |
import org.gvsig.educa.thematicmap.ThematicMapException;
|
35 |
38 |
import org.gvsig.educa.thematicmap.ThematicMapManager;
|
36 |
39 |
import org.gvsig.educa.thematicmap.compilation.ThematicMapCompilation;
|
... | ... | |
45 |
48 |
import org.gvsig.educa.thematicmap.map.InvalidThematicMapFormatException;
|
46 |
49 |
import org.gvsig.educa.thematicmap.map.ThematicMap;
|
47 |
50 |
import org.gvsig.educa.thematicmap.map.ThematicMapInformation;
|
48 |
|
import org.gvsig.educa.thematicmap.spi.ThematicMapProviderLocator;
|
49 |
51 |
import org.gvsig.i18n.Messages;
|
50 |
52 |
import org.gvsig.installer.lib.api.InstallerLocator;
|
51 |
53 |
import org.gvsig.installer.lib.api.InstallerManager;
|
... | ... | |
55 |
57 |
import org.gvsig.tools.service.AbstractManager;
|
56 |
58 |
import org.gvsig.tools.service.Service;
|
57 |
59 |
import org.gvsig.tools.service.ServiceException;
|
58 |
|
import org.gvsig.tools.service.spi.ProviderManager;
|
59 |
|
import org.slf4j.Logger;
|
60 |
|
import org.slf4j.LoggerFactory;
|
61 |
60 |
|
62 |
61 |
/**
|
63 |
62 |
* Default {@link ThematicMapManager} implementation.
|
... | ... | |
100 |
99 |
|
101 |
100 |
private final ThematicMapFileFilter thematicMapFileFilter;
|
102 |
101 |
|
103 |
|
public DefaultThematicMapManager(ProviderManager providerManager) {
|
104 |
|
super(providerManager);
|
|
102 |
public DefaultThematicMapManager() {
|
|
103 |
super(new DefaultThematicMapProviderManager());
|
105 |
104 |
|
106 |
|
// TODO Auto-generated constructor stub
|
107 |
|
|
108 |
105 |
// initially, installation folder is null
|
109 |
106 |
installationFolder = null;
|
110 |
107 |
installationFolderInput = null;
|
... | ... | |
128 |
125 |
installerManager = InstallerLocator.getInstallerManager();
|
129 |
126 |
}
|
130 |
127 |
|
131 |
|
public DefaultThematicMapManager() {
|
132 |
|
// super(new DefaultInstallerProviderManager());
|
133 |
|
// this(ThematicMapProviderLocator.getManager());
|
134 |
|
this(null);
|
135 |
|
}
|
136 |
|
|
137 |
|
// public DefaultThematicMapManager() {
|
138 |
|
//
|
139 |
|
// // initially, installation folder is null
|
140 |
|
// installationFolder = null;
|
141 |
|
// installationFolderInput = null;
|
142 |
|
//
|
143 |
|
// // default temporal folder tmp.dir + '/ThematicMap.tmp'
|
144 |
|
// temporalDeployMapFolder = FileUtils.getWritableFolder(
|
145 |
|
// new File(System.getProperty("java.io.tmpdir")),
|
146 |
|
// "ThematicMap.tmp");
|
147 |
|
// temporalDelployFolderInput = temporalDeployMapFolder.getAbsolutePath();
|
148 |
|
//
|
149 |
|
// // Create file filter to identify map candidate in a folder
|
150 |
|
// thematicMapFileFilter = new ThematicMapFileFilter(
|
151 |
|
// THEMATIC_MAP_FILE_EXTENSION);
|
152 |
|
//
|
153 |
|
// // Create loader instance
|
154 |
|
// mapLoader = new ThematicMapLoader();
|
155 |
|
//
|
156 |
|
// // Create resource manager instance
|
157 |
|
// resourceManager = new MapResoucesManager(mapLoader);
|
158 |
|
//
|
159 |
|
// installerManager = InstallerLocator.getInstallerManager();
|
160 |
|
// }
|
161 |
|
|
162 |
128 |
/** {@inheridDoc} */
|
163 |
129 |
public String getInstallationMapFolder() {
|
164 |
130 |
return installationFolderInput;
|
... | ... | |
547 |
513 |
DefaultThematicMapCompilation serviceCompilation = new DefaultThematicMapCompilation(
|
548 |
514 |
map, this);
|
549 |
515 |
|
|
516 |
serviceCompilation.setParameters(parameters);
|
550 |
517 |
return serviceCompilation;
|
551 |
518 |
|
552 |
519 |
}
|
... | ... | |
554 |
521 |
public ThematicMapCompilation createCompilationInstance(String gameName)
|
555 |
522 |
throws ServiceException {
|
556 |
523 |
DynObject params = createServiceParameters(gameName);
|
557 |
|
|
558 |
|
|
559 |
|
// DefaultThematicMapCompilation compilation = new DefaultThematicMapCompilation(this);
|
560 |
|
// compilation.
|
561 |
|
// Instanciar thematicmapcompilation i assignar-li params
|
562 |
|
return null;
|
|
524 |
return (ThematicMapCompilation) getService(params);
|
563 |
525 |
}
|
564 |
526 |
}
|