/** * @param f * @param chain * @return * @throws PersistenceException * @throws IOException */ private List<String> parser(File f, String chain) throws PersistenceException, IOException { PersistenceManager manager = ToolsLocator.getPersistenceManager(); Patternnormalization pat = new DefaultPatternnormalization(); FileReader reader = new FileReader(f); PersistentState state = manager.loadState(reader); pat.loadFromState(state); reader.close(); NormalizationAlgorithm na = new DefaultNormalizationAlgorithm(pat); List<String> result = na.splitChain(chain); return result; }
/** * Constructor * * @param filterStack */ public RasterFilterListManager(RasterFilterList filterStack) { this.rasterFilterList = filterStack; // Cargamos el manager con los gestores de drivers registrados ExtensionPointManager extensionPoints = ToolsLocator.getExtensionPointManager(); ExtensionPoint point = extensionPoints.get("RasterFilter"); Iterator iterator = point.iterator(); while (iterator.hasNext()) { ExtensionPoint.Extension entry = (ExtensionPoint.Extension) iterator.next(); if (entry != null) { Class RasterClass = entry.getExtension(); Object obj = RasterFilterListManager.loadClass(RasterClass, this); if (obj != null) managers.add(obj); } } }
/* public static ProjectTable createTable(String viewName, FTable ftable){ return Table.createTable(viewName, ftable); } */ public static ProjectView createView(String viewName) { ProjectDocumentFactory pdf = null; try { pdf = (ProjectDocumentFactory) ToolsLocator.getExtensionPointManager() .get("Documents") .create(ProjectViewFactory.registerName); } catch (Exception e) { // FIXME Exception e.printStackTrace(); } ProjectView pv = (ProjectView) pdf.create((Project) null); pv.setProjectDocumentFactory(pdf); pv.setName(viewName); return pv; }
public static FeatureTableDocument createTable(String name, FeatureStore fs) { ProjectDocumentFactory pdf = null; try { pdf = (ProjectDocumentFactory) ToolsLocator.getExtensionPointManager() .get("Documents") .create(FeatureTableDocumentFactory.registerName); } catch (Exception e) { // FIXME Exception e.printStackTrace(); } FeatureTableDocument pt = FeatureTableDocumentFactory.createTable(name, fs); pt.setProjectDocumentFactory(pdf); return pt; }
public static ProjectMap createMap(String baseName) { ProjectDocumentFactory pdf = null; try { pdf = (ProjectDocumentFactory) ToolsLocator.getExtensionPointManager() .get("Documents") .create(ProjectMapFactory.registerName); } catch (Exception e) { // FIXME Exception e.printStackTrace(); } ProjectMap pm = (ProjectMap) pdf.create((Project) null); pm.setProjectDocumentFactory(pdf); pm.setName(baseName); return pm; }
protected static void registerDynClass() { DynObjectManager dynman = ToolsLocator.getDynObjectManager(); DynClass dynClass; DynField field; if (DYNCLASS == null) { DynClass dbfDynClass = DBFStoreProvider.DYNCLASS; dynClass = dynman.add(DYNCLASS_NAME); field = dynClass.addDynField(DYNFIELD_SRSORIGINALPARAMETERS_NAME); field.setType(DataTypes.STRING); field.setDescription("SRS original parameters"); // The SHP store parameters extend the DBF store parameters dynClass.extend(dbfDynClass); DYNCLASS = dynClass; } }
/** Constructor */ public TestNormAlgorithm() { ToolsLibrary tools = new ToolsLibrary(); tools.initialize(); ToolsLocator.registerPersistenceManager(XMLEntityManager.class); tools.postInitialize(); Library dlib = new DALLibrary(); dlib.initialize(); dlib.postInitialize(); Library libFile = new DALFileLibrary(); libFile.initialize(); libFile.postInitialize(); Library shpLib = new SHPLibrary(); shpLib.initialize(); shpLib.postInitialize(); }
public SHPStoreProvider(SHPStoreParameters params, DataStoreProviderServices storeServices) throws InitializeException { super(params, storeServices, ToolsLocator.getDynObjectManager().createDynObject(DYNCLASS)); }
public DynField addDynFieldURI(String name) { DataTypesManager datamanager = ToolsLocator.getDataTypesManager(); return addDynField(name).setType(datamanager.get(DataTypes.URI)); }