public static void fillArchetypeFields(Archetype target, Archetype source) { target.setIsControlled(source.isIsControlled()); target.setBuildUid(source.getBuildUid()); target.setAdlVersion(source.getAdlVersion()); target.setDescription(source.getDescription()); target.setOriginalLanguage(source.getOriginalLanguage()); target.setRevisionHistory(source.getRevisionHistory()); target.setAnnotations(source.getAnnotations()); target.setIsGenerated(source.isIsGenerated()); target.setRmRelease(source.getRmRelease()); target.getOtherMetadata().addAll(source.getOtherMetadata()); target.getTranslations().addAll(source.getTranslations()); target.setDefinition(source.getDefinition()); target.setArchetypeId(source.getArchetypeId()); target.setIsDifferential(source.isIsDifferential()); target.setConcept(source.getConcept()); target.setTerminology(source.getTerminology()); target.setParentArchetypeId(source.getParentArchetypeId()); target.getInvariants().addAll(source.getInvariants()); target.setIsOverlay(source.isIsOverlay()); target.setIsTemplate(source.isIsTemplate()); }
public static Archetype createDifferentialArchetypeClone(Archetype source) { checkArgument(!source.isIsDifferential(), "source archetype must be a flat archetype"); Archetype result = makeClone(source); result.setIsDifferential(true); return result; }
public static Archetype createFlatArchetypeClone(Archetype source) { checkArgument(source.isIsDifferential(), "source archetype must be a differential archetype"); Archetype result = makeClone(source); result.setIsDifferential(false); return result; }