Subversion Repositories XServices

Rev

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

Rev Author Line No. Line
12 brianR 1
/*
13 brianR 2
 *   Copyright 2010 Brian Rosenberger (Brutex Network)
3
 *
4
 *   Licensed under the Apache License, Version 2.0 (the "License");
5
 *   you may not use this file except in compliance with the License.
6
 *   You may obtain a copy of the License at
7
 *
8
 *       http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 *   Unless required by applicable law or agreed to in writing, software
11
 *   distributed under the License is distributed on an "AS IS" BASIS,
12
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 *   See the License for the specific language governing permissions and
14
 *   limitations under the License.
12 brianR 15
 */
16
package net.brutex.xservices.types;
17
 
18
import java.util.ArrayList;
19
import java.util.List;
20
import java.util.Map;
21
import javax.xml.bind.annotation.XmlElement;
22
import javax.xml.bind.annotation.XmlRootElement;
23
 
24
/**
25
 *
26
 * @author brian
27
 */
28
@XmlRootElement
29
public class AntProperty {
30
 
31
    @XmlElement(required=true)
32
    public String name ="";
33
 
34
    @XmlElement(required=true)
35
    public String value="";
36
 
37
    public static List<AntProperty> createAntPropertyList(Map<String, String> map) {
38
        List<AntProperty> list = new ArrayList<AntProperty>();
39
        for(Map.Entry<String, String> e : map.entrySet()) {
40
            list.add(new AntProperty(e.getKey(), e.getValue()));
41
        }
42
        return list;
43
    }
44
 
45
    public AntProperty(String name, String value) {
46
        this.name = name;
47
        this.value = value;
48
    }
49
 
50
    public AntProperty() {
51
    }
52
 
53
 
54
}