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<CComplexObjectProxy>  {
    public CComplexObjectProxySerializer(ADLDefinitionSerializer serializer) {
        super(serializer);
    }

    @Override
    public void serialize(CComplexObjectProxy cobj) {
        builder.newIndentedLine()
                .append("use_node ")
                .append(cobj.getRmTypeName())
                .append(" ")
                .append(cobj.getTargetPath())
                //.lineComment("Should be comment here - not implemented")
                .unindent();
    }
}

@@ -280,17 +280,16 @@
 ctProxy%3E
- 
  %7B%0A    p
@@ -577,24 +577,80 @@
 TypeName())%0A
+                .append(nodeIdString(cobj.getNodeId()))%0A
             
@@ -821,11 +821,124 @@
 );%0A    %7D
+%0A%0A    private String nodeIdString(String nodeId) %7B%0A        return nodeId == null ? %22%22 : %22%5B%22 + nodeId + %22%5D%22;%0A    %7D
 %0A%7D%0A

Add node_id to CComplexObjectProxySerializer