class MetaModelServiceDefault implements MetaModelService {

    @Override
    public DomainModel getDomainModel() {

        final Collection<ObjectSpecification> specifications = specificationLoader.snapshotSpecifications();

        final List<DomainMember> rows = _Lists.newArrayList();
        for (final ObjectSpecification spec : specifications) {
            if (exclude(spec)) {
                continue;
            }

            {
                final Stream<ObjectAssociation> properties = 
                        spec.streamAssociations(Contributed.EXCLUDED)
                        .filter(ObjectAssociation.Predicates.PROPERTIES);

                properties
                .map(property->(OneToOneAssociation) property)
                .filter(otoa->!exclude(otoa))
                .forEach(otoa->rows.add(new DomainMemberDefault(spec, otoa)));
            }

            {
                final Stream<ObjectAssociation> associations = 
                        spec.streamAssociations(Contributed.EXCLUDED)
                        .filter(ObjectAssociation.Predicates.COLLECTIONS);

                associations
                .map(collection->(OneToManyAssociation) collection)
                .filter(otma->!exclude(otma))
                .forEach(otma->rows.add(new DomainMemberDefault(spec, otma)));
            }

            {
                final Stream<ObjectAction> actions = 
                        spec.streamObjectActions(Contributed.INCLUDED);

                actions
                .filter(action->!exclude(action))
                .forEach(action->rows.add(new DomainMemberDefault(spec, action)));
            }
        }

        Collections.sort(rows);

        return new DomainModelDefault(rows);
    }

}