1 /*
2  * This file is part of ELKI:
3  * Environment for Developing KDD-Applications Supported by Index-Structures
4  *
5  * Copyright (C) 2018
6  * ELKI Development Team
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU Affero General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU Affero General Public License for more details.
17  *
18  * You should have received a copy of the GNU Affero General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  */
21 package de.lmu.ifi.dbs.elki.result;
22 
23 /**
24  * Basic class for a result. Much like AbstractHierarchicalResult, except it
25  * stores the required short and long result names.
26  *
27  * @author Erich Schubert
28  * @since 0.4.0
29  *
30  * @opt nodefillcolor LemonChiffon
31  */
32 // TODO: getter, setter for result names? Merge with AbstractHierarchicalResult?
33 public class BasicResult extends AbstractHierarchicalResult {
34   /**
35    * Result name, for presentation
36    */
37   private String name;
38 
39   /**
40    * Result name, for output
41    */
42   private String shortname;
43 
44   /**
45    * Result constructor.
46    *
47    * @param name The long name (for pretty printing)
48    * @param shortname the short name (for filenames etc.)
49    */
BasicResult(String name, String shortname)50   public BasicResult(String name, String shortname) {
51     super();
52     this.name = name;
53     this.shortname = shortname;
54   }
55 
56   @Override
getLongName()57   public final String getLongName() {
58     return name;
59   }
60 
61   @Override
getShortName()62   public final String getShortName() {
63     return shortname;
64   }
65 }