From: <ap...@vh...> - 2006-06-09 16:12:25
|
Author: apevec Date: 2006-06-09 18:08:05 +0200 (Fri, 09 Jun 2006) New Revision: 1152 Modified: trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/AutoCategorisation.java Log: skip manually assigned LGCL/IPSV Modified: trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/AutoCategorisation.java =================================================================== --- trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/AutoCategorisation.java 2006-06-08 23:32:16 UTC (rev 1151) +++ trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/AutoCategorisation.java 2006-06-09 16:08:05 UTC (rev 1152) @@ -326,15 +326,18 @@ // assign all new auto-derived terms, unless it's already assigned // prefer manual IPSV/LGCL over auto IPSV/LGCL, deriving GCL, LGSL, LGDL // check existing manual terms - DataCollection dc = SessionManager.getSession().retrieve(Term.BASE_DATA_OBJECT_TYPE); - dc.addEqualsFilter("model.id", manualCategories); - dc.addFilter("domain.key IN ('IPSV','LGCL')"); boolean foundIPSVLGCL = false; - while (dc.next()) { - foundIPSVLGCL = true; - if (isDebug) { - out("manual IPSV/LGCL found"); + if (!manualCategories.isEmpty()) { + DataCollection dc = SessionManager.getSession().retrieve(Term.BASE_DATA_OBJECT_TYPE); + dc.addEqualsFilter("model.id", manualCategories); + dc.addFilter("domain.key IN ('IPSV','LGCL')"); + while (!foundIPSVLGCL && dc.next()) { + foundIPSVLGCL = true; + if (isDebug) { + out("manual IPSV/LGCL found"); + } } + dc.close(); } if (!foundIPSVLGCL) { for (Iterator iter=terms.iterator();iter.hasNext();) { @@ -383,8 +386,12 @@ out("isAuto=TRUE for new categoryID="+categoryID+"/"+item); } } + } else { + // TODO derive other domains from assigned terms using mappings + if (isVerbose) { + out("derive from manual LGCL/IPSV"); + } } - // TODO derive other domains from assigned terms using mappings } else { if (isVerbose) { System.out |