Search in sources :

Example 1 with ItemFilter

use of org.sirix.axis.filter.ItemFilter in project sirix by sirixdb.

the class NestedFilterTest method testFilterConvetions.

@Test
public void testFilterConvetions() throws SirixException {
    holder.getReader().moveTo(9L);
    FilterTest.testFilterConventions(new NestedFilter(holder.getReader(), new ItemFilter(holder.getReader()), new ElementFilter(holder.getReader()), new NameFilter(holder.getReader(), "b")), true);
    FilterTest.testFilterConventions(new NestedFilter(holder.getReader(), new ItemFilter(holder.getReader()), new AttributeFilter(holder.getReader()), new NameFilter(holder.getReader(), "b")), false);
    holder.getReader().moveTo(4L);
    FilterTest.testFilterConventions(new NestedFilter(holder.getReader(), new NodeFilter(holder.getReader()), new ElementFilter(holder.getReader())), false);
    FilterTest.testFilterConventions(new NestedFilter(holder.getReader(), new NodeFilter(holder.getReader()), new TextFilter(holder.getReader())), true);
    holder.getReader().moveTo(1L);
    holder.getReader().moveToAttribute(0);
    FilterTest.testFilterConventions(new NestedFilter(holder.getReader(), new AttributeFilter(holder.getReader()), new NameFilter(holder.getReader(), "i")), true);
}
Also used : NestedFilter(org.sirix.axis.filter.NestedFilter) NameFilter(org.sirix.axis.filter.NameFilter) TextFilter(org.sirix.axis.filter.TextFilter) ItemFilter(org.sirix.axis.filter.ItemFilter) ElementFilter(org.sirix.axis.filter.ElementFilter) AttributeFilter(org.sirix.axis.filter.AttributeFilter) NodeFilter(org.sirix.axis.filter.NodeFilter) FilterTest(org.sirix.axis.filter.FilterTest) Test(org.junit.Test)

Example 2 with ItemFilter

use of org.sirix.axis.filter.ItemFilter in project sirix by sirixdb.

the class ItemFilterTest method testFilterConvetions.

@Test
public void testFilterConvetions() throws SirixException {
    holder.getReader().moveTo(9L);
    FilterTest.testFilterConventions(new ItemFilter(holder.getReader()), true);
    holder.getReader().moveTo(3L);
    FilterTest.testFilterConventions(new ItemFilter(holder.getReader()), true);
    holder.getReader().moveTo(2L);
    holder.getReader().moveToAttribute(0);
    FilterTest.testFilterConventions(new ItemFilter(holder.getReader()), true);
}
Also used : ItemFilter(org.sirix.axis.filter.ItemFilter) FilterTest(org.sirix.axis.filter.FilterTest) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 FilterTest (org.sirix.axis.filter.FilterTest)2 ItemFilter (org.sirix.axis.filter.ItemFilter)2 AttributeFilter (org.sirix.axis.filter.AttributeFilter)1 ElementFilter (org.sirix.axis.filter.ElementFilter)1 NameFilter (org.sirix.axis.filter.NameFilter)1 NestedFilter (org.sirix.axis.filter.NestedFilter)1 NodeFilter (org.sirix.axis.filter.NodeFilter)1 TextFilter (org.sirix.axis.filter.TextFilter)1