|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectucot.ModuleProperties
ucot.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 | |
---|---|
static java.lang.String |
name
|
Fields inherited from class ucot.ModuleProperties |
---|
properties, propertiesURL |
Constructor Summary | |
---|---|
SimpleInputAdapter()
|
Method Summary | |
---|---|
void |
applyProperties()
Applies current properties for the module. |
boolean |
canRead(java.net.URL url)
Tests if this adapter can read the file. |
java.lang.String |
getName()
|
java.util.Properties |
loadDefaultProperties()
Method which returns the factory default properties for the module. |
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. |
java.lang.String |
toString()
returns inputs name |
Methods inherited from class ucot.ModuleProperties |
---|
getProperties, loadProperties, saveProperties, setProperties |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ucot.ModulePropertyInterface |
---|
getProperties, loadProperties, saveProperties, setProperties |
Field Detail |
---|
public static final java.lang.String name
Constructor Detail |
---|
public SimpleInputAdapter()
Method Detail |
---|
public java.lang.String getName()
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 java.lang.String toString()
toString
in interface InputInterface
toString
in class java.lang.Object
public java.util.Properties loadDefaultProperties()
ModulePropertyInterface
loadDefaultProperties
in interface ModulePropertyInterface
loadDefaultProperties
in class ModuleProperties
ModulePropertyInterface.loadDefaultProperties()
public void applyProperties() throws BadPropertyValueException
ModulePropertyInterface
applyProperties
in interface ModulePropertyInterface
applyProperties
in class ModuleProperties
BadPropertyValueException
- In this case exception
is thrown only if either the given parser or heuristic
does not exist.ModulePropertyInterface.applyProperties()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |