From: Peter W. <pw...@us...> - 2006-08-09 19:45:54
|
Update of /cvsroot/cob/COBEditor/src/edu/iastate/ato/po/naming In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv13356/src/edu/iastate/ato/po/naming Modified Files: NamingPolicyFactory.java BasicNamingPolicy.java Log Message: Both naming policies will update the auto_id table Index: BasicNamingPolicy.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/po/naming/BasicNamingPolicy.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** BasicNamingPolicy.java 18 Jul 2006 21:32:41 -0000 1.3 --- BasicNamingPolicy.java 9 Aug 2006 19:45:51 -0000 1.4 *************** *** 1,4 **** --- 1,8 ---- package edu.iastate.ato.po.naming ; + import java.sql.Connection; + + import edu.iastate.ato.po.OntologyEdit; + /** * <p>@author Jie Bao</p> *************** *** 9,14 **** public static String policyName = "Basic Naming Policy" ; ! public BasicNamingPolicy() { enableRename = true ; uniqueRequired = true ; --- 13,22 ---- public static String policyName = "Basic Naming Policy" ; ! Connection db ; ! ! ! public BasicNamingPolicy(Connection db) { + this.db = db; enableRename = true ; uniqueRequired = true ; *************** *** 36,39 **** --- 44,48 ---- public String makeNameWhenSaving(String baseName) { + OntologyEdit.applyID(db, baseName); return baseName ; } Index: NamingPolicyFactory.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/po/naming/NamingPolicyFactory.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NamingPolicyFactory.java 13 Jun 2006 21:55:24 -0000 1.1 --- NamingPolicyFactory.java 9 Aug 2006 19:45:50 -0000 1.2 *************** *** 14,18 **** { Vector<NamingPolicy> allNamingPolicy = new Vector() ; ! allNamingPolicy.add(new BasicNamingPolicy()) ; allNamingPolicy.add(new AutomaticNamingPolicy(db)) ; --- 14,18 ---- { Vector<NamingPolicy> allNamingPolicy = new Vector() ; ! allNamingPolicy.add(new BasicNamingPolicy(db)) ; allNamingPolicy.add(new AutomaticNamingPolicy(db)) ; *************** *** 25,29 **** if(name.equals(BasicNamingPolicy.policyName)) { ! return new BasicNamingPolicy() ; } else if(name.equals(AutomaticNamingPolicy.policyName)) --- 25,29 ---- if(name.equals(BasicNamingPolicy.policyName)) { ! return new BasicNamingPolicy(db) ; } else if(name.equals(AutomaticNamingPolicy.policyName)) |