de.interactive_instruments.ShapeChange.Target.ArcGISWorkspace
Class EAModelUtil

java.lang.Object
  extended by de.interactive_instruments.ShapeChange.Target.ArcGISWorkspace.EAModelUtil

public class EAModelUtil
extends Object

Author:
Johannes Echterhoff

Constructor Summary
EAModelUtil()
           
 
Method Summary
static org.sparx.Connector createEAAssociation(org.sparx.Element client, org.sparx.Element supplier)
           
static org.sparx.Attribute createEAAttribute(org.sparx.Element e, String name, String alias, String documentation, Set<String> stereotypes, List<EATaggedValue> taggedValues, boolean isDerived, boolean isOrdered, String initialValue, Multiplicity m, String type, Integer classifierID)
           
static org.sparx.Element createEAClass(String className, org.sparx.Package eaPkg)
           
static void createEAGeneralization(org.sparx.Element c1, org.sparx.Element c2)
           
static org.sparx.Package createEAPackage(PackageInfo pi, org.sparx.Package eaParentPkg)
          Creates an EA package for the given PackageInfo.
static String createMessage(int mnr)
           
static String createMessage(int mnr, String p1)
           
static String createMessage(int mnr, String p1, String p2)
           
static String createMessage(int mnr, String p1, String p2, String p3)
           
static String createMessage(int mnr, String p1, String p2, String p3, String p4)
           
static org.sparx.Package getEAChildPackageByName(org.sparx.Package eaParentPkg, String name)
           
static String message(int mnr)
           
static void setEAAbstract(boolean isAbstract, org.sparx.Element e)
           
static void setEAAlias(String aliasName, org.sparx.Element e)
           
static void setEAAssociationClass(org.sparx.Connector con, org.sparx.Element classElement, String eapFileAbsolutePath)
           
static void setEACardinality(org.sparx.ConnectorEnd conEnd, String cardinalityAsString)
           
static void setEAName(org.sparx.Connector con, String name)
           
static void setEANotes(String documentation, org.sparx.Element e)
           
static void setEARole(org.sparx.ConnectorEnd conEnd, String role)
           
static void setEAStereotype(org.sparx.Connector con, String stereotype)
           
static void setEAStereotype(org.sparx.Element e, String stereotype)
           
static void setEATaggedValue(org.sparx.Collection<org.sparx.ConnectorTag> cTV, String name, String value, String notes)
           
static void setEATaggedValue(org.sparx.Connector con, String tvName, String tvValue, String tvNotes)
           
static void setEATaggedValue(org.sparx.Element e, String tvName, String tvValue, String tvNotes)
           
static void setEATaggedValueRole(org.sparx.Collection<org.sparx.RoleTag> cTV, String n, String v)
           
static void setEATaggedValues(org.sparx.Connector con, List<EATaggedValue> tvs)
           
static void setEATaggedValues(org.sparx.Element e, List<EATaggedValue> tvs)
           
static void setTaggedValue(org.sparx.Collection<org.sparx.TaggedValue> cTV, String name, String value, String notes)
           
static void setTaggedValueAtt(org.sparx.Collection<org.sparx.AttributeTag> cTV, String name, String value, String notes)
           
