This commit is contained in:
Kathy Ruffing 2010-10-25 17:20:01 +00:00
parent 84a519279d
commit 17476e9cdd

View File

@ -132,6 +132,10 @@ namespace DataLoader
if (dr2 != null) if (dr2 != null)
{ {
string thekey2 = dr2["TONUMBER"].ToString() + "|" + dr2["TOSEQUENCE"].ToString(); string thekey2 = dr2["TONUMBER"].ToString() + "|" + dr2["TOSEQUENCE"].ToString();
// Range transitions that are type 2 are called 'and' transitions. These should extend to the
// last sibling. In data, these are represented with the SQL database field in the transitions
// table 'IsRange' == 2, and the toid == rangeid. In the content record, the link is
// TransitionRange:[type] [tranid] [toid] [rangeid] -> and the toid == rangeid
if (itype == 2) if (itype == 2)
{ {
if (dr["TOSEQUENCE"].ToString().Length > 3 && if (dr["TOSEQUENCE"].ToString().Length > 3 &&
@ -167,7 +171,12 @@ namespace DataLoader
Transition tr = null; Transition tr = null;
try try
{ {
tr = Transition.New(fromCon, toItem, toItem2, itype, ci!=null?ci.ToString():null, dts, userid); int isRange = 0;
if (toItem.ItemID != toItem2.ItemID)
isRange = 1;
else if (itype == 2)
isRange = 2;
tr = Transition.New(fromCon, toItem, toItem2, isRange, itype, ci != null ? ci.ToString() : null, dts, userid);
//if (otranskey != null) //if (otranskey != null)
// tr.MyZTransition.Oldto = otranskey; // info to finish outside transition processing later // tr.MyZTransition.Oldto = otranskey; // info to finish outside transition processing later
//else //else
@ -184,7 +193,7 @@ namespace DataLoader
log.ErrorFormat("{0}\r\n\r\n{1}", ex.Message, ex.InnerException); log.ErrorFormat("{0}\r\n\r\n{1}", ex.Message, ex.InnerException);
} }
string results = null; string results = null;
if (toItem.ItemID == toItem2.ItemID) if (toItem.ItemID == toItem2.ItemID && itype != 2)
results = string.Format(@"\v <START]\v0 (Resolved Transition Text)\v #Link:Transition:{0} {1} {2}[END>\v0 ", tr.TranType, tr.TransitionID, tr.ToID); results = string.Format(@"\v <START]\v0 (Resolved Transition Text)\v #Link:Transition:{0} {1} {2}[END>\v0 ", tr.TranType, tr.TransitionID, tr.ToID);
else else
results = string.Format(@"\v <START]\v0 (Resolved Transition Text)\v #Link:TransitionRange:{0} {1} {2} {3}[END>\v0 ", tr.TranType, tr.TransitionID, tr.ToID, tr.RangeID); results = string.Format(@"\v <START]\v0 (Resolved Transition Text)\v #Link:TransitionRange:{0} {1} {2} {3}[END>\v0 ", tr.TranType, tr.TransitionID, tr.ToID, tr.RangeID);