Ejemplo n.º 1
0
  /**
   * See ConcreteTreeRepNode.makeChildren
   *
   * @param nodeSet
   * @param leafSet
   * @return
   */
  @Override
  protected boolean makeChildren(MutableSet<TreeRepNode> nodeSet, Set<TreeRepNode> leafSet) {

    if (record.getSimpleFields() == null) {
      throw new RuntimeException("null simple fields in record!?!?!!");
    }

    if (!record.getSimpleFields().getItems().isEmpty()) {
      for (Object simpleFieldObj : record.getSimpleFields().getItems()) {
        // contents of getItems should be no other type than SimpleField.
        SimpleField simpleField = (SimpleField) simpleFieldObj;

        DeepDeleteUtil.addNodeForSimpleType(simpleField, this, nodeSet, leafSet);
      }

      return true;
    } else {
      // record has no contents
      return false;
    }
  }
Ejemplo n.º 2
0
 /**
  * Create a RecordNode wrapping the given Record element.
  *
  * @param element
  */
 public RecordNode(Record element) {
   super(element, element.getID(), "Record", element.getName().toString());
   record = element;
 }