CollectionSchema collectionSchema = new CollectionSchema();
//HACK: AssociationSchema and CollectionSchema share many common elements, but have no inheritance
//relationship. Here, we construct them both as facades on the same DataMap, which allows
//us to pass strongly typed CollectionSchema objects around, even when we're dealing with
//an association.
AssociationSchema associationSchema = new AssociationSchema(collectionSchema.data());
if (collectionModel.getKeys().size() == 1)
{
appendIdentifierNode(collectionSchema, collectionModel);
}