code: private void addPropertiesToModel(List<Property> localProperties, Item parent) {
          for (Property property : localProperties) {
              Item propertyItem = new Item(property, parent);
              model.add(propertyItem);
  
              // add any sub-properties
              Property[] subProperties = property.getSubProperties();
              if (subProperties != null && subProperties.length > 0) {
                  addPropertiesToModel(Arrays.asList(subProperties), propertyItem);
              }
          }
      }
docs: Add the specified properties to the model using the specified parent.
  
  @param localProperties the properties to add to the end of the model
  @param parent the {@link Item} parent of these properties, null if none