[Swift-commit] r2969 - trunk/src/org/griphyn/vdl/mapping

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Mon Jun 22 07:47:08 CDT 2009


Author: benc
Date: 2009-06-22 07:47:07 -0500 (Mon, 22 Jun 2009)
New Revision: 2969

Modified:
   trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java
Log:
FILENAME logs should only be output for file-mapped types, not for
externals, arrays, structs or primitive types.

Modified: trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java
===================================================================
--- trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java	2009-06-22 12:01:37 UTC (rev 2968)
+++ trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java	2009-06-22 12:47:07 UTC (rev 2969)
@@ -447,10 +447,30 @@
 				// anyway - should perhaps only be trying to map leafnodes?
 				// Mapping
 				// non-leaf stuff is giving wierd paths anyway
+
+// TODO this is perhaps an unpleasant way of finding if this is a file-backed
+// leaf node or not
+				boolean filemapped = true;
+				Type type = this.getType();
+				if(type.getName().equals("external")) {
+					filemapped = false;
+				}
+				if(type.isPrimitive()) {
+					filemapped = false;
+				}
+				if(type.isArray()) {
+					filemapped = false;
+				}
+				if(handles.size()>0) {
+					filemapped = false;
+				}
+
 				try {
-					Object path = m.map(pathFromRoot);
-					logger.info("FILENAME dataset=" + identifier + " filename="
+					if(filemapped) {
+						Object path = m.map(pathFromRoot);
+						logger.info("FILENAME dataset=" + identifier + " filename="
 							+ path);
+					}
 				}
 				catch (Exception e) {
 					logger.info("NOFILENAME dataset=" + identifier);




More information about the Swift-commit mailing list