001: /*
002: * JFolder, Copyright 2001-2006 Gary Steinmetz
003: *
004: * Distributable under LGPL license.
005: * See terms of license at gnu.org.
006: */
007:
008: package org.jfolder.common.function.v1;
009:
010: //base classes
011:
012: //project specific classes
013: import org.jfolder.common.SelfArgumentlessConstructor;
014: import org.jfolder.common.StandardDataTypes;
015: import org.jfolder.common.UnexpectedSystemException;
016: import org.jfolder.common.function.BaseCommonFunctionCompatibilityTag;
017: import org.jfolder.common.function.WebPageTagInstanceViewContext;
018: import org.jfolder.common.function.WebPageTagInstanceViewContextInfo;
019: import org.jfolder.common.tagging.AppraiseConceptTagContext;
020: import org.jfolder.common.tagging.CompoundConceptTagConstraintContext;
021: import org.jfolder.common.tagging.ConceptTagCharacteristic;
022: import org.jfolder.common.tagging.ConceptTagCharacteristicHolder;
023: import org.jfolder.common.tagging.ConceptTagConstraint;
024: import org.jfolder.common.tagging.ConceptTagConstraintHolder;
025: import org.jfolder.common.tagging.ConceptTagConstraintTemplate;
026: import org.jfolder.common.tagging.ConceptTagFlagsHelper;
027: import org.jfolder.common.tagging.ConceptTagHelper;
028: import org.jfolder.common.tagging.DetermineClassConceptTagContext;
029: import org.jfolder.common.tagging.DetermineValueAndClassConceptTagContext;
030: import org.jfolder.common.tagging.DetermineValueAndClassConceptTagException;
031: import org.jfolder.common.tagging.DynamicConceptTagConstraintContext;
032: import org.jfolder.common.tagging.DynamicConceptTagValidator;
033: import org.jfolder.common.tagging.InitializeConceptTagContext;
034: import org.jfolder.common.tagging.ReturnableConceptTag;
035: import org.jfolder.common.tagging.SelectionCriteriaForReturnableConceptTag;
036: import org.jfolder.common.tagging.StaticConceptTagConstraintContext;
037: import org.jfolder.common.tagging.StudioConceptTagCreParInfoContext;
038: import org.jfolder.common.tagging.StudioConceptTagInstanceInfoContext;
039: import org.jfolder.common.tagging.StudioConceptTagTypeInfoContext;
040: import org.jfolder.common.tagging.ValueAndClassForConceptTag;
041: import org.jfolder.common.utils.misc.MiscHelper;
042:
043: //other classes
044:
045: public class CommonFunctionLogStructIfElseIfElseTag extends
046: BaseCommonFunctionCompatibilityTag implements
047: SelfArgumentlessConstructor {
048:
049: //characteristics
050: //
051: private ConceptTagCharacteristic ifCtchar = null;
052: private ConceptTagCharacteristic elseIfCtchar = null;
053: private ConceptTagCharacteristic elseCtchar = null;
054:
055: //
056: //if details
057: private final static String IF_CTCON = "if";
058: private final static String IF_TITLE = "If";
059: private final static String IF_SHORT_DESCRIPTION = "If";
060: //
061: //condition of if details
062: private final static String IF_CTCON_CONDITION_CTCTEMP = "condition";
063: private final static String IF_CTCON_CONDITION_TITLE = "Condition";
064: private final static String IF_CTCON_CONDITION_SHORT_DESCRIPTION = "Condition";
065: //
066: //action of if details
067: private final static String IF_CTCON_ACTION_CTCTEMP = "action";
068: private final static String IF_CTCON_ACTION_TITLE = "Action";
069: private final static String IF_CTCON_ACTION_SHORT_DESCRIPTION = "Action";
070: //
071: //
072: //else-if details
073: private final static String ELSE_IF_CTCON = "else-if";
074: private final static String ELSE_IF_TITLE = "Else If";
075: private final static String ELSE_IF_SHORT_DESCRIPTION = "Else If";
076: //
077: //condition of else-if details
078: private final static String ELSE_IF_CTCON_CONDITION_CTCTEMP = "condition";
079: private final static String ELSE_IF_CTCON_CONDITION_TITLE = "Condition";
080: private final static String ELSE_IF_CTCON_CONDITION_SHORT_DESCRIPTION = "Condition";
081: //
082: //action of else-if details
083: private final static String ELSE_IF_CTCON_ACTION_CTCTEMP = "action";
084: private final static String ELSE_IF_CTCON_ACTION_TITLE = "Action";
085: private final static String ELSE_IF_CTCON_ACTION_SHORT_DESCRIPTION = "Action";
086: //
087:
088: //
089: //
090: //
091: //
092: //else details
093: private final static String ELSE_CTCON = "else";
094: private final static String ELSE_TITLE = "Else";
095: private final static String ELSE_SHORT_DESCRIPTION = "Else";
096:
097: public void initialize(InitializeConceptTagContext inIctc) {
098:
099: MiscHelper
100: .println("ComFuncIfElseIfElse else-if and else not Impl");
101:
102: //
103: ConceptTagConstraintHolder rootCtconh = ConceptTagConstraintHolder
104: .newInstance(inIctc);
105:
106: //
107: //
108: //
109: //
110: //constrain "if"
111: ConceptTagConstraint ifCtcon = ConceptTagConstraint
112: .newInstance(IF_CTCON, rootCtconh);
113: //
114: ifCtcon.setTitle(IF_TITLE);
115: ifCtcon.setShortDescription(IF_SHORT_DESCRIPTION);
116: //
117: ifCtcon
118: .registerPostValidator(PostConstraintValidatorForIterator
119: .newInstance());
120: //
121: ifCtcon.setMinimumLength(1);
122: ifCtcon.setMaximumLength(1);
123: //
124: CompoundConceptTagConstraintContext ifCctcc = CompoundConceptTagConstraintContext
125: .newInstance(ifCtcon);
126: ifCctcc.addDefaultValue();
127: //
128: //
129: //constrain "condition" of "if"
130: ConceptTagConstraintTemplate ifCtconConditionCtctemp = ConceptTagConstraintTemplate
131: .newInstance(IF_CTCON_CONDITION_CTCTEMP, ifCctcc);
132: ifCtconConditionCtctemp.setTitle(IF_CTCON_CONDITION_TITLE);
133: ifCtconConditionCtctemp
134: .setShortDescription(IF_CTCON_CONDITION_SHORT_DESCRIPTION);
135: ifCtconConditionCtctemp.setMinimumLength(1);
136: ifCtconConditionCtctemp.setMaximumLength(1);
137: //
138: DynamicConceptTagConstraintContext ifCtconConditionDctcc = DynamicConceptTagConstraintContext
139: .newInstance(ifCtconConditionCtctemp);
140: ifCtconConditionDctcc.getValidator().allowReturnOfOnlyBoolean();
141: ifCtconConditionDctcc.getValidator()
142: .filterDirectChildOfRootAndHtml();
143: //
144: //constrain "action" of "if"
145: ConceptTagConstraintTemplate ifCtconActionCtctemp = ConceptTagConstraintTemplate
146: .newInstance(IF_CTCON_ACTION_CTCTEMP, ifCctcc);
147: ifCtconActionCtctemp.setTitle(IF_CTCON_ACTION_TITLE);
148: ifCtconActionCtctemp
149: .setShortDescription(IF_CTCON_ACTION_SHORT_DESCRIPTION);
150: //
151: ifCtconActionCtctemp.inheritFromParent(inIctc);
152: //
153: //ifCtconActionCtctemp.setMinimumLength(0);
154: //ifCtconActionCtctemp.setLengthUnbounded(true);
155: //
156: //DynamicConceptTagConstraintContext ifCtconActionDctcc =
157: // DynamicConceptTagConstraintContext.newInstance(
158: // ifCtconActionCtctemp);
159: //DynamicConceptTagValidator ifCtconActionDctv =
160: // ifCtconActionDctcc.getValidator();
161: //ifCtconActionDctv.allowReturnOfAnythingIncludingNothing();
162: //ifCtconActionDctv.filterDirectChildOfRootAndHtml();
163: //
164: //StaticConceptTagConstraintContext ifCtconActionSctcc =
165: // StaticConceptTagConstraintContext.newInstance(
166: // ifCtconActionCtctemp);
167: //
168:
169: //
170: //
171: //
172: //
173: //
174: //constrain "else-if"
175: ConceptTagConstraint elseIfCtcon = ConceptTagConstraint
176: .newInstance(ELSE_IF_CTCON, rootCtconh);
177: //
178: elseIfCtcon.setTitle(ELSE_IF_TITLE);
179: elseIfCtcon.setShortDescription(ELSE_IF_SHORT_DESCRIPTION);
180: //
181: elseIfCtcon
182: .registerPostValidator(PostConstraintValidatorForIterator
183: .newInstance());
184: //
185: elseIfCtcon.setMinimumLength(0);
186: elseIfCtcon.setLengthUnbounded(true);
187: //
188: CompoundConceptTagConstraintContext elseIfCctcc = CompoundConceptTagConstraintContext
189: .newInstance(elseIfCtcon);
190: //elseIfCctcc.addDefaultValue();
191: //
192: //constrain "condition" of "else-if"
193: ConceptTagConstraintTemplate elseIfCtconConditionCtctemp = ConceptTagConstraintTemplate
194: .newInstance(ELSE_IF_CTCON_CONDITION_CTCTEMP,
195: elseIfCctcc);
196: elseIfCtconConditionCtctemp
197: .setTitle(ELSE_IF_CTCON_CONDITION_TITLE);
198: elseIfCtconConditionCtctemp
199: .setShortDescription(ELSE_IF_CTCON_CONDITION_SHORT_DESCRIPTION);
200: elseIfCtconConditionCtctemp.setMinimumLength(1);
201: elseIfCtconConditionCtctemp.setMaximumLength(1);
202: //
203: DynamicConceptTagConstraintContext elseIfCtconConditionDctcc = DynamicConceptTagConstraintContext
204: .newInstance(elseIfCtconConditionCtctemp);
205: DynamicConceptTagValidator elseIfCtconCtonditionDctv = elseIfCtconConditionDctcc
206: .getValidator();
207: elseIfCtconCtonditionDctv.allowReturnOfOnlyBoolean();
208: elseIfCtconCtonditionDctv.filterDirectChildOfRootAndHtml();
209: //
210: //constrain "action" of "else-if"
211: ConceptTagConstraintTemplate elseIfCtconActionCtctemp = ConceptTagConstraintTemplate
212: .newInstance(ELSE_IF_CTCON_ACTION_CTCTEMP, elseIfCctcc);
213: elseIfCtconActionCtctemp.setTitle(ELSE_IF_CTCON_ACTION_TITLE);
214: elseIfCtconActionCtctemp
215: .setShortDescription(ELSE_IF_CTCON_ACTION_SHORT_DESCRIPTION);
216: //
217: elseIfCtconActionCtctemp.inheritFromParent(inIctc);
218: //elseIfCtconActionCtctemp.setMinimumLength(0);
219: //elseIfCtconActionCtctemp.setLengthUnbounded(true);
220: //
221: //DynamicConceptTagConstraintContext elseIfCtconActionDctcc =
222: // DynamicConceptTagConstraintContext.newInstance(
223: // elseIfCtconActionCtctemp);
224: //DynamicConceptTagValidator elseIfCtconActionDctv =
225: // elseIfCtconActionDctcc.getValidator();
226: //elseIfCtconActionDctv.allowReturnOfAnythingIncludingNothing();
227: //elseIfCtconActionDctv.filterDirectChildOfRootAndHtml();
228: //
229: //StaticConceptTagConstraintContext elseIfCtconActionSctcc =
230: // StaticConceptTagConstraintContext.newInstance(
231: // elseIfCtconActionCtctemp);
232:
233: //
234: //
235: //
236: //constrain "else"
237: ConceptTagConstraint elseCtcon = ConceptTagConstraint
238: .newInstance(ELSE_CTCON, rootCtconh);
239: elseCtcon.setTitle(ELSE_TITLE);
240: elseCtcon.setShortDescription(ELSE_SHORT_DESCRIPTION);
241: //
242: elseCtcon.inheritFromParent(inIctc);
243: //
244: //DynamicConceptTagConstraintContext elseDctcc =
245: // DynamicConceptTagConstraintContext.newInstance(elseCtcon);
246: //DynamicConceptTagValidator elseDctv =
247: // elseDctcc.getValidator();
248: //elseDctv.allowReturnOfAnythingIncludingNothing();
249: //elseDctv.filterDirectChildOfRootAndHtml();
250: //
251: //StaticConceptTagConstraintContext elseSctcc =
252: // StaticConceptTagConstraintContext.newInstance(elseCtcon);
253:
254: //
255: inIctc.initialize();
256:
257: //initialize characteristics
258: this .ifCtchar = ifCtcon.getCharacteristic();
259: this .elseIfCtchar = elseIfCtcon.getCharacteristic();
260: this .elseCtchar = elseCtcon.getCharacteristic();
261: }
262:
263: public void appraise(AppraiseConceptTagContext inActc) {
264:
265: if (inActc instanceof StudioConceptTagInstanceInfoContext) {
266:
267: StudioConceptTagInstanceInfoContext sctiic = (StudioConceptTagInstanceInfoContext) inActc;
268:
269: sctiic.setInstanceTitle("If-ElseIf-Else");
270: sctiic.setInstanceDescription("If-ElseIf-Else");
271: } else if (inActc instanceof StudioConceptTagTypeInfoContext) {
272:
273: StudioConceptTagTypeInfoContext scttic = (StudioConceptTagTypeInfoContext) inActc;
274:
275: scttic.setTypeTitle("If-ElseIf-Else");
276: scttic.setTypeDescription("If-ElseIf-Else");
277: } else if (inActc instanceof WebPageTagInstanceViewContext) {
278:
279: WebPageTagInstanceViewContext wptivc = (WebPageTagInstanceViewContext) inActc;
280:
281: WebPageTagInstanceViewContextInfo info = wptivc
282: .getInfoAsIterativeNonHtml();
283: //
284: //
285: //info for if
286: WebPageTagInstanceViewContextInfo ifStartInfo[] = new WebPageTagInstanceViewContextInfo[1];
287: WebPageTagInstanceViewContextInfo ifMiddleInfo[] = new WebPageTagInstanceViewContextInfo[1];
288: WebPageTagInstanceViewContextInfo ifEndInfo[] = new WebPageTagInstanceViewContextInfo[1];
289: //
290: if (this .ifCtchar.getValueLength() > 0
291: && this .ifCtchar.isHolderWithoutConceptTag(0,
292: inActc)) {
293: //
294: info.createIterativeSubParts(ifStartInfo, ifMiddleInfo,
295: ifEndInfo, this .ifCtchar, 0);
296: (ifStartInfo[0]).setNonHtmlContent("if (", ") {");
297: } else {
298: info.createIterativeSubParts(ifStartInfo, ifMiddleInfo,
299: ifEndInfo, IF_CTCON);
300: (ifStartInfo[0]).setNonHtmlContent(
301: "if (Click Here To Create", ") {");
302: }
303: //
304: //(ifStartInfo[0]).setEndContent(") {");
305: if (this .ifCtchar.getValueLength() > 0
306: && this .ifCtchar.isHolderWithoutConceptTag(0,
307: inActc)) {
308: //
309: ConceptTagCharacteristicHolder nextIfCtcharh = this .ifCtchar
310: .getValueAsHolder(0, inActc);
311: //
312: //
313: //
314: //
315: ConceptTagCharacteristic nextConditionCtchar = nextIfCtcharh
316: .getCharacteristic(IF_CTCON_CONDITION_CTCTEMP);
317: if (nextConditionCtchar.getValueLength() > 0) {
318: WebPageTagInstanceViewContext
319: .displayView(nextConditionCtchar,
320: ifStartInfo[0], wptivc);
321: } else {
322: WebPageTagInstanceViewContextInfo emptyConditionInfo = (ifStartInfo[0])
323: .createNonHtmlInfo(IF_CTCON_CONDITION_CTCTEMP);
324: emptyConditionInfo
325: .setNonHtmlContent("No Condition - Click Here To Create");
326: }
327: //
328: //
329: //
330: //
331: //
332: //
333: ConceptTagCharacteristic nextActionCtchar = nextIfCtcharh
334: .getCharacteristic(IF_CTCON_ACTION_CTCTEMP);
335: if (nextActionCtchar.getValueLength() > 0) {
336: WebPageTagInstanceViewContext.displayView(
337: nextActionCtchar, ifMiddleInfo[0], wptivc);
338: } else {
339: WebPageTagInstanceViewContextInfo emptyActionInfo = (ifMiddleInfo[0])
340: .createNonHtmlInfo(IF_CTCON_ACTION_CTCTEMP);
341: emptyActionInfo
342: .setNonHtmlContent("No Action - Click Here To Create");
343: }
344: } else {
345:
346: }
347: (ifEndInfo[0]).setNonHtmlContent("}");
348: //
349: //
350: //
351: //
352: //
353: //
354: //
355: //
356: if (this .elseIfCtchar.getValueLength() > 0) {
357: for (int i = 0; i < this .elseIfCtchar.getValueLength(); i++) {
358: if (this .elseIfCtchar.isHolderWithoutConceptTag(i,
359: inActc)) {
360: //
361: ConceptTagCharacteristicHolder nextElseIfCtcharh = this .elseIfCtchar
362: .getValueAsHolder(i, inActc);
363: //
364: //
365: //ConceptTa
366: //
367: //info for else-if
368: WebPageTagInstanceViewContextInfo elseIfStartInfo[] = new WebPageTagInstanceViewContextInfo[1];
369: WebPageTagInstanceViewContextInfo elseIfMiddleInfo[] = new WebPageTagInstanceViewContextInfo[1];
370: WebPageTagInstanceViewContextInfo elseIfEndInfo[] = new WebPageTagInstanceViewContextInfo[1];
371: info.createIterativeSubParts(elseIfStartInfo,
372: elseIfMiddleInfo, elseIfEndInfo,
373: this .elseIfCtchar, i);
374: //
375:
376: //
377: (elseIfStartInfo[0]).setNonHtmlContent(
378: "else if (", ") {");
379: //(elseIfStartInfo[0]).setEndContent(") {");
380: //
381: //
382: //
383: //
384: //
385: //
386: //
387: //
388: ConceptTagCharacteristic nextConditionCtchar = nextElseIfCtcharh
389: .getCharacteristic(ELSE_IF_CTCON_CONDITION_CTCTEMP);
390: if (nextConditionCtchar.getValueLength() > 0) {
391: WebPageTagInstanceViewContext.displayView(
392: nextConditionCtchar,
393: elseIfStartInfo[0], wptivc);
394: } else {
395: WebPageTagInstanceViewContextInfo emptyConditionInfo = (elseIfStartInfo[0])
396: .createNonHtmlInfo(ELSE_IF_CTCON_CONDITION_CTCTEMP);
397: emptyConditionInfo
398: .setNonHtmlContent("No Condition - Click Here To Create");
399: }
400: //
401: //
402: //
403: ConceptTagCharacteristic nextActionCtchar = nextElseIfCtcharh
404: .getCharacteristic(ELSE_IF_CTCON_ACTION_CTCTEMP);
405: if (nextActionCtchar.getValueLength() > 0) {
406: WebPageTagInstanceViewContext.displayView(
407: nextActionCtchar,
408: elseIfMiddleInfo[0], wptivc);
409: } else {
410: WebPageTagInstanceViewContextInfo emptyActionInfo = (elseIfMiddleInfo[0])
411: .createNonHtmlInfo(ELSE_IF_CTCON_ACTION_CTCTEMP);
412: emptyActionInfo
413: .setNonHtmlContent("No Action - Click Here To Create");
414: }
415: //
416: //
417: //
418: //
419: //
420: (elseIfEndInfo[0]).setNonHtmlContent("}");
421: }
422: }
423:
424: } else {
425: //
426: WebPageTagInstanceViewContextInfo elseIfStartInfo[] = new WebPageTagInstanceViewContextInfo[1];
427: WebPageTagInstanceViewContextInfo elseIfMiddleInfo[] = new WebPageTagInstanceViewContextInfo[1];
428: WebPageTagInstanceViewContextInfo elseIfEndInfo[] = new WebPageTagInstanceViewContextInfo[1];
429: info.createIterativeSubParts(elseIfStartInfo,
430: elseIfMiddleInfo, elseIfEndInfo, ELSE_IF_CTCON);
431: //
432: (elseIfStartInfo[0]).setNonHtmlContent(
433: "else if (Click Here To Add 'Else If'", ") {");
434: //(elseIfStartInfo[0]).setEndContent(") {");
435: (elseIfEndInfo[0]).setNonHtmlContent("}");
436: }
437: //
438: //
439: //
440: //
441: //
442: //
443: //
444: if (this .elseCtchar.getValueLength() > 0) {
445: //info for else
446: WebPageTagInstanceViewContextInfo elseStartInfo[] = new WebPageTagInstanceViewContextInfo[1];
447: WebPageTagInstanceViewContextInfo elseMiddleInfo[] = new WebPageTagInstanceViewContextInfo[1];
448: WebPageTagInstanceViewContextInfo elseEndInfo[] = new WebPageTagInstanceViewContextInfo[1];
449: info.createIterativeSubParts(elseStartInfo,
450: elseMiddleInfo, elseEndInfo);
451: //,
452: //this.elseCtchar, 0);
453: //
454: (elseStartInfo[0]).setNonHtmlContent("else {");
455: WebPageTagInstanceViewContext.displayView(
456: this .elseCtchar, elseMiddleInfo[0], wptivc);
457: (elseEndInfo[0]).setNonHtmlContent("}");
458: } else {
459: //
460: WebPageTagInstanceViewContextInfo elseStartInfo[] = new WebPageTagInstanceViewContextInfo[1];
461: WebPageTagInstanceViewContextInfo elseMiddleInfo[] = new WebPageTagInstanceViewContextInfo[1];
462: WebPageTagInstanceViewContextInfo elseEndInfo[] = new WebPageTagInstanceViewContextInfo[1];
463: info.createIterativeSubParts(elseStartInfo,
464: elseMiddleInfo, elseEndInfo);
465: //
466: (elseStartInfo[0]).setNonHtmlContent("else", " {");
467: //
468: //
469: WebPageTagInstanceViewContextInfo emptyActionInfo = (elseMiddleInfo[0])
470: .createNonHtmlInfo(ELSE_CTCON);
471: emptyActionInfo
472: .setNonHtmlContent("No Action - Click Here To Create");
473: //
474: //
475: //(elseStartInfo[0]).setEndContent(") {");
476: (elseEndInfo[0]).setNonHtmlContent("}");
477: }
478: //
479: } else if (inActc instanceof SelectionCriteriaForReturnableConceptTag) {
480:
481: SelectionCriteriaForReturnableConceptTag scfrct = (SelectionCriteriaForReturnableConceptTag) inActc;
482:
483: scfrct.canReturnNothing();
484: scfrct.declareFormatAsInherit();
485: ConceptTagFlagsHelper.assertCanBeIterativeStructure(scfrct);
486: } else if (inActc instanceof StudioConceptTagCreParInfoContext) {
487:
488: StudioConceptTagCreParInfoContext scpc = (StudioConceptTagCreParInfoContext) inActc;
489: }
490: }
491:
492: public void determineValueAndClass(
493: DetermineValueAndClassConceptTagContext inDvacctc) {
494:
495: try {
496:
497: boolean correctBlockFound = false;
498:
499: //if
500: //
501: ConceptTagCharacteristicHolder ifCtcharh = this .ifCtchar
502: .getValueAsHolder(0, inDvacctc);
503: //
504: ConceptTagCharacteristic ifConditionCtchar = ifCtcharh
505: .getCharacteristic(IF_CTCON_CONDITION_CTCTEMP);
506: //
507: ValueAndClassForConceptTag ifConditionVacfct = ifConditionCtchar
508: .getDetermineValueAndClass(0, inDvacctc);
509: Boolean ifConditionResult = ((Boolean) ifConditionVacfct
510: .getValue());
511: //
512: if (ifConditionResult.booleanValue()) {
513: ConceptTagCharacteristic ifActionCtchar = ifCtcharh
514: .getCharacteristic(IF_CTCON_ACTION_CTCTEMP);
515: ifActionCtchar.processIterativeStructure(inDvacctc);
516: correctBlockFound = true;
517: }
518:
519: //else if
520: //
521: int icount = this .elseIfCtchar.getValueLength();
522: for (int i = 0; i < icount && !correctBlockFound; i++) {
523: //
524: ConceptTagCharacteristicHolder elseIfCtcharh = this .elseIfCtchar
525: .getValueAsHolder(i, inDvacctc);
526: //
527: //
528: ConceptTagCharacteristic elseIfConditionCtchar = elseIfCtcharh
529: .getCharacteristic(ELSE_IF_CTCON_CONDITION_CTCTEMP);
530: //
531: ValueAndClassForConceptTag elseIfConditionVacfct = elseIfConditionCtchar
532: .getDetermineValueAndClass(0, inDvacctc);
533: Boolean elseIfConditionResult = ((Boolean) elseIfConditionVacfct
534: .getValue());
535: //
536: if (elseIfConditionResult.booleanValue()) {
537: ConceptTagCharacteristic elseIfActionCtchar = elseIfCtcharh
538: .getCharacteristic(ELSE_IF_CTCON_ACTION_CTCTEMP);
539: elseIfActionCtchar
540: .processIterativeStructure(inDvacctc);
541: correctBlockFound = true;
542: }
543: }
544:
545: //
546: //else
547: if (!correctBlockFound) {
548: this .elseCtchar.processIterativeStructure(inDvacctc);
549: }
550:
551: inDvacctc
552: .setDetermineValueAndClass(ValueAndClassForConceptTag
553: .newNothing());
554: } catch (DetermineValueAndClassConceptTagException dvaccte) {
555: inDvacctc.setDetermineException(dvaccte);
556: }
557: }
558:
559: public void determineClass(DetermineClassConceptTagContext inDcctc) {
560: inDcctc.setDetermineClass(StandardDataTypes.getNothingClass());
561: }
562:
563: public Object createUninitializedSelf() {
564: return new CommonFunctionLogStructIfElseIfElseTag();
565: }
566: }
|