use of com.dexels.navajo.document.navascript.tags.ValidationsTag in project navajo by Dexels.
the class NS3ToNSXML method parseValidations.
private ValidationsTag parseValidations(NS3Compatible parent, XMLElement xe) {
ValidationsTag vt = new ValidationsTag(myNavascript);
vt.addParent(parent);
Vector<XMLElement> children = xe.getChildren();
CheckTag ct = null;
for (XMLElement child : children) {
String name = child.getName();
String content = (child.getContent() != null && !"".equals(child.getContent()) ? child.getContent() : null);
if (name.equals("Checks")) {
return parseValidations(parent, child);
}
if (name.equals("Check")) {
ct = new CheckTag(myNavascript);
vt.addCheck(ct);
parseCheckAttributes(ct, child);
}
}
return vt;
}
use of com.dexels.navajo.document.navascript.tags.ValidationsTag in project navajo by Dexels.
the class NS3ToNSXML method parseXML.
private void parseXML(NS3Compatible parent, XMLElement xe, int level) throws Exception {
if (xe.getAttribute("PROCESSED") != null) {
return;
}
String name = xe.getName();
String content = (xe.getContent() != null && !"".equals(xe.getContent()) ? xe.getContent() : null);
if (name.equals("DebugDefinition")) {
parseHeaderDefinitions(xe);
} else if (name.equals("Validations")) {
ValidationsTag vt = parseValidations(parent, xe);
myNavascript.addValidations(vt);
} else if (name.equals("Var")) {
ParamTag pt = parseVar(parent, xe);
addChildTag(parent, pt);
} else if (name.equals("Message")) {
MessageTag mt = parseMessage(parent, xe);
addChildTag(parent, mt);
} else if (name.equals("ConditionalEmptyMessage")) {
BlockTag mt = parseConditionalBlock(parent, xe, true);
addChildTag(parent, mt);
} else if (name.equals("Loop")) {
LoopTag mt = parseLoop(parent, xe);
addChildTag(parent, mt);
} else if (name.equals("Synchronized")) {
SynchronizedTag st = parseSynchronizedBlock(parent, xe);
addChildTag(parent, st);
} else if (name.equals("Map")) {
MapTag mt = parseMap(parent, xe);
addChildTag(parent, mt);
} else if (name.equals("Break")) {
BreakTag mt = parseBreak(parent, xe);
addChildTag(parent, mt);
} else if (name.equals("Include")) {
IncludeTag it = parseInclude(parent, xe);
addChildTag(parent, it);
} else if (name.equals("Define")) {
DefineTag dt = parseDefine(parent, xe);
addDefine(dt);
} else if (name.equals("Print")) {
DebugTag dt = parsePrint(parent, xe);
addChildTag(parent, dt);
} else if (name.equals("Log")) {
LogTag dt = parseLog(parent, xe);
addChildTag(parent, dt);
} else if (name.equals("Finally")) {
FinallyTag ft = parseFinally(parent, xe);
addChildTag(parent, ft);
} else if (name.equals("Methods")) {
MethodsTag mt = parseMethods(parent, xe);
addChildTag(parent, mt);
} else {
Vector<XMLElement> children = xe.getChildren();
for (XMLElement x : children) {
if (x.getAttribute("PROCESSED") == null) {
parseXML(parent, x, level + 1);
}
}
}
}
Aggregations