001/*
002 * Sonar, open source software quality management tool.
003 * Copyright (C) 2008-2012 SonarSource
004 * mailto:contact AT sonarsource DOT com
005 *
006 * Sonar is free software; you can redistribute it and/or
007 * modify it under the terms of the GNU Lesser General Public
008 * License as published by the Free Software Foundation; either
009 * version 3 of the License, or (at your option) any later version.
010 *
011 * Sonar is distributed in the hope that it will be useful,
012 * but WITHOUT ANY WARRANTY; without even the implied warranty of
013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014 * Lesser General Public License for more details.
015 *
016 * You should have received a copy of the GNU Lesser General Public
017 * License along with Sonar; if not, write to the Free Software
018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
019 */
020package org.sonar.plugins.findbugs.xml;
021
022import com.thoughtworks.xstream.annotations.XStreamAlias;
023import com.thoughtworks.xstream.annotations.XStreamImplicit;
024
025import java.util.ArrayList;
026import java.util.List;
027
028
029@XStreamAlias("Or")
030public class OrFilter {
031
032  @XStreamImplicit(itemFieldName = "Bug")
033  private List<Bug> bugs;
034
035  @XStreamImplicit(itemFieldName = "Package")
036  private List<PackageFilter> packages;
037
038  @XStreamImplicit(itemFieldName = "Class")
039  private List<ClassFilter> classes;
040
041  @XStreamImplicit(itemFieldName = "Method")
042  private List<MethodFilter> methods;
043
044  @XStreamImplicit(itemFieldName = "Field")
045  private List<FieldFilter> fields;
046
047  @XStreamImplicit(itemFieldName = "Local")
048  private List<LocalFilter> locals;
049
050
051  public OrFilter() {
052    bugs = new ArrayList<Bug>();
053    packages = new ArrayList<PackageFilter>();
054    classes = new ArrayList<ClassFilter>();
055    methods = new ArrayList<MethodFilter>();
056    fields = new ArrayList<FieldFilter>();
057    locals = new ArrayList<LocalFilter>();
058  }
059
060  public List<Bug> getBugs() {
061    return bugs;
062  }
063
064  public void setBugs(List<Bug> bugs) {
065    this.bugs = bugs;
066  }
067
068  public List<PackageFilter> getPackages() {
069    return packages;
070  }
071
072  public void setPackages(List<PackageFilter> packages) {
073    this.packages = packages;
074  }
075
076  public List<ClassFilter> getClasses() {
077    return classes;
078  }
079
080  public void setClasses(List<ClassFilter> classes) {
081    this.classes = classes;
082  }
083
084  public List<MethodFilter> getMethods() {
085    return methods;
086  }
087
088  public void setMethods(List<MethodFilter> methods) {
089    this.methods = methods;
090  }
091
092  public List<FieldFilter> getFields() {
093    return fields;
094  }
095
096  public void setFields(List<FieldFilter> fields) {
097    this.fields = fields;
098  }
099
100  public List<LocalFilter> getLocals() {
101    return locals;
102  }
103
104  public void setLocals(List<LocalFilter> locals) {
105    this.locals = locals;
106  }
107}