SMILA (incubation) API documentation

org.eclipse.smila.solr.util
Class SolrHelper

java.lang.Object
  extended by org.eclipse.smila.solr.util.SolrHelper

public class SolrHelper
extends java.lang.Object

SolrHelper class.

Author:
pwissel

Constructor Summary
SolrHelper(SolrProperties properties)
          Constructor.
 
Method Summary
 void copyCoreConfig(java.lang.String srcName, java.lang.String targetName)
          Copy the conf/ of the source core to the workspace for a new core.
 java.io.File getCoreDataDir(java.lang.String core)
          Get the core data dir.
 java.io.File getCoreInstanceDir(java.lang.String core)
          Get the core instance dir.
 java.io.File getCoreRootDir(java.lang.String core)
          Get the core root dir.
 java.lang.String getDataDirPath(java.lang.String coreName)
          Get the path of the data directory relative to solr.home for specified a core.
 java.io.File getSolrConfigByCore(java.lang.String core)
          Get the solrconfig.xml by core.
 java.io.File getSolrHome()
          Get the solr.home file.
 java.io.File getSolrSchemaByCore(java.lang.String core)
          Get the schema.xml by core.
 java.io.File getSolrXML()
          Get the solr.xml file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SolrHelper

public SolrHelper(SolrProperties properties)
           throws java.io.IOException
Constructor.

Parameters:
properties - the SolrPropertie.
Throws:
java.io.IOException - IOException.
Method Detail

copyCoreConfig

public void copyCoreConfig(java.lang.String srcName,
                           java.lang.String targetName)
                    throws java.io.IOException
Copy the conf/ of the source core to the workspace for a new core.

Parameters:
srcName - the name of the new core.
targetName -
Throws:
java.io.IOException - IOException.

getCoreRootDir

public java.io.File getCoreRootDir(java.lang.String core)
                            throws java.io.IOException
Get the core root dir.

Parameters:
core - the core name.
Returns:
the core root dir.
Throws:
java.io.IOException - IOException.

getCoreDataDir

public java.io.File getCoreDataDir(java.lang.String core)
                            throws java.io.IOException
Get the core data dir.

Parameters:
core - the core name.
Returns:
the core data dir.
Throws:
java.io.IOException - IOException.

getCoreInstanceDir

public java.io.File getCoreInstanceDir(java.lang.String core)
                                throws java.io.IOException
Get the core instance dir.

Parameters:
core - the core name.
Returns:
the core instance dir.
Throws:
java.io.IOException

getSolrConfigByCore

public java.io.File getSolrConfigByCore(java.lang.String core)
                                 throws java.io.IOException
Get the solrconfig.xml by core.

Parameters:
core - the core name.
Returns:
the path to solrconfig.xml.
Throws:
java.io.IOException

getSolrSchemaByCore

public java.io.File getSolrSchemaByCore(java.lang.String core)
                                 throws java.io.IOException
Get the schema.xml by core.

Parameters:
core - the core name.
Returns:
the path to schema.xml.
Throws:
java.io.IOException - IOException.

getSolrHome

public java.io.File getSolrHome()
                         throws java.io.IOException
Get the solr.home file.

Returns:
the solr.home file.
Throws:
java.io.IOException - IOException.

getSolrXML

public java.io.File getSolrXML()
                        throws java.io.IOException
Get the solr.xml file.

Returns:
the solr.xml file.
Throws:
java.io.IOException - IOException.

getDataDirPath

public java.lang.String getDataDirPath(java.lang.String coreName)
Get the path of the data directory relative to solr.home for specified a core.

Parameters:
coreName - the core name.
Returns:
the path of data directory.

SMILA (incubation) API documentation