Add method to get document metadata.