| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Old Sites/Libteiser - Ojs/ojs2/classes/article/ |
Upload File : |
<?php
/**
* @file classes/article/Author.inc.php
*
* Copyright (c) 2003-2009 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @class Author
* @ingroup article
* @see AuthorDAO
*
* @brief Article author metadata class.
*/
// $Id: Author.inc.php,v 1.12.2.1 2009/04/08 19:42:46 asmecher Exp $
class Author extends DataObject {
/**
* Constructor.
*/
function Author() {
parent::DataObject();
$this->setAuthorId(0);
}
/**
* Get the author's complete name.
* Includes first name, middle name (if applicable), and last name.
* @return string
*/
function getFullName() {
return $this->getData('firstName') . ' ' . ($this->getData('middleName') != '' ? $this->getData('middleName') . ' ' : '') . $this->getData('lastName');
}
//
// Get/set methods
//
/**
* Get ID of author.
* @return int
*/
function getAuthorId() {
return $this->getData('authorId');
}
/**
* Set ID of author.
* @param $authorId int
*/
function setAuthorId($authorId) {
return $this->setData('authorId', $authorId);
}
/**
* Get ID of article.
* @return int
*/
function getArticleId() {
return $this->getData('articleId');
}
/**
* Set ID of article.
* @param $articleId int
*/
function setArticleId($articleId) {
return $this->setData('articleId', $articleId);
}
/**
* Get first name.
* @return string
*/
function getFirstName() {
return $this->getData('firstName');
}
/**
* Set first name.
* @param $firstName string
*/
function setFirstName($firstName)
{
return $this->setData('firstName', $firstName);
}
/**
* Get middle name.
* @return string
*/
function getMiddleName() {
return $this->getData('middleName');
}
/**
* Set middle name.
* @param $middleName string
*/
function setMiddleName($middleName) {
return $this->setData('middleName', $middleName);
}
/**
* Get last name.
* @return string
*/
function getLastName() {
return $this->getData('lastName');
}
/**
* Set last name.
* @param $lastName string
*/
function setLastName($lastName) {
return $this->setData('lastName', $lastName);
}
/**
* Get affiliation (position, institution, etc.).
* @return string
*/
function getAffiliation() {
return $this->getData('affiliation');
}
/**
* Set affiliation.
* @param $affiliation string
*/
function setAffiliation($affiliation) {
return $this->setData('affiliation', $affiliation);
}
/**
* Get country code
* @return string
*/
function getCountry() {
return $this->getData('country');
}
/**
* Get localized country
* @return string
*/
function getCountryLocalized() {
$countryDao =& DAORegistry::getDAO('CountryDAO');
$country = $this->getCountry();
if ($country) {
return $countryDao->getCountry($country);
}
return null;
}
/**
* Set country code.
* @param $country string
*/
function setCountry($country) {
return $this->setData('country', $country);
}
/**
* Get email address.
* @return string
*/
function getEmail() {
return $this->getData('email');
}
/**
* Set email address.
* @param $email string
*/
function setEmail($email) {
return $this->setData('email', $email);
}
/**
* Get URL.
* @return string
*/
function getUrl() {
return $this->getData('url');
}
/**
* Set URL.
* @param $url string
*/
function setUrl($url) {
return $this->setData('url', $url);
}
/**
* Get the localized biography for this author
*/
function getAuthorCompetingInterests() {
return $this->getLocalizedData('competingInterests');
}
/**
* Get author competing interests.
* @param $locale string
* @return string
*/
function getCompetingInterests($locale) {
return $this->getData('competingInterests', $locale);
}
/**
* Set author competing interests.
* @param $biography string
* @param $locale string
*/
function setCompetingInterests($competingInterests, $locale) {
return $this->setData('competingInterests', $competingInterests, $locale);
}
/**
* Get the localized biography for this author
*/
function getAuthorBiography() {
return $this->getLocalizedData('biography');
}
/**
* Get author biography.
* @param $locale string
* @return string
*/
function getBiography($locale) {
return $this->getData('biography', $locale);
}
/**
* Set author biography.
* @param $biography string
* @param $locale string
*/
function setBiography($biography, $locale) {
return $this->setData('biography', $biography, $locale);
}
/**
* Get primary contact.
* @return boolean
*/
function getPrimaryContact() {
return $this->getData('primaryContact');
}
/**
* Set primary contact.
* @param $primaryContact boolean
*/
function setPrimaryContact($primaryContact) {
return $this->setData('primaryContact', $primaryContact);
}
/**
* Get sequence of author in article's author list.
* @return float
*/
function getSequence() {
return $this->getData('sequence');
}
/**
* Set sequence of author in article's author list.
* @param $sequence float
*/
function setSequence($sequence) {
return $this->setData('sequence', $sequence);
}
}
?>