|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlio.core.LiOResourceFactory
public class LiOResourceFactory
This class is used to arrange all facilities related to load resources needed by a search algorithm and other resources recursively. Here is used the singleton pattern because only one instance of this class is needed in one execution. So you don't have to make an instance of LiOResourceFactory but use static method getHandle
Method Summary | |
---|---|
boolean |
applySearchConf(LiOSearch alg)
Let update LiOSearch algorithm's parameters before run it from configuration file or command line parameters |
boolean |
applySearchOutputConf(SearchOutput so)
|
boolean |
applyStopConditionConf(StopCondition sc)
|
java.lang.Object |
createFromFile(java.lang.String fileName)
Tries to create a new instance of an object from a path to .class file or a full qualified class name. |
LiOResource |
createResource(java.lang.String pResource)
Returns the default resource given by either configuration file or default file in that order. |
LiOResource |
createResource(java.lang.String pResource,
java.lang.String pInstantiation)
Returns the resource by looking for a concrete instantiation, but if isn't possible then returns the default resource. |
LiOResource |
createSearchAlgorithm(java.lang.String pSA)
Create the search algorithm encode in the class name passed as argument |
static LiOResourceFactory |
getHandle()
This method use lazy construction to return an instance of LiOResourceFactory. |
java.util.List<java.lang.String> |
getListOfNonDependentResources(java.lang.String pKindOfResource)
Gets a list of built-in resources which match with a kind of resource. |
java.util.List<java.lang.String> |
getListOfResources(java.lang.String pKindOfResource)
Gets a list of built-in resources which match with a kind of resource. |
java.util.List<java.lang.String> |
getListOfResources(java.lang.String pKindOfResource,
java.lang.String pKindOfData)
Gets a list of built-in resources which match with a kind of resource and a kind of data type. |
java.util.List<java.lang.String> |
getProblemsList()
|
java.util.List<java.lang.String> |
getSearchAlgList()
|
java.lang.String |
getSearchAlgorithmName()
|
java.lang.String |
getTaskName()
|
boolean |
saveConfToFile(LiOSearch search,
java.lang.String file)
Save actual configuration of a search algorithm to a file |
boolean |
setCmdParam(java.lang.String cmdParam)
Update a configuration parameter from command line |
void |
setConfFile(java.lang.String pConfFile)
Loads a search configuration by reading a configuration file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static LiOResourceFactory getHandle()
public boolean saveConfToFile(LiOSearch search, java.lang.String file)
search
- search algorithmfile
- file to be stored
public void setConfFile(java.lang.String pConfFile)
pConfFile
- name of the file containing the configuration of the search.public boolean setCmdParam(java.lang.String cmdParam)
cmdParam
- this is the command line parameter which is an String
representing a configuration parameter and its valuepublic java.util.List<java.lang.String> getListOfResources(java.lang.String pKindOfResource, java.lang.String pKindOfData)
pKindOfResource
- kind of resourcepKindOfData
- kind of data
public java.util.List<java.lang.String> getListOfResources(java.lang.String pKindOfResource)
pKindOfResource
- kind of resource
public java.util.List<java.lang.String> getListOfNonDependentResources(java.lang.String pKindOfResource)
pKindOfResource
- kind of resource
public java.util.List<java.lang.String> getProblemsList()
public java.util.List<java.lang.String> getSearchAlgList()
public LiOResource createResource(java.lang.String pResource)
pResource
- kind of resource
public LiOResource createSearchAlgorithm(java.lang.String pSA)
pSA
- name of the search algorithm
public LiOResource createResource(java.lang.String pResource, java.lang.String pInstantiation)
pResource
- kind of resourcepInstantiation
- concrete implementation of that resource.
public java.lang.Object createFromFile(java.lang.String fileName)
fileName
- path to a .class file or a full qualified class name
public boolean applySearchConf(LiOSearch alg)
alg
- algorithm which is updated
public boolean applySearchOutputConf(SearchOutput so)
public boolean applyStopConditionConf(StopCondition sc)
public java.lang.String getSearchAlgorithmName()
public java.lang.String getTaskName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |