23 |
brianR |
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.
|
|
|
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.
|
|
|
15 |
*/
|
|
|
16 |
|
82 |
brianR |
17 |
package net.brutex.xservices.types.ant;
|
23 |
brianR |
18 |
|
|
|
19 |
import javax.xml.bind.annotation.XmlElement;
|
|
|
20 |
import javax.xml.bind.annotation.XmlType;
|
|
|
21 |
import org.apache.tools.ant.types.selectors.ContainsSelector;
|
|
|
22 |
import org.apache.tools.ant.types.selectors.FileSelector;
|
|
|
23 |
|
|
|
24 |
/**
|
|
|
25 |
*
|
|
|
26 |
* @author Brian Rosenberger, bru@brutex.de
|
|
|
27 |
*/
|
|
|
28 |
@XmlType
|
|
|
29 |
public class ContainsSelectorType implements SelectorTypeInterface {
|
|
|
30 |
|
|
|
31 |
public static final String XML_NAME="contains";
|
|
|
32 |
|
|
|
33 |
public ContainsSelectorType() {
|
|
|
34 |
}
|
|
|
35 |
|
|
|
36 |
public FileSelector getSelector() {
|
|
|
37 |
ContainsSelector selector = new ContainsSelector();
|
|
|
38 |
selector.setCasesensitive(casesensitive);
|
|
|
39 |
selector.setText(text);
|
|
|
40 |
selector.setIgnorewhitespace(ignorewhitespace);
|
|
|
41 |
return selector;
|
|
|
42 |
}
|
|
|
43 |
|
|
|
44 |
@XmlElement(required=true, nillable=false)
|
|
|
45 |
public String text;
|
|
|
46 |
|
|
|
47 |
@XmlElement(required=true, defaultValue="true")
|
|
|
48 |
public boolean casesensitive;
|
|
|
49 |
|
|
|
50 |
@XmlElement(required=true, defaultValue="false")
|
|
|
51 |
public boolean ignorewhitespace;
|
|
|
52 |
|
|
|
53 |
}
|