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

import java.util.List;

import org.eclipse.cosmos.me.sdd.schema.AlternativeRequiredBaseConstraintType;

public class AlternativeRequiredBaseConstraintCompare
{

	protected static List<AlternativeRequiredBaseConstraintType> merge(List<AlternativeRequiredBaseConstraintType> c, List<AlternativeRequiredBaseConstraintType> c2)
	{
		c.addAll(c2);
		return c;
	}
//		Vector <AlternativeRequiredBaseConstraintType> toRemove = new Vector <AlternativeRequiredBaseConstraintType> ();
//		Iterator <AlternativeRequiredBaseConstraintType> iter1 = c.iterator();		
//		//iterate through the items
//		while (iter1.hasNext())
//		{
//			AlternativeRequiredBaseConstraintType o1 = (AlternativeRequiredBaseConstraintType) iter1.next();
//			Iterator <AlternativeRequiredBaseConstraintType> iter2 = c2.iterator();
//			while (iter2.hasNext())
//			{
//				AlternativeRequiredBaseConstraintType o2 = (AlternativeRequiredBaseConstraintType) iter2.next();
//				//if you find a match that hasn't been found, note it
//				//one of the equals needs to be deleted with its children merged over
//				if (toRemove.contains(o2)==false)
//				{
//					if (equals(o1, o2))
//					{  
//						toRemove.add(o2);
//						o1 = merge(o1,o2);
//					}
//				}
//					
//			}
//		}
//		
//		c2.removeAll(toRemove);
//		//remove all of the matches that were found
//		
//		Vector <AlternativeRequiredBaseConstraintType> finals = new Vector <AlternativeRequiredBaseConstraintType> ();
//		//create and return a new collection with all of the remaining items
//		finals.addAll(c);
//		finals.addAll(c2);		
//		
//		return finals;
//	}
//
////	Type 	 Element 	 Attribute 	 Data Type 	 Compare?
////			<AlternativeRequiredBaseConstraintType> 				
////					id 	xsd:ID 	Throw Away
////					priority 	xsd:positiveInteger 	Merge
////					any 	namespace="##other" 	 ?
////				DisplayElementGroup 		DisplayElementGroup 	Merge
////				ResourceConstraint 		<RequiredBaseConstraintType> 	Yes
////				any 		namespace="##other" 	 ? 
//	
//	protected static AlternativeRequiredBaseConstraintType merge(AlternativeRequiredBaseConstraintType o1,	AlternativeRequiredBaseConstraintType o2)
//	{
//		ObjectFactory objectFactory = new ObjectFactory();
//		AlternativeRequiredBaseConstraintType rc = objectFactory.createAlternativeRequiredBaseConstraintType();
//		rc.setDescription(DisplayTextCompare.merge(o1.getDescription(), o2.getDescription()));
//		rc.setDisplayName(DisplayTextCompare.merge(o1.getDisplayName(), o2.getDisplayName()));
//		rc.setId(o1.getId());
//		rc.setShortDescription(DisplayTextCompare.merge(o1.getShortDescription(), o2.getShortDescription()));
//		rc.setPriority(value)
//		return rc;
//	}
//
//	protected static boolean equals(AlternativeRequiredBaseConstraintType rc, AlternativeRequiredBaseConstraintType rc2)
//	{
//		if (!ResourceCompare.equals((ResourceType)rc.getResourceRef(),(ResourceType)rc2.getResourceRef()))
//			return false;
//		if (rc.isTestValue()!=rc2.isTestValue())
//			return false;
//		return true;
//	}
}
