comparison src/uk/ac/qmul/eecs/ccmi/xmlparser/PropertyValue.java @ 0:e0ee6ac3a45f

first import
author Fiore Martin <fiore@eecs.qmul.ac.uk>
date Thu, 13 Dec 2012 20:00:21 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e0ee6ac3a45f
1 /*
2 CCmI Diagram Editor for Android
3
4 Copyright (C) 2012 Queen Mary University of London (http://ccmi.eecs.qmul.ac.uk/)
5
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 package uk.ac.qmul.eecs.ccmi.xmlparser;
20
21 import java.util.ArrayList;
22 import java.util.List;
23
24 import org.simpleframework.xml.Root;
25
26
27 @Root(name="Element")
28 public class PropertyValue implements HierarchyItem {
29
30 @org.simpleframework.xml.Element(name="Value")
31 private String value;
32 @org.simpleframework.xml.ElementList(name="Modifiers",required=false)
33 private ArrayList<Integer> modifiers = new ArrayList<Integer>();
34
35 private PropertyValue(){}
36
37 public PropertyValue(String value){
38 this();
39 this.value = value;
40 }
41
42 public String getValue() {
43 return value;
44 }
45
46 public void setValue(String value) {
47 this.value = value;
48 }
49
50 public List<Integer> getModifiersIndexes(){
51 return modifiers;
52 }
53
54 public void setModifiersIndexes(List<Integer> modifiers){
55 this.modifiers.clear();
56 this.modifiers.addAll(modifiers);
57 }
58
59 @Override
60 public String toString(){
61 return getValue();
62 }
63 }