ModErn Text Analysis
META Enumerates Textual Applications
Public Member Functions | Private Attributes | List of all members
meta::corpus::metadata_parser Class Reference

Reads metadata from the metadata file of a corpus according to a schema. More...

#include <metadata_parser.h>

Public Member Functions

 metadata_parser (const std::string &filename, metadata::schema_type schema)
 Creates the parser. More...
 
std::vector< metadata::fieldnext ()
 
const metadata::schema_type & schema () const
 

Private Attributes

io::mifstream infile_
 the parser used to extract metadata
 
metadata::schema_type schema_
 the schema for the metadata being extracted
 

Detailed Description

Reads metadata from the metadata file of a corpus according to a schema.

Constructor & Destructor Documentation

§ metadata_parser()

meta::corpus::metadata_parser::metadata_parser ( const std::string &  filename,
metadata::schema_type  schema 
)

Creates the parser.

Parameters
filenameThe name of the file to parse
schemaThe schema to parse the file with

Member Function Documentation

§ next()

std::vector< metadata::field > meta::corpus::metadata_parser::next ( )
Returns
the metadata vector for the next document in the file

§ schema()

const metadata::schema_type & meta::corpus::metadata_parser::schema ( ) const
Returns
the schema for the metadata in this file

The documentation for this class was generated from the following files: