|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Defines the details of object matching criteria.
This interface provides methods for ascertaining whether two table
rows are to be linked - this usually means that they are to be
assumed to refer to the same object.
The methods act on 'tuples' - an array of objects defining the relevant
characteristics of a row. Of course these tuples have to be prepared
with understanding of what a particular implementation of this interface
knows how to deal with, which can be obtained from the getTupleInfos()
method. Typically a tuple will be a list of coordinates,
such as RA and Dec.
The business end of the interface consists of two methods. One simply tests whether two tuples count as the same or not (in practice, this is likely to compare corresponding elements of the two submitted tuples allowing for some error in each one). The second is a bit more subtle: it must identify a set of bins into which possible matches for the tuple might fall. For the case of coordinate matching with errors, you would need to chop the whole possible space into a discrete set of zones, each with a given key, and return the key for each zone near enough to the submitted tuple (point) that it might contain a match for it.
Formally, the requirements for correct implementations of this interface are as follows:
It may help to think of all this as a sort of fuzzy hash.
Method Summary | |
Object[] |
getBins(Object[] tuple)
Returns a set of keys for bins into which possible matches for a given tuple might fall. |
DescribedValue[] |
getMatchParameters()
Returns a set of DescribedValue objects whose values can be modified to modify the matching criteria. |
ValueInfo[] |
getTupleInfos()
Returns a set of ValueInfo objects indicating what is required for the elements of each tuple. |
boolean |
matches(Object[] tuple1,
Object[] tuple2)
Indicates whether two tuples are to be linked. |
Method Detail |
public Object[] getBins(Object[] tuple)
tuple
-
public boolean matches(Object[] tuple1, Object[] tuple2)
tuple1
- one tupletuple2
- the other tuple
public ValueInfo[] getTupleInfos()
public DescribedValue[] getMatchParameters()
DescribedValue.setValue(java.lang.Object)
on the
returned objects.
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |