Project

General

Profile

« Previous | Next » 

Revision 4212

Added by daigle over 15 years ago

Continue to qualify property names

View differences:

test/edu/ucsb/nceas/metacatnettest/MetaCatServletNetTest.java
178 178
	 * Test insert a xml document successfully
179 179
	 */
180 180
	public void testInsertXMLDocument() throws PropertyNotFoundException {
181
		String name = "john" + PropertyService.getProperty("accNumSeparator") + serialNumber
182
				+ PropertyService.getProperty("accNumSeparator") + "1";
181
		String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
182
				+ PropertyService.getProperty("document.accNumSeparator") + "1";
183 183
		logMetacat.info("insert docid: " + name);
184 184
		String content = "<?xml version=\"1.0\"?>"
185 185
				+ "<!DOCTYPE acl PUBLIC \"-//ecoinformatics.org//"
......
201 201
	 * In the String, there is no <!Doctype ... Public/System/>
202 202
	 */
203 203
	public void testInsertInvalidateXMLDocument() throws PropertyNotFoundException  {
204
		String name = "john" + PropertyService.getProperty("accNumSeparator") + serialNumber
205
				+ PropertyService.getProperty("accNumSeparator") + "1";
204
		String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
205
				+ PropertyService.getProperty("document.accNumSeparator") + "1";
206 206
		logMetacat.info("insert docid: " + name);
207 207
		String content = "<?xml version=\"1.0\"?>"
208 208
				+ "<acl authSystem=\"knb\" order=\"allowFirst\">" + "<identifier>" + name
......
220 220
	 * There is no </acl> in this string
221 221
	 */
222 222
	public void testInsertNonWellFormedXMLDocument() throws PropertyNotFoundException  {
223
		String name = "john" + PropertyService.getProperty("accNumSeparator") + serialNumber
224
				+ PropertyService.getProperty("accNumSeparator") + "1";
223
		String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
224
				+ PropertyService.getProperty("document.accNumSeparator") + "1";
225 225
		logMetacat.info("insert non well-formed docid: " + name);
226 226
		String content = "<?xml version=\"1.0\"?>"
227 227
				+ "<acl authSystem=\"knb\" order=\"allowFirst\">" + "<identifier>" + name
......
239 239
	 * Test read a xml document  in xml format successfully
240 240
	 */
241 241
	public void testReadXMLDocumentXMLFormat() throws PropertyNotFoundException  {
242
		String name = "john" + PropertyService.getProperty("accNumSeparator") + serialNumber
243
				+ PropertyService.getProperty("accNumSeparator") + "1";
242
		String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
243
				+ PropertyService.getProperty("document.accNumSeparator") + "1";
244 244
		assertTrue(handleReadAction(name, "xml"));
245 245

  
246 246
	}
......
249 249
	 * Test read a xml document  in html format successfully
250 250
	 */
251 251
	public void testReadXMLDocumentHTMLFormat() throws PropertyNotFoundException {
252
		String name = "john" + PropertyService.getProperty("accNumSeparator") + serialNumber
253
				+ PropertyService.getProperty("accNumSeparator") + "1";
252
		String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
253
				+ PropertyService.getProperty("document.accNumSeparator") + "1";
254 254
		assertTrue(handleReadAction(name, "html"));
255 255

  
256 256
	}
......
259 259
	 * Test read a xml document  in zip format successfully
260 260
	 */
261 261
	public void testReadXMLDocumentZipFormat() throws PropertyNotFoundException {
262
		String name = "john" + PropertyService.getProperty("accNumSeparator") + serialNumber
263
				+ PropertyService.getProperty("accNumSeparator") + "1";
262
		String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
263
				+ PropertyService.getProperty("document.accNumSeparator") + "1";
264 264
		assertTrue(handleReadAction(name, "zip"));
265 265

  
266 266
	}
......
269 269
	 * Test insert a xml document successfully
270 270
	 */
271 271
	public void testUpdateXMLDocument() throws PropertyNotFoundException {
272
		String name = "john" + PropertyService.getProperty("accNumSeparator") + serialNumber
273
				+ PropertyService.getProperty("accNumSeparator") + "2";
272
		String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
273
				+ PropertyService.getProperty("document.accNumSeparator") + "2";
274 274
		logMetacat.info("update docid: " + name);
275 275
		String content = "<?xml version=\"1.0\"?>"
276 276
				+ "<!DOCTYPE acl PUBLIC \"-//ecoinformatics.org//"
......
291 291
	 * Test insert a data file successfully
292 292
	 */
293 293
	public void testInertDataFile() throws PropertyNotFoundException {
294
		String name = "john" + PropertyService.getProperty("accNumSeparator") + serialNumber
295
				+ PropertyService.getProperty("accNumSeparator") + "1";
294
		String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
295
				+ PropertyService.getProperty("document.accNumSeparator") + "1";
296 296
		logMetacat.info("insert data file docid: " + name);
297 297
		logMetacat.info("insert data file ");
298 298
		File hello = new File("test/jones.204.22.xml");
......
304 304
	 * Test delete a xml document successfully
305 305
	 */
306 306
	public void testDeleteXMLDocument() throws PropertyNotFoundException {
307
		String name = "john" + PropertyService.getProperty("accNumSeparator") + serialNumber
308
				+ PropertyService.getProperty("accNumSeparator") + "2";
307
		String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
308
				+ PropertyService.getProperty("document.accNumSeparator") + "2";
309 309
		logMetacat.info("delete docid: " + name);
310 310
		assertTrue(handleDeleteFile(name));
311 311

  
test/edu/ucsb/nceas/metacattest/QuerySpecificationTest.java
149 149
            System.out.println("---- SQL ------------------");
150 150
            QuerySpecification qspec = new QuerySpecification(xml, 
151 151
                    PropertyService.getProperty("saxparser"), 
152
                    PropertyService.getProperty("accNumSeparator"));
152
                    PropertyService.getProperty("document.accNumSeparator"));
153 153
            String query = qspec.printSQL(false);
154 154
           assertTrue(selectionQuery.equals(query.trim()));
155 155
        } catch (IOException e) {
......
168 168
            System.out.println("---- orginal EXT SQL  ------------------\n"+extendedQuery);
169 169
            QuerySpecification qspec = new QuerySpecification(xml, 
170 170
                    PropertyService.getProperty("saxparser"), 
171
                    PropertyService.getProperty("accNumSeparator"));
171
                    PropertyService.getProperty("document.accNumSeparator"));
172 172
            String query = 
173 173
                    qspec.printExtendedSQL(
174 174
                            "'obfs.45337', 'obfs.45338', 'obfs.45346'", true);
test/edu/ucsb/nceas/metacattest/QueryResultBuilderTest.java
233 233
        	String   createDate = result.getString(5);
234 234
        	String updateDate = result.getString(6);
235 235
        	String completeDocid = docid
236
                             + PropertyService.getProperty("accNumSeparator");
236
                             + PropertyService.getProperty("document.accNumSeparator");
237 237
            completeDocid += rev;
238 238
            // Put everything into a string buffer
239 239
            StringBuffer document = new StringBuffer();
test/edu/ucsb/nceas/metacattest/MetaCatServletTest.java
224 224
	public void testInsertXMLDocument() {
225 225
		String name = null;
226 226
		try {
227
			name = "john" + PropertyService.getProperty("accNumSeparator") + serialNumber
228
					+ PropertyService.getProperty("accNumSeparator") + "1";
227
			name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
228
					+ PropertyService.getProperty("document.accNumSeparator") + "1";
229 229
		} catch (PropertyNotFoundException pnfe) {
230 230
			fail("Could not find property: " + pnfe.getMessage());
231 231
		}
......
252 252
	public void testInsertInvalidateXMLDocument() {
253 253
		String name = null;
254 254
		try {
255
			name = "john" + PropertyService.getProperty("accNumSeparator") + serialNumber
256
				+ PropertyService.getProperty("accNumSeparator") + "1";
255
			name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
256
				+ PropertyService.getProperty("document.accNumSeparator") + "1";
257 257
		} catch (PropertyNotFoundException pnfe) {
258 258
			fail("Could not find property: " + pnfe.getMessage());
259 259
		}
......
276 276
	public void testInsertNonWellFormedXMLDocument() {
277 277
		String name = null;
278 278
		try {
279
			name = "john" + PropertyService.getProperty("accNumSeparator") + serialNumber
280
				+ PropertyService.getProperty("accNumSeparator") + "1";
279
			name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
280
				+ PropertyService.getProperty("document.accNumSeparator") + "1";
281 281
		} catch (PropertyNotFoundException pnfe) {
282 282
			fail("Could not find property: " + pnfe.getMessage());
283 283
		}
......
300 300
	public void testReadXMLDocumentXMLFormat() {
301 301
		String name = null;
302 302
		try {
303
			name = "john" + PropertyService.getProperty("accNumSeparator") + serialNumber
304
				+ PropertyService.getProperty("accNumSeparator") + "1";
303
			name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
304
				+ PropertyService.getProperty("document.accNumSeparator") + "1";
305 305
		} catch (PropertyNotFoundException pnfe) {
306 306
			fail("Could not find property: " + pnfe.getMessage());
307 307
		}
......
315 315
	public void testReadXMLDocumentHTMLFormat() {
316 316
		String name = null;
317 317
		try {
318
			name = "john" + PropertyService.getProperty("accNumSeparator") + serialNumber
319
				+ PropertyService.getProperty("accNumSeparator") + "1";
318
			name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
319
				+ PropertyService.getProperty("document.accNumSeparator") + "1";
320 320
		} catch (PropertyNotFoundException pnfe) {
321 321
			fail("Could not find property: " + pnfe.getMessage());
322 322
		}	
......
330 330
	public void testReadXMLDocumentZipFormat() {
331 331
		String name = null;
332 332
		try {
333
			name = "john" + PropertyService.getProperty("accNumSeparator") + serialNumber
334
				+ PropertyService.getProperty("accNumSeparator") + "1";
333
			name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
334
				+ PropertyService.getProperty("document.accNumSeparator") + "1";
335 335
		} catch (PropertyNotFoundException pnfe) {
336 336
			fail("Could not find property: " + pnfe.getMessage());
337 337
		}	
......
345 345
	public void testUpdateXMLDocument() {
346 346
		String name = null;
347 347
		try {
348
			name = "john" + PropertyService.getProperty("accNumSeparator") + serialNumber
349
				+ PropertyService.getProperty("accNumSeparator") + "2";
348
			name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
349
				+ PropertyService.getProperty("document.accNumSeparator") + "2";
350 350
		} catch (PropertyNotFoundException pnfe) {
351 351
			fail("Could not find property: " + pnfe.getMessage());
352 352
		}		
......
372 372
	public void testDeleteXMLDocument() {
373 373
		String name = null;
374 374
		try {
375
			name = "john" + PropertyService.getProperty("accNumSeparator") + serialNumber
376
				+ PropertyService.getProperty("accNumSeparator") + "2";
375
			name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
376
				+ PropertyService.getProperty("document.accNumSeparator") + "2";
377 377
		} catch (PropertyNotFoundException pnfe) {
378 378
			fail("Could not find property: " + pnfe.getMessage());
379 379
		}
src/edu/ucsb/nceas/metacat/MetaCatServlet.java
221 221
			// schema, which accidentily points to wrong version of
222 222
			// eml-resource.xsd.
223 223
			String correctedEML201Doc = PropertyService
224
					.getProperty("eml201_document_corrected");
224
					.getProperty("document.eml201DocumentCorrected");
225 225
			if (correctedEML201Doc != null && correctedEML201Doc.equals(FALSE)) {
226 226
				logMetacat.info("===Start to correct eml201 documents");
227 227
				EML201DocumentCorrector correct = new EML201DocumentCorrector();
228 228
				boolean success = correct.run();
229 229
				if (success) {
230
					PropertyService.setProperty("eml201_document_corrected", TRUE);
230
					PropertyService.setProperty("document.eml201DocumentCorrected", TRUE);
231 231
				}
232 232
				logMetacat.info("====Finish to correct eml201 documents");
233 233
			}
......
3654 3654
    private static String appendRev(String docid) throws Exception {
3655 3655
        Logger logMetacat = Logger.getLogger(MetaCatServlet.class);
3656 3656
        String newAccNum = null;
3657
        String separator = PropertyService.getProperty("accNumSeparator");
3657
        String separator = PropertyService.getProperty("document.accNumSeparator");
3658 3658
        int firstIndex = docid.indexOf(separator);
3659 3659
        int lastIndex = docid.lastIndexOf(separator);
3660 3660
        if (firstIndex == lastIndex) {
src/edu/ucsb/nceas/metacat/ContentTypeProvider.java
185 185
    // create xml document
186 186
    try
187 187
    {
188
      String accNumber = eml2DocId + PropertyService.getProperty("accNumSeparator") +
188
      String accNumber = eml2DocId + PropertyService.getProperty("document.accNumSeparator") +
189 189
                    DBUtil.getLatestRevisionInDocumentTable(eml2DocId);
190 190
      //System.out.println("the acc number is !!!!!!!!!!!!!!!!!"+accNumber);
191 191
      xmlDoc = new DocumentImpl(accNumber);
......
555 555
    String xmlDoc = null;
556 556
    try
557 557
    {
558
      String accNumber = physicalDocid + PropertyService.getProperty("accNumSeparator") +
558
      String accNumber = physicalDocid + PropertyService.getProperty("document.accNumSeparator") +
559 559
        DBUtil.getLatestRevisionInDocumentTable(physicalDocid);
560 560
      //System.out.println("the accenumber is !!!!!!!!!!!!!!!!!!" + accNumber);
561 561
      DocumentImpl doc = new DocumentImpl(accNumber);
src/edu/ucsb/nceas/metacat/DocumentImpl.java
2038 2038
                int thisrev = DBUtil.getLatestRevisionInDocumentTable(docid);
2039 2039
                logMetacat.info("this revsion is: " + thisrev);
2040 2040
                // Save the old document publicaccessentry in a backup table
2041
                String accNumber = docid+PropertyService.getProperty("accNumSeparator")+thisrev;
2041
                String accNumber = docid+PropertyService.getProperty("document.accNumSeparator")+thisrev;
2042 2042
                thisdoc = new DocumentImpl(accNumber, false);
2043 2043
                DocumentImpl.archiveDocAndNodesRevision(connection, docid, user, thisdoc);
2044 2044
                logMetacat.info("after archiveDoc");
......
2426 2426
        ForceReplicationHandler frh = new ForceReplicationHandler(accnum,
2427 2427
                action, true, null);
2428 2428
        // clear cache after inserting or updating a document
2429
        if (PropertyService.getProperty("query_cache_on").equals("true"))
2429
        if (PropertyService.getProperty("database.queryCacheOn").equals("true"))
2430 2430
        {
2431 2431
          //System.out.println("the string stored into cache is "+ resultsetBuffer.toString());
2432 2432
     	   DBQuery.clearQueryResultCache();
......
2613 2613
        }
2614 2614
        
2615 2615
        // clear cache after inserting or updating a document
2616
        if (PropertyService.getProperty("query_cache_on").equals("true"))
2616
        if (PropertyService.getProperty("database.queryCacheOn").equals("true"))
2617 2617
        {
2618 2618
          //System.out.println("the string stored into cache is "+ resultsetBuffer.toString());
2619 2619
     	   DBQuery.clearQueryResultCache();
......
2926 2926
            ForceReplicationHandler frh = new ForceReplicationHandler(
2927 2927
                             accnum, ForceReplicationHandler.DELETE, isXML, notifyServer);
2928 2928
            // clear cache after inserting or updating a document
2929
            if (PropertyService.getProperty("query_cache_on").equals("true"))
2929
            if (PropertyService.getProperty("database.queryCacheOn").equals("true"))
2930 2930
            {
2931 2931
              //System.out.println("the string stored into cache is "+ resultsetBuffer.toString());
2932 2932
         	   DBQuery.clearQueryResultCache();
......
3158 3158

  
3159 3159
        try {
3160 3160
            if (doc == null) {
3161
                String accNumber = docid + PropertyService.getProperty("accNumSeparator") +
3161
                String accNumber = docid + PropertyService.getProperty("document.accNumSeparator") +
3162 3162
                DBUtil.getLatestRevisionInDocumentTable(docid);
3163 3163
                    doc = new DocumentImpl(accNumber);
3164 3164
            }
src/edu/ucsb/nceas/metacat/ReplicationHandler.java
331 331
      String createdDate = (String)docinfoHash.get("date_created");
332 332
      String updatedDate = (String)docinfoHash.get("date_updated");
333 333
      //docid should include rev number too
334
      /*String accnum=docId+util.getProperty("accNumSeparator")+
334
      /*String accnum=docId+util.getProperty("document.accNumSeparator")+
335 335
                                              (String)docinfoHash.get("rev");*/
336 336
      logMetacat.info("docid in repl: "+accNumber);
337 337
      String docType = (String)docinfoHash.get("doctype");
......
454 454
      String createdDate = (String)docinfoHash.get("date_created");
455 455
      String updatedDate = (String)docinfoHash.get("date_updated");
456 456
      //docid should include rev number too
457
      /*String accnum=docId+util.getProperty("accNumSeparator")+
457
      /*String accnum=docId+util.getProperty("document.accNumSeparator")+
458 458
                                              (String)docinfoHash.get("rev");*/
459 459

  
460 460

  
......
558 558

  
559 559
         //because delete method docid should have rev number
560 560
         //so we just add one for it. This rev number is no sence.
561
         String accnum=docId+PropertyService.getProperty("accNumSeparator")+"1";
561
         String accnum=docId+PropertyService.getProperty("document.accNumSeparator")+"1";
562 562
         //System.out.println("accnum: "+accnum);
563 563
         DocumentImpl.delete(accnum, null, null, notifyServer);
564 564
         logMetacat.info("Successfully deleted doc " + docId);
......
1112 1112
         }
1113 1113
       }
1114 1114
       
1115
       String accNumber = docid + PropertyService.getProperty("accNumSeparator") + rev;
1115
       String accNumber = docid + PropertyService.getProperty("document.accNumSeparator") + rev;
1116 1116
       // this is non-data file
1117 1117
       if(flag && !dataFile)
1118 1118
       {
......
1178 1178
           flag = true;    
1179 1179
       }
1180 1180
     
1181
       String accNumber = docid + PropertyService.getProperty("accNumSeparator") + rev;
1181
       String accNumber = docid + PropertyService.getProperty("document.accNumSeparator") + rev;
1182 1182
       // this is non-data file
1183 1183
       if(flag && !dataFile)
1184 1184
       {
src/edu/ucsb/nceas/metacat/RelationHandler.java
219 219
				rev = rs.getInt(2);
220 220
				String sep = ".";
221 221
				try {
222
					sep = PropertyService.getProperty("accNumSeparator");
222
					sep = PropertyService.getProperty("document.accNumSeparator");
223 223
				} catch (PropertyNotFoundException pnfe) {
224 224
					logMetacat.error("Could not find account separator.  Setting to '.': " + pnfe.getMessage());
225 225
				}
src/edu/ucsb/nceas/metacat/AccessionNumber.java
58 58
	 */
59 59
	private AccessionNumber() throws AccessionNumberException {
60 60
		try {
61
			this.sitecode = PropertyService.getProperty("sitecode");
62
			this.sep = PropertyService.getProperty("accNumSeparator");
61
			this.sitecode = PropertyService.getProperty("document.sitecode");
62
			this.sep = PropertyService.getProperty("document.accNumSeparator");
63 63
		} catch (PropertyNotFoundException pnfe) {
64 64
			throw new AccessionNumberException("Could not retrieve property "
65 65
					+ "in constructor: " + pnfe.getMessage());
src/edu/ucsb/nceas/metacat/DBUtil.java
347 347
    String accnum = null;
348 348
    String sep = ".";
349 349
    try {
350
    	PropertyService.getProperty("accNumSeparator");
350
    	PropertyService.getProperty("document.accNumSeparator");
351 351
    } catch (PropertyNotFoundException pnfe) {
352 352
    	logMetacat.error("could not get property 'accNumSeparator'.  setting to '.': " 
353 353
    			+ pnfe.getMessage());  	
......
446 446
    String accnum = null;
447 447
    String sep = ".";
448 448
    try {
449
    	PropertyService.getProperty("accNumSeparator");
449
    	PropertyService.getProperty("document.accNumSeparator");
450 450
    } catch (PropertyNotFoundException pnfe) {
451 451
    	logMetacat.error("could not get property 'accNumSeparator'.  setting to '.': " 
452 452
    			+ pnfe.getMessage());  	
src/edu/ucsb/nceas/metacat/util/MetaCatUtil.java
81 81
        }
82 82

  
83 83
        try {
84
        	separator = PropertyService.getProperty("accNumSeparator").charAt(0);
84
        	separator = PropertyService.getProperty("document.accNumSeparator").charAt(0);
85 85
        } catch (PropertyNotFoundException pnfe) {
86 86
        	logMetacat.error("Could not retrieve account number separator. " 
87 87
        			+ "Separator set to '.' : " + pnfe.getMessage());
......
722 722

  
723 723
    /**
724 724
	 * Writes debug information into a file. In metacat.properties, if property
725
	 * writeDebugToFile is set to true, the debug information will be written to
726
	 * debug file, which value is the property debugOutputFile in
725
	 * application.writeDebugToFile is set to true, the debug information will be written to
726
	 * debug file, which value is the property application.debugOutputFile in
727 727
	 * metacat.properties.
728 728
	 * 
729 729
	 */
730 730
	public static void writeDebugToFile(String debugInfo) {
731 731
		String debug = "false";
732 732
		try {
733
			debug = PropertyService.getProperty("writeDebugToFile");
733
			debug = PropertyService.getProperty("application.writeDebugToFile");
734 734
			if (debug != null && debug.equalsIgnoreCase("true")) {
735 735
				File outputFile = 
736
					new File(PropertyService.getProperty("debugOutputFile"));
736
					new File(PropertyService.getProperty("application.debugOutputFile"));
737 737
				FileOutputStream fos = new FileOutputStream(outputFile, true);
738 738
				PrintWriter pw = new PrintWriter(fos);
739 739
				pw.println(debugInfo);
......
765 765
	public static void writeDebugToDelimiteredFile(String debugInfo, boolean newLine) {
766 766
		String debug = "false";
767 767
		try {
768
			debug = PropertyService.getProperty("writeDebugToFile");
768
			debug = PropertyService.getProperty("application.writeDebugToFile");
769 769
			if (debug != null && debug.equalsIgnoreCase("true")) {
770 770
				File outputFile = new File(PropertyService
771
						.getProperty("delimiteredOutputFile"));
771
						.getProperty("application.delimiteredOutputFile"));
772 772
				FileOutputStream fos = new FileOutputStream(outputFile, true);
773 773
				PrintWriter pw = new PrintWriter(fos);
774 774
				if (newLine) {
src/edu/ucsb/nceas/metacat/DBQuery.java
92 92
    static {
93 93
    	int qryRsltCacheSize = 0;
94 94
    	try {
95
    		qryRsltCacheSize = Integer.parseInt(PropertyService.getProperty("queryresult_cache_size"));
95
    		qryRsltCacheSize = Integer.parseInt(PropertyService.getProperty("database.queryresultCacheSize"));
96 96
    	} catch (PropertyNotFoundException pnfe) {
97 97
    		System.err.println("Could not get QUERYRESULTCACHESIZE property in static block: "
98 98
					+ pnfe.getMessage());
......
234 234
    {
235 235
    	// since the query will be too long to be handled, so we divided the 
236 236
    	// docids vector into couple vectors.
237
    	int size = (new Integer(PropertyService.getProperty("app_resultsetsize"))).intValue();
237
    	int size = (new Integer(PropertyService.getProperty("database.appResultsetSize"))).intValue();
238 238
    	logMetacat.info("The size of select doicds is "+docids.size());
239 239
    	logMetacat.info("The application result size in metacat.properties is "+size);
240 240
    	Vector subset = new Vector();
......
347 347
         {
348 348
           qspec = new QuerySpecification(xmlquery,
349 349
                                          parserName,
350
                                          PropertyService.getProperty("accNumSeparator"));
350
                                          PropertyService.getProperty("document.accNumSeparator"));
351 351
         }
352 352
         catch (Exception ee)
353 353
         {
......
573 573
      {
574 574
        // for html page, we put everything into one page
575 575
        offset =
576
            (new Integer(PropertyService.getProperty("web_resultsetsize"))).intValue();
576
            (new Integer(PropertyService.getProperty("database.webResultsetSize"))).intValue();
577 577
      }
578 578
      else
579 579
      {
580 580
          offset =
581
              (new Integer(PropertyService.getProperty("app_resultsetsize"))).intValue();
581
              (new Integer(PropertyService.getProperty("database.appResultsetSize"))).intValue();
582 582
      }
583 583

  
584 584
      /*
......
625 625
      String selectionAndExtendedQuery = null;
626 626
      // we only get cache for public
627 627
      if (user != null && user.equalsIgnoreCase("public") 
628
     		 && pagesize == 0 && PropertyService.getProperty("query_cache_on").equals("true"))
628
     		 && pagesize == 0 && PropertyService.getProperty("database.queryCacheOn").equals("true"))
629 629
      {
630 630
    	  selectionAndExtendedQuery = query +qspec.getReturnDocList()+qspec.getReturnFieldList();
631 631
   	      String cachedResult = getResultXMLFromCache(selectionAndExtendedQuery);
......
682 682
           document = new StringBuffer();
683 683

  
684 684
           String completeDocid = docid
685
                            + PropertyService.getProperty("accNumSeparator");
685
                            + PropertyService.getProperty("document.accNumSeparator");
686 686
           completeDocid += rev;
687 687
           document.append("<docid>").append(completeDocid).append("</docid>");
688 688
           if (docname != null)
......
780 780
     
781 781
     // now we only cached none-paged query and user is public
782 782
     if (user != null && user.equalsIgnoreCase("public") 
783
    		 && pagesize == NONPAGESIZE && PropertyService.getProperty("query_cache_on").equals("true"))
783
    		 && pagesize == NONPAGESIZE && PropertyService.getProperty("database.queryCacheOn").equals("true"))
784 784
     {
785 785
       //System.out.println("the string stored into cache is "+ resultsetBuffer.toString());
786 786
  	   storeQueryResultIntoCache(selectionAndExtendedQuery, resultsetBuffer.toString());
......
807 807
     int usage_count = getXmlReturnfieldsTableId(qspec, dbconn);
808 808
     boolean enterRecords = false;
809 809

  
810
     // get value of xml_returnfield_count
810
     // get value of database.xmlReturnfieldCount
811 811
     int count = (new Integer(PropertyService
812
                            .getProperty("xml_returnfield_count")))
812
                            .getProperty("database.xmlReturnfieldCount")))
813 813
                            .intValue();
814 814

  
815 815
     // set enterRecords to true if usage_count is more than the offset
......
877 877
     String element = null;
878 878
     String query = null;
879 879
     int offset = (new Integer(PropertyService
880
                               .getProperty("queryresult_string_length")))
880
                               .getProperty("database.queryresultStringLength")))
881 881
                               .intValue();
882 882
     while (keys.hasNext())
883 883
     {
......
1996 1996
                }
1997 1997

  
1998 1998
                String docidPlusVersion = ((String) docIdList.elementAt(i))
1999
                        + PropertyService.getProperty("accNumSeparator") + rev;
1999
                        + PropertyService.getProperty("document.accNumSeparator") + rev;
2000 2000

  
2001 2001
                //create new documentImpl object
2002 2002
                DocumentImpl documentImplObject = new DocumentImpl(
......
2273 2273
                version = currentVersion;
2274 2274
                //get package zip entry name
2275 2275
                //it should be docId.revsion.package
2276
                rootName = packageId + PropertyService.getProperty("accNumSeparator")
2277
                        + version + PropertyService.getProperty("accNumSeparator")
2276
                rootName = packageId + PropertyService.getProperty("document.accNumSeparator")
2277
                        + version + PropertyService.getProperty("document.accNumSeparator")
2278 2278
                        + "package";
2279 2279
                //get the whole id list for data packadge
2280 2280
                docIdList = getCurrentDocidListForDataPackage(packageId);
......
2290 2290
            {
2291 2291

  
2292 2292
                rootName = docIdString
2293
                        + PropertyService.getProperty("accNumSeparator") + "package";
2293
                        + PropertyService.getProperty("document.accNumSeparator") + "package";
2294 2294
                //get the whole id list for data packadge
2295 2295
                docIdList = getOldVersionDocidListForDataPackage(docIdString);
2296 2296

  
......
2338 2338
                            // Add String object to htmlDocumentImplList
2339 2339
                            String elementInHtmlList = remoteDoc
2340 2340
                                    .getDocIdWithoutRevsion()
2341
                                    + PropertyService.getProperty("accNumSeparator")
2341
                                    + PropertyService.getProperty("document.accNumSeparator")
2342 2342
                                    + remoteDoc.getRevision();
2343 2343
                            htmlDocumentImplList.add(elementInHtmlList);
2344 2344
                        }//if
src/edu/ucsb/nceas/metacat/Sitemap.java
143 143
                        writeSitemapHeader(sitemap);
144 144
                    }
145 145

  
146
                    String separator = PropertyService.getProperty("accNumSeparator");
146
                    String separator = PropertyService.getProperty("document.accNumSeparator");
147 147
                    String docid = rs.getString(1) + separator
148 148
                            + rs.getString(2);
149 149
                    writeSitemapEntry(sitemap, docid);
src/edu/ucsb/nceas/metacat/Eml200SAXHandler.java
313 313
        try
314 314
        {
315 315
            PermissionController control = new PermissionController(docid
316
                    + PropertyService.getProperty("accNumSeparator") + revision);
316
                    + PropertyService.getProperty("document.accNumSeparator") + revision);
317 317
            //unChangableSubTreeHash = getUnchangableSubTree(control, user,
318 318
            // groups);
319 319

  
......
601 601
                String docidWithoutRev = MetaCatUtil.getDocIdFromString(docid);
602 602
                String seperator = ".";
603 603
                try {
604
					seperator = PropertyService.getProperty("accNumSeparator");
604
					seperator = PropertyService.getProperty("document.accNumSeparator");
605 605
				} catch (PropertyNotFoundException pnfe) {
606 606
					logMetacat.error("Could not get property 'accNumSeparator'.  " 
607 607
							+ "Setting separator to '.': "+ pnfe.getMessage());
src/edu/ucsb/nceas/metacat/Eml210SAXHandler.java
196 196
        // Get the unchangable subtrees (user doesn't have write permission)
197 197
        try {
198 198
            PermissionController control = new PermissionController(docid
199
                    + PropertyService.getProperty("accNumSeparator") + revision);
199
                    + PropertyService.getProperty("document.accNumSeparator") + revision);
200 200
            //unChangableSubTreeHash = getUnchangableSubTree(control, user,
201 201
            // groups);
202 202

  
......
347 347
                String docidWithoutRev = MetaCatUtil.getDocIdFromString(docid);
348 348
                String seperator = ".";
349 349
                try {
350
                seperator = PropertyService.getProperty("accNumSeparator");
350
                seperator = PropertyService.getProperty("document.accNumSeparator");
351 351
                } catch (PropertyNotFoundException pnfe) {
352 352
                	logMetacat.error("Could not fing property 'accNumSeparator'. " 
353 353
                			+ "Setting separator to '.': " + pnfe.getMessage());
src/edu/ucsb/nceas/metacat/DocumentIdentifier.java
52 52
	public DocumentIdentifier(String docid) throws AccessionNumberException {
53 53
		this.docid = docid;
54 54
		try {
55
			this.separator = PropertyService.getProperty("accNumSeparator");
55
			this.separator = PropertyService.getProperty("document.accNumSeparator");
56 56
		} catch (PropertyNotFoundException pnfe) {
57 57
			throw new AccessionNumberException(
58 58
					"Could not get property 'accNumSeparator' :" + pnfe.getMessage());
src/edu/ucsb/nceas/metacat/RemoteDocument.java
92 92
    userName = myUserName;
93 93
    passWord = myPassWord;
94 94
    zipEntry = myZipEntryPath+ docIdWithoutRevision + 
95
                PropertyService.getProperty("accNumSeparator") + revision;
95
                PropertyService.getProperty("document.accNumSeparator") + revision;
96 96
   
97 97

  
98 98
  }// Constructor
......
207 207
      throw new Exception ("Couldn't find a dataset docid for the required id");
208 208
    }
209 209
    // Create a documentImpl object
210
    String accNumber = givenDocId + PropertyService.getProperty("accNumSeparator") +
210
    String accNumber = givenDocId + PropertyService.getProperty("document.accNumSeparator") +
211 211
    DBUtil.getLatestRevisionInDocumentTable(givenDocId);
212 212
    document = new DocumentImpl(accNumber, false);
213 213
    // get the replication home server (it come from xml_replication table)
......
295 295
    }
296 296
    // User specified docid (including revision number
297 297
    String specifiedDocId = docIdWithoutRevision + 
298
                PropertyService.getProperty("accNumSeparator") +revision;
298
                PropertyService.getProperty("document.accNumSeparator") +revision;
299 299
    logMetacat.info("The requried docid is: "+ specifiedDocId);
300 300
    
301 301
    // At first login to remote metacat server. 
......
366 366
    }
367 367
    // User specified docid (including revision number
368 368
    String specifiedDocId = docIdWithoutRevision + 
369
                PropertyService.getProperty("accNumSeparator") +revision;
369
                PropertyService.getProperty("document.accNumSeparator") +revision;
370 370
    logMetacat.info("The requried docid is: "+ specifiedDocId);
371 371
    
372 372
    // At first login to remote metacat server.
src/edu/ucsb/nceas/metacat/AccessControlList.java
131 131
  {
132 132
		String parserName = PropertyService.getProperty("saxparser");
133 133
		this.server = SystemUtil.getSecureServerURL();
134
		this.sep = PropertyService.getProperty("accNumSeparator");
134
		this.sep = PropertyService.getProperty("document.accNumSeparator");
135 135

  
136 136
		this.connection = conn;
137 137
		this.parserName = parserName;

Also available in: Unified diff