com.nedap.archie.serializer.adl.rules.ConstantSerializer 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.Constant;
import com.nedap.archie.rules.ExpressionType;
import com.nedap.archie.serializer.adl.ADLRulesSerializer;
import com.nedap.archie.rules.ReferenceType;
/**
* Created by pieter.bos on 15/06/16.
*/
public class ConstantSerializer extends RuleElementSerializer> {
public ConstantSerializer(ADLRulesSerializer adlRulesSerializer) {
super(adlRulesSerializer);
}
@Override
public void serialize(Constant> ruleElement) {
if(ruleElement.getType() == ExpressionType.STRING) {
builder.append("\"");
builder.append(ruleElement.getValue());
builder.append("\"");
} else {
builder.append(ruleElement.getValue());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy