code: protected void addAttributes(final GedDocument<?> document) {
          for (final GedDocument<? extends GedObject> attribute : document
                  .getAttributes()) {
              final DocumentToApiModelVisitor v = createVisitor();
              attribute.accept(v);
              baseObject.getAttributes()
                      .add(convertToAttribute(v.getBaseObject()));
          }
      }
docs: Recurse into the child documents converting and adding to the list.
  
  @param document the current document