use of com.dexels.navajo.document.nanoimpl.XMLElement in project navajo by Dexels.
the class MethodDefinition method parseDef.
public static MethodDefinition parseDef(XMLElement e) {
Map<String, ParameterDefinition> params = new HashMap<>();
String name = (String) e.getAttribute("name");
Vector<XMLElement> paramV = e.getChildren();
for (int i = 0; i < paramV.size(); i++) {
XMLElement c = paramV.get(i);
ParameterDefinition pd = ParameterDefinition.parseDef(c, i);
params.put(pd.getName(), pd);
}
return new MethodDefinition(name, params);
}
use of com.dexels.navajo.document.nanoimpl.XMLElement in project navajo by Dexels.
the class TslMetaDataHandler method addScriptElement.
/**
* @param x
* @param element
*/
private void addScriptElement(XMLElement x, String element) {
XMLElement xn = new CaseSensitiveXMLElement();
xn.setName("script");
x.addChild(xn);
xn.setAttribute("name", element);
addAdapters(xn, element);
addCalls(xn, element);
addCalledBy(xn, element);
addIncludes(xn, element);
addIncomingIncludes(xn, element);
}
use of com.dexels.navajo.document.nanoimpl.XMLElement in project navajo by Dexels.
the class TslMetaDataHandler method addCalls.
private void addCalls(XMLElement xn, String element) {
TreeSet<String> s = callsScriptMap.get(element);
if (s == null) {
return;
}
for (Iterator<String> iter = s.iterator(); iter.hasNext(); ) {
String include = iter.next();
XMLElement xnincl = new CaseSensitiveXMLElement();
xnincl.setName("calls");
xnincl.setAttribute("name", include);
xn.addChild(xnincl);
}
}
use of com.dexels.navajo.document.nanoimpl.XMLElement in project navajo by Dexels.
the class TslMetaDataHandler method parseMetaData.
/**
* @param e
*/
private void parseMetaData(XMLElement e) {
if (!"metadata".equals(e.getName())) {
logger.info("Unknown root tag in metadata: " + e.getName());
return;
}
Vector<XMLElement> v = e.getChildren();
for (Iterator<XMLElement> iter = v.iterator(); iter.hasNext(); ) {
XMLElement element = iter.next();
if (!"script".equals(element.getName())) {
logger.info("Unknown tag within metadata: " + element.getName());
return;
}
String scriptName = element.getStringAttribute("name");
scriptList.add(scriptName);
parseScriptData(scriptName, element);
}
}
use of com.dexels.navajo.document.nanoimpl.XMLElement in project navajo by Dexels.
the class TslMetaDataHandler method addIncomingIncludes.
/**
* @param xn
* @param element
*/
private void addIncomingIncludes(XMLElement xn, String element) {
TreeSet<String> s = includedByScriptMap.get(element);
if (s == null) {
return;
}
for (Iterator<String> iter = s.iterator(); iter.hasNext(); ) {
String include = iter.next();
XMLElement xnincl = new CaseSensitiveXMLElement();
xnincl.setName("includedby");
xnincl.setAttribute("name", include);
xn.addChild(xnincl);
}
}
Aggregations