|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectucot.ModuleProperties
ucot.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 |
---|
Fields inherited from class ucot.ModuleProperties |
---|
properties, propertiesURL |
Constructor Summary | |
---|---|
ProcessMlInputAdapter()
|
Method Summary | |
---|---|
void |
applyProperties()
Applies current properties for the module. |
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 |
loadDefaultProperties()
Method which returns the factory default properties for the module. |
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. |
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 |
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 printNodeList(org.w3c.dom.NodeList a)
a
- nodelist to printpublic static void main(java.lang.String[] args)
args
- public java.lang.String toString()
toString
in interface InputInterface
toString
in class java.lang.Object
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()
public java.util.Properties loadDefaultProperties()
ModulePropertyInterface
loadDefaultProperties
in interface ModulePropertyInterface
loadDefaultProperties
in class ModuleProperties
ModulePropertyInterface.loadDefaultProperties()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |