All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nedap.archie.serializer.adl.constraints.CComplexObjectProxySerializer Maven / Gradle / Ivy

There is a newer version: 3.12.0
Show newest version
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