/xservices/trunk/src/java/net/brutex/xservices/types/ContainsSelectorType.java |
---|
0,0 → 1,53 |
/* |
* Copyright 2010 Brian Rosenberger (Brutex Network) |
* |
* Licensed under the Apache License, Version 2.0 (the "License"); |
* you may not use this file except in compliance with the License. |
* You may obtain a copy of the License at |
* |
* http://www.apache.org/licenses/LICENSE-2.0 |
* |
* Unless required by applicable law or agreed to in writing, software |
* distributed under the License is distributed on an "AS IS" BASIS, |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
* See the License for the specific language governing permissions and |
* limitations under the License. |
*/ |
package net.brutex.xservices.types; |
import javax.xml.bind.annotation.XmlElement; |
import javax.xml.bind.annotation.XmlType; |
import org.apache.tools.ant.types.selectors.ContainsSelector; |
import org.apache.tools.ant.types.selectors.FileSelector; |
/** |
* |
* @author Brian Rosenberger, bru@brutex.de |
*/ |
@XmlType |
public class ContainsSelectorType implements SelectorTypeInterface { |
public static final String XML_NAME="contains"; |
public ContainsSelectorType() { |
} |
public FileSelector getSelector() { |
ContainsSelector selector = new ContainsSelector(); |
selector.setCasesensitive(casesensitive); |
selector.setText(text); |
selector.setIgnorewhitespace(ignorewhitespace); |
return selector; |
} |
@XmlElement(required=true, nillable=false) |
public String text; |
@XmlElement(required=true, defaultValue="true") |
public boolean casesensitive; |
@XmlElement(required=true, defaultValue="false") |
public boolean ignorewhitespace; |
} |
/xservices/trunk/src/java/net/brutex/xservices/types/SelectorType.java |
---|
0,0 → 1,36 |
/* |
* Copyright 2010 Brian Rosenberger (Brutex Network) |
* |
* Licensed under the Apache License, Version 2.0 (the "License"); |
* you may not use this file except in compliance with the License. |
* You may obtain a copy of the License at |
* |
* http://www.apache.org/licenses/LICENSE-2.0 |
* |
* Unless required by applicable law or agreed to in writing, software |
* distributed under the License is distributed on an "AS IS" BASIS, |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
* See the License for the specific language governing permissions and |
* limitations under the License. |
*/ |
package net.brutex.xservices.types; |
import java.util.List; |
import javax.xml.bind.annotation.XmlElement; |
import org.apache.tools.ant.types.selectors.FileSelector; |
/** |
* |
* @author Brian Rosenberger, bru@brutex.de |
*/ |
public abstract class SelectorType implements SelectorTypeInterface { |
public SelectorType() { |
} |
@XmlElement(name=ContainsSelectorType.XML_NAME, nillable=true) |
public List<ContainsSelectorType> contains; |
} |
/xservices/trunk/src/java/net/brutex/xservices/types/FileSetResource.java |
---|
31,7 → 31,7 |
* @author Brian Rosenberger, bru@brutex.de |
*/ |
@XmlType(name = "FileSetType", namespace = "http://ws.xservices.brutex.net", |
propOrder = {"type", "source", "includes", "excludes", "casesensitive"}) |
propOrder = {"type", "source", "filter", "excludes", "casesensitive"}) |
public class FileSetResource { |
/** |
51,8 → 51,9 |
* Pattern of files to include. |
* |
*/ |
@XmlElement(name = "includes", required = true, nillable = false, defaultValue = "**/*") |
public String includes = ""; |
@XmlElement(name = PatternSetType.XML_NAME, required = true, nillable = true) |
public PatternSetType filter; |
/** |
* Pattern of files to exclude. |
*/ |
95,7 → 96,7 |
set.setDir(new File(source)); |
} |
set.setProject(p); |
set.setIncludes(includes); |
//set.setIncludes(includes); |
set.setExcludes(excludes); |
set.setCaseSensitive(casesensitive); |
/xservices/trunk/src/java/net/brutex/xservices/types/SelectorTypeInterface.java |
---|
0,0 → 1,16 |
/* |
* To change this template, choose Tools | Templates |
* and open the template in the editor. |
*/ |
package net.brutex.xservices.types; |
import org.apache.tools.ant.types.selectors.FileSelector; |
/** |
* |
* @author brian |
*/ |
public interface SelectorTypeInterface { |
public FileSelector getSelector(); |
} |
/xservices/trunk/src/java/net/brutex/xservices/types/PatternElement.java |
---|
0,0 → 1,20 |
/* |
* To change this template, choose Tools | Templates |
* and open the template in the editor. |
*/ |
package net.brutex.xservices.types; |
import javax.xml.bind.annotation.XmlType; |
import javax.xml.bind.annotation.XmlValue; |
/** |
* |
* @author brian |
*/ |
@XmlType() |
public class PatternElement { |
@XmlValue() |
public String pattern; |
} |
/xservices/trunk/src/java/net/brutex/xservices/types/PatternSetType.java |
---|
0,0 → 1,41 |
/* |
* Copyright 2010 Brian Rosenberger (Brutex Network) |
* |
* Licensed under the Apache License, Version 2.0 (the "License"); |
* you may not use this file except in compliance with the License. |
* You may obtain a copy of the License at |
* |
* http://www.apache.org/licenses/LICENSE-2.0 |
* |
* Unless required by applicable law or agreed to in writing, software |
* distributed under the License is distributed on an "AS IS" BASIS, |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
* See the License for the specific language governing permissions and |
* limitations under the License. |
*/ |
package net.brutex.xservices.types; |
import java.util.List; |
import javax.xml.bind.annotation.XmlElement; |
/** |
* |
* @author Brian Rosenberger |
*/ |
public class PatternSetType { |
public static final String XML_NAME = "filter"; |
@XmlElement(required=false, nillable=false, defaultValue="**/*") |
public List<PatternElement> include; |
@XmlElement(required=false, nillable=false) |
public List<PatternElement> exclude; |
@XmlElement(required=false, nillable=true) |
public SelectorType selector; |
public PatternSetType() { |
} |
} |