use of com.sldeditor.filter.v2.function.FilterName in project sldeditor by robward-scisys.
the class IsGreaterThan method getFilterConfiguration.
/**
* Gets the filter configuration.
*
* @return the filter configuration
*/
@Override
public FilterName getFilterConfiguration() {
FilterName filterName = new FilterName("PropertyIsGreaterThan", Boolean.class);
filterName.addParameter(new FilterNameParameter("property", ExpressionTypeEnum.PROPERTY, Object.class));
filterName.addParameter(new FilterNameParameter("expression", ExpressionTypeEnum.EXPRESSION, Object.class));
return filterName;
}
use of com.sldeditor.filter.v2.function.FilterName in project sldeditor by robward-scisys.
the class IsLessThan method getFilterConfiguration.
/**
* Gets the filter configuration.
*
* @return the filter configuration
*/
@Override
public FilterName getFilterConfiguration() {
FilterName filterName = new FilterName("PropertyIsLessThan", Boolean.class);
filterName.addParameter(new FilterNameParameter("property", ExpressionTypeEnum.PROPERTY, Object.class));
filterName.addParameter(new FilterNameParameter("expression", ExpressionTypeEnum.EXPRESSION, Object.class));
filterName.addParameter(new FilterNameParameter("matchCase", ExpressionTypeEnum.LITERAL, Boolean.class));
return filterName;
}
use of com.sldeditor.filter.v2.function.FilterName in project sldeditor by robward-scisys.
the class FilterNodeTest method testSetName.
/**
* Test method for
* {@link com.sldeditor.filter.v2.expression.FilterNode#setName(java.lang.String)}.
*/
@Test
public void testSetName() {
FilterNode node = new FilterNode();
assertNull(node.getFilter());
String name = "filtername";
node.setName(name);
String expected = name + " : " + Localisation.getString(ExpressionPanelv2.class, "FilterNode.filterNotSet");
assertTrue(node.toString().compareTo(expected) == 0);
}
use of com.sldeditor.filter.v2.function.FilterName in project sldeditor by robward-scisys.
the class FilterNameTest method testGetFilterName.
/**
* Test method for {@link com.sldeditor.filter.v2.function.FilterName#FilterName(java.lang.String, java.lang.Class)}.
* Test method for {@link com.sldeditor.filter.v2.function.FilterName#getFilterName()}.
* Test method for {@link com.sldeditor.filter.v2.function.FilterName#getReturnType()}.
* Test method for {@link com.sldeditor.filter.v2.function.FilterName#getParameterList()}.
* Test method for {@link com.sldeditor.filter.v2.function.FilterName#getParameter(int)}.
* Test method for {@link com.sldeditor.filter.v2.function.FilterName#addParameter(com.sldeditor.filter.v2.function.FilterNameParameter)}.
*/
@Test
public void testGetFilterName() {
String filterName = "test filter";
Class<?> returnType = String.class;
FilterName f = new FilterName(filterName, returnType);
assertTrue(filterName.compareTo(f.getFilterName()) == 0);
assertEquals(returnType, f.getReturnType());
FilterNameParameter p1 = new FilterNameParameter("parameter 1", ExpressionTypeEnum.LITERAL, Integer.class);
f.addParameter(p1);
assertEquals(1, f.getParameterList().size());
assertEquals(null, f.getParameter(-1));
assertEquals(null, f.getParameter(99));
assertEquals(p1, f.getParameter(0));
}
Aggregations