Package org.eclipse.rdf4j.rio.hdt
Class HDTTriplesSectionBitmap
- java.lang.Object
-
- org.eclipse.rdf4j.rio.hdt.HDTPart
-
- org.eclipse.rdf4j.rio.hdt.HDTTriplesSection
-
- org.eclipse.rdf4j.rio.hdt.HDTTriplesSectionBitmap
-
- All Implemented Interfaces:
java.util.Iterator<int[]>
class HDTTriplesSectionBitmap extends HDTTriplesSection
HDT Triples section.This part contains two levels of bitmaps and arrays.
Typically (in SPO order), the Y-level corresponds to the predicates and the Z-level to the objects.
The X (subjects) is implicit since triples are already ordered by X, and bitmap Y is used to notify when there is a new X: X will be used until a 1 is found in bitmap Y, which indicates that the next triple uses X+1.
The array contains numeric references to the predicates and objects in the HDT dictionaries, starting with the entries in the "shared"
Dictionary
These positions are counted starting with 1, not 0.E.g. Y-bitmap
0 1 1
and Y-array1 2 3
results inS1-P1 S1-P2 S2-P3
Structure:
+----------+----------+---------+---------+ | Bitmap Y | Bitmap Z | Array Y | Array Z | +----------+----------+---------+---------+
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.rdf4j.rio.hdt.HDTPart
HDTPart.Type
-
-
Field Summary
Fields Modifier and Type Field Description private HDTArray
arrY
private HDTArray
arrZ
private HDTBitmap
bitmapY
private HDTBitmap
bitmapZ
private int
posX
private int
posY
private int
posZ
private int
sizeY
private int
sizeZ
-
Fields inherited from class org.eclipse.rdf4j.rio.hdt.HDTPart
COOKIE, name, pos, properties
-
-
Constructor Summary
Constructors Constructor Description HDTTriplesSectionBitmap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
int[]
next()
protected void
parse(java.io.InputStream is)
Parse from input streamprotected void
parse(java.io.InputStream is, HDTTriples.Order order)
Parse triples section and return the triple parts in the correct S,P,O order.-
Methods inherited from class org.eclipse.rdf4j.rio.hdt.HDTPart
checkControl, checkCRC, checkFormat, countToNull, getDebugPartStr, getIntegerProperty, getProperties, getProperties, mapProperties, readToNull
-
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
-
next
public int[] next()
-
parse
protected void parse(java.io.InputStream is) throws java.io.IOException
Description copied from class:HDTPart
Parse from input stream
-
parse
protected void parse(java.io.InputStream is, HDTTriples.Order order) throws java.io.IOException
Description copied from class:HDTTriplesSection
Parse triples section and return the triple parts in the correct S,P,O order.- Specified by:
parse
in classHDTTriplesSection
- Throws:
java.io.IOException
-
-