/// <summary>
		/// creates a new user based on the given details
		/// </summary>
		/// <param name="model">the model containing the user</param>
		/// <param name="login">the string used to log in into the tool</param>
		/// <param name="firstName">the first name of the user</param>
		/// <param name="lastName">the last name of the user</param>
		public User(EAWrappers.Model model,string login,string firstName,string lastName)
		{
			this.model = model;
			this.login = login;
			this.firstName = firstName;
			this.lastName = lastName;
		}
 protected DB2TableTransformer addDB2Table(UTF_EA.Class classElement)
 {
     DB2TableTransformer transformer = null;
     if (classElement.owningPackage.Equals(this.logicalPackage))
     {
         if ( ! this._tableTransformers.Any(x => x.logicalClasses.Any(y => y.Equals(classElement))))
         {
             transformer = new DB2TableTransformer(this._newDatabase,_nameTranslator);
             this._tableTransformers.Add(transformer);
         }
     }
     else
     {
         if (!this.externalTableTransformers.Any(x => x.logicalClasses.Any(y => y.Equals(classElement))))
         {
             transformer = new DB2TableTransformer(this._externalDatabase,_nameTranslator);
             this.externalTableTransformers.Add(transformer);
         }
     }
     if (transformer != null)
     {
         //transform to table
         transformer.transformLogicalClass(classElement);
         //now do the external tables linked to this classElement
         foreach (var dependingAssociationEnd in transformer.getDependingAssociationEnds())
         {
             var dependingEndTransformer = addDB2Table(dependingAssociationEnd);
             if (dependingEndTransformer != null)transformer.dependingTransformers.Add(dependingEndTransformer);
         }
         //add the remote columns and primary and foreign keys
         transformer.addRemoteColumnsAndKeys();
     }
     return transformer;
 }
		public WorkingSet(EAWrappers.Model model,string ID,User user, string name)
		{
			this.model = model;
			this.ID = ID;
			this.user = user;
			this.name = name;
		}
 public EAImvertorException(UTF_EA.Model model, string exceptionType, string guid, string step, string construct, string message)
 {
     this._model = model;
     this.exceptionType = exceptionType;
     this.guid = guid;
     this.step = step;
     this.construct = construct;
     this.message = message;
 }
 public TFSConnectorSettingsForm(EATFSConnectorSettings settings, TSF_EA.Model model )
 {
     //
     // The InitializeComponent() call is required for Windows Forms designer support.
     //
     InitializeComponent();
     this.settings = settings;
     this.model = model;
     this.loadData();
     this.enableDisable();
 }
 public EASearchOutput(string name,List<string> fields,List<UML.Extended.UMLModelOutPutItem> output, UTF_EA.Model model)
 {
     this.name = name;
     //add the default fields for EA Searches
     this.fields = new List<string> { "CLASSGUID", "CLASSTYPE" };
     this.fields.AddRange(fields);
     this.output = output;
     if (this.output == null)
     {
         this.output = new List<UML.Extended.UMLModelOutPutItem>();
     }
     this._model = model;
 }
 protected DB2TableTransformer addDB2Table(UTF_EA.AssociationEnd associationEnd)
 {
     DB2TableTransformer transformer = addDB2Table(associationEnd.type as UTF_EA.Class);
     if (transformer == null)
     {
         transformer = this.tableTransformers.OfType<DB2TableTransformer>().FirstOrDefault( x => x.logicalClass.Equals(associationEnd.type));
     }
     if (transformer == null)
     {
         transformer = this.externalTableTransformers.FirstOrDefault( x => x.logicalClass.Equals(associationEnd.type));
     }
     if (transformer != null)
     {
         transformer.associationEnd = associationEnd;
     }
     return transformer;
 }
 /// <summary>
 /// copies only the tagged values necesarry
 /// </summary>
 /// <param name="source">the source element</param>
 /// <param name="target">the target element</param>
 public void copyTaggedValues(UTF_EA.Element source, UTF_EA.Element target)
 {
     //copy tagged values
     foreach (UTF_EA.TaggedValue sourceTaggedValue in source.taggedValues)
     {
         bool updateTaggedValue = true;
         if (this.settings.ignoredTaggedValues.Contains(sourceTaggedValue.name))
         {
             UTF_EA.TaggedValue targetTaggedValue =
                 target.getTaggedValue(sourceTaggedValue.name);
             if (targetTaggedValue != null &&
                 targetTaggedValue.eaStringValue != string.Empty)
             {
                 //don't update any of the tagged values of the ignoredTaggeValues if the value is already filled in.
                 updateTaggedValue = false;
             }
         }
         if (updateTaggedValue)
         {
             target.addTaggedValue(sourceTaggedValue.name,
                 sourceTaggedValue.eaStringValue, sourceTaggedValue.comment);
         }
     }
 }
 private void copyAssociationEndProperties(UTF_EA.AssociationEnd source, UTF_EA.AssociationEnd target)
 {
     target.name = source.name;
     target.multiplicity = source.multiplicity;
     target.isNavigable = source.isNavigable;
     target.aggregation = source.aggregation;
     target.ownedComments = source.ownedComments;
     target.save();
 }
 protected abstract void addTable(UTF_EA.Class classElement);
 /// <summary>
 /// gets the superclasses of an element
 /// </summary>
 /// <param name="classElement"></param>
 /// <returns></returns>
 protected virtual List<UTF_EA.Class> getsuperClasses(UTF_EA.Class classElement)
 {
     if (!_superClasses.ContainsKey(classElement))
     {
         if (classElement.superClasses.Count == 0)
         {
             //no superclasses, return empty list
             _superClasses.Add(classElement, new List<UTF_EA.Class>());
         }
         else
         {
             var superClasses = new List<UTF_EA.Class>();
             //first add the superclasses of the superclasses
             foreach (UTF_EA.Class superClass in classElement.superClasses)
             {
                 superClasses.AddRange(getsuperClasses(superClass));
             }
             //the add the superclasses themselves
             foreach (UTF_EA.Class superClass in classElement.superClasses)
             {
                 superClasses.Add(superClass);
             }
             _superClasses.Add(classElement, superClasses);
         }
     }
     return _superClasses[classElement];
 }
		/// <summary>
		/// Constructor of the EASchema. Only to be used by the EASchemaBuilderFactory
		/// </summary>
		/// <param name="model">The model containing this Scheam</param>
		/// <param name="composer">The EA.SchemaComposer object to be wrapped</param>
		internal EASchema(UTF_EA.Model model, EA.SchemaComposer composer)
		{
			this.model = model;
			this.wrappedComposer = composer;
		}
 public EASchemaPropertyWrapper(UTF_EA.Model model, EASchemaElement owner, EA.SchemaProperty objectToWrap)
 {
     this._owner = owner;
     this.model = model;
     this.wrappedProperty = objectToWrap;
 }
		public EASchemaElement(UTF_EA.Model model,EASchema owner, EA.SchemaType objectToWrap)
		{
			this.model = model;
			this.ownerSchema = owner;
			this.wrappedSchemaType = objectToWrap;
		}
 public static DatabaseFactory getFactory(UTF_EA.Model model)
 {
     return DB_EA.DatabaseFactory.getFactory("DB2",model);
 }
 public DB2DatabaseTransformer(DatabaseFactory factory,UTF_EA.Model model,NameTranslator nameTranslator)
     : base(factory,model,nameTranslator)
 {
     this._externalDatabase = factory.createDatabase("external");
 }
 public DB2DatabaseTransformer(UTF_EA.Model model,NameTranslator nameTranslator)
     : this(getFactory(model),model,nameTranslator)
 {
 }
 public DB2DatabaseTransformer(UTF_EA.Package logicalPackage,NameTranslator nameTranslator)
     : this(logicalPackage.model, nameTranslator)
 {
     this._logicalPackage = logicalPackage;
 }
 public Column(Table owner, TSF_EA.Attribute attribute)
 {
     this._ownerTable = owner;
     this._wrappedattribute = attribute;
 }
		public Event(UTF_EA.Model model, global::EA.Element wrappedElement)
		: base(model,wrappedElement)
		{
		}
		public EASchemaAssociation(UTF_EA.Model model,EASchemaElement owner, EA.SchemaProperty objectToWrap):base(model,owner, objectToWrap)
		{
		}
		/// <summary>
		/// Writes a transitions connector source at the current indent level.
		/// </summary>
		/// <param name="connectorWrapper"></param>
		/// <param name="addProperties"></param>
		/// <returns>The TransformationILWriter instance for use in concatenated output.</returns>
		public TransformationILWriter WriteILConnectorTarget(UTF_EA.ConnectorWrapper connectorWrapper, StringDictionary addProperties = null)
		{
			if(connectorWrapper != null) {
				WriteIndented("target");
				WriteIndented("{");
					Indent();
					if(addProperties != null) {
						foreach(string propertyName in addProperties.Keys) {
							WriteILProperty(propertyName,addProperties[propertyName]);
						}
					}
					GenerateXRef(connectorWrapper.supplier);
					Indent(-1);
				WriteIndented("}");
			}
			return this;
		}
 protected abstract void createTable(UTF_EA.Class classElement);
		/// <summary>
		/// Writes an IL 'XRef' declaration for connectorWrapper at the current indentation level.
		/// </summary>
		/// <param name="name"></param>
		/// <param name="connectorWrapper"></param>
		/// <returns>The TransformationILWriter instance for use in concatenated output.</returns>
		public TransformationILWriter GenerateXRef(string name, UTF_EA.ConnectorWrapper connectorWrapper)
		{
			string sourceGuid = GetConnectorGuid(connectorWrapper);
			OpenILXRef()
				.WriteILProperty("namespace","C++STTCL")
				.WriteILProperty("name",name)
				.WriteILProperty("source",sourceGuid)
			.CloseIL();
			return this;
		}
 protected abstract Column transformLogicalAttribute(UTF_EA.Attribute attribute);
		private string GetElementGuid(UTF_EA.ElementWrapper elementWrapper)
		{
			return elementWrapper.WrappedElement.ElementGUID;
		}
 public EADatabaseTransformer(DatabaseFactory factory, UTF_EA.Model model,NameTranslator nameTranslator)
     : base(nameTranslator)
 {
     this._factory = factory;
     this._model = model;
 }
		private string GetConnectorGuid(UTF_EA.ConnectorWrapper connectorWrapper)
		{
			return connectorWrapper.WrappedConnector.ConnectorGUID;
		}
 public EASchemaAssociation(UTF_EA.Model model, EASchemaElement owner, EA.SchemaProperty objectToWrap)
     : base(model, owner, objectToWrap)
 {
     this.subsetAssociations = new List<Association>();
 }
 protected abstract void createColumn(UTF_EA.Attribute attribute);