Subversion Repositories XServices

Rev

Rev 12 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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