public boolean visitDynamicsSpecificationNode(DynamicsSpecificationNode node) {
String commonProperties = this.commonProperties(node);
PhysicalQuantity quantity = node.getInitialConditions();
FunctionNode functionNode = node.getDynamics();
String specs = "", function = "";
if (quantity != null) {
AValue value = quantity.getValue();
String unit = null, scale = null;
if (quantity.getUnit() != null) {
unit = quantity.getUnit();
}
if (quantity.getScalingFactor() != null) {
scale = "\"" + quantity.getScalingFactor() + "\"";
}
specs = "\"value\":" + "\"" + value + "\",\"unit\":" + "\"" + unit
+ "\",\"scale\":" + scale + ",";
}
if (functionNode != null) {
String properties = "";
if (functionNode.getArgument() != null) {
List<String> arguments = functionNode.getArgument();
properties = "," + "\"arguments\":{";
for (int index = 0; index < arguments.size(); index++) {
properties = properties.concat("\"" + index + "\":\""
+ arguments.get(index) + "\"");
if (index < (arguments.size() - 1)) {
properties = properties.concat(",");
}
}
properties = properties.concat("}");
}
function = "\"_function\":{" + "\"expression\":" + "\""
+ functionNode.getExpression() + "\"" + properties + "},";
}
_serialized.append("\"" + node.getId() + "\":{" + specs + function
+ commonProperties + "},");