Bug #1241
closedSearch Results Data/Nodata icons not working for EML2
0%
Description
In the search results dialog, the icons on the left showing "has data" (red
icon) or "description only" (blue icon) always show blue for eml2 packages, even
if they have data. This is because the code in ResultSet.java is still
Beta6-specific.
Also need to check other classes in query package to ensure no beta 6 dependencies
Suggested fix:
1) pull this eml-verion-specific code into the eml-verion-specific datapackage
object, and access it via a static method (public static boolean hasData, so an
entire datapackage doesn't need to be instantiated to call it (since we're only
looking at search results, not opening the entire packages yet).
2) In DataPackageFactory, factor our the code that determines doctype (or eml
version) into a public method, so the resultset can call this method and pass it
the xml file in question, eg:
public static String getDPInstanceNameForDataPackage(xmlDocToInspect)
The method will return the string name of the correct datapackage class version
(eg "com.edu.ucsb.morpho.datapackage.EML200DataPAckage.java"), so the resultset
can do a class.forName() and get the datapackage class to call the
above-mentioned static method.
Related issues