Skip to content

Commit 1d9c45d

Browse files
committed
fix the exception and the switch between VO providers.
1 parent 957999c commit 1d9c45d

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

src/firefly/java/edu/caltech/ipac/firefly/server/persistence/NedSearch.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010
import edu.caltech.ipac.firefly.server.util.ipactable.DataGroupReader;
1111
import edu.caltech.ipac.firefly.server.util.ipactable.TableDef;
1212
import edu.caltech.ipac.firefly.util.DataSetParser;
13-
import edu.caltech.ipac.util.DataGroup;
14-
import edu.caltech.ipac.util.DataObject;
15-
import edu.caltech.ipac.util.DataType;
16-
import edu.caltech.ipac.util.IpacTableUtil;
13+
import edu.caltech.ipac.util.*;
1714

1815
import java.io.File;
1916
import java.io.UnsupportedEncodingException;
@@ -45,6 +42,13 @@ protected String getFilePrefix(TableServerRequest request) {
4542
protected File postProcessData(File dgFile, TableServerRequest request) throws Exception {
4643
String url = "http://ned.ipac.caltech.edu/cgi-bin/objsearch?objname=%s&extend=no&list_limit=5&img_stamp=YES";
4744
final DataGroup resDg = DataGroupReader.read(dgFile);
45+
//Check if this is the first time (original table to be postporcess) for a different usage (Statistic/XYWithWerror, etc.
46+
if (!StringUtils.isEmpty(resDg.getAttribute("joined"))) {
47+
return dgFile;
48+
} else {
49+
resDg.addAttribute("joined", "true");
50+
}
51+
4852
TableDef tableDef = IpacTableUtil.getMetaInfo(dgFile);
4953
int maxWidth = NED_OBJECT_NAME.length();
5054
Iterator<DataObject> iterator = resDg.iterator();

src/firefly/js/tables/TableUtil.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,9 @@ export function makeVOCatalogRequest(title, params={}, options={}) {
184184
var req = {startIdx: 0, pageSize: 100};
185185
options.use = options.use || 'catalog_overlay';
186186
const tbl_id = options.tbl_id || uniqueTblId();
187-
const id = params.ned?'NedSearch':'ConeSearchByURL';
187+
const providerid = voProviders[params.providerName];
188+
189+
const id = providerid || 'ConeSearchByURL';
188190
const UserTargetWorldPt = params.UserTargetWorldPt || params.position; // may need to convert to worldpt.
189191
var META_INFO = Object.assign(options.META_INFO || {}, {title, tbl_id});
190192

@@ -194,6 +196,8 @@ export function makeVOCatalogRequest(title, params={}, options={}) {
194196
return omitBy(Object.assign(req, options, params, {id, tbl_id, META_INFO, UserTargetWorldPt}), isNil);
195197
}
196198

199+
const voProviders = {'NED':'NedSearch'};
200+
197201
/**
198202
* create a deep clone of the given request. tbl_id is removed from the cloned request.
199203
* @param {TableRequest} request the original request to clone

src/firefly/js/visualize/ui/CatalogSelectViewPanel.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const COLDEF1 = 9;
4545
const COLDEF2 = 8;
4646
const dropdownName = 'IrsaCatalogDropDown';
4747
const constraintskey = 'inputconstraint';
48+
const voProviders = [{name: 'NED', id: 'NedSearch'}];
4849

4950
/**
5051
* Globally scoped here, master table, columns object
@@ -262,11 +263,11 @@ function doVoSearch(request, providerName = '') {
262263
[ServerParams.USER_TARGET_WORLD_PT]: request[ServerParams.USER_TARGET_WORLD_PT],
263264
SearchMethod: 'Cone',
264265
radius: conesize, //degree!
265-
ned:true,
266+
providerName,
266267
accessUrl
267268
}
268269
);
269-
dispatchTableSearch(tReq);
270+
dispatchTableSearch(tReq, {backgroundable:true});
270271
}
271272

272273
function doLoadTable(request) {

0 commit comments

Comments
 (0)