Skip to content

Commit

Permalink
Added EHCaching for Datasets
Browse files Browse the repository at this point in the history
Updated the Common Queries
Updated Datasets to ignore
  • Loading branch information
nfspeedypur committed Jan 25, 2016
1 parent 7c49aef commit 700e87a
Show file tree
Hide file tree
Showing 9 changed files with 883 additions and 19 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
/opengridservice/target/
17 changes: 16 additions & 1 deletion opengridservice/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-ws-policy</artifactId>
Expand Down Expand Up @@ -130,6 +135,16 @@
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>${javax-validation.version}</version>
</dependency>
</dependency>
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>2.7.6</version>
</dependency>
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-web</artifactId>
<version>2.0.4</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@ public String getData(String dataSetId, String metaCollectionName, String filter

StringBuilder sURL = new StringBuilder();
StringBuilder sb = new StringBuilder();
String defaultGeo = properties.getStringProperty("plenario.geo.default");
sURL.append("http://plenar.io/v1/api/detail/?dataset_name=" + dataSetId + "&dup_ver=1&obs_date__ge=2000-1-1"); //just a string
sURL.append("&location_geom__within={\"type\":\"Feature\",\"properties\":{},\"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[[-89.961548,42.561173],[-87.033691,42.561173],[-87.033691,39.609920],[-89.961548,39.609920],[-89.961548,42.561173]]]}}");
sURL.append("&location_geom__within={\"type\":\"Feature\",\"properties\":{},\"geometry\":{\"type\":\"Polygon\",\"coordinates\":"
+ defaultGeo
+ "}}");
try
{
if (filter !=null && filter.length() > 0)
Expand Down Expand Up @@ -536,7 +539,7 @@ private List<OpenGridColumn> getColumnsForDataset(JsonObject rootobj) {
column.setGroupBy(shouldColumnBeInGroupBy(object.get("field_name").toString().replace("\"", "")));
column.setQuickSearch(shouldColumnBeInQuickSearch(object.get("field_name").toString().replace("\"", "")));

if(IgnoreColumn(object.get("field_name").toString().replace("\"", "")))
if(!IgnoreColumn(object.get("field_name").toString().replace("\"", "")))
{
column.setList(true);
column.setSortOrder(count);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ auth.expiration=4

#Plenario attribution
plenario.attribution.default=Chicago
plenario.dataset.default=Cook County
plenario.dataset.default=Cook County
plenario.geo.default=[[[-89.961548,42.561173],[-87.033691,42.561173],[-87.033691,39.609920],[-89.961548,39.609920],[-89.961548,42.561173]]]
Loading

0 comments on commit 700e87a

Please sign in to comment.