Reorder methods to get metadata.

Use the same order than https://wiki.openzim.org/wiki/Metadata
This commit is contained in:
Matthieu Gautier 2019-09-12 15:24:17 +02:00
parent 651cb9165c
commit 420be55bfa
2 changed files with 48 additions and 48 deletions

View File

@ -160,6 +160,13 @@ class Reader
*/
bool getMetatag(const string& name, string& value) const;
/**
* Get the name of the zim file.
*
* @return The name of the zim file as specified in the zim metadata.
*/
string getName() const;
/**
* Get the title of the zim file.
*
@ -169,6 +176,27 @@ class Reader
*/
string getTitle() const;
/**
* Get the creator of the zim file.
*
* @return The creator of the zim file as specified in the zim metadata.
*/
string getCreator() const;
/**
* Get the publisher of the zim file.
*
* @return The publisher of the zim file as specified in the zim metadata.
*/
string getPublisher() const;
/**
* Get the date of the zim file.
*
* @return The date of the zim file as specified in the zim metadata.
*/
string getDate() const;
/**
* Get the description of the zim file.
*
@ -184,13 +212,6 @@ class Reader
*/
string getLanguage() const;
/**
* Get the name of the zim file.
*
* @return The name of the zim file as specified in the zim metadata.
*/
string getName() const;
/**
* Get the tags of the zim file.
*
@ -198,27 +219,6 @@ class Reader
*/
string getTags() const;
/**
* Get the date of the zim file.
*
* @return The date of the zim file as specified in the zim metadata.
*/
string getDate() const;
/**
* Get the creator of the zim file.
*
* @return The creator of the zim file as specified in the zim metadata.
*/
string getCreator() const;
/**
* Get the publisher of the zim file.
*
* @return The publisher of the zim file as specified in the zim metadata.
*/
string getPublisher() const;
/**
* Get the origId of the zim file.
*

View File

@ -289,6 +289,13 @@ bool Reader::getMetatag(const string& name, string& value) const
}
}
string Reader::getName() const
{
string value;
this->getMetatag("Name", value);
return value;
}
string Reader::getTitle() const
{
string value;
@ -302,17 +309,24 @@ string Reader::getTitle() const
return value;
}
string Reader::getName() const
string Reader::getCreator() const
{
string value;
this->getMetatag("Name", value);
this->getMetatag("Creator", value);
return value;
}
string Reader::getTags() const
string Reader::getPublisher() const
{
string value;
this->getMetatag("Tags", value);
this->getMetatag("Publisher", value);
return value;
}
string Reader::getDate() const
{
string value;
this->getMetatag("Date", value);
return value;
}
@ -336,24 +350,10 @@ string Reader::getLanguage() const
return value;
}
string Reader::getDate() const
string Reader::getTags() const
{
string value;
this->getMetatag("Date", value);
return value;
}
string Reader::getCreator() const
{
string value;
this->getMetatag("Creator", value);
return value;
}
string Reader::getPublisher() const
{
string value;
this->getMetatag("Publisher", value);
this->getMetatag("Tags", value);
return value;
}