static String stereotypesCSV(Set<String> stereotypes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EAModelUtil

public EAModelUtil()
Method Detail

createEAPackage

public static org.sparx.Package createEAPackage(PackageInfo pi,
                                                org.sparx.Package eaParentPkg)
                                         throws EAException
Creates an EA package for the given PackageInfo. The new EA package will be a child of the given EA parent package. Properties such as stereotype and tagged values are not set by this method and thus need to be added later on.

Parameters:
pi - package to create in EA
eaParentPkg - EA Package element that is the parent of the EA Package to create for pi
Throws:
EAException - If an EA error was encountered while updating the package

createEAClass

public static org.sparx.Element createEAClass(String className,
                                              org.sparx.Package eaPkg)
                                       throws EAException
Throws:
EAException

setEAAlias

public static void setEAAlias(String aliasName,
                              org.sparx.Element e)
                       throws EAException
Throws:
EAException

setEANotes

public static void setEANotes(String documentation,
                              org.sparx.Element e)
                       throws EAException
Throws:
EAException

setEAStereotype

public static void setEAStereotype(org.sparx.Element e,
                                   String stereotype)
                            throws EAException
Throws:
EAException

setEATaggedValue

public static void setEATaggedValue(org.sparx.Element e,
                                    String tvName,
                                    String tvValue,
                                    String tvNotes)
                             throws EAException
Throws:
EAException

setTaggedValue

public static void setTaggedValue(org.sparx.Collection<org.sparx.TaggedValue> cTV,
                                  String name,
                                  String value,
                                  String notes)
                           throws EAException
Parameters:
cTV - the tagged value shall be set in this collection
name - name of the tagged value to set
value - value to set, '<memo>' if it is a memo field
notes - contains the actual value if it is a memo field; otherwise empty string or null
Throws:
EAException

setEATaggedValueRole

public static void setEATaggedValueRole(org.sparx.Collection<org.sparx.RoleTag> cTV,
                                        String n,
                                        String v)
                                 throws EAException
Parameters:
cTV - the tagged value shall be set in this collection
n - name of the tagged value to set
v - value to set
Throws:
EAException

setEATaggedValue

public static void setEATaggedValue(org.sparx.Collection<org.sparx.ConnectorTag> cTV,
                                    String name,
                                    String value,
                                    String notes)
                             throws EAException
Parameters:
cTV - the tagged value shall be set in this collection
n - name of the tagged value to set
v - value to set
Throws:
EAException

setTaggedValueAtt

public static void setTaggedValueAtt(org.sparx.Collection<org.sparx.AttributeTag> cTV,
                                     String name,
                                     String value,
                                     String notes)
                              throws EAException
Parameters:
cTV - the tagged value shall be set in this collection
name - name of the tagged value to set
value - value to set, '<memo>' if it is a memo field
notes - contains the actual value if it is a memo field; otherwise empty string or null
Throws:
EAException

stereotypesCSV

public static String stereotypesCSV(Set<String> stereotypes)
Parameters:
stereotypes -
Returns:
comma separated list of the set of given stereotypes

createMessage

public static String createMessage(int mnr,
                                   String p1,
                                   String p2,
                                   String p3,
                                   String p4)

createMessage

public static String createMessage(int mnr,
                                   String p1,
                                   String p2,
                                   String p3)

createMessage

public static String createMessage(int mnr,
                                   String p1,
                                   String p2)

createMessage

public static String createMessage(int mnr,
                                   String p1)

createMessage

public static String createMessage(int mnr)

message

public static String message(int mnr)

getEAChildPackageByName

public static org.sparx.Package getEAChildPackageByName(org.sparx.Package eaParentPkg,
                                                        String name)

setEAAbstract

public static void setEAAbstract(boolean isAbstract,
                                 org.sparx.Element e)
                          throws EAException
Throws:
EAException

createEAAttribute

public static org.sparx.Attribute createEAAttribute(org.sparx.Element e,
                                                    String name,
                                                    String alias,
                                                    String documentation,
                                                    Set<String> stereotypes,
                                                    List<EATaggedValue> taggedValues,
                                                    boolean isDerived,
                                                    boolean isOrdered,
                                                    String initialValue,
                                                    Multiplicity m,
                                                    String type,
                                                    Integer classifierID)
                                             throws EAException
Throws:
EAException

setEATaggedValues

public static void setEATaggedValues(org.sparx.Element e,
                                     List<EATaggedValue> tvs)
                              throws EAException
Throws:
EAException

createEAGeneralization

public static void createEAGeneralization(org.sparx.Element c1,
                                          org.sparx.Element c2)
                                   throws EAException
Throws:
EAException

createEAAssociation

public static org.sparx.Connector createEAAssociation(org.sparx.Element client,
                                                      org.sparx.Element supplier)
                                               throws EAException
Throws:
EAException

setEARole

public static void setEARole(org.sparx.ConnectorEnd conEnd,
                             String role)
                      throws EAException
Throws:
EAException

setEACardinality

public static void setEACardinality(org.sparx.ConnectorEnd conEnd,
                                    String cardinalityAsString)
                             throws EAException
Throws:
EAException

setEAName

public static void setEAName(org.sparx.Connector con,
                             String name)
                      throws EAException
Throws:
EAException

setEAStereotype

public static void setEAStereotype(org.sparx.Connector con,
                                   String stereotype)
                            throws EAException
Throws:
EAException

setEATaggedValues

public static void setEATaggedValues(org.sparx.Connector con,
                                     List<EATaggedValue> tvs)
                              throws EAException
Throws:
EAException

setEATaggedValue

public static void setEATaggedValue(org.sparx.Connector con,
                                    String tvName,
                                    String tvValue,
                                    String tvNotes)
                             throws EAException
Throws:
EAException

setEAAssociationClass

public static void setEAAssociationClass(org.sparx.Connector con,
                                         org.sparx.Element classElement,
                                         String eapFileAbsolutePath)
                                  throws EAException
Throws:
EAException


Copyright © 2015. All rights reserved.