Skip to content

Commit

Permalink
Part of #2957, includes test queries for adding metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
raprasad committed Feb 22, 2016
1 parent 800df8e commit 3b8d148
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/main/webapp/filesFragmentWorldMapTestQuery.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:p="http://primefaces.org/ui"
xmlns:o="http://omnifaces.org/ui"
xmlns:jsf="http://xmlns.jcp.org/jsf">

<!-- For the dataset page, this fragment gives a query to add test WorldMap map data
After the query is run, the "Explore Map" button should appear for a tabular file or shapefile
-->

<ui:fragment rendered="#{ !DatasetPage.canUserSeeExploreWorldMapButton(fileMetadata)}">
<!-- There is NO map data for this file -->

<ui:fragment rendered="#{ (DatasetPage.canSeeTwoRavensExploreButton(fileMetadata) or fileMetadata.dataFile.isShapefileType())}">
<!-- This is either a tabular or shapefile -->
to add sample map data:
<textarea><h:outputText escape="false" value="INSERT INTO maplayermetadata VALUES (DEFAULT, 'https://worldmap.harvard.edu/maps/embed/?layer=geonode:zip_codes_2015_zip_s9i','https://worldmap.harvard.edu/data/geonode:zip_codes_2015_zip_s9i',
'geonode:zip_codes_2015_zip_s9i',
'http://worldmap.harvard.edu/download/wms/27289/png?layers=geonode%3Azip_codes_2015_zip_s9i&#38;width=865&#38;bbox=-71.1911091251%2C42.2270382738%2C-70.9228275369%2C42.3976144794&#38;service=WMS&#38;format=image%2Fpng&#38;srs=EPSG%3A4326&#38;request=GetMap&#38;height=550',
'admin',#{DatasetPage.dataset.id},#{fileMetadata.dataFile.id});" />
</textarea>
</ui:fragment>
</ui:fragment>

</ui:composition>

0 comments on commit 3b8d148

Please sign in to comment.