|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.ac.starlink.table.join.MatchStarTables
Provides factory methods for producing tables which represent the result of row matching.
Field Summary | |
static ValueInfo |
GRP_ID_INFO
Defines the characteristics of a table column which represents the ID of a group of matched row objects. |
static ValueInfo |
GRP_SIZE_INFO
Defines the characteristics of a table column which represents the number of matched row objects in a given group (with the same group ID). |
static ValueInfo |
MATCH_SCORE_INFO
Defines the characteristics of a table column which represents the match score of a given RowLink. |
Constructor Summary | |
MatchStarTables()
|
Method Summary | |
static StarTable |
makeInternalMatchTable(int iTable,
Collection rowLinks,
long rowCount)
Analyses a set of RowLinks to mark as linked rows of a given table. |
static StarTable |
makeJoinTable(StarTable[] tables,
Collection rowLinks,
Map matchScores,
JoinStarTable.FixAction[] fixActs)
Constructs a table made out of a set of constituent tables joined together. |
static StarTable |
makeParallelMatchTable(StarTable table,
int iTable,
Collection links,
int width,
int minSize,
int maxSize,
JoinStarTable.FixAction[] fixActs)
Constructs a new wide table from a single given base table and a set of RowLinks. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final ValueInfo GRP_ID_INFO
public static final ValueInfo GRP_SIZE_INFO
public static final ValueInfo MATCH_SCORE_INFO
Constructor Detail |
public MatchStarTables()
Method Detail |
public static StarTable makeJoinTable(StarTable[] tables, Collection rowLinks, Map matchScores, JoinStarTable.FixAction[] fixActs)
RowLink
entry in a set rowLinks; if that RowLink
contains a row from one of the tables being joined here,
the columns corresponding to that table are filled in.
If it contains multiple rows from that table, an arbitrary one
of them is filled in.
The tables array determines which tables columns appear in the output table. It must have (at least) as many elements as the highest table index in the RowLink set. Table data will be picked from the n'th table in this array for RowRef elements with a tableIndex of n. If the nth element is null, the corresponding columns will not appear in the output table.
tables
- array of constituent tablesrowLinks
- set of RowLink objects which define which rows
in one table are associated with which rows in the othersmatchScores
- may supply a mapping from items in the
rowLinks list to match scores - if so a
MatchScore column will be added to the resulting tablefixActs
- actions to take for deduplicating column names
(array of the same length as tables)public static StarTable makeInternalMatchTable(int iTable, Collection rowLinks, long rowCount)
GRP_ID_INFO
and GRP_SIZE_INFO
.
Rows of the table linked together
by rowLinks are assigned the same integer value in
the new GRP_ID_INFO column, and the GRP_SIZE_INFO column
indicates how many rows are linked together in this way.
Each group corresponds to a single RowLink; if a row is part of
more than one RowLink then only one of them will be recorded
in the new columns.
Any rows linked in rowLinks which do not refer to
table have null entries in these columns.
iTable
- the index of the table in which internal matches
are to be soughtrowLinks
- a collection of RowLink
objects
linking groups of rows togetherrowCount
- number of rows in the returned table
(must be large enough
to accommodate the indices in rowLinks)
public static StarTable makeParallelMatchTable(StarTable table, int iTable, Collection links, int width, int minSize, int maxSize, JoinStarTable.FixAction[] fixActs)
table
- input tableiTable
- index corresponding to this table in the
rowLinks setlinks
- collection of RowLink
objects describing the
matches. This collection is modified on exitwidth
- width of the output table as a multiple of the
width of the input tableminSize
- minimum number of entries in a RowLink to count as
an output rowmaxSize
- maximum number of entries in a RowLink to count as
an output row; also the width of the output table
(as a multiple of the width of the input table)fixActs
- actions to take for deduplicating column names
(width-element array, or null)
|
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 |