// XAAL toolkit // Copyright (C) 2009 Ville Karavirta // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . package xaal.objects.metadata; /** * This class represents an author who created the Xaal animation. This is part * of the metadata that can be used in Xaal. */ public class Author { private String firstName; private String lastName; private String affiliation; private String email; /** * Constructs an Author instance. */ public Author() { } /** * Constructs an Author instance with the given name. * * @param firstName Firstname(s) of the author. * @param lastName Lastname of the author. */ public Author(String firstName, String lastName) { this.firstName = firstName; this.lastName = lastName; } /** * Returns the affiliation of the author. * * @return Returns the affiliation. */ public String getAffiliation() { return affiliation; } /** * Sets the affiliation of the author. * * @param affiliation The affiliation to set. */ public void setAffiliation(String affiliation) { this.affiliation = affiliation; } /** * Returns the email address of the author. * * @return Returns the email. */ public String getEmail() { return email; } /** * Sets the email address of the author. * * @param email The email to set. */ public void setEmail(String email) { this.email = email; } /** * Returns the firstname of the author. * * @return Returns the firstname. */ public String getFirstName() { return firstName; } /** * Sets the firstname of the author. * * @param firstName The firstName to set. */ public void setFirstName(String firstName) { this.firstName = firstName; } /** * Returns the lastname of the author. * * @return Returns the lastname. */ public String getLastName() { return lastName; } /** * Sets the lastname of the author. * * @param lastName The lastname to set. */ public void setLastName(String lastName) { this.lastName = lastName; } public String toString() { String str = firstName + " " + lastName; if (getEmail() != null) str += "\t<" + getEmail() + ">"; return str; } }