Ignore:
Timestamp:
Sep 19, 2010, 9:27:31 PM (14 years ago)
Author:
mlg
Message:

Feature :
Adds the ui to add tags. It's done in the thumbnail viewer (right click on the thumbnail)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/om/Tag.java

    r6964 r6968  
    33import org.jdom.Element;
    44
     5import fr.mael.jiwigo.transverse.enumeration.TagEnum;
     6
     7/**
     8Copyright (c) 2010, Mael
     9All rights reserved.
     10
     11Redistribution and use in source and binary forms, with or without
     12modification, 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
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
     23ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
     24WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
     25DISCLAIMED. IN NO EVENT SHALL Mael BE LIABLE FOR ANY
     26DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
     27(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
     28LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
     29ON 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
     31SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     32
     33* @author mael
     34*
     35*/
    536public class Tag {
    637    /**
    738     * Name of the tag
    839     */
    9     String nom;
     40    private String nom;
     41
     42    /**
     43     * Id of the tag
     44     */
     45    private Integer identifiant;
    1046
    1147    /**
     
    1955     */
    2056    public Tag(Element element) {
    21 
     57        this.identifiant = Integer.valueOf(element.getAttributeValue(TagEnum.ID.getLabel()));
     58        this.nom = element.getAttributeValue(TagEnum.NAME.getLabel());
    2259    }
    2360
     
    4380    }
    4481
     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    }
    45101}
Note: See TracChangeset for help on using the changeset viewer.