org.apache.solr.core
Class Config
java.lang.Object
org.apache.solr.core.Config
public class Config
- extends Object
- Version:
- $Id: Config.java 542679 2007-05-29 22:28:21Z ryan $
- Author:
- yonik
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
public static final Logger log
Config
public Config(String name,
InputStream is,
String prefix)
throws ParserConfigurationException,
IOException,
SAXException
- Throws:
ParserConfigurationException
IOException
SAXException
getDocument
public Document getDocument()
getXPath
public XPath getXPath()
evaluate
public Object evaluate(String path,
QName type)
getNode
public Node getNode(String path,
boolean errIfMissing)
getVal
public String getVal(String path,
boolean errIfMissing)
get
public String get(String path)
get
public String get(String path,
String def)
getInt
public int getInt(String path)
getInt
public int getInt(String path,
int def)
getBool
public boolean getBool(String path)
getBool
public boolean getBool(String path,
boolean def)
getFloat
public float getFloat(String path)
getFloat
public float getFloat(String path,
float def)
findClass
public static Class findClass(String cname,
String... subpackages)
newInstance
public static Object newInstance(String cname,
String... subpackages)
setInstanceDir
public static void setInstanceDir(String dir)
getInstanceDir
public static String getInstanceDir()
isInstanceDirInitialized
public static boolean isInstanceDirInitialized()
openResource
public static InputStream openResource(String resource)
getLines
public static List<String> getLines(String resource)
throws IOException
- Accesses a resource by name and returns the (non comment) lines
containing data.
A comment line is any line that starts with the character "#"
- Parameters:
resource
-
- Returns:
- a list of non-blank non-comment lines with whitespace trimmed
from front and back.
- Throws:
IOException
Copyright © 2006 - 2009 The Apache Software Foundation