01: /*--------------------------------------------------------------------------*
02: | Copyright (C) 2006 Christopher Kohlhaas |
03: | |
04: | This program is free software; you can redistribute it and/or modify |
05: | it under the terms of the GNU General Public License as published by the |
06: | Free Software Foundation. A copy of the license has been included with |
07: | these distribution in the COPYING file, if not go to www.fsf.org |
08: | |
09: | As a special exception, you are granted the permissions to link this |
10: | program with every library, which license fulfills the Open Source |
11: | Definition as published by the Open Source Initiative (OSI). |
12: *--------------------------------------------------------------------------*/
13: package org.rapla.entities.dynamictype;
14:
15: import java.util.Locale;
16:
17: import org.rapla.entities.Named;
18:
19: /** A Classification is an instance of a DynamicType. It holds the
20: * attribute values for the attributesof the corresponding type. You
21: * need one classification for each object you want to
22: * classify.
23: */
24: public interface Classification extends Named, Cloneable {
25: DynamicType getType();
26:
27: String getName(Locale locale);
28:
29: Attribute[] getAttributes();
30:
31: Attribute getAttribute(String key);
32:
33: void setValue(Attribute attribute, Object value);
34:
35: /** calls setValue(getAttribte(key),value)*/
36: void setValue(String key, Object value);
37:
38: /** calls getValue(getAttribte(key))*/
39: Object getValue(Attribute attribute);
40:
41: Object getValue(String key);
42:
43: /** returns the value as a String in the selected locale.*/
44: String getValueAsString(Attribute attribute, Locale locale);
45:
46: Object clone();
47: }
|