ucot.core
Interface ControlInterface

All Superinterfaces:
ModulePropertyInterface
All Known Implementing Classes:
Core

public interface ControlInterface
extends ModulePropertyInterface

This interface controls the basics of the UCOT-program (starting, parsing, shuting 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.

Author:
UCOT

Method Summary
 void addToAnalyzeModel(java.util.Vector<UseCase> useCases)
          Requests core to parse use case, perform heuristic on it and add it to given analyze model.
 void addToAnalyzeModel(java.util.Vector<UseCase> useCases, ParserInterface parser, HeuristicInterface heuristic)
          Requests core to parse use case, perform heuristic on it and add it to given analyze model.
 void clearAnalyzeModel()
          Clears the whole current analyze model.
 AnalyzeModel getAnalyzeModel()
          Returns vector of all analyze models from core.
 HeuristicInterface getCurrentHeuristic()
          Returns the current heuristic.
 ParserInterface getCurrentParser()
          Returns the current default parser.
 java.util.Vector<HeuristicInterface> getHeuristics()
          Returns a list of heuristics that are available.
 InputCollection getInputs()
          Returns InputCollection of inputs.
 java.util.Vector<OutputInterface> getOutputs()
          Returns a list of output adapters available.
 java.util.Vector<ParserInterface> getParsers()
          Returns a vector of parsers that are available.
 UseCaseCollection getUseCaseCollection()
          Returns all loaded use cases.
 void loadAnalyzeModel(java.net.URL url)
          Loads analyze model from a file.
 void loadUseCases(java.net.URL url)
          Loads use cases from 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 analyze model to a file.
 void setCurrentHeuristic(HeuristicInterface heuristic)
          Sets the default heuristic to use.
 void setCurrentParser(ParserInterface parser)
          Sets the default parser to use.
 void shutdown()
          Shuts down the program.
 
Methods inherited from interface ucot.ModulePropertyInterface
applyProperties, getProperties, loadDefaultProperties, loadProperties, saveProperties, setProperties
 

Method Detail

shutdown

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.


clearAnalyzeModel

void clearAnalyzeModel()
Clears the whole current analyze model. Basically this is similiar to creating a whole new empty analyze model.


loadUseCases

void loadUseCases(java.net.URL url)
Loads use cases from file.

Parameters:
url - URL of the file.

reloadUseCases

void reloadUseCases(java.net.URL url)
Reloads use cases from file. First core should remove all use cases that are loaded from given url. Then it should read use cases from the file.

Parameters:
url - URL of the file to reload.

loadAnalyzeModel

void loadAnalyzeModel(java.net.URL url)
                      throws java.io.IOException
Loads analyze model from a file.

Parameters:
url - URL of the file containing analyze model.
Throws:
java.io.IOException - If something goes wrong with loading use the analyze model from given URL.

saveAnalyzeModel

void saveAnalyzeModel(java.net.URL url)
Saves analyze model to a file.

Parameters:
url - Target file.

getUseCaseCollection

UseCaseCollection getUseCaseCollection()
Returns all loaded use cases.

Returns:
Use case colletion.

addToAnalyzeModel

void addToAnalyzeModel(java.util.Vector<UseCase> useCases)
Requests core to parse use case, perform heuristic on it and add it to given analyze model.

Parameters:
useCases - Use cases to work magic on.

addToAnalyzeModel

void addToAnalyzeModel(java.util.Vector<UseCase> useCases,
                       ParserInterface parser,
                       HeuristicInterface heuristic)
Requests core to parse use case, perform heuristic on it and add it to given analyze model.

Parameters:
useCases - Use case to work magic on.
parser - Parser to use.
heuristic - Heuristic to use.

getAnalyzeModel

AnalyzeModel getAnalyzeModel()
Returns vector of all analyze models from core.

Returns:
Specified analyze model.

getParsers

java.util.Vector<ParserInterface> getParsers()
Returns a vector of parsers that are available.

Returns:
Vector containing parser adapters.

getHeuristics

java.util.Vector<HeuristicInterface> getHeuristics()
Returns a list of heuristics that are available.

Returns:
Vector containing heuristic adapter.

getOutputs

java.util.Vector<OutputInterface> getOutputs()
Returns a list of output adapters available.

Returns:
Vector containing output adapter names.

getInputs

InputCollection getInputs()
Returns InputCollection of inputs.

Returns:
InputCollection.

setCurrentParser

void setCurrentParser(ParserInterface parser)
Sets the default parser to use.

Parameters:
parser - Parser to be used by default.

setCurrentHeuristic

void setCurrentHeuristic(HeuristicInterface heuristic)
Sets the default heuristic to use.

Parameters:
heuristic - Default heuristic to be used.

getCurrentParser

ParserInterface getCurrentParser()
Returns the current default parser.

Returns:
Default parser.

getCurrentHeuristic

HeuristicInterface getCurrentHeuristic()
Returns the current heuristic.

Returns:
Current heuristic.

output

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.

Parameters:
url - Destination URL.
output - Output adapter to use.
analyzeModel - Analyze model to export.
Throws:
java.lang.Exception - If something goes wrong with the output, then an exception is thrown.