Пример #1
0
 @When("the relationship \"$children\" is configured with node name \"$rootNode\"")
 public void setNodeNameForChildren(String childName, String node) {
   if (options == null) {
     options = new ParsingOptions();
   }
   ParsingOptions opt = options.children.get(childName);
   opt.nodeName = node;
   options.children.put(childName, opt);
 }
Пример #2
0
 @When("the relationship \"$children\" is configured with root node \"$rootNode\"")
 public void setRootNodeForChildren(String childName, String root) {
   if (options == null) {
     options = new ParsingOptions();
   }
   ParsingOptions opt = options.children.get(childName);
   opt.rootNode = root;
   options.children.put(childName, opt);
 }
Пример #3
0
 @When("I configure the $type node to be \"$rootNode\"")
 public void setRootNode(String type, String rootNode) {
   if (options == null) {
     options = new ParsingOptions();
   }
   if (type.equals("root")) {
     options.rootNode = rootNode;
   } else if (type.equals("array")) {
     options.nodeName = rootNode;
   }
 }
Пример #4
0
  @When("I configure a one to many relationship on node \"$children\"")
  public void setRelationship(String name) {
    if (options == null) {
      options = new ParsingOptions();
    }

    if (options.children == null) {
      options.children = new HashMap<String, ParsingOptions>();
    }
    options.children.put(name, new ParsingOptions());
  }