Commit cbd93357 authored by Jaime Arias's avatar Jaime Arias
Browse files

doc: add documentation to the methods

parent a92b47c5
......@@ -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>();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment