lcsim-contrib/src/main/java/org/lcsim/contrib/Mbussonn
diff -u -r1.1 -r1.2
--- ITupleWrapper.java 9 Jul 2009 00:43:49 -0000 1.1
+++ ITupleWrapper.java 9 Jul 2009 21:46:17 -0000 1.2
@@ -39,6 +39,7 @@
return (Entry) entry.get(name);
}
else{
+ //System.out.println("create column"+name);
Entry newEntry = new Entry();
entry.put(name,newEntry);
return newEntry;
@@ -53,22 +54,26 @@
Set<Number> setOfSize = new HashSet<Number>();
for(Object key: entry.keySet() ){
Entry ent = (Entry) entry.get(key);
+ // System.out.println("key "+key);
setOfSize.add(ent.size());
}
IAnalysisFactory af = IAnalysisFactory.create();
ITree tree = af.createTreeFactory().create();
ITupleFactory tf = af.createTupleFactory(tree);
- System.out.println("set of sizes"+setOfSize);
+ //System.out.println("set of sizes"+setOfSize);
for(Number i : setOfSize){
int ii = i.intValue();
- System.out.println("size = "+ii);
+ //System.out.println("size = "+ii);
String columnString = "int firstcol";
for(Object key: entry.keySet() ){
Entry ent = (Entry) entry.get(key);
- if(ent.size()!=i)continue;
+ if(ent.size()!=ii){
+ // System.out.println("skipping entry "+key+"for number of value "+ii+" because the length is "+ent.size());
+ continue;
+ }
columnString = columnString+","+ent.type()+key;
}
- System.out.println("columns:"+columnString);
+ // System.out.println("dumping columns:"+columnString);
ITuple tuple = tf.create("tuple"+i, "MyNtule"+i, columnString);
@@ -138,7 +143,7 @@
}
if( type.equals(newtype) )
{
- System.out.println("adding "+value+" for type"+newtype);
+ // System.out.println("adding "+value+" for type"+newtype);
list.add(value);
}
else
@@ -148,7 +153,7 @@
}
}
public void description(){
- System .out.println(" array:"+list);
+ System .out.println(" array:"+list.size()+" element 0 : "+list.get(0));
}
}