// Build the default metadata for our directly included elements.
registry.build(PUBLISHED);
registry.build(SUMMARY);
// Build atom:entry.
ElementCreator builder = registry.build(KEY)
.setCardinality(Cardinality.MULTIPLE);
builder.addAttribute(ETAG);
builder.addAttribute(GD_KIND);
builder.addElement(ID);
builder.addElement(PUBLISHED);
builder.addElement(UPDATED);
builder.addElement(Edited.KEY);
builder.addElement(Control.KEY);
builder.addElement(Category.KEY);
builder.addElement(TITLE);
builder.addElement(SUMMARY);
builder.addElement(RIGHTS);
builder.addElement(Content.KEY).adapt(TextContent.KIND,
TextContent.KEY).adapt(OtherContent.KIND, OtherContent.KEY).adapt(
OutOfLineContent.KIND, OutOfLineContent.KEY);
builder.addElement(Link.KEY);
builder.addElement(Author.KEY);
builder.addElement(Contributor.KEY);
builder.addElement(Source.KEY);
builder.addElement(BatchId.KEY);
builder.addElement(BatchInterrupted.KEY);
builder.addElement(BatchOperation.KEY);
builder.addElement(BatchStatus.KEY);
// Register adaptations.
TextContent.registerMetadata(registry);
OtherContent.registerMetadata(registry);
OutOfLineContent.registerMetadata(registry);