java.lang.Objectucot.input.UseCase
public class UseCase
UseCase class. Contains UseCaseSteps related to this usecase.
Field Summary | |
---|---|
private HeuristicInterface |
heuristic
Which heuristicInterface was used on this usecase |
private boolean |
isUseCaseAnalyzed
Is usecase added to current analyze model. |
private AnalyzeModel |
model
When heuristic was ran on this usecase, this model was created. |
private java.lang.String |
name
|
private ParserInterface |
parser
Which parserInterface was used on this usecase |
private boolean |
subUseCase
Is this a sub-usecase, mainly used when connecting sub-usecases to usecase steps |
private java.net.URL |
url
|
private java.lang.String |
useCaseId
UseCase's id loaded from processml files or from simple usecase format Only used for connecting usecase steps to sub-usecases |
private java.util.Vector<UseCaseStep> |
useCaseSteps
Vector that contains all usecase steps |
Constructor Summary | |
---|---|
UseCase()
|
Method Summary | |
---|---|
void |
addStep(java.lang.String step,
UseCase subUseCase)
Adds a new step to this usecase |
void |
addStep(UseCaseStep step)
Adds a new UseCaseStep to this usecase |
void |
clear()
Removes all usecase's steps |
boolean |
equals(java.lang.Object obj)
Equals method for usecases. |
AnalyzeModel |
getAnalyzeModel()
Returns the (mini) analyzemodel that was created from this (and only this) usecase |
HeuristicInterface |
getHeuristic()
Get the heuristic that was used on this usecase |
java.lang.String |
getHeuristicName()
Returns name of the heuristic that was used in creating this usecase |
java.lang.String |
getName()
Returns this usecase's name |
ParserInterface |
getParser()
Get the parser that was used on this usecase |
java.lang.String |
getParserName()
Returns name of the parser that was used in creating this usecase |
UseCaseStep |
getStep(int index)
Returns step with given index |
int |
getStepCount()
Returns the count of steps this usecase has |
java.net.URL |
getUrl()
Returns the url where this usecase was loaded from |
java.lang.String |
getUseCaseId()
Returns this usecase's id. |
int |
hashCode()
|
boolean |
isSubUseCase()
Is this usecase a sub-usecaes |
boolean |
isUseCaseAnalyzed()
Is this usecase analyzed and added to main analyzemodel |
java.util.Iterator<UseCaseStep> |
iterator()
Iterator for the usecase steps |
void |
setAnalyzeModel(AnalyzeModel model)
Sets the (mini) analyzemodel that was created from this (and only this) usecase |
void |
setAsSubUseCase(boolean sub)
Mark this usecase as a sub usecase |
void |
setHeuristic(HeuristicInterface heuristic)
Set the heuristic that was used to this usecase |
void |
setId(java.lang.String relationId)
Set relation id for this usecase. |
void |
setName(java.lang.String name)
Sets a new name for this usecase |
void |
setParser(ParserInterface parser)
Set the parser that was used to parse this usecase |
void |
setUrl(java.net.URL url)
Sets the url where this usecase was loaded from |
void |
setUseCaseAnalyzed()
Mark this usecase as analyzed |
void |
setUseCaseAnalyzed(boolean analyzed)
Set wheiter this usecase is analyzed. |
java.lang.String |
toString()
Returns this usecase as a string with this format:
Name
---
(step index). |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.util.Vector<UseCaseStep> useCaseSteps
Vector that contains all usecase steps
private java.net.URL url
private java.lang.String name
private boolean isUseCaseAnalyzed
Is usecase added to current analyze model.
private boolean subUseCase
Is this a sub-usecase, mainly used when connecting sub-usecases to usecase steps
private AnalyzeModel model
When heuristic was ran on this usecase, this model was created. It was later added to the main usecase, but a copy was left. This copy is used for highlighting.
private HeuristicInterface heuristic
Which heuristicInterface was used on this usecase
private ParserInterface parser
Which parserInterface was used on this usecase
private java.lang.String useCaseId
UseCase's id loaded from processml files or from simple usecase format Only used for connecting usecase steps to sub-usecases
Constructor Detail |
---|
public UseCase()
Method Detail |
---|
public void setParser(ParserInterface parser)
Set the parser that was used to parse this usecase
parser
- parser that was usedpublic void setHeuristic(HeuristicInterface heuristic)
Set the heuristic that was used to this usecase
heuristic
- heuristicpublic ParserInterface getParser()
Get the parser that was used on this usecase
public HeuristicInterface getHeuristic()
Get the heuristic that was used on this usecase
public java.lang.String getParserName()
Returns name of the parser that was used in creating this usecase
public java.lang.String getHeuristicName()
Returns name of the heuristic that was used in creating this usecase
public AnalyzeModel getAnalyzeModel()
Returns the (mini) analyzemodel that was created from this (and only this) usecase
public void setAnalyzeModel(AnalyzeModel model)
Sets the (mini) analyzemodel that was created from this (and only this) usecase
model
- this usecase was created frompublic void setAsSubUseCase(boolean sub)
Mark this usecase as a sub usecase
sub
- true if this usecase is a sub-usecasepublic boolean isSubUseCase()
Is this usecase a sub-usecaes
public boolean isUseCaseAnalyzed()
Is this usecase analyzed and added to main analyzemodel
public void setUseCaseAnalyzed(boolean analyzed)
Set wheiter this usecase is analyzed.
analyzed
- is the usecase analyzedpublic void setUseCaseAnalyzed()
Mark this usecase as analyzed
public java.util.Iterator<UseCaseStep> iterator()
Iterator for the usecase steps
iterator
in interface java.lang.Iterable<UseCaseStep>
public void setId(java.lang.String relationId)
Set relation id for this usecase. Only used for connecting UseCaseSteps to subusecases
relationId
- this usecase's id loaded from filepublic java.lang.String getUseCaseId()
Returns this usecase's id.
public int getStepCount()
Returns the count of steps this usecase has
public UseCaseStep getStep(int index)
Returns step with given index
index
- index of the step
public void clear()
Removes all usecase's steps
public void addStep(java.lang.String step, UseCase subUseCase)
Adds a new step to this usecase
step
- step's descriptionsubUseCase
- reference to sub usecasepublic void addStep(UseCaseStep step)
Adds a new UseCaseStep to this usecase
step
- UseCaseStep object to addpublic java.net.URL getUrl()
Returns the url where this usecase was loaded from
public void setUrl(java.net.URL url)
Sets the url where this usecase was loaded from
url
- public java.lang.String getName()
Returns this usecase's name
public void setName(java.lang.String name)
Sets a new name for this usecase
name
- new namepublic java.lang.String toString()
Returns this usecase as a string with this format:
Name
---
(step index). (step)
(step index). (step)
...
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
Equals method for usecases.
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object