Project

General

Profile

« Previous | Next » 

Revision 4178

Added by daigle over 16 years ago

Fully qualify spatial and replication properties

View differences:

lib/style/skins/default/index.jsp
47 47
  </script>
48 48
  <br/>
49 49

  
50
  <% if ( PropertyService.getProperty("runSpatialOption").equals("true") ) { %>
50
  <% if ( PropertyService.getProperty("spatial.runSpatialOption").equals("true") ) { %>
51 51
  <script language="javascript">
52 52
	  insertMap("<%=CONTEXT_URL%>");
53 53
  </script>
lib/style/skins/knb2/index2.jsp
110 110
		</div>
111 111
	</td>
112 112
	<td align="center" width="33%">
113
	<% if ( PropertyService.getProperty("runSpatialOption").equals("true") ) { %>
113
	<% if ( PropertyService.getProperty("spatial.runSpatialOption").equals("true") ) { %>
114 114
	  <a href="./index_map_only.jsp" style="border:none"><img height="120" width="240" style="background-color: #C8E5F5; border: 1px solid #ccc" src="http://indus.msi.ucsb.edu:8180/knb/wms?VERSION=1.1.1&REQUEST=GetMap&SERVICE=WMS&LAYERS=metacat:world_borders,metacat:data_bounds,metacat:data_points&SRS=EPSG:4326&BBOX=-180,-90,180,90&WIDTH=240&HEIGHT=120&FORMAT=image/gif&STYLES=&TRANSPARENT=TRUE&UNIQUEID="> <br/> <span style="font-size:8pt"> Click to View Interactive Map </span> </a>
115 115
	<% } %>
116 116
	</td>
lib/style/skins/knb2/index_map_only.jsp
94 94
            </table></td>
95 95
        </tr>
96 96

  
97
	<% if ( PropertyService.getProperty("runSpatialOption").equals("true") ) { %>
97
	<% if ( PropertyService.getProperty("spatial.runSpatialOption").equals("true") ) { %>
98 98
        <tr>
99 99
          <td class="text_plain"><%@ include file="include_map.jsp" %></td>
100 100
        </tr>
lib/style/skins/knb2/index.jsp
116 116
          <td class="text_plain"><%@ include file="include_searchbox.jsp" %></td>
117 117
        </tr>
118 118

  
119
	<% if ( PropertyService.getProperty("runSpatialOption").equals("true") ) { %>
119
	<% if ( PropertyService.getProperty("spatial.runSpatialOption").equals("true") ) { %>
120 120
        <tr>
121 121
          <td class="text_plain"><%@ include file="include_map.jsp" %></td>
122 122
        </tr>
lib/metacat.properties
203 203
organization.user.UNAFFILIATED=cn=Manager
204 204
organization.password.UNAFFILIATED=
205 205

  
206
######## Access section               #########################################
207

  
208
timedreplication=false
209
firsttimedreplication=10:00 PM
210
timedreplicationinterval=172800000
211
forcereplicationwaitingtime=30000
212

  
213 206
######## Log Paths  ##############################################
214 207

  
215 208
sitecode=nceas
......
303 296
## TODO MCD this seems to be used in other placed besides replication
304 297
replication.datafilesizelimit=1000
305 298
replication.defaultcontenttype=application/octet-stream
299
replication.timedreplication=false
300
replication.firsttimedreplication=10:00 PM
301
replication.timedreplicationinterval=172800000
302
forcereplicationwaitingtime=30000
306 303

  
307 304
######## Skins  #########################################
308 305
skin.names=default,esa,nceas,knb,obfs,nrs,sanparks
......
373 370

  
374 371
######## Spatial section              #########################################
375 372

  
376
runSpatialOption=true
377
regenerateCacheOnRestart=true
373
spatial.runSpatialOption=true
374
spatial.regenerateCacheOnRestart=true
378 375

  
379 376
# Comma-seperated list of schemas containing spatial bounding boxes
380 377
# name corresponds to the docname stored in xml_documents table
381
spatialDocnameList=eml,fgdc,metadata
378
spatial.spatialDocnameList=eml,fgdc,metadata
382 379

  
383 380
# XML paths to the four bounding coordinates
384 381
# These paths must be included in your indexPaths variable in build.properties
385 382
# Note the naming convention:
386 383
#   {docname}_{direction}BoundingCoordinatePath=.....
387 384
# Has not been tested with other schemas besides EML
388
eml_westBoundingCoordinatePath=geographicCoverage/boundingCoordinates/westBoundingCoordinate
389
eml_eastBoundingCoordinatePath=geographicCoverage/boundingCoordinates/eastBoundingCoordinate
390
eml_southBoundingCoordinatePath=geographicCoverage/boundingCoordinates/southBoundingCoordinate
391
eml_northBoundingCoordinatePath=geographicCoverage/boundingCoordinates/northBoundingCoordinate
392
fgdc_westBoundingCoordinatePath=spdom/bounding/westbc
393
fgdc_eastBoundingCoordinatePath=spdom/bounding/eastbc
394
fgdc_southBoundingCoordinatePath=spdom/bounding/southbc
395
fgdc_northBoundingCoordinatePath=spdom/bounding/northbc
396
metadata_westBoundingCoordinatePath=westbc
397
metadata_eastBoundingCoordinatePath=eastbc
398
metadata_southBoundingCoordinatePath=southbc
399
metadata_northBoundingCoordinatePath=northbc
385
spatial.eml_westBoundingCoordinatePath=geographicCoverage/boundingCoordinates/westBoundingCoordinate
386
spatial.eml_eastBoundingCoordinatePath=geographicCoverage/boundingCoordinates/eastBoundingCoordinate
387
spatial.eml_southBoundingCoordinatePath=geographicCoverage/boundingCoordinates/southBoundingCoordinate
388
spatial.eml_northBoundingCoordinatePath=geographicCoverage/boundingCoordinates/northBoundingCoordinate
389
spatial.fgdc_westBoundingCoordinatePath=spdom/bounding/westbc
390
spatial.fgdc_eastBoundingCoordinatePath=spdom/bounding/eastbc
391
spatial.fgdc_southBoundingCoordinatePath=spdom/bounding/southbc
392
spatial.fgdc_northBoundingCoordinatePath=spdom/bounding/northbc
393
spatial.metadata_westBoundingCoordinatePath=westbc
394
spatial.metadata_eastBoundingCoordinatePath=eastbc
395
spatial.metadata_southBoundingCoordinatePath=southbc
396
spatial.metadata_northBoundingCoordinatePath=northbc
400 397

  
401
docTitle=dataset/title
398
spatial.docTitle=dataset/title
402 399

  
403 400
######## SiteMap section              #########################################
404 401

  
src/edu/ucsb/nceas/metacat/MetacatReplication.java
60 60
  private Thread lockThread = null;
61 61
  private static final AbstractDatabase dbAdapter = MetaCatUtil.dbAdapter;
62 62
  public static final String FORCEREPLICATEDELETE = "forcereplicatedelete";
63
  private static final String TIMEREPLICATION = "timedreplication";
64
  private static final String TIMEREPLICATIONINTERVAl = "timedreplicationinterval";
65
  private static final String FIRSTTIME  = "firsttimedreplication";
63
  private static final String TIMEREPLICATION = "replication.timedreplication";
64
  private static final String TIMEREPLICATIONINTERVAl = "replication.timedreplicationinterval";
65
  private static final String FIRSTTIME  = "replication.firsttimedreplication";
66 66
  private static final int    TIMEINTERVALLIMIT = 7200000;
67 67
  private static Logger logMetacat = Logger.getLogger(MetacatReplication.class);
68 68
  public static final String REPLICATIONUSER = "replication";
src/edu/ucsb/nceas/metacat/spatial/SpatialDocument.java
121 121
		// If so, get the appropriate corner xpaths
122 122
		try {
123 123
			Vector spatialDocnames = MetaCatUtil.getOptionList(PropertyService
124
					.getProperty("spatialDocnameList"));
124
					.getProperty("spatial.spatialDocnameList"));
125 125
			for (int i = 0; i < spatialDocnames.size(); i++) {
126 126
				thisDocname = ((String) spatialDocnames.elementAt(i)).trim();
127 127
				if (docname.trim().equals(thisDocname)) {
128 128
					isSpatialDocument = true;
129 129

  
130 130
					// determine its east,west,north and south coord xpaths
131
					westPath = PropertyService.getProperty(thisDocname
131
					westPath = PropertyService.getProperty("spatial." + thisDocname
132 132
							+ "_westBoundingCoordinatePath");
133
					eastPath = PropertyService.getProperty(thisDocname
133
					eastPath = PropertyService.getProperty("spatial." + thisDocname
134 134
							+ "_eastBoundingCoordinatePath");
135
					northPath = PropertyService.getProperty(thisDocname
135
					northPath = PropertyService.getProperty("spatial." + thisDocname
136 136
							+ "_northBoundingCoordinatePath");
137
					southPath = PropertyService.getProperty(thisDocname
137
					southPath = PropertyService.getProperty("spatial." + thisDocname
138 138
							+ "_southBoundingCoordinatePath");
139 139
				}
140 140
			}
......
191 191

  
192 192
			try {
193 193

  
194
				String docTitlePath = PropertyService.getProperty("docTitle");
194
				String docTitlePath = PropertyService.getProperty("spatial.docTitle");
195 195
				query = "select nodedata from xml_path_index where path = '"
196 196
						+ docTitlePath.trim() + "' and docid = '" + docid.trim() + "'";
197 197
				pstmt = dbconn.prepareStatement(query);
src/edu/ucsb/nceas/metacat/MetaCatServlet.java
251 251
             *  If spatial option is turned on and set to regenerate the
252 252
             *  spatial cache on restart, trigger the harvester regeneratation method
253 253
             */
254
            if ( PropertyService.getProperty("runSpatialOption").equals("true") &&
255
                    PropertyService.getProperty("regenerateCacheOnRestart").equals("true") ) {
254
            if ( PropertyService.getProperty("spatial.runSpatialOption").equals("true") &&
255
                    PropertyService.getProperty("spatial.regenerateCacheOnRestart").equals("true") ) {
256 256
                
257 257
                // Begin timer
258 258
                long before = System.currentTimeMillis();
......
265 265
                
266 266
                // After running the first time, we want to to set regenerateCacheOnRestart to false
267 267
                // so that it does not regenerate the cache every time tomcat is restarted
268
                PropertyService.setProperty("regenerateCacheOnRestart","false");
268
                PropertyService.setProperty("spatial.regenerateCacheOnRestart","false");
269 269
                
270 270
                // End timer
271 271
                long after = System.currentTimeMillis();
......
905 905
        
906 906
        Logger logMetacat = Logger.getLogger(MetaCatServlet.class);
907 907
        
908
        if ( !PropertyService.getProperty("runSpatialOption").equals("true") ) {
908
        if ( !PropertyService.getProperty("spatial.runSpatialOption").equals("true") ) {
909 909
            response.setContentType("text/html");
910 910
            out.println("<html> Metacat Spatial Option is turned off </html>");
911 911
            out.close();
......
2412 2412
                    logMetacat.info("Document deleted.");
2413 2413
                    
2414 2414
                    // Delete from spatial cache if runningSpatialOption
2415
                    if ( PropertyService.getProperty("runSpatialOption").equals("true") ) {
2415
                    if ( PropertyService.getProperty("spatial.runSpatialOption").equals("true") ) {
2416 2416
                        SpatialHarvester sh = new SpatialHarvester();
2417 2417
                        sh.addToDeleteQue( MetaCatUtil.getSmartDocId( docid[0] ) );
2418 2418
                        sh.destroy();
src/edu/ucsb/nceas/metacat/DocumentImpl.java
1394 1394

  
1395 1395
		// Adds the docid to the spatial data cache
1396 1396
		try {
1397
			if (PropertyService.getProperty("runSpatialOption").equals("true")) {
1397
			if (PropertyService.getProperty("spatial.runSpatialOption").equals("true")) {
1398 1398
				SpatialHarvester spatialHarvester = new SpatialHarvester();
1399 1399
				logMetacat.info(" --------- Attempting to update the spatial cache for docid "
1400 1400
								+ docid);
src/edu/ucsb/nceas/metacat/ForceReplicationHandler.java
160 160
		int sleepTime;
161 161
		try {
162 162
			sleepTime = Integer.parseInt(PropertyService
163
					.getProperty("forcereplicationwaitingtime"));
163
					.getProperty("replication.forcereplicationwaitingtime"));
164 164
			Thread.sleep(sleepTime);
165 165
		} catch (Exception ee) {
166 166
			logMetacat.error("Couldn't sleep in force replication");

Also available in: Unified diff