01: /*
02: * Created on Dec 14, 2004
03: */
04: package uk.org.ponder.mapping;
05:
06: import uk.org.ponder.saxalizer.AccessMethod;
07:
08: /**
09: * @author Antranig Basman (antranig@caret.cam.ac.uk)
10: *
11: */
12: public class ExampleQuerier {
13: public static boolean match(Object query, Object totest,
14: AccessMethod[] fields) {
15: for (int i = 0; i < fields.length; ++i) {
16: Object querychild = fields[i].getChildObject(query);
17: if (querychild != null) {
18: Object testchild = fields[i].getChildObject(totest);
19: if (!querychild.equals(testchild))
20: return false;
21: }
22: }
23: return true;
24: }
25: }
|