public interface ControlInterface
This interface controls the basics of the UCOT-program (starting, parsing, shutting down etc). UCOT core implements this interface and it is designed in a way that the user interface using the core can control the execution of the program effectively.
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_CURRENT_HEURISTIC
|
static java.lang.String |
PROPERTY_CURRENT_PARSER
|
Method Summary | |
---|---|
void |
addToAnalyzeModel(java.util.Vector<UseCase> useCases)
Requests core to parse given use cases, perform heuristic on them and add then them to current analyze model. |
void |
addToAnalyzeModel(java.util.Vector<UseCase> useCases,
ParserInterface parser,
HeuristicInterface heuristic)
Requests core to parse use cases, perform heuristic on them and add them to current analyze model. |
void |
clearAnalyzeModel()
Clears the whole current analyze model. |
AnalyzeModel |
getAnalyzeModel()
Method for getting a pointer to the current analyze model being handled in the core. |
HeuristicInterface |
getCurrentHeuristic()
Returns the current heuristic. |
ParserInterface |
getCurrentParser()
Returns the current default parser. |
java.util.Vector<HeuristicInterface> |
getHeuristics()
Returns a vector containing all the heuristics currently available to the UCOT core. |
InputCollection |
getInputs()
Returns all the input adapters currently available to UCOT core. |
java.util.Vector<OutputInterface> |
getOutputs()
Returns a vector containing all the output adapters currently available to the UCOT core. |
java.util.Vector<ParserInterface> |
getParsers()
Returns a vector containing all the parsers currently available to the UCOT core. |
java.lang.String |
getRootDir()
Returns the UCOT root directory. |
UseCaseCollection |
getUseCaseCollection()
Returns all currently loaded use cases in a UseCaseCollection. |
void |
loadAnalyzeModel(java.net.URL url)
Loads serialized analyze model from the given file. |
void |
loadUseCases(java.net.URL url)
Loads use cases from the given file. |
void |
output(java.net.URL url,
OutputInterface output,
AnalyzeModel analyzeModel)
Exports given analyze model to given URL using given output adapter. |
void |
reloadUseCases(java.net.URL url)
Reloads use cases from file. |
void |
saveAnalyzeModel(java.net.URL url)
Saves the current analyze model to a java serialization file which location is pointed by the given URL. |
void |
setCurrentHeuristic(HeuristicInterface heuristic)
Sets the default heuristic to used in analyzation progresses. |
void |
setCurrentParser(ParserInterface parser)
Sets the default parser to be used in parsing progresses. |
void |
shutdown()
Shuts down the program. |
Methods inherited from interface ucot.ModulePropertyInterface |
---|
applyProperties, getProperties, loadDefaultProperties, loadProperties, saveProperties, setProperties |
Field Detail |
---|
static final java.lang.String PROPERTY_CURRENT_PARSER
static final java.lang.String PROPERTY_CURRENT_HEURISTIC
Method Detail |
---|
void shutdown()
Shuts down the program. The shutdown routine triggers all possible autosave actions and after that the core gets rid of all its modules and prepares itself for getting automatically junkbusted.
java.lang.String getRootDir()
Returns the UCOT root directory. That is either the system directory where the class files are stored under a hierarchical directory structure based on the package definitions or the system directory where the UCOT JAR distribution package is stored. The result depends solely on the fact which distribution is currently used.
void clearAnalyzeModel()
Clears the whole current analyze model. Basically this is similiar to creating a whole new empty analyze model. Notice that the old analyze model is not saved anywhere and the restoration of the old model is impossible without manually backing up the old analyze model before using this function.
void loadUseCases(java.net.URL url)
Loads use cases from the given file.
url
- URL to the use case file.void reloadUseCases(java.net.URL url)
Reloads use cases from file. First core should remove all use cases that are loaded from the given url, and then it should (re)read the use cases from the given file.
url
- URL of the file to be reloaded.void loadAnalyzeModel(java.net.URL url) throws java.io.IOException
Loads serialized analyze model from the given file.
url
- URL to the file containing a serialized analyze model.
java.io.IOException
- If something goes wrong while loading
the analyze model from given URL.void saveAnalyzeModel(java.net.URL url)
Saves the current analyze model to a java serialization file which location is pointed by the given URL.
url
- URL to the file where the current analyze model
should be serialized and saved.UseCaseCollection getUseCaseCollection()
Returns all currently loaded use cases in a UseCaseCollection.
void addToAnalyzeModel(java.util.Vector<UseCase> useCases)
Requests core to parse given use cases, perform heuristic on them and add then them to current analyze model.
Default parser and heuristic are used for this operation.
useCases
- Use cases to work magic on.void addToAnalyzeModel(java.util.Vector<UseCase> useCases, ParserInterface parser, HeuristicInterface heuristic)
Requests core to parse use cases, perform heuristic on them and add them to current analyze model.
If either the given parser or heuristic is unknown to the UCOT core, then nothing is done.
useCases
- Use cases to work magic on.parser
- Parser to use.heuristic
- Heuristic to use.AnalyzeModel getAnalyzeModel()
Method for getting a pointer to the current analyze model being handled in the core.
Notice that all editing to the analyze model should be done
through the AnalyzeModelEditor which can be easily acquired
with the getEditor()
method from the
AnalyzeModel
itself.
java.util.Vector<ParserInterface> getParsers()
Returns a vector containing all the parsers currently available to the UCOT core.
ParserInterfaces
.java.util.Vector<HeuristicInterface> getHeuristics()
Returns a vector containing all the heuristics currently available to the UCOT core.
HeuristicInterfaces
.java.util.Vector<OutputInterface> getOutputs()
Returns a vector containing all the output adapters currently available to the UCOT core.
OutputInterfaces
.InputCollection getInputs()
Returns all the input adapters currently available to UCOT core.
InputInterface
.void setCurrentParser(ParserInterface parser)
Sets the default parser to be used in parsing progresses.
parser
- Parser to be used by default.void setCurrentHeuristic(HeuristicInterface heuristic)
Sets the default heuristic to used in analyzation progresses.
heuristic
- Default heuristic to be used by default.ParserInterface getCurrentParser()
Returns the current default parser.
ParserInterface
.HeuristicInterface getCurrentHeuristic()
Returns the current heuristic.
HeuristicInterface
.void output(java.net.URL url, OutputInterface output, AnalyzeModel analyzeModel) throws java.lang.Exception
Exports given analyze model to given URL using given output adapter.
url
- Destination URL.output
- OutputInterface
of the output adapter to be used.analyzeModel
- Analyze model to export.
If
- something goes wrong with the output operation, then an
exception is thrown.
java.lang.Exception