- Timestamp:
- Sep 19, 2010, 9:27:31 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/om/Tag.java
r6964 r6968 3 3 import org.jdom.Element; 4 4 5 import fr.mael.jiwigo.transverse.enumeration.TagEnum; 6 7 /** 8 Copyright (c) 2010, Mael 9 All rights reserved. 10 11 Redistribution and use in source and binary forms, with or without 12 modification, are permitted provided that the following conditions are met: 13 * Redistributions of source code must retain the above copyright 14 notice, this list of conditions and the following disclaimer. 15 * Redistributions in binary form must reproduce the above copyright 16 notice, this list of conditions and the following disclaimer in the 17 documentation and/or other materials provided with the distribution. 18 * Neither the name of jiwigo nor the 19 names of its contributors may be used to endorse or promote products 20 derived from this software without specific prior written permission. 21 22 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 23 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 24 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 25 DISCLAIMED. IN NO EVENT SHALL Mael BE LIABLE FOR ANY 26 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 27 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 29 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 31 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 33 * @author mael 34 * 35 */ 5 36 public class Tag { 6 37 /** 7 38 * Name of the tag 8 39 */ 9 String nom; 40 private String nom; 41 42 /** 43 * Id of the tag 44 */ 45 private Integer identifiant; 10 46 11 47 /** … … 19 55 */ 20 56 public Tag(Element element) { 21 57 this.identifiant = Integer.valueOf(element.getAttributeValue(TagEnum.ID.getLabel())); 58 this.nom = element.getAttributeValue(TagEnum.NAME.getLabel()); 22 59 } 23 60 … … 43 80 } 44 81 82 /** 83 * @return the id 84 */ 85 public Integer getId() { 86 return identifiant; 87 } 88 89 /** 90 * @param id the id to set 91 */ 92 public void setId(Integer id) { 93 this.identifiant = id; 94 } 95 96 @Override 97 public String toString() { 98 // TODO Auto-generated method stub 99 return nom; 100 } 45 101 }
Note: See TracChangeset
for help on using the changeset viewer.