Skip to content

Commit

Permalink
quick review of querylab
Browse files Browse the repository at this point in the history
  • Loading branch information
jodygarnett committed Aug 21, 2016
1 parent 80532ff commit 32506c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 22 deletions.
9 changes: 5 additions & 4 deletions docs/src/main/java/org/geotools/tutorial/filter/QueryLab.java
Expand Up @@ -54,9 +54,10 @@
* Remember when programming that you have other options then the CQL parser, you can directly make
* a Filter using CommonFactoryFinder.getFilterFactory2().
*/
@SuppressWarnings("serial")
public class QueryLab extends JFrame {
private DataStore dataStore;
private JComboBox featureTypeCBox;
private JComboBox<String> featureTypeCBox;
private JTable table;
private JTextField text;

Expand Down Expand Up @@ -89,7 +90,7 @@ public QueryLab() {
JMenu fileMenu = new JMenu("File");
menubar.add(fileMenu);

featureTypeCBox = new JComboBox();
featureTypeCBox = new JComboBox<String>();
menubar.add(featureTypeCBox);

JMenu dataMenu = new JMenu("Data");
Expand Down Expand Up @@ -162,7 +163,7 @@ private void connect(DataStoreFactorySpi format) throws Exception {

// docs start update
private void updateUI() throws Exception {
ComboBoxModel cbm = new DefaultComboBoxModel(dataStore.getTypeNames());
ComboBoxModel<String> cbm = new DefaultComboBoxModel<String>(dataStore.getTypeNames());
featureTypeCBox.setModel(cbm);

table.setModel(new DefaultTableModel(5, 5));
Expand Down Expand Up @@ -224,7 +225,7 @@ private void centerFeatures() throws Exception {
String name = schema.getGeometryDescriptor().getLocalName();
Query query = new Query(typeName, filter, new String[] { name });

SimpleFeatureCollection features = source.getFeatures(filter);
SimpleFeatureCollection features = source.getFeatures(query);

double totalX = 0.0;
double totalY = 0.0;
Expand Down
18 changes: 0 additions & 18 deletions docs/user/tutorial/filter/query.rst
Expand Up @@ -35,24 +35,6 @@ to both a PostGIS database and shapefiles.
We are trying out a code first idea with these workbooks |hyphen| offering you a chance to start with
source code and explore the ideas that went into it later if you have any questions.

This workbook is featured as part of OSDC2011, FOSS4G 2010 and FOSS4G 2009 conferences.

Jody Garnett

Jody Garnett is the lead architect for the uDig project; and on the steering
committee for GeoTools; GeoServer and uDig. Taking the role of geospatial
consultant a bit too literally Jody has presented workshops and training
courses on every continent (except Antarctica). Jody Garnett is an employee
of LISAsoft.

Michael Bedward

Michael Bedward is a researcher with the NSW Department of Environment and
Climate Change and an active contributor to the GeoTools users' list. He has
a particularly wide grasp of all the possible mistakes one can make using
GeoTools.


Query Lab Application
=====================

Expand Down

0 comments on commit 32506c0

Please sign in to comment.