|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectucot.input.SimpleInputAdapter
public class SimpleInputAdapter
Reads usecases that are stored in this format: [name] Name of the usecase is here [id] Id of the usecase (must be unique within file, it is discarded after loading) [steps] Steps separated with linebreak. Step can have a sub-usecase, it is marked with (usecaseid) after the steps description and "."-character. [end] Use case ends with [end] tag, another usecase can begin with [name] element now
Field Summary | |
---|---|
private java.util.Properties |
options
|
Constructor Summary | |
---|---|
SimpleInputAdapter()
|
Method Summary | |
---|---|
boolean |
canRead(java.net.URL url)
Tests if this adapter can read the file. |
java.util.Properties |
getOptions()
Returns adapter's options |
private UseCaseStep |
parseStep(java.lang.String line)
Parses usecase step from given line. |
UseCaseCollection |
read(java.net.URL url)
Parses given usecase. |
UseCase |
readUseCase(java.io.BufferedReader reader,
java.net.URL url)
Reads a single usecase from given reader, sets it's url to given on |
void |
readUseCases(java.io.BufferedReader reader,
UseCaseCollection collection,
java.net.URL url)
Reads usecases from given reader, stores them to given collection and sets their url to given one. |
void |
setOptions(java.util.Properties options)
Sets options for the adapter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.Properties options
Constructor Detail |
---|
public SimpleInputAdapter()
Method Detail |
---|
public UseCaseCollection read(java.net.URL url) throws java.io.IOException
InputInterface
read
in interface InputInterface
url
- Url where input is loaded from
java.io.IOException
public void readUseCases(java.io.BufferedReader reader, UseCaseCollection collection, java.net.URL url) throws java.io.IOException
reader
- reader for the inputstreamcollection
- where all found usecases are storedurl
- url for the usecase
java.io.IOException
public UseCase readUseCase(java.io.BufferedReader reader, java.net.URL url) throws java.io.IOException
reader
- reader to read usecases withurl
- url for the usecases
java.io.IOException
private UseCaseStep parseStep(java.lang.String line)
line
-
public boolean canRead(java.net.URL url)
canRead
in interface InputInterface
url
- url of the file to test
public void setOptions(java.util.Properties options)
InputInterface
setOptions
in interface InputInterface
options
- options for the adapterpublic java.util.Properties getOptions()
InputInterface
getOptions
in interface InputInterface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |