com.nedap.archie.serializer.adl.constraints.CComplexObjectProxySerializer 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.constraints;
import com.nedap.archie.aom.CComplexObjectProxy;
import com.nedap.archie.serializer.adl.ADLDefinitionSerializer;
/**
* @author markopi
*/
public class CComplexObjectProxySerializer extends ConstraintSerializer {
public CComplexObjectProxySerializer(ADLDefinitionSerializer serializer) {
super(serializer);
}
@Override
public void serialize(CComplexObjectProxy cobj) {
builder.newIndentedLine();
appendSiblingOrder(cobj);
builder.append("use_node ")
.append(cobj.getRmTypeName())
.append(nodeIdString(cobj.getNodeId()));
appendOccurrences(cobj);
builder.ensureSpace().append(cobj.getTargetPath())
//.lineComment("Should be comment here - not implemented")
.unindent();
}
private String nodeIdString(String nodeId) {
return nodeId == null ? "" : "[" + nodeId + "]";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy