-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changed in db regarding autoindexing requested by search team
- Loading branch information
1 parent
7afee63
commit f90871a
Showing
3 changed files
with
45 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
import org.apache.jena.update.UpdateRequest; | ||
import org.apache.log4j.Logger; | ||
import org.dice_research.sask.database_ms.RDFTriples.AutoIndexDTO; | ||
import org.dice_research.sask.database_ms.RDFTriples.EndPointParameters; | ||
import org.dice_research.sask.database_ms.RDFTriples.TripleDTO; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.cloud.client.loadbalancer.LoadBalanced; | ||
|
@@ -219,8 +220,10 @@ private void updateAutoIndex() { | |
HttpHeaders headers = new HttpHeaders(); | ||
headers.setContentType(MediaType.APPLICATION_JSON); | ||
// have to replace with the required values | ||
dto.setUrl("http://localhost:3030/sask/query"); | ||
dto.setEntitySelectQuery("SELECT ?subject ?object WHERE { ?subject ?predicate ?object }"); | ||
EndPointParameters endPointParameters = dto.getEndPointParameters(); | ||
endPointParameters.setUrl("http://localhost:3030/sask/query"); | ||
endPointParameters.setEntitySelectQuery("SELECT ?subject ?object WHERE { ?subject ?predicate ?object }"); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
sepidetari
Author
Collaborator
|
||
endPointParameters.setIsEntityCustomized(true); | ||
dto.setUseLocalDataSource(true); | ||
HttpEntity<AutoIndexDTO> entity = new HttpEntity<AutoIndexDTO>(dto, headers); | ||
|
||
|
23 changes: 6 additions & 17 deletions
23
database-ms/src/main/java/org/dice_research/sask/database_ms/RDFTriples/AutoIndexDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...se-ms/src/main/java/org/dice_research/sask/database_ms/RDFTriples/EndPointParameters.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package org.dice_research.sask.database_ms.RDFTriples; | ||
|
||
public class EndPointParameters{ | ||
private String url = ""; | ||
private Boolean isEntityCustomized = false; | ||
private String entitySelectQuery = ""; | ||
|
||
public void setUrl(String url) { | ||
this.url = url; | ||
} | ||
|
||
public String getUrl() { | ||
return this.url; | ||
} | ||
|
||
public void setIsEntityCustomized(Boolean isEntityCustomized) { | ||
this.isEntityCustomized = isEntityCustomized; | ||
} | ||
|
||
public void setEntitySelectQuery(String entitySelectQuery) { | ||
this.entitySelectQuery = entitySelectQuery; | ||
} | ||
|
||
public Boolean getIsEntityCustomized() { | ||
return this.isEntityCustomized; | ||
} | ||
|
||
public String getEntitySelectQuery() { | ||
return this.entitySelectQuery; | ||
} | ||
|
||
|
||
|
||
} |
@sepidetari This query will be modified to the query which @RicardoUsbeck suggested in issue #60