- Get original scope read form ScopeProvider.get and its set to original value performed everywhere
- updated changelog git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-transfer/uri-resolver@146336 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
31c3ad2775
commit
8a5f01282f
|
@ -4,9 +4,6 @@
|
|||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<dependent-module archiveName="uri-resolver-manager-1.3.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/uri-resolver-manager-TRUNK/uri-resolver-manager-TRUNK">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<property name="context-root" value="uri-resolver"/>
|
||||
<property name="java-output-path" value="/uri-resolver/target/classes"/>
|
||||
</wb-module>
|
||||
|
|
|
@ -58,17 +58,26 @@
|
|||
<Changeset component="org.gcube.data-transfer.uri-resolver.1-9-0"
|
||||
date="2016-12-20">
|
||||
<Change>[Task #6119] Provide CatalogueResolver: get/resolve a link to
|
||||
a CKAN Entity</Change>
|
||||
a CKAN Entity
|
||||
</Change>
|
||||
<Change>[Task #6262] Catalogue Resolver: get/resolve a direct link
|
||||
</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.data-transfer.uri-resolver.1-10-0"
|
||||
date="2017-02-28">
|
||||
<Change>[Task #6492] Catalogue Resolver: "improve"/"build better" public URLs to products</Change>
|
||||
<Change>[Task #6952] Catalogue Resolver: update on the fly the Application Profile for VRE's used to resolve Product URL</Change>
|
||||
<Change>[Task #6492] Catalogue Resolver: "improve"/"build better"
|
||||
public URLs to products
|
||||
</Change>
|
||||
<Change>[Task #6952] Catalogue Resolver: update on the fly the
|
||||
Application Profile for VRE's used to resolve Product URL
|
||||
</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.data-transfer.uri-resolver.1-11-0"
|
||||
date="2017-03-09">
|
||||
<Change>[Feature #7350] GeoExplorer Resolver: resolve a GeoExplorer Link</Change>
|
||||
date="2017-03-22">
|
||||
<Change>[Feature #7350] GeoExplorer Resolver: resolve a GeoExplorer
|
||||
Link
|
||||
</Change>
|
||||
<Change>[Task #7626] Fix issue on set/reset scope
|
||||
</Change>
|
||||
</Changeset>
|
||||
</ReleaseNotes>
|
|
@ -76,9 +76,9 @@ public class ApplicationProfileReader {
|
|||
*/
|
||||
private ApplicationProfile readProfileFromInfrastrucure() {
|
||||
|
||||
String originalScope = ScopeProvider.instance.get();
|
||||
ApplicationProfile appProf = new ApplicationProfile();
|
||||
String queryString = GcubeQuery.getGcubeGenericResource(secondaryType, FIELD_TYPE.APP_ID, appId);
|
||||
String originalScope = null;
|
||||
|
||||
try {
|
||||
|
||||
|
@ -179,7 +179,7 @@ public class ApplicationProfileReader {
|
|||
}finally{
|
||||
if(originalScope!=null && !originalScope.isEmpty()){
|
||||
ScopeProvider.instance.set(originalScope);
|
||||
logger.info("scope provider setted to orginal scope: "+originalScope);
|
||||
logger.info("scope provider set to orginal scope: "+originalScope);
|
||||
}else{
|
||||
ScopeProvider.instance.reset();
|
||||
logger.info("scope provider reset");
|
||||
|
|
|
@ -23,6 +23,7 @@ import org.gcube.datatransfer.resolver.applicationprofile.ApplicationProfileNotF
|
|||
import org.gcube.datatransfer.resolver.catalogue.resource.ApplicationProfileReaderForCatalogueResolver;
|
||||
import org.gcube.datatransfer.resolver.catalogue.resource.CkanPorltetApplicationProfile;
|
||||
import org.gcube.datatransfer.resolver.catalogue.resource.UpdateApplicationProfileCatalogueResolver;
|
||||
import org.gcube.datatransfer.resolver.scope.ScopeUtil;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
@ -83,10 +84,12 @@ public class CatalogueResolver extends HttpServlet{
|
|||
if(scopeToEncDecr!=null)
|
||||
return scopeToEncDecr;
|
||||
|
||||
scopeToEncDecr = System.getenv(ENV_SCOPE);
|
||||
logger.info("Reading Environment Variable "+ENV_SCOPE+" to get the scope for encrypt/descrypt; I read scope: "+scopeToEncDecr);
|
||||
if(scopeToEncDecr == null || scopeToEncDecr.isEmpty())
|
||||
try{
|
||||
scopeToEncDecr = ScopeUtil.getScopeFromEnvironment();
|
||||
}catch(ServletException e){
|
||||
logger.error("I cannot encrypt/descrypt: ", e);
|
||||
throw new ServletException(CatalogueResolver.class.getName() +" cannot work without set the Environment Variable: "+ENV_SCOPE);
|
||||
}
|
||||
|
||||
appPrCatResolver = new ApplicationProfileReaderForCatalogueResolver(scopeToEncDecr, true);
|
||||
logger.info("Resource read for CatalogueResolver: "+appPrCatResolver);
|
||||
|
@ -99,10 +102,10 @@ public class CatalogueResolver extends HttpServlet{
|
|||
@Override
|
||||
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
||||
|
||||
//ScopeProvider.instance.set(scope);
|
||||
|
||||
String originalScope = ScopeProvider.instance.get();
|
||||
String clearCatalogueQueryLink = req.getParameter(DIRECT_CATALOGUE_LINK_PARAM);
|
||||
String encryptedCatalogueQueryLink = req.getParameter(ENC_CATALOGUE_LINK_PARAM);
|
||||
logger.debug("Read original scope from ScopeProvider: "+originalScope);
|
||||
|
||||
boolean foundClearLink = false;
|
||||
if(clearCatalogueQueryLink==null || clearCatalogueQueryLink.isEmpty()){
|
||||
|
@ -122,6 +125,7 @@ public class CatalogueResolver extends HttpServlet{
|
|||
return;
|
||||
}
|
||||
String base64DecodedId = "";
|
||||
|
||||
try {
|
||||
|
||||
base64DecodedId = base64DecodeString(encryptedCatalogueQueryLink);
|
||||
|
@ -138,6 +142,16 @@ public class CatalogueResolver extends HttpServlet{
|
|||
logger.error("An error occurred during decrypting data catalogue link: "+base64DecodedId+", using the scope: "+scopeToEncDecr, e);
|
||||
sendError(resp, HttpStatus.SC_INTERNAL_SERVER_ERROR, "The system cannot decrypt the Catalogue Link");
|
||||
return;
|
||||
}finally{
|
||||
|
||||
if(originalScope!=null){
|
||||
ScopeProvider.instance.set(originalScope);
|
||||
logger.info("scope provider set to orginal scope: "+originalScope);
|
||||
}else{
|
||||
ScopeProvider.instance.reset();
|
||||
logger.info("scope provider reset");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -184,7 +198,7 @@ public class CatalogueResolver extends HttpServlet{
|
|||
|
||||
String ckanPorltetUrl = "";
|
||||
try{
|
||||
logger.info("Using scope "+scope+ " to search Ckan Portlet URL from IS");
|
||||
logger.info("Setting scope "+scope+ " to search Ckan Portlet URL from IS");
|
||||
ScopeProvider.instance.set(scope);
|
||||
ckanPorltetUrl = CkanPorltetApplicationProfile.getPortletUrlFromInfrastrucure();
|
||||
if(ckanPorltetUrl == null || ckanPorltetUrl.isEmpty()){
|
||||
|
@ -195,6 +209,17 @@ public class CatalogueResolver extends HttpServlet{
|
|||
logger.error("An error occurred during discovery Data Catalogue URL: ",e);
|
||||
sendError(resp, HttpStatus.SC_INTERNAL_SERVER_ERROR, "An error occurred during discovery Data Catalogue URL, try again later");
|
||||
return;
|
||||
|
||||
}finally{
|
||||
|
||||
if(originalScope!=null){
|
||||
ScopeProvider.instance.set(originalScope);
|
||||
logger.info("scope provider set to orginal scope: "+originalScope);
|
||||
}else{
|
||||
ScopeProvider.instance.reset();
|
||||
logger.info("scope provider reset");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//UrlEncoderUtil.encodeQuery(cer.getParameters());
|
||||
|
@ -214,8 +239,8 @@ public class CatalogueResolver extends HttpServlet{
|
|||
@Override
|
||||
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
||||
|
||||
String originalScope = ScopeProvider.instance.get();
|
||||
final CatalogueEntityRequest cer = new CatalogueEntityRequest();
|
||||
String originalScope = null;
|
||||
try{
|
||||
String jsonRequest = IOUtils.toString(req.getInputStream());
|
||||
logger.debug("Read json request: "+jsonRequest);
|
||||
|
@ -327,7 +352,6 @@ public class CatalogueResolver extends HttpServlet{
|
|||
buildLink += req.getRequestURI();
|
||||
|
||||
cer.removeParameterToRequest(CatalogueRequestParameter.CLEAR_URL.getKey());
|
||||
originalScope = ScopeProvider.instance.get();
|
||||
logger.info("Using scope "+scopeToEncDecr+ " from env to get encrypt key");
|
||||
ScopeProvider.instance.set(scopeToEncDecr);
|
||||
//String query = UrlEncoderUtil.encodeQuery(cer.getParameters());
|
||||
|
@ -357,9 +381,10 @@ public class CatalogueResolver extends HttpServlet{
|
|||
//silent
|
||||
}
|
||||
}finally{
|
||||
if(originalScope!=null && !originalScope.isEmpty()){
|
||||
|
||||
if(originalScope!=null){
|
||||
ScopeProvider.instance.set(originalScope);
|
||||
logger.info("scope provider setted to orginal scope: "+originalScope);
|
||||
logger.info("scope provider set to orginal scope: "+originalScope);
|
||||
}else{
|
||||
ScopeProvider.instance.reset();
|
||||
logger.info("scope provider reset");
|
||||
|
|
|
@ -83,12 +83,11 @@ public class ApplicationProfileReaderForCatalogueResolver {
|
|||
*/
|
||||
private void readProfileFromInfrastrucure() {
|
||||
|
||||
String originalScope = ScopeProvider.instance.get();
|
||||
String queryString = GcubeQuery.getGcubeGenericResource(secondaryType, FIELD_TYPE.RESOURCE_NAME, resourceName);
|
||||
String originalScope = null;
|
||||
|
||||
try {
|
||||
|
||||
originalScope = ScopeProvider.instance.get();
|
||||
String discoveryScope = useRootScope?ScopeUtil.getInfrastructureNameFromScope(scope):scope;
|
||||
ScopeProvider.instance.set(discoveryScope);
|
||||
logger.info("Trying to fetch ApplicationProfile in the scope: "+discoveryScope+", SecondaryType: " + secondaryType + ", ResourceName: " + resourceName);
|
||||
|
|
|
@ -50,10 +50,12 @@ public class UpdateApplicationProfileCatalogueResolver {
|
|||
* @throws ApplicationProfileNotFoundException the application profile not found exception
|
||||
*/
|
||||
public static boolean validateEndPoint(String scopeToInstanceResolver, String VRE, String fullScope) throws ApplicationProfileNotFoundException {
|
||||
|
||||
String originalScope = ScopeProvider.instance.get();
|
||||
logger.info("Checking if the VRE_NAME: "+VRE+" exists into Application Profile: "+ApplicationProfileReaderForCatalogueResolver.RESOURCE_NAME+" using scope: "+scopeToInstanceResolver);
|
||||
ApplicationProfileReaderForCatalogueResolver appPrCatResolver = new ApplicationProfileReaderForCatalogueResolver(scopeToInstanceResolver, true);
|
||||
Element root = appPrCatResolver.getRootDocument();
|
||||
String originalScope = null;
|
||||
|
||||
try {
|
||||
XPathHelper helper = new XPathHelper(root);
|
||||
List<String> scopes = helper.evaluate(ApplicationProfileReaderForCatalogueResolver.RESOURCE_PROFILE_BODY_END_POINT_SCOPE_TEXT);
|
||||
|
@ -83,7 +85,6 @@ public class UpdateApplicationProfileCatalogueResolver {
|
|||
|
||||
logger.debug("Updated resource: \n"+result.getWriter().toString());
|
||||
|
||||
originalScope = ScopeProvider.instance.get();
|
||||
String discoveryScope = useRootScope?ScopeUtil.getInfrastructureNameFromScope(scopeToInstanceResolver):scopeToInstanceResolver;
|
||||
ScopeProvider.instance.set(discoveryScope);
|
||||
|
||||
|
@ -97,9 +98,9 @@ public class UpdateApplicationProfileCatalogueResolver {
|
|||
logger.error("Error ", e);
|
||||
throw new ApplicationProfileNotFoundException("Error during parsing application profile with resource name: " +ApplicationProfileReaderForCatalogueResolver.RESOURCE_NAME + " in the scope: " + scopeToInstanceResolver);
|
||||
}finally{
|
||||
if(originalScope!=null && !originalScope.isEmpty()){
|
||||
if(originalScope!=null){
|
||||
ScopeProvider.instance.set(originalScope);
|
||||
logger.info("scope provider setted to orginal scope: "+originalScope);
|
||||
logger.info("scope provider set to orginal scope: "+originalScope);
|
||||
}else{
|
||||
ScopeProvider.instance.reset();
|
||||
logger.info("scope provider reset");
|
||||
|
|
|
@ -36,19 +36,13 @@ public class GeoRuntimeReader {
|
|||
|
||||
public static final Logger logger = LoggerFactory.getLogger(GeoRuntimeReader.class);
|
||||
|
||||
private ServerParameters getParameters(String scope, GEO_SERVICE geoservice) throws Exception
|
||||
{
|
||||
|
||||
private ServerParameters getParameters(String scope, GEO_SERVICE geoservice) throws Exception{
|
||||
String originalScope = ScopeProvider.instance.get();
|
||||
ServerParameters parameters = new ServerParameters();
|
||||
String originalScope = null;
|
||||
try{
|
||||
|
||||
boolean isGeoserver = geoservice.equals(GEO_SERVICE.GEOSERVER);
|
||||
|
||||
String resourceName = isGeoserver ? GEOSERVER_RESOURCE_NAME : GEONETWORK_RESOURCE_NAME;
|
||||
|
||||
originalScope = ScopeProvider.instance.get();
|
||||
|
||||
ScopeProvider.instance.set(scope);
|
||||
|
||||
SimpleQuery query = queryFor(ServiceEndpoint.class);
|
||||
|
@ -95,9 +89,9 @@ public class GeoRuntimeReader {
|
|||
}catch (Exception e) {
|
||||
logger.error("Sorry, an error occurred on reading parameters in Runtime Resources",e);
|
||||
}finally{
|
||||
if(originalScope!=null && !originalScope.isEmpty()){
|
||||
if(originalScope!=null){
|
||||
ScopeProvider.instance.set(originalScope);
|
||||
logger.info("scope provider setted to orginal scope: "+originalScope);
|
||||
logger.info("scope provider set to orginal scope: "+originalScope);
|
||||
}else{
|
||||
ScopeProvider.instance.reset();
|
||||
logger.info("scope provider reset");
|
||||
|
|
|
@ -66,11 +66,10 @@ public class GeonetworkInstance {
|
|||
* @throws GeonetworkInstanceException the geonetwork instance exception
|
||||
*/
|
||||
public GeonetworkInstance(String scope, boolean authenticate, LoginLevel level) throws GeonetworkInstanceException {
|
||||
String originalScope = ScopeProvider.instance.get();
|
||||
logger.debug("Instancing GeonetworkInstance with scope: "+scope + ", authenticate: "+authenticate +", login level: "+level);
|
||||
this.scope = scope;
|
||||
String originalScope = null;
|
||||
try {
|
||||
originalScope = ScopeProvider.instance.get();
|
||||
ScopeProvider.instance.set(scope);
|
||||
logger.info("setting scope "+scope);
|
||||
createInstanceGeonetworkPublisher(authenticate, level);
|
||||
|
@ -79,9 +78,9 @@ public class GeonetworkInstance {
|
|||
logger.warn(message, e);
|
||||
throw new GeonetworkInstanceException(message);
|
||||
}finally{
|
||||
if(originalScope!=null && !originalScope.isEmpty()){
|
||||
if(originalScope!=null){
|
||||
ScopeProvider.instance.set(originalScope);
|
||||
logger.info("scope provider setted to orginal scope: "+originalScope);
|
||||
logger.info("scope provider set to orginal scope: "+originalScope);
|
||||
}else{
|
||||
ScopeProvider.instance.reset();
|
||||
logger.info("scope provider reset");
|
||||
|
|
|
@ -240,8 +240,10 @@ public class GisResolver extends HttpServlet{
|
|||
*/
|
||||
@Override
|
||||
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
||||
logger.info("The http session id is: " + req.getSession().getId());
|
||||
|
||||
String originalScope = ScopeProvider.instance.get();
|
||||
|
||||
logger.info("The http session id is: " + req.getSession().getId());
|
||||
String scope = req.getParameter(SCOPE);
|
||||
|
||||
if (scope == null || scope.isEmpty()) {
|
||||
|
@ -323,8 +325,13 @@ public class GisResolver extends HttpServlet{
|
|||
sendError(resp, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, error);
|
||||
return;
|
||||
}finally{
|
||||
logger.info("Resetting scope");
|
||||
if(originalScope!=null){
|
||||
ScopeProvider.instance.set(originalScope);
|
||||
logger.info("scope provider set to orginal scope: "+originalScope);
|
||||
}else{
|
||||
ScopeProvider.instance.reset();
|
||||
logger.info("scope provider reset");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -257,6 +257,7 @@ public class GeonetworkResolver extends HttpServlet{
|
|||
if(req instanceof MultiReadHttpServletRequest)
|
||||
req2 = (MultiReadHttpServletRequest) req;*/
|
||||
|
||||
String originalScope = ScopeProvider.instance.get();
|
||||
logger.info("doPost running...");
|
||||
String scope = req.getParameter(SCOPE);
|
||||
String remainValue = req.getParameter(REMAIN_PATH);
|
||||
|
@ -264,7 +265,6 @@ public class GeonetworkResolver extends HttpServlet{
|
|||
String noAuthentication = req.getParameter(PARAMETER_NO_AUTHENTICATION);
|
||||
boolean filterPublicMetadataIDsB = false;
|
||||
boolean noAuthenticationB = false;
|
||||
String originalScope = null;
|
||||
|
||||
if (scope == null || scope.equals("")) {
|
||||
logger.debug("Scope not found");
|
||||
|
@ -289,8 +289,6 @@ public class GeonetworkResolver extends HttpServlet{
|
|||
GeonetworkServiceInterface gntwAccess = new GeonetworkAccessParameter(scope, null);
|
||||
GeonetworkInstance gnInstance = gntwAccess.getGeonetworkInstance();
|
||||
|
||||
originalScope = ScopeProvider.instance.get();
|
||||
|
||||
ScopeProvider.instance.set(scope);
|
||||
logger.info("set scope provider "+scope);
|
||||
Configuration config = gnInstance.getGeonetworkPublisher().getConfiguration();
|
||||
|
@ -392,9 +390,9 @@ public class GeonetworkResolver extends HttpServlet{
|
|||
sendError(resp, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, error);
|
||||
return;
|
||||
}finally{
|
||||
if(originalScope!=null && !originalScope.isEmpty()){
|
||||
if(originalScope!=null){
|
||||
ScopeProvider.instance.set(originalScope);
|
||||
logger.info("scope provider setted to orginal scope: "+originalScope);
|
||||
logger.info("scope provider set to orginal scope: "+originalScope);
|
||||
}else{
|
||||
ScopeProvider.instance.reset();
|
||||
logger.info("scope provider reset");
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.datatransfer.resolver.scope;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The Class ScopeUtil.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* Mar 22, 2017
|
||||
*/
|
||||
public class ScopeUtil {
|
||||
|
||||
public static final String ENV_SCOPE = "SCOPE"; //Environment Variable
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ScopeUtil.class);
|
||||
|
||||
|
||||
/**
|
||||
* Gets the scope from environment.
|
||||
*
|
||||
* @return the scope from environment
|
||||
* @throws ServletException the servlet exception
|
||||
*/
|
||||
public static String getScopeFromEnvironment() throws ServletException{
|
||||
|
||||
logger.info("Reading Environment Variable "+ENV_SCOPE);
|
||||
String scopeFromEnv = System.getenv(ENV_SCOPE);
|
||||
|
||||
if(scopeFromEnv == null || scopeFromEnv.isEmpty())
|
||||
throw new ServletException(ScopeUtil.class.getName() +" cannot read scope from Environment Variable: "+ENV_SCOPE+", It is null or empty");
|
||||
|
||||
logger.info("Read scope: "+scopeFromEnv+" from Environment Variable: "+ENV_SCOPE);
|
||||
return scopeFromEnv;
|
||||
}
|
||||
}
|
|
@ -23,21 +23,21 @@ public class GeonetworkQueryTest {
|
|||
|
||||
//private String[] scopes = {"/gcube/devNext/NextNext"};
|
||||
|
||||
//private String[] scopesProd = {"/d4science.research-infrastructures.eu/gCubeApps"};
|
||||
private String[] scopesProd = {"/d4science.research-infrastructures.eu"};
|
||||
|
||||
//private String[] scopesProd = {"/d4science.research-infrastructures.eu/gCubeApps/fisheriesandecosystematmii"};
|
||||
|
||||
private String[] scopesProd = {"/d4science.research-infrastructures.eu/D4Research"};
|
||||
//private String[] scopesProd = {"/d4science.research-infrastructures.eu/D4Research"};
|
||||
|
||||
//private String[] scopesProd = {"/d4science.research-infrastructures.eu"};
|
||||
|
||||
private LoginLevel loginLevel = LoginLevel.SCOPE;
|
||||
private LoginLevel loginLevel = LoginLevel.CKAN;
|
||||
|
||||
private Type accountType = Type.SCOPE;
|
||||
|
||||
private String textToSearch = "salinity";
|
||||
private String textToSearch = "geo_fea";
|
||||
|
||||
//@Test
|
||||
@Test
|
||||
public void getCount() throws Exception{
|
||||
try{
|
||||
for(String scope:scopesProd){
|
||||
|
@ -85,7 +85,7 @@ public class GeonetworkQueryTest {
|
|||
}
|
||||
|
||||
|
||||
@Test
|
||||
//@Test
|
||||
public void getLayersBySearch() throws Exception{
|
||||
try{
|
||||
for(String scope:scopesProd){
|
||||
|
@ -164,7 +164,7 @@ public class GeonetworkQueryTest {
|
|||
System.out.println("search by any text");
|
||||
}else{
|
||||
req.addParam(GNSearchRequest.Param.title, textToSearch);
|
||||
req.addConfig(GNSearchRequest.Config.similarity, Integer.toString(1));
|
||||
req.addConfig(GNSearchRequest.Config.similarity, "1");
|
||||
System.out.println("search by title");
|
||||
}
|
||||
System.out.println("text to search "+textToSearch);
|
||||
|
|
Loading…
Reference in New Issue