public static Mapping getMapping(MappingNode startNode, ConnectorWrapper mappingRelation, MappingNode targetRootNode) { var sourceMappingPath = getMappingPath(mappingRelation, false); var targetMappingPath = getMappingPath(mappingRelation, true); Element targetElement = mappingRelation.targetElement; return(getMapping(mappingRelation, targetElement, startNode, sourceMappingPath, targetMappingPath, targetRootNode)); }
public static string getConnectorString(ConnectorWrapper mappedConnector) { //check if the connector has a target role name string connectorString = mappedConnector.targetEnd.name; //if no rolename then try the association name if (string.IsNullOrEmpty(connectorString)) { connectorString = mappedConnector.name; } //if no associationName then we take the name of the target element if (string.IsNullOrEmpty(connectorString)) { connectorString = mappedConnector.target.name; } return(connectorString); }
public ConnectorMapping(Element source, Element target, string sourcePath, string targetPath, MappingSettings settings) : base(source, target, sourcePath, targetPath) { var sourceAttribute = source as TFS_EA.Attribute; var targetAttribute = target as TFS_EA.Attribute; ElementWrapper sourceOwner = sourceAttribute != null ? sourceAttribute.owner as ElementWrapper : source as ElementWrapper; ElementWrapper targetOwner = targetAttribute != null ? targetAttribute.owner as ElementWrapper: null as ElementWrapper; if (sourceOwner != null & targetOwner != null) { //create the connector wrappedConnector = sourceOwner.model.factory.createNewElement <UML.Classes.Kernel.Association> (sourceOwner, string.Empty) as Association; //set source and target wrappedConnector.source = source; wrappedConnector.target = target; wrappedConnector.save(); } }
public ConnectorMapping(ConnectorWrapper wrappedConnector, MappingNode sourceEnd, MappingNode targetEnd) : base(sourceEnd, targetEnd) { this.wrappedConnector = wrappedConnector; }
public ConnectorMapping(ConnectorWrapper wrappedConnector, string basePath, string targetBasePath) : base(wrappedConnector.sourceElement, wrappedConnector.targetElement, basePath, targetBasePath) { this.wrappedConnector = wrappedConnector; }