Skip to content

Commit

Permalink
port to the original hdt store
Browse files Browse the repository at this point in the history
  • Loading branch information
hmottestad committed Nov 4, 2023
1 parent ace9d06 commit d90cb0f
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ public void setDelegate(boolean delegate) {
this.delegate = delegate;
}

@Override
public long getInternalId() {
return id;
}

@Override
public boolean isDelegate() {
return delegate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ public void setDelegate(boolean delegate) {
this.delegate = delegate;
}

@Override
public long getInternalId() {
return id;
}

@Override
public boolean isDelegate() {
return delegate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,11 @@ public void setDelegate(boolean delegate) {
// ignored
}

@Override
public long getInternalId() {
return hdtID;
}

@Override
public boolean isDelegate() {
return true;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.the_qa_company.qendpoint.store;

import com.the_qa_company.qendpoint.model.HDTValue;
import com.the_qa_company.qendpoint.model.SimpleIRIHDT;
import com.the_qa_company.qendpoint.store.exception.EndpointTimeoutException;
import com.the_qa_company.qendpoint.utils.CombinedNativeStoreResult;
import org.eclipse.rdf4j.common.iteration.CloseableIteration;
Expand Down Expand Up @@ -210,6 +212,11 @@ public Comparator<Value> getComparator() {
return new Comparator<Value>() {
@Override
public int compare(Value o1, Value o2) {
if(o1 instanceof HDTValue && o2 instanceof HDTValue){
long internalId1 = ((HDTValue) o1).getInternalId();
long internalId2 = ((HDTValue) o2).getInternalId();
return Long.compare(internalId1, internalId2);
}
return o1.toString().compareTo(o2.toString());
}
};
Expand Down

0 comments on commit d90cb0f

Please sign in to comment.