001: /*
002: * Copyright 2004-2006 the original author or authors.
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */
016:
017: package org.compass.sample.library;
018:
019: import java.util.ArrayList;
020: import java.util.Date;
021: import java.util.List;
022:
023: /**
024: * @author kimchy
025: */
026: public class Author implements Identifiable {
027:
028: private Long id;
029:
030: private Name name;
031:
032: private Date birthdate;
033:
034: private String[] keywords;
035:
036: private List articles = new ArrayList();
037:
038: private List books = new ArrayList();
039:
040: public Author() {
041:
042: }
043:
044: public Date getBirthdate() {
045: return birthdate;
046: }
047:
048: public void setBirthdate(Date birthdate) {
049: this .birthdate = birthdate;
050: }
051:
052: public List getBooks() {
053: return books;
054: }
055:
056: public void setBooks(List books) {
057: this .books = books;
058: }
059:
060: public void addBook(Book book) {
061: books.add(book);
062: }
063:
064: public Long getId() {
065: return id;
066: }
067:
068: public void setId(Long id) {
069: this .id = id;
070: }
071:
072: public Name getName() {
073: return name;
074: }
075:
076: public void setName(Name name) {
077: this .name = name;
078: }
079:
080: public List getArticles() {
081: return articles;
082: }
083:
084: public void setArticles(List publications) {
085: this .articles = publications;
086: }
087:
088: public String[] getKeywords() {
089: return keywords;
090: }
091:
092: public void setKeywords(String[] keywords) {
093: this .keywords = keywords;
094: }
095:
096: public String toString() {
097: return name.toString();
098: }
099:
100: }
|