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:
Iterator<int[]>
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-array 1 2 3 results in S1-P1 S1-P2 S2-P3
Structure:
+----------+----------+---------+---------+ | Bitmap Y | Bitmap Z | Array Y | Array Z | +----------+----------+---------+---------+
-
Nested Class Summary
Nested classes/interfaces inherited from class HDTPart
HDTPart.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate HDTArrayprivate HDTArrayprivate HDTBitmapprivate HDTBitmapprivate intprivate intprivate intprivate intprivate intFields inherited from class HDTPart
COOKIE, name, pos, properties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasNext()int[]next()protected voidparse(InputStream is) Parse from input streamprotected voidparse(InputStream is, HDTTriples.Order order) Parse triples section and return the triple parts in the correct S,P,O order.Methods inherited from class HDTPart
checkControl, checkCRC, checkFormat, countToNull, getDebugPartStr, getIntegerProperty, getProperties, getProperties, mapProperties, readToNullMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterator
forEachRemaining, remove
-
Field Details
-
bitmapY
-
bitmapZ
-
arrY
-
arrZ
-
sizeY
private int sizeY -
sizeZ
private int sizeZ -
posX
private int posX -
posY
private int posY -
posZ
private int posZ
-
-
Constructor Details
-
HDTTriplesSectionBitmap
HDTTriplesSectionBitmap()
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
public int[] next() -
parse
Description copied from class:HDTPartParse from input stream- Specified by:
parsein classHDTPart- Parameters:
is-- Throws:
IOException
-
parse
Description copied from class:HDTTriplesSectionParse triples section and return the triple parts in the correct S,P,O order.- Specified by:
parsein classHDTTriplesSection- Parameters:
is-order-- Throws:
IOException
-