com.nedap.archie.serializer.adl.rules.FunctionSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aom Show documentation
Show all versions of aom Show documentation
An OpenEHR archetype object model implementation, plus parser
package com.nedap.archie.serializer.adl.rules;
import com.nedap.archie.rules.Expression;
import com.nedap.archie.rules.Function;
import com.nedap.archie.rules.ModelReference;
import com.nedap.archie.serializer.adl.ADLRulesSerializer;
/**
* Created by pieter.bos on 15/05/2017.
*/
public class FunctionSerializer extends RuleElementSerializer {
public FunctionSerializer(ADLRulesSerializer serializer) {
super(serializer);
}
@Override
public void serialize(Function ruleElement) {
builder.append(ruleElement.getFunctionName());
boolean first = true;
builder.append("(");
for(Expression expression:ruleElement.getArguments()) {
if(!first) {
builder.append(", ");
}
serializer.serializeRuleElement(expression);
first = false;
}
builder.append(")");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy