package org.eclipse.cosmos.me.sdd.tooling.btg.aggregator.comparisons;

import org.eclipse.cosmos.me.sdd.schema.ObjectFactory;
import org.eclipse.cosmos.me.sdd.schema.VersionConstraintType;

public class VersionConstraintCompare
{
//	  <VersionConstraintType> 				
//	  	DescriptionGroup 		DescriptionGroup 	Merge
//	  	Supported 		<VersionConstraintValueType> 	Merge
//	  	Certified 		<VersionConstraintValueType> 	Merge 
	protected static VersionConstraintType merge(VersionConstraintType vc1, VersionConstraintType vc2)
	{
		ObjectFactory objectFactory = new ObjectFactory();
		VersionConstraintType vc = objectFactory.createVersionConstraintType();
		vc.setDescription(DisplayTextCompare.merge(vc1.getDescription(), vc2.getDescription()));
		vc.setShortDescription(DisplayTextCompare.merge(vc1.getShortDescription(), vc2.getShortDescription()));
		vc.setSupported(VersionConstraintValueCompare.merge(vc1.getSupported(), vc2.getSupported()));
		vc.setCertified(VersionConstraintValueCompare.merge(vc1.getCertified(), vc2.getCertified()));
		return vc;
	}

}
