VIVO-870 Implement UpdateStatementsTask.
Also add the listener to support it and get rid of the last of the vestigial classes.
This commit is contained in:
parent
69711960bc
commit
6a49dbf7ec
2 changed files with 5 additions and 11 deletions
|
@ -33,9 +33,8 @@ public class AdditionalURIsForContextNodes implements IndexingUriFinder, Context
|
||||||
private static final List<String> multiValuedQueriesForRole = new ArrayList<String>();
|
private static final List<String> multiValuedQueriesForRole = new ArrayList<String>();
|
||||||
private static final List<String>queryList;
|
private static final List<String>queryList;
|
||||||
|
|
||||||
private RDFService rdfService;
|
private final Set<String> alreadyChecked = Collections.synchronizedSet(new HashSet<String>());
|
||||||
private Set<String> alreadyChecked;
|
private volatile RDFService rdfService;
|
||||||
private long accumulatedTime = 0;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -47,8 +46,6 @@ public class AdditionalURIsForContextNodes implements IndexingUriFinder, Context
|
||||||
public List<String> findAdditionalURIsToIndex(Statement stmt) {
|
public List<String> findAdditionalURIsToIndex(Statement stmt) {
|
||||||
|
|
||||||
if( stmt != null ){
|
if( stmt != null ){
|
||||||
long start = System.currentTimeMillis();
|
|
||||||
|
|
||||||
List<String>urisToIndex = new ArrayList<String>();
|
List<String>urisToIndex = new ArrayList<String>();
|
||||||
if(stmt.getSubject() != null && stmt.getSubject().isURIResource() ){
|
if(stmt.getSubject() != null && stmt.getSubject().isURIResource() ){
|
||||||
String subjUri = stmt.getSubject().getURI();
|
String subjUri = stmt.getSubject().getURI();
|
||||||
|
@ -66,7 +63,6 @@ public class AdditionalURIsForContextNodes implements IndexingUriFinder, Context
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
accumulatedTime += (System.currentTimeMillis() - start ) ;
|
|
||||||
return urisToIndex;
|
return urisToIndex;
|
||||||
}else{
|
}else{
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
|
@ -75,14 +71,12 @@ public class AdditionalURIsForContextNodes implements IndexingUriFinder, Context
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void startIndexing() {
|
public void startIndexing() {
|
||||||
alreadyChecked = new HashSet<String>();
|
alreadyChecked.clear();
|
||||||
accumulatedTime = 0L;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void endIndexing() {
|
public void endIndexing() {
|
||||||
log.debug( "Accumulated time for this run of the index: " + accumulatedTime + " msec");
|
// Nothing to clear
|
||||||
alreadyChecked = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected List<String> findAdditionalURIsToIndex(String uri) {
|
protected List<String> findAdditionalURIsToIndex(String uri) {
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class AdditionalUrisForVCards implements IndexingUriFinder, ContextModels
|
||||||
+ " ?uri obo:ARG_2000028 ?contactInfo . \n " //
|
+ " ?uri obo:ARG_2000028 ?contactInfo . \n " //
|
||||||
+ "}";
|
+ "}";
|
||||||
|
|
||||||
private RDFService rdfService;
|
private volatile RDFService rdfService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setContextModels(ContextModelAccess models) {
|
public void setContextModels(ContextModelAccess models) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue