5617 |
28 Apr 11 |
nicklas |
1 |
/** |
5617 |
28 Apr 11 |
nicklas |
$Id: ExtensionPointFilter.java 5598 2011-03-30 09:44:57Z nicklas $ |
5617 |
28 Apr 11 |
nicklas |
3 |
|
5617 |
28 Apr 11 |
nicklas |
Copyright (C) 2011 Nicklas Nordborg |
5617 |
28 Apr 11 |
nicklas |
5 |
|
5617 |
28 Apr 11 |
nicklas |
This file is part of BASE - BioArray Software Environment. |
5617 |
28 Apr 11 |
nicklas |
Available at http://base.thep.lu.se/ |
5617 |
28 Apr 11 |
nicklas |
8 |
|
5617 |
28 Apr 11 |
nicklas |
BASE is free software; you can redistribute it and/or |
5617 |
28 Apr 11 |
nicklas |
modify it under the terms of the GNU General Public License |
5617 |
28 Apr 11 |
nicklas |
as published by the Free Software Foundation; either version 3 |
5617 |
28 Apr 11 |
nicklas |
of the License, or (at your option) any later version. |
5617 |
28 Apr 11 |
nicklas |
13 |
|
5617 |
28 Apr 11 |
nicklas |
BASE is distributed in the hope that it will be useful, |
5617 |
28 Apr 11 |
nicklas |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
5617 |
28 Apr 11 |
nicklas |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5617 |
28 Apr 11 |
nicklas |
GNU General Public License for more details. |
5617 |
28 Apr 11 |
nicklas |
18 |
|
5617 |
28 Apr 11 |
nicklas |
You should have received a copy of the GNU General Public License |
5617 |
28 Apr 11 |
nicklas |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
5617 |
28 Apr 11 |
nicklas |
21 |
*/ |
5617 |
28 Apr 11 |
nicklas |
22 |
package net.sf.basedb.util.extensions.xml; |
5617 |
28 Apr 11 |
nicklas |
23 |
|
6473 |
11 Jun 14 |
nicklas |
24 |
import org.jdom2.Element; |
5617 |
28 Apr 11 |
nicklas |
25 |
|
5617 |
28 Apr 11 |
nicklas |
26 |
import net.sf.basedb.util.filter.Filter; |
5617 |
28 Apr 11 |
nicklas |
27 |
|
5617 |
28 Apr 11 |
nicklas |
28 |
/** |
5617 |
28 Apr 11 |
nicklas |
Filter implementation that only matches tags for plug-in definitions. |
5617 |
28 Apr 11 |
nicklas |
This filter is useful if the parser is not interested in extensions. |
5617 |
28 Apr 11 |
nicklas |
31 |
|
5617 |
28 Apr 11 |
nicklas |
@author Nicklas |
5617 |
28 Apr 11 |
nicklas |
@since 3.0 |
5617 |
28 Apr 11 |
nicklas |
@base.modified $Date: 2011-03-30 11:44:57 +0200 (on, 30 mar 2011) $ |
5617 |
28 Apr 11 |
nicklas |
35 |
*/ |
5617 |
28 Apr 11 |
nicklas |
36 |
public class PluginDefinitionFilter |
5617 |
28 Apr 11 |
nicklas |
37 |
implements Filter<Element> |
5617 |
28 Apr 11 |
nicklas |
38 |
{ |
5617 |
28 Apr 11 |
nicklas |
39 |
|
5617 |
28 Apr 11 |
nicklas |
40 |
|
5617 |
28 Apr 11 |
nicklas |
41 |
/** |
5617 |
28 Apr 11 |
nicklas |
Create a new filter. |
5617 |
28 Apr 11 |
nicklas |
43 |
*/ |
5617 |
28 Apr 11 |
nicklas |
44 |
public PluginDefinitionFilter() |
5617 |
28 Apr 11 |
nicklas |
45 |
{} |
5617 |
28 Apr 11 |
nicklas |
46 |
|
5617 |
28 Apr 11 |
nicklas |
47 |
/* |
5617 |
28 Apr 11 |
nicklas |
From the Filter interface |
5617 |
28 Apr 11 |
nicklas |
49 |
-------------------------- |
5617 |
28 Apr 11 |
nicklas |
50 |
*/ |
5617 |
28 Apr 11 |
nicklas |
51 |
@Override |
5617 |
28 Apr 11 |
nicklas |
52 |
public boolean evaluate(Element tag) |
5617 |
28 Apr 11 |
nicklas |
53 |
{ |
5617 |
28 Apr 11 |
nicklas |
54 |
return "plugin-definition".equals(tag.getName()); |
5617 |
28 Apr 11 |
nicklas |
55 |
} |
5617 |
28 Apr 11 |
nicklas |
56 |
// -------------------------- |
5617 |
28 Apr 11 |
nicklas |
57 |
} |