r4898 - trunk/lib/style/skins/first
leinfelder at ecoinformatics.org
leinfelder at ecoinformatics.org
Thu Apr 2 17:45:32 PDT 2009
Author: leinfelder
Date: 2009-04-02 17:45:32 -0700 (Thu, 02 Apr 2009)
New Revision: 4898
Modified:
trunk/lib/style/skins/first/download.jsp
Log:
do not duplicate the true/false indicators for the metadata vocab/value matrix
Modified: trunk/lib/style/skins/first/download.jsp
===================================================================
--- trunk/lib/style/skins/first/download.jsp 2009-04-03 00:40:04 UTC (rev 4897)
+++ trunk/lib/style/skins/first/download.jsp 2009-04-03 00:45:32 UTC (rev 4898)
@@ -273,6 +273,7 @@
vocabRow.add(key);
}
//go through the questions now, again
+ String lastPivotValue = "";
headerIter = header.iterator();
while (headerIter.hasNext()) {
String column = (String) headerIter.next();
@@ -285,15 +286,22 @@
if (pivotValue == null) {
continue;
}
- //check to see if this question has that keyword
- List names = (List) vocabNames.get(pivotValue);
- List values = (List) vocabValues.get(pivotValue);
- if (names != null && names.indexOf(vocabName) > -1 && names.indexOf(vocabName) == values.indexOf(vocabValue) ) {
- vocabRow.add("true");
+ //check to not duplicate values
+ if (pivotValue.equals(lastPivotValue)) {
+ vocabRow.add(null);
}
else {
- vocabRow.add("false");
+ //check to see if this question has that keyword
+ List names = (List) vocabNames.get(pivotValue);
+ List values = (List) vocabValues.get(pivotValue);
+ if (names != null && names.indexOf(vocabName) > -1 && names.indexOf(vocabName) == values.indexOf(vocabValue) ) {
+ vocabRow.add("true");
+ }
+ else {
+ vocabRow.add("false");
+ }
}
+ lastPivotValue = pivotValue;
}
//put the row on
vocabTable.add(vocabRow.toArray(new String[0]));
More information about the Metacat-cvs
mailing list