Project

General

Profile

« Previous | Next » 

Revision 4812

Added by daigle about 15 years ago

Format indexPaths in metacat.properties. Remove from build.properties and build.xml. Move indexPath list getter from MetacatUtil to SystemUtil.

View differences:

SystemUtil.java
27 27
package edu.ucsb.nceas.metacat.util;
28 28

  
29 29
import java.io.IOException;
30
import java.util.Vector;
30 31
import java.util.regex.Matcher;
31 32
import java.util.regex.Pattern;
32 33
import javax.servlet.ServletContext;
......
40 41
import edu.ucsb.nceas.metacat.service.ServiceService;
41 42
import edu.ucsb.nceas.utilities.FileUtil;
42 43
import edu.ucsb.nceas.utilities.PropertyNotFoundException;
44
import edu.ucsb.nceas.utilities.StringUtil;
43 45

  
44 46
public class SystemUtil {
45 47

  
......
573 575
	public static String getUserHomeDir() {
574 576
		return System.getProperty("user.home");
575 577
	}
576

  
577
}
578
	
579
	/**
580
	 * Get a list of xml paths that need to be indexed
581
	 */
582
	public static Vector<String> getPathsForIndexing() throws UtilException {
583
		Vector <String> indexPaths = null;
584
		try {
585
			indexPaths = 
586
				StringUtil.toVector(PropertyService.getProperty("xml.indexPaths"), ',');
587
		} catch (PropertyNotFoundException pnfe) {
588
			throw new UtilException("could not get index paths: " + pnfe.getMessage());
589
		}
590
		
591
		return indexPaths;
592
	}
593
 }

Also available in: Unified diff