code: @Programmatic
      public Clob downloadMetaModel() {
  
          final Collection<ObjectSpecification> specifications = specificationLoader.allSpecifications();
  
          final List<MetaModelRow> rows = Lists.newArrayList();
          for (final ObjectSpecification spec : specifications) {
              if (exclude(spec)) {
                  continue;
              }
              final List<ObjectAssociation> properties = spec.getAssociations(Contributed.EXCLUDED, ObjectAssociation.Filters.PROPERTIES);
              for (final ObjectAssociation property : properties) {
                  final OneToOneAssociation otoa = (OneToOneAssociation) property;
                  if (exclude(otoa)) {
                      continue;
                  }
                  rows.add(new MetaModelRow(spec, otoa));
              }
              final List<ObjectAssociation> associations = spec.getAssociations(Contributed.EXCLUDED, ObjectAssociation.Filters.COLLECTIONS);
              for (final ObjectAssociation collection : associations) {
                  final OneToManyAssociation otma = (OneToManyAssociation) collection;
                  if (exclude(otma)) {
                      continue;
                  }
                  rows.add(new MetaModelRow(spec, otma));
              }
              final List<ObjectAction> actions = spec.getObjectActions(Contributed.INCLUDED);
              for (final ObjectAction action : actions) {
                  if (exclude(action)) {
                      continue;
                  }
                  rows.add(new MetaModelRow(spec, action));
              }
          }
  
          Collections.sort(rows);
  
          final StringBuilder buf = new StringBuilder();
          buf.append(MetaModelRow.header()).append("\n");
          for (final MetaModelRow row : rows) {
              buf.append(row.asTextCsv()).append("\n");
          }
          return new Clob("metamodel.csv", mimeTypeTextCsv, buf.toString().toCharArray());
      }
docs: //////////////////////////////////////