ef0a564ce6491ea958fef56d64492a7b0e4f23e7
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / model / reference / Database.java
1 /**
2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9
10 package eu.etaxonomy.cdm.model.reference;
11
12
13 import javax.persistence.Entity;
14
15 import org.apache.log4j.Logger;
16
17 /**
18 * This class represents a database used as an information source. A database is
19 * a structured collection of records or data.
20 * <P>
21 * This class corresponds, according to the TDWG ontology, partially to the
22 * publication type term (from PublicationTypeTerm): "ComputerProgram".
23 *
24 * @author m.doering
25 * @version 1.0
26 * @created 08-Nov-2007 13:06:19
27 */
28 @Entity
29 public class Database extends PublicationBase implements Cloneable {
30 private static final Logger logger = Logger.getLogger(Database.class);
31
32 /**
33 * Creates a new empty database instance.
34 */
35 public static Database NewInstance(){
36 return new Database();
37 }
38
39 /**
40 * Generates, according to the {@link strategy.cache.reference.IReferenceBaseCacheStrategy cache strategy}
41 * assigned to <i>this</i> database, a string that identifies <i>this</i>
42 * database and returns it. This string may be stored in the inherited
43 * {@link common.IdentifiableEntity#getTitleCache() titleCache} attribute.<BR>
44 * This method overrides the generic and inherited
45 * ReferenceBase#generateTitle() method.
46 *
47 * @return the string identifying <i>this</i> database
48 * @see ReferenceBase#generateTitle()
49 * @see common.IdentifiableEntity#getTitleCache()
50 * @see common.IdentifiableEntity#generateTitle()
51 * @see strategy.cache.common.IIdentifiableEntityCacheStrategy#getTitleCache()
52 */
53 @Override
54 public String generateTitle(){
55 //TODO is this method really needed or is ReferenceBase#generateTitle() enough?
56 //FIXME implement
57 //only dummy
58 return this.getTitle();
59 }
60
61
62 //*********** CLONE **********************************/
63
64 /**
65 * Clones <i>this</i> database instance. This is a shortcut that enables to
66 * create a new instance that differs only slightly from <i>this</i>
67 * database instance by modifying only some of the attributes.<BR>
68 * This method overrides the {@link PublicationBase#clone() method} from PublicationBase.
69 *
70 * @see PublicationBase#clone()
71 * @see media.IdentifyableMediaEntity#clone()
72 * @see java.lang.Object#clone()
73 */
74 public Database clone(){
75 Database result = (Database)super.clone();
76 //no changes to: -
77 return result;
78 }
79
80 }