Class CorruptValue
- java.lang.Object
-
- org.eclipse.rdf4j.sail.nativerdf.model.CorruptValue
-
- All Implemented Interfaces:
Serializable
,Value
,NativeValue
- Direct Known Subclasses:
CorruptIRI
,CorruptIRIOrBNode
,CorruptLiteral
,CorruptUnknownValue
public class CorruptValue extends Object implements NativeValue
CorruptValue is used when a NativeValue cannot be read from the ValueStore and if soft failure is enabled
-
-
Field Summary
-
Fields inherited from interface org.eclipse.rdf4j.sail.nativerdf.model.NativeValue
UNKNOWN_ID
-
-
Constructor Summary
Constructors Constructor Description CorruptValue(ValueStoreRevision revision, int internalID, byte[] data)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
byte[]
getData()
Returns the bytes that were read from the ValueStore for this value's internalID.int
getInternalID()
Gets the ID that is used in the native store for this Value.ValueStoreRevision
getValueStoreRevision()
Gets the revision of the value store that created this value.void
setInternalID(int internalID, ValueStoreRevision revision)
Sets the ID that is used for this value in a specific revision of the value store.String
stringValue()
Returns the String-value of a Value object.
-
-
-
Constructor Detail
-
CorruptValue
public CorruptValue(ValueStoreRevision revision, int internalID, byte[] data)
-
-
Method Detail
-
setInternalID
public void setInternalID(int internalID, ValueStoreRevision revision)
Description copied from interface:NativeValue
Sets the ID that is used for this value in a specific revision of the value store.- Specified by:
setInternalID
in interfaceNativeValue
-
getValueStoreRevision
public ValueStoreRevision getValueStoreRevision()
Description copied from interface:NativeValue
Gets the revision of the value store that created this value. The value's internal ID is only valid when it's value store revision is equal to the value store's current revision.- Specified by:
getValueStoreRevision
in interfaceNativeValue
- Returns:
- The revision of the value store that created this value at the time it last set the value's internal ID.
-
getInternalID
public int getInternalID()
Description copied from interface:NativeValue
Gets the ID that is used in the native store for this Value.- Specified by:
getInternalID
in interfaceNativeValue
- Returns:
- The value's ID, or
NativeValue.UNKNOWN_ID
if not yet set.
-
stringValue
public String stringValue()
Description copied from interface:Value
Returns the String-value of a Value object. This returns either aLiteral
's label, aIRI
's URI or aBNode
's ID.- Specified by:
stringValue
in interfaceValue
-
getData
public byte[] getData()
Returns the bytes that were read from the ValueStore for this value's internalID. Since the value is corrupt the data may be null or an empty array.- Returns:
- null, empty array or corrupt data
-
-