Subversion Repositories XServices

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
12 brianR 1
/*
2
 * To change this template, choose Tools | Templates
3
 * and open the template in the editor.
4
 */
5
 
6
package net.brutex.xservices.types;
7
 
8
import java.util.ArrayList;
9
import java.util.List;
10
import java.util.Map;
11
import javax.xml.bind.annotation.XmlElement;
12
import javax.xml.bind.annotation.XmlRootElement;
13
 
14
/**
15
 *
16
 * @author brian
17
 */
18
@XmlRootElement
19
public class AntProperty {
20
 
21
    @XmlElement(required=true)
22
    public String name ="";
23
 
24
    @XmlElement(required=true)
25
    public String value="";
26
 
27
    public static List<AntProperty> createAntPropertyList(Map<String, String> map) {
28
        List<AntProperty> list = new ArrayList<AntProperty>();
29
        for(Map.Entry<String, String> e : map.entrySet()) {
30
            list.add(new AntProperty(e.getKey(), e.getValue()));
31
        }
32
        return list;
33
    }
34
 
35
    public AntProperty(String name, String value) {
36
        this.name = name;
37
        this.value = value;
38
    }
39
 
40
    public AntProperty() {
41
    }
42
 
43
 
44
}