@Override protected void setGroupProperties(Context context, Request request, Response response) throws ResourceException { String[] r = NCISearchProcessor.METHODS.reach.getOpenToxEntry(); if (r == null) return; Template gp = new Template(); for (int i = 0; i < r.length; i++) { Property p = new Property(r[i]); p.setLabel(r[i]); p.setEnabled(true); p.setOrder(i + 1); gp.add(p); } setGroupProperties(gp); }
@Override protected IQueryRetrieval<IStructureRecord> createQuery() { Profile<Property> profile = new Profile<Property>(); for (int i = 1; i < 5; i++) { // for the test only id matters Property p = Property.getInstance(String.format("test%d", i), String.format("test%d", i)); p.setId(i); p.setEnabled(true); profile.add(p); } RetrieveProfileValuesAsRow q = new RetrieveProfileValuesAsRow(); q.setChemicalsOnly(false); q.setFieldname(profile); q.setValue(new int[] {100211, 100214, 100215, 129345}); return q; }