/** * Tell the requester about all the reference sequences that have data (are of non-zero length) * and are in the correct domain. */ private void serveRefSeqs() { Model m = im.getModel(); ClassDescriptor ref = m.getClassDescriptorByName(refType); if (ref == null) { throw new ResourceNotFoundException("No class called " + ref); } PathQuery pq = new PathQuery(m); pq.addView(refType + ".id"); pq.addConstraint(Constraints.greaterThan(refType + "." + lengthPath, "0")); pq.addConstraint(Constraints.eq(refType + "." + domainPath, domain)); Query q = pathQueryToOSQ(pq); SingletonResults res = im.getObjectStore().executeSingleton(q); if (res.size() == 0) { throw new ResourceNotFoundException("No " + refType + "s on " + domain); } Iterator<Object> it = res.iterator(); while (it.hasNext()) { FastPathObject o = (FastPathObject) it.next(); Map<String, Object> refseq = makeRefSeq(o); addResultItem(refseq, it.hasNext()); } }