Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cosyverif
Services
service adt2amas
Commits
cbd93357
Commit
cbd93357
authored
Dec 04, 2020
by
Jaime Arias
Browse files
doc: add documentation to the methods
parent
a92b47c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/cosyverif/service/adt2amas/GrmlParser.java
View file @
cbd93357
...
...
@@ -29,18 +29,37 @@ import org.cosyverif.model.Attribute;
@Accessors
(
chain
=
true
,
fluent
=
true
)
public
class
GrmlParser
{
/** GRML Model */
private
Model
model
;
/** Map containing all the ADTree nodes <id, node> */
private
HashMap
<
String
,
ADTreeNode
>
mapNodes
=
new
HashMap
<
String
,
ADTreeNode
>();
/**
* Constructor
*
* @param model Grml Model
*/
private
GrmlParser
(
Model
model
)
{
this
.
model
=
model
;
}
/**
* Creates a parser from Grml to ADTree
*
* @param model Grml Model
* @return GrmlParser object
*/
public
static
GrmlParser
create
(
Model
model
)
{
return
new
GrmlParser
(
model
);
}
/**
* Generates a file handled by the adt2amas tool
*
* @return File object of the generated file
* @throws IOException
*/
public
File
parse
()
throws
IOException
{
File
fileOutput
=
null
;
BufferedWriter
bw
=
null
;
...
...
@@ -141,6 +160,12 @@ public class GrmlParser {
return
fileOutput
;
}
/**
* Parses a Grml node containing ADTree attributes (e.g. time, cost)
*
* @param node Grml Node
* @return Map<name, value> with the attribute's information
*/
private
HashMap
<
String
,
String
>
getAttributes
(
Attribute
node
)
{
HashMap
<
String
,
String
>
attrs
=
new
HashMap
<
String
,
String
>();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment