|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectucot.input.ProcessMlInputAdapter
public class ProcessMlInputAdapter
This InputInterface reads ProcessMl-files and parses usecases from them. References to sub-usecase is stored to usecase's steps. If sub-usecase has no references to it, it is currently discarded.
Field Summary | |
---|---|
private java.util.Properties |
options
|
Constructor Summary | |
---|---|
ProcessMlInputAdapter()
|
Method Summary | |
---|---|
boolean |
canRead(java.net.URL url)
Tests if this adapter can read the file. |
private org.w3c.dom.Element |
getCorrectAbstraction(org.w3c.dom.NodeList abstractions)
Goes throguh a nodelist containing "abstraction"-named elements and returns the one which has level 0 |
java.util.Properties |
getOptions()
Returns adapter's options |
static void |
main(java.lang.String[] args)
Test program used while programming this class |
private void |
ParseInstanceDetails(org.w3c.dom.Element processInstance,
UseCase usecase)
Parses processInstance's id and adds it to usecase, also checks if this usecase is a subusecase |
private UseCaseStep |
ParseStep(org.w3c.dom.Node node)
Parses usecase step from given node and returns it, or null if acceptable one wasn't found |
private boolean |
ParseSteps(UseCase usecase,
org.w3c.dom.NodeList steps)
Parses steps from given nodelist, stores them to given usecase |
void |
printNodeList(org.w3c.dom.NodeList a)
Prints a nodelist, for testing purposes nly.. |
UseCaseCollection |
read(java.net.URL url)
Parses given usecase. |
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 ProcessMlInputAdapter()
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
private org.w3c.dom.Element getCorrectAbstraction(org.w3c.dom.NodeList abstractions)
abstractions
- list of elements with the name abstraction (from processml)
private boolean ParseSteps(UseCase usecase, org.w3c.dom.NodeList steps)
usecase
- where steps are storedsteps
- nodelist containing the "step"-elements
private UseCaseStep ParseStep(org.w3c.dom.Node node)
node
- xml-element that contains a step
private void ParseInstanceDetails(org.w3c.dom.Element processInstance, UseCase usecase)
processInstance
- xml-element to parse the details fromusecase
- usecase that was created from processInstance attributepublic 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
public void printNodeList(org.w3c.dom.NodeList a)
a
- nodelist to printpublic static void main(java.lang.String[] args)
args
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |