|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.solr.core.Config
public class Config
Field Summary | |
---|---|
static org.slf4j.Logger |
log
|
Constructor Summary | |
---|---|
Config(SolrResourceLoader loader,
String name)
Builds a config from a resource name with no xpath prefix. |
|
Config(SolrResourceLoader loader,
String name,
InputSource is,
String prefix)
Builds a config: |
|
Config(SolrResourceLoader loader,
String name,
InputStream is,
String prefix)
Deprecated. Use Config(SolrResourceLoader, String, InputSource, String) instead. |
|
Config(String name,
InputStream is,
String prefix)
Deprecated. Use Config(SolrResourceLoader, String, InputSource, String) instead. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.slf4j.Logger log
Constructor Detail |
---|
@Deprecated public Config(String name, InputStream is, String prefix) throws ParserConfigurationException, IOException, SAXException
Config(SolrResourceLoader, String, InputSource, String)
instead.
ParserConfigurationException
IOException
SAXException
public Config(SolrResourceLoader loader, String name) throws ParserConfigurationException, IOException, SAXException
loader
- name
-
ParserConfigurationException
IOException
SAXException
@Deprecated public Config(SolrResourceLoader loader, String name, InputStream is, String prefix) throws ParserConfigurationException, IOException, SAXException
Config(SolrResourceLoader, String, InputSource, String)
instead.
Note that the 'name' parameter is used to obtain a valid input stream if no valid one is provided through 'is'. If no valid stream is provided, a valid SolrResourceLoader instance should be provided through 'loader' so the resource can be opened (@see SolrResourceLoader#openResource); if no SolrResourceLoader instance is provided, a default one will be created.
Consider passing a non-null 'name' parameter in all use-cases since it is used for logging & exception reporting.
loader
- the resource loader used to obtain an input stream if 'is' is nullname
- the resource name used if the input stream 'is' is nullis
- the resource as a streamprefix
- an optional prefix that will be preprended to all non-absolute xpath expressions
ParserConfigurationException
IOException
SAXException
public Config(SolrResourceLoader loader, String name, InputSource is, String prefix) throws ParserConfigurationException, IOException, SAXException
Note that the 'name' parameter is used to obtain a valid input stream if no valid one is provided through 'is'. If no valid stream is provided, a valid SolrResourceLoader instance should be provided through 'loader' so the resource can be opened (@see SolrResourceLoader#openResource); if no SolrResourceLoader instance is provided, a default one will be created.
Consider passing a non-null 'name' parameter in all use-cases since it is used for logging & exception reporting.
loader
- the resource loader used to obtain an input stream if 'is' is nullname
- the resource name used if the input stream 'is' is nullis
- the resource as a SAX InputSourceprefix
- an optional prefix that will be preprended to all non-absolute xpath expressions
ParserConfigurationException
IOException
SAXException
Method Detail |
---|
public SolrResourceLoader getResourceLoader()
public String getResourceName()
public String getName()
public Document getDocument()
public XPath getXPath()
public Object evaluate(String path, QName type)
public Node getNode(String path, boolean errIfMissing)
public String getVal(String path, boolean errIfMissing)
public String get(String path)
public String get(String path, String def)
public int getInt(String path)
public int getInt(String path, int def)
public boolean getBool(String path)
public boolean getBool(String path, boolean def)
public float getFloat(String path)
public float getFloat(String path, float def)
public double getDouble(String path)
public double getDouble(String path, double def)
public org.apache.lucene.util.Version getLuceneVersion(String path)
public org.apache.lucene.util.Version getLuceneVersion(String path, org.apache.lucene.util.Version def)
public static final org.apache.lucene.util.Version parseLuceneVersionString(String matchVersion)
@Deprecated public String getConfigDir()
SolrResourceLoader.getConfigDir()
instead.
@Deprecated public InputStream openResource(String resource)
SolrResourceLoader.openResource(String)
instead.
@Deprecated public List<String> getLines(String resource) throws IOException
SolrResourceLoader.getLines(String)
instead.
IOException
@Deprecated public Class findClass(String cname, String... subpackages)
SolrResourceLoader.findClass(String, String[])
instead.
@Deprecated public Object newInstance(String cname, String... subpackages)
SolrResourceLoader.newInstance(String, String[])
instead.
@Deprecated public String getInstanceDir()
SolrResourceLoader.getInstanceDir()
instead.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |