Search Results Data/Nodata icons not working for EML2
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
Also need to check other classes in query package to ensure no beta 6 dependencies
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.
#1 Updated by Dan Higgins over 15 years ago
The problem here is complicated by the fact that the resultSet returned by a
metacat query does not automatically return information about the existence of
data in the package. Previously, the triples (which are part of the ResultSet)
were examined for a link to a datafile.
To handle the case for eml2 without changing metacat, we will need to add
returnField parameters to the query.