|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openjena.atlas.lib.ColumnMap
public class ColumnMap
General descriptor of a reordering (mapping) of columns in tuples to columns in indexes, for example, from triples to triple index order. Naming: map is convert to the reordered form, fetch is get back.
Constructor Summary | |
---|---|
ColumnMap(String label,
int... elements)
Construct a column map - the elements are the mappings of a tuple originally in the order 0,1,2,... |
|
ColumnMap(String label,
List<T> input,
List<T> output)
|
|
ColumnMap(String input,
String output)
Construct a column mapping that maps the input (one col, one char) to the output |
|
ColumnMap(String label,
T[] input,
T[] output)
|
Method Summary | ||
---|---|---|
|
fetchSlot(int idx,
T[] tuple)
Apply to an unmapped tuple to get the i'th slot after mapping : SPO->POS : 0'th slot is P from SPO |
|
|
fetchSlot(int idx,
Tuple<T> tuple)
Apply to an unmapped tuple to get the i'th slot after mapping : SPO->POS : 0'th slot is P from SPO |
|
int |
fetchSlotIdx(int idx)
Get the index of the i'th slot as it appears from a mapping : for SPO->POS : 0'th slot is P so 1->0 |
|
String |
getLabel()
|
|
int |
length()
Length of mapping |
|
|
map(Tuple<T> src)
Apply to an unmapped tuple to get a tuple with the column mapping applied |
|
String |
mapName(String word)
Reorder the letters of a string by the same rules as this column map (forward, map direction) |
|
|
mapSlot(int idx,
T[] tuple)
Apply to a mapped tuple to get the i'th slot as it appears after mapping : SPO->POS : 0'th slot is S from POS |
|
|
mapSlot(int idx,
Tuple<T> tuple)
Apply to a mapped tuple to get the i'th slot as it appears after mapping : SPO->POS : 0'th slot is S from POS |
|
int |
mapSlotIdx(int idx)
Get the index of the i'th slot as it appears after mapping : SPO->POS : 0'th slot is S from POS so 2->0 |
|
String |
toString()
|
|
|
unmap(Tuple<T> src)
Apply to a mapped tuple to get a tuple with the column mapping reverse-applied |
|
String |
unmapName(String word)
Reorder the letters of a string by the same rules as this column map (backward, fetch direction) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ColumnMap(String input, String output)
public ColumnMap(String label, List<T> input, List<T> output)
public ColumnMap(String label, T[] input, T[] output)
public ColumnMap(String label, int... elements)
Method Detail |
---|
public int length()
public <T> T fetchSlot(int idx, Tuple<T> tuple)
public <T> T fetchSlot(int idx, T[] tuple)
public <T> T mapSlot(int idx, Tuple<T> tuple)
public <T> T mapSlot(int idx, T[] tuple)
public int mapSlotIdx(int idx)
public int fetchSlotIdx(int idx)
public <T> Tuple<T> map(Tuple<T> src)
public <T> Tuple<T> unmap(Tuple<T> src)
public String toString()
toString
in class Object
public String getLabel()
public String mapName(String word)
public String unmapName(String word)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |