![]() |
OpenMS
|
Used to load and store PTMXML files. More...
#include <OpenMS/FORMAT/PTMXMLFile.h>
Public Member Functions | |
| PTMXMLFile () | |
| Constructor. | |
| void | load (const std::string &filename, std::map< std::string, std::pair< std::string, std::string > > &ptm_informations) |
| Loads the information of a PTMXML file. | |
| void | store (const std::string &filename, std::map< std::string, std::pair< std::string, std::string > > &ptm_informations) const |
| Stores the data in an PTMXML file. | |
Public Member Functions inherited from XMLFile | |
| XMLFile () | |
Construct an XMLFile without schema info; schema_location_ remains unset, so isValid cannot be used until derived-class logic initializes schema_location_ before calling isValid. | |
| XMLFile (const std::string &schema_location, const std::string &version) | |
| Construct with a schema location for later isValid calls. | |
| virtual | ~XMLFile () |
| Virtual destructor — defaulted; allows safe deletion through a base-class pointer. | |
| bool | isValid (const std::string &filename, std::ostream &os) |
Check if filename validates against the bound XML schema. | |
| const std::string & | getVersion () const |
| Return the schema version string passed to the parameterised constructor; empty for default-constructed instances. | |
Additional Inherited Members | |
Protected Member Functions inherited from XMLFile | |
| void | parse_ (const std::string &filename, XMLHandler *handler) |
Parse the XML file at filename through handler. | |
| void | parseBuffer_ (const std::string &buffer, XMLHandler *handler) |
Parse an in-memory XML buffer through handler. | |
| void | save_ (const std::string &filename, XMLHandler *handler) const |
Stores the contents of the XML handler given by handler in the file given by filename. | |
| void | enforceEncoding_ (const std::string &encoding) |
| Set or clear the XML-encoding override applied to subsequent parse_ / parseBuffer_ calls. | |
Protected Attributes inherited from XMLFile | |
| std::string | schema_location_ |
Path of the XML schema for validation; empty when the default constructor was used (isValid then throws NotImplemented). | |
| std::string | schema_version_ |
| Schema version string returned by getVersion. | |
| std::string | enforced_encoding_ |
Optional XML encoding override applied to the InputSource in parse_ and parseBuffer_; empty disables the override. Used as a workaround for XTandem output XML which carries an encoding the parser otherwise stumbles on. | |
Used to load and store PTMXML files.
This class is used to load and store documents that implement the schema of PTMXML files.
| PTMXMLFile | ( | ) |
Constructor.
| void load | ( | const std::string & | filename, |
| std::map< std::string, std::pair< std::string, std::string > > & | ptm_informations | ||
| ) |
Loads the information of a PTMXML file.
| [in] | filename | The name of the file |
| [out] | ptm_informations | the PTM information from the file are stored herein |
| FileNotFound | is thrown if the given file could not be found |
| ParseError | is thrown if the given file could not be parsed The information is read in and stored in the corresponding variables |
| void store | ( | const std::string & | filename, |
| std::map< std::string, std::pair< std::string, std::string > > & | ptm_informations | ||
| ) | const |
Stores the data in an PTMXML file.
| UnableToCreateFile | is thrown if the given filename could not be created |
The data is read in and stored in the file 'filename'.