Examples of DataStore


Examples of org.eobjects.analyzer.connection.Datastore

    _addDatastoreButton = WidgetFactory.createButton("Save datastore", getDatastoreIconPath());
    _addDatastoreButton.addActionListener(new ActionListener() {
      @Override
      public void actionPerformed(ActionEvent e) {
        final Datastore datastore = createDatastore(getDatastoreName(), getFilename());

        if (_originalDatastore != null) {
          _mutableDatastoreCatalog.removeDatastore(_originalDatastore);
        }
View Full Code Here

Examples of org.eobjects.analyzer.connection.Datastore

    return title;
  }

  private String getDatastoreName() {
    if (_job != null) {
      Datastore datastore = _job.getDatastore();
      if (datastore != null) {
        String datastoreName = datastore.getName();
        if (!StringUtils.isNullOrEmpty(datastoreName)) {
          return datastoreName;
        }
      }
    }
View Full Code Here

Examples of org.eobjects.analyzer.connection.Datastore

    _datastoreComboBox.addActionListener(new ActionListener() {
      @Override
      public void actionPerformed(ActionEvent e) {
        String datastoreName = (String) _datastoreComboBox.getSelectedItem();
        if (datastoreName != null) {
          Datastore datastore = _datastoreCatalog.getDatastore(datastoreName);
          if (datastore != null) {
            _treePanel.removeAll();

            Injector injectorWithDatastore = _injectorBuilder.with(Datastore.class, datastore)
                .with(AnalyzerJobBuilder.class, null).createInjector();
View Full Code Here

Examples of org.eobjects.analyzer.connection.Datastore

        final List<Datastore> datastores = new ArrayList<Datastore>();

        for (JCheckBox checkBox : _checkBoxes) {
          if (checkBox.isSelected()) {
            String datastoreName = checkBox.getText();
            Datastore datastore = _mutableDatastoreCatalog.getDatastore(datastoreName);
            if (datastore == null) {
              throw new IllegalStateException("No such datastore: " + datastoreName);
            }
            datastores.add(datastore);
          }
        }

        final Datastore datastore = new CompositeDatastore(_datastoreNameField.getText(), datastores);

        if (_originalDatastore != null) {
          _mutableDatastoreCatalog.removeDatastore(_originalDatastore);
        }
View Full Code Here

Examples of org.gamejolt.DataStore

  public void testAddHighscore(){
    assertTrue(api.addHighscore("100", 100));
  }
  @Test
  public void testDataStore(){
    DataStore s;
    assertNotNull(s=api.setDataStore(DataStoreType.GAME, "testkey", "testdata"));
    assertNotNull(s=api.getDataStore(DataStoreType.GAME, "testkey"));
    assertEquals("testdata",s.getData());
    assertNotNull(s=api.updateDataStore(DataStoreType.GAME, "testkey", DataStoreOperation.APPEND, "lol"));
    assertEquals("testdatalol",s.getData());
  }
View Full Code Here

Examples of org.geotools.data.DataStore

  @Before
  public void setUp() throws Exception {
    ClassLoader classloader = Thread.currentThread().getContextClassLoader();
    URL url = classloader.getResource(SHAPE_FILE);
    DataStore dataStore = new ShapefileDataStore(url);
    featureModel = new ShapeInMemFeatureModel(dataStore, LAYER_NAME, 4326, converterService);
    featureModel.setLayerInfo(layerInfo);

    FeatureSource<SimpleFeatureType, SimpleFeature> fs = featureModel.getFeatureSource();
    FeatureIterator<SimpleFeature> fi = fs.getFeatures().features();
View Full Code Here

Examples of org.geotools.data.DataStore

  @Before
  public void init() throws Exception {
    ClassLoader classloader = Thread.currentThread().getContextClassLoader();
    URL url = classloader.getResource(SHAPE_FILE);
    DataStore dataStore = new ShapefileDataStore(url);
    featureModel = new GeoToolsFeatureModel(dataStore, LAYER_NAME, 4326, converterService);
    featureModel.setLayerInfo(layerInfo);

    FeatureSource<SimpleFeatureType, SimpleFeature> fs = featureModel.getFeatureSource();
    FeatureIterator<SimpleFeature> fi = fs.getFeatures().features();
View Full Code Here

Examples of org.geotools.data.DataStore

  public void setUrl(String url) throws LayerException {
    try {
      this.url = url;
      Map<String, String> params = new HashMap<String, String>();
      params.put("url", url);
      DataStore store = DataStoreFactory.create(params);
      if (store == null) {
        throw new LayerException(ExceptionCode.INVALID_SHAPE_FILE_URL, url);
      }
      setDataStore(store);
    } catch (IOException ioe) {
View Full Code Here

Examples of org.geotools.data.DataStore

        if (null != parameters) {
          for (Parameter parameter : parameters) {
            params.put(parameter.getName(), parameter.getValue());
          }
        }
        DataStore store = DataStoreFactory.create(params);
        setDataStore(store);
      }
      if (null == super.getDataStore()) {
        return;
      }
View Full Code Here

Examples of org.geotools.data.DataStore

  public static DataStore create(Map<String, String> parameters) throws IOException {
    String url = parameters.get("url");
    if (url != null) {
      parameters.put("url", ResourceUtils.getURL(url).toExternalForm());
    }
    DataStore store = DataStoreFinder.getDataStore(parameters);
    if (store instanceof PostgisDataStore) {
      PostgisDataStore jdbcStore = (PostgisDataStore) store;
      jdbcStore.setFIDMapperFactory(new NonTypedPostgisFidMapperFactory(false));
    } else if (store instanceof JDBCDataStore) {
      JDBCDataStore jdbcStore = (JDBCDataStore) store;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.