This class is a new implementation which uses the Metadata factory.