java.lang.Object
org.apache.jena.tdb1.lib.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
ConstructorsConstructorDescriptionConstruct a column map - the elements are the mappings of a tuple originally in the order 0,1,2,...Construct a column mapping that maps the input (one col, one char) to the output -
Method Summary
Modifier and TypeMethodDescription<T> TfetchSlot(int idx, org.apache.jena.atlas.lib.tuple.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<T> TfetchSlot(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 SPOintfetchSlotIdx(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->0getLabel()intlength()Length of mapping<T> org.apache.jena.atlas.lib.tuple.Tuple<T>map(org.apache.jena.atlas.lib.tuple.Tuple<T> src) Apply to an unmapped tuple to get a tuple with the column mapping appliedReorder the letters of a string by the same rules as this column map (forward, map direction)<T> TmapSlot(int idx, org.apache.jena.atlas.lib.tuple.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<T> TmapSlot(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 POSintmapSlotIdx(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->0toString()<T> org.apache.jena.atlas.lib.tuple.Tuple<T>unmap(org.apache.jena.atlas.lib.tuple.Tuple<T> src) Apply to a mapped tuple to get a tuple with the column mapping reverse-appliedReorder the letters of a string by the same rules as this column map (backward, fetch direction)
-
Constructor Details
-
ColumnMap
Construct a column mapping that maps the input (one col, one char) to the output -
ColumnMap
-
ColumnMap
-
ColumnMap
Construct a column map - the elements are the mappings of a tuple originally in the order 0,1,2,... so SPO->POS is 2,0,1 (SPO->POS so S->2, P->0, O->1) and not 1,2,0 (which is the extraction mapping). The label is just a label and is not interpreted.
-
-
Method Details
-
length
public int length()Length of mapping -
fetchSlot
public <T> T fetchSlot(int idx, org.apache.jena.atlas.lib.tuple.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 -
fetchSlot
public <T> T 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 -
mapSlot
public <T> T mapSlot(int idx, org.apache.jena.atlas.lib.tuple.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 -
mapSlot
public <T> T 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 -
mapSlotIdx
public 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 -
fetchSlotIdx
public 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 -
map
public <T> org.apache.jena.atlas.lib.tuple.Tuple<T> map(org.apache.jena.atlas.lib.tuple.Tuple<T> src) Apply to an unmapped tuple to get a tuple with the column mapping applied -
unmap
public <T> org.apache.jena.atlas.lib.tuple.Tuple<T> unmap(org.apache.jena.atlas.lib.tuple.Tuple<T> src) Apply to a mapped tuple to get a tuple with the column mapping reverse-applied -
toString
-
getLabel
-
mapName
Reorder the letters of a string by the same rules as this column map (forward, map direction) -
unmapName
Reorder the letters of a string by the same rules as this column map (backward, fetch direction)
-