X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Futil%2FDBRefUtils.java;h=d3788ea1ead1a96fa555c0956214a805c591f7ba;hb=37a5dfc3c72a42689e90ad8a0e118e8855d9868b;hp=86ab201843b94a6509d9ffd877e3d4247b375f50;hpb=869913baf5d81e99c37727bae7ca8652e6abfb8b;p=jalview.git diff --git a/src/jalview/util/DBRefUtils.java b/src/jalview/util/DBRefUtils.java index 86ab201..d3788ea 100755 --- a/src/jalview/util/DBRefUtils.java +++ b/src/jalview/util/DBRefUtils.java @@ -1,32 +1,72 @@ package jalview.util; -import java.util.Vector; -import java.util.Hashtable; +import java.util.*; + +import jalview.datamodel.*; + public class DBRefUtils { /** * Utilities for handling DBRef objects and their collections. */ - public static Vector selectRefs(java.util.Vector dbrefs, String[] sources) { + /** + * + * @param dbrefs Vector of DBRef objects to search + * @param sources String[] array of source DBRef IDs to retrieve + * @return Vector + */ + public static DBRefEntry [] selectRefs(DBRefEntry [] dbrefs, String[] sources) { if (dbrefs==null) return null; if (sources==null) return dbrefs; Hashtable srcs = new Hashtable(); Vector res=new Vector(); + for (int i=0; i0) - return res; + { + DBRefEntry [] reply = new DBRefEntry[res.size()]; + for(int i=0; i