void merge(Archetype flatParent, Archetype specialized) {
        expandAttributeNodes(specialized.getDefinition());

        flattenCObject(RmPath.ROOT, null, flatParent.getDefinition(), specialized.getDefinition());


        mergeOntologies(flatParent.getTerminology(), specialized.getTerminology());
        if (flatParent.getAnnotations() != null) {
            if (specialized.getAnnotations() == null) {
                specialized.setAnnotations(new ResourceAnnotations());
            }
            annotationsMerger.merge(flatParent.getAnnotations().getItems(), specialized.getAnnotations().getItems());
        }
    }
void merge ( Archetype flatParent , Archetype specialized ) { expandAttributeNodes ( specialized . getDefinition ( ) ) ; flattenCObject ( RmPath . ROOT , null , flatParent . getDefinition ( ) , specialized . getDefinition ( ) ) ; mergeOntologies ( flatParent . getTerminology ( ) , specialized . getTerminology ( ) ) ; if ( flatParent . getAnnotations ( ) != null ) { if ( specialized . getAnnotations ( ) == null ) { specialized . setAnnotations ( new ResourceAnnotations ( ) ) ; } annotationsMerger . merge ( flatParent . getAnnotations ( ) . getItems ( ) , specialized . getAnnotations ( ) . getItems ( ) ) ; } }
Merges a specialized archetype with its parent. Merge will be done in-place on the specialized parameter.

@param flatParent  Flat parent archetype
@param specialized Specialized archetype