public void serialize(String filename){ Files.writeObjectToFile(this, new File(filename)); } public static Table deserialize(String filename){
public static void doIt(String file, String format, String relation, String type, String nsFilter, boolean noExpand){ Map<String, SortedSet<String>> dbdown = new Hierarchy().getHierarchyDown(file, format, relation, noExpand); Files.writeObjectToFile(dbdown, new File(file+".sub.ser")); Map<String, SortedSet<String>> dbup = new Hierarchy().getHierarchyUp(file, format, relation, noExpand); Files.writeObjectToFile(dbup, new File(file+".super.ser")); dbup = null; List<Count> countdb = c.countInstances(type, nsFilter); toFile(countdb, file+".count"); toFile(expand(countdb, dbdown), file+".expanded.count"); Files.writeObjectToFile(purge(countdb, dbdown), new File( file+".purged.ser")); }