task_24859 #13
|
@ -12,6 +12,7 @@ import org.gcube.application.cms.plugins.faults.IndexingException;
|
||||||
import org.gcube.application.cms.plugins.faults.InitializationException;
|
import org.gcube.application.cms.plugins.faults.InitializationException;
|
||||||
import org.gcube.application.cms.plugins.faults.InvalidPluginRequestException;
|
import org.gcube.application.cms.plugins.faults.InvalidPluginRequestException;
|
||||||
import org.gcube.application.cms.plugins.faults.InvalidProfileException;
|
import org.gcube.application.cms.plugins.faults.InvalidProfileException;
|
||||||
|
import org.gcube.application.cms.plugins.implementations.IndexConstants;
|
||||||
import org.gcube.application.cms.plugins.reports.IndexDocumentReport;
|
import org.gcube.application.cms.plugins.reports.IndexDocumentReport;
|
||||||
import org.gcube.application.cms.plugins.reports.InitializationReport;
|
import org.gcube.application.cms.plugins.reports.InitializationReport;
|
||||||
import org.gcube.application.cms.plugins.reports.Report;
|
import org.gcube.application.cms.plugins.reports.Report;
|
||||||
|
@ -79,11 +80,8 @@ public class SDIIndexerPlugin extends SDIAbstractPlugin implements IndexerPlugin
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Expected parameters :
|
* Expected parameters : - indexName (unique) - workspace - flagInternalIndex as
|
||||||
* - indexName (unique)
|
* Boolean; boolean - centroidRecord (OPT).
|
||||||
* - workspace
|
|
||||||
* - flagInternalIndex as Boolean;
|
|
||||||
* boolean - centroidRecord (OPT).
|
|
||||||
*
|
*
|
||||||
* @param request the request
|
* @param request the request
|
||||||
* @return the index document report
|
* @return the index document report
|
||||||
|
@ -125,12 +123,13 @@ public class SDIIndexerPlugin extends SDIAbstractPlugin implements IndexerPlugin
|
||||||
// Added by Francesco. Creating Gis Viewer Link as public or private
|
// Added by Francesco. Creating Gis Viewer Link as public or private
|
||||||
Boolean isInternalIndex = null;
|
Boolean isInternalIndex = null;
|
||||||
try {
|
try {
|
||||||
isInternalIndex = requestArguments.getBoolean("flagInternalIndex");
|
isInternalIndex = requestArguments
|
||||||
log.debug("flagInternalIndex read as {} ", isInternalIndex);
|
.getBoolean(IndexConstants.INDEX_PARAMETER_FLAGINTERNALINDEX);
|
||||||
|
log.debug(IndexConstants.INDEX_PARAMETER_FLAGINTERNALINDEX + " read as {} ", isInternalIndex);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
}
|
}
|
||||||
log.info("flagInternalIndex is {} ", isInternalIndex);
|
log.info(IndexConstants.INDEX_PARAMETER_FLAGINTERNALINDEX + " is {} ", isInternalIndex);
|
||||||
|
|
||||||
if (isInternalIndex != null) {
|
if (isInternalIndex != null) {
|
||||||
try {
|
try {
|
||||||
|
@ -332,8 +331,9 @@ public class SDIIndexerPlugin extends SDIAbstractPlugin implements IndexerPlugin
|
||||||
List<MappingObject> mappingObjects = getMappings(ucd);
|
List<MappingObject> mappingObjects = getMappings(ucd);
|
||||||
List<PostgisTable.Field> fields = PostgisTable.Field.fromMappings(mappingObjects);
|
List<PostgisTable.Field> fields = PostgisTable.Field.fromMappings(mappingObjects);
|
||||||
|
|
||||||
indexer.initIndex(params.getString("indexName"), fields, params.getString("workspace"),
|
indexer.initIndex(params.getString(IndexConstants.INDEX_PARAMETER_INDEXNAME), fields,
|
||||||
params.getString("indexName"));
|
params.getString(IndexConstants.INDEX_PARAMETER_WORKSPACE),
|
||||||
|
params.getString(IndexConstants.INDEX_PARAMETER_INDEXNAME));
|
||||||
return indexer;
|
return indexer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue