File |
Line |
org\overturetool\umltrans\vdm2uml\Uml2XmiEAxml.java |
1680
|
org\overturetool\umltrans\vdm2uml\Uml2XmiEclipseUml.java |
1216
|
doc.StartA(new String("visibility"), new String("public"));
{
String tid = GetNextId();
{
doc.StartA(ID_uTAG, tid);
doc.StartA(new String("xmi:type"), new String("uml:Class"));
doc.StopE(oe);
return tid;
}
}
}
// ***** VDMTOOLS END Name=PrintPrimitiveType#1|String
// ***** VDMTOOLS START Name=GetTypeId#1|IUmlType KEEP=NO
protected String GetTypeId (final IUmlType t) throws CGException {
boolean succ_2 = true;
{
succ_2 = true;
if (!UTIL.equals(new Boolean(true), new Boolean(t instanceof IUmlClassNameType)))
succ_2 = false;
if (succ_2) {
IUmlClassNameType qc = (IUmlClassNameType) t;
{
Boolean cond_22 = null;
boolean tmpQuant_23 = false;
{
HashSet e_set_28 = new HashSet();
e_set_28.clear();
e_set_28.addAll(classes.keySet());
String x = null;
{
for (Iterator enm_31 = e_set_28.iterator(); enm_31.hasNext() && !tmpQuant_23; ) {
String elem_30 = UTIL.ConvertToString(enm_31.next());
x = elem_30;
Boolean pred_24 = null;
String var2_26 = null;
var2_26 = qc.getName();
pred_24 = new Boolean(UTIL.equals(x, var2_26));
if (pred_24.booleanValue())
tmpQuant_23 = true;
}
}
}
cond_22 = new Boolean(tmpQuant_23);
if (cond_22.booleanValue()) {
String rexpr_35 = null;
String tmppar_37 = null;
tmppar_37 = qc.getName();
rexpr_35 = UTIL.ConvertToString(classes.get(tmppar_37));
return rexpr_35;
}
else
return UTIL.ConvertToString(primitiveTypes.get(new String("NotSupportedType")));
}
}
else {
succ_2 = true;
if (!UTIL.equals(new Boolean(true), new Boolean(t instanceof IUmlBoolType)))
succ_2 = false;
if (!succ_2) {
succ_2 = true;
if (!UTIL.equals(new Boolean(true), new Boolean(t instanceof IUmlIntegerType)))
succ_2 = false;
}
if (!succ_2) {
succ_2 = true;
if (!UTIL.equals(new Boolean(true), new Boolean(t instanceof IUmlCharType)))
succ_2 = false;
}
if (!succ_2) {
succ_2 = true;
if (!UTIL.equals(new Boolean(true), new Boolean(t instanceof IUmlUnlimitedNatural)))
succ_2 = false;
}
if (succ_2)
return GetUmlPrimitiveTypeId((IUmlType) t);
else
return UTIL.ConvertToString(primitiveTypes.get(new String("NotSupportedType")));
}
}
}
// ***** VDMTOOLS END Name=GetTypeId#1|IUmlType
// ***** VDMTOOLS START Name=GetNextId KEEP=NO
protected String GetNextId () throws CGException {
id = UTIL.NumberToLong(UTIL.clone(new Long(id.intValue() + new Long(1).intValue())));
return GetId(id);
}
// ***** VDMTOOLS END Name=GetNextId
// ***** VDMTOOLS START Name=GetId#1|Long KEEP=NO
protected String GetId (final Long idNum) throws CGException {
String varRes_2 = null;
String var2_4 = null;
var2_4 = UTIL.ConvertToString(Util.ToString(idNum));
varRes_2 = new String("VDM.").concat(var2_4);
return varRes_2;
}
// ***** VDMTOOLS END Name=GetId#1|Long
// ***** VDMTOOLS START Name=GetVisibilityKind#1|IUmlVisibilityKind KEEP=NO
protected String GetVisibilityKind (final IUmlVisibilityKind visibility) throws CGException {
String varRes_2 = null;
Long selRes_4 = null;
selRes_4 = visibility.getValue();
boolean succ_3 = true;
{
succ_3 = true;
if (!UTIL.equals(selRes_4, UmlVisibilityKindQuotes.IQPUBLIC))
succ_3 = false;
if (succ_3)
varRes_2 = new String("public");
}
if (!succ_3) {
succ_3 = true;
if (!UTIL.equals(selRes_4, UmlVisibilityKindQuotes.IQPRIVATE))
succ_3 = false;
if (succ_3)
varRes_2 = new String("private");
}
if (!succ_3) {
succ_3 = true;
if (!UTIL.equals(selRes_4, UmlVisibilityKindQuotes.IQPROTECTED))
succ_3 = false;
if (succ_3)
varRes_2 = new String("protected");
}
if (!succ_3)
UTIL.RunTime("Run-Time Error:No \'others\' branch in CasesExpr");
return varRes_2;
}
// ***** VDMTOOLS END Name=GetVisibilityKind#1|IUmlVisibilityKind
}
|
File |
Line |
org\overturetool\umltrans\uml2vdm\Uml2Vdm.java |
1387
|
org\overturetool\umltrans\uml2vdm\Uml2Vdm.java |
1525
|
public void extractProductAssociation (final HashSet props) throws CGException {
HashSet ownerEndSet = new HashSet();
HashSet res_s_4 = new HashSet();
{
IUmlProperty p = null;
{
for (Iterator enm_13 = props.iterator(); enm_13.hasNext(); ) {
IUmlProperty elem_12 = (IUmlProperty) enm_13.next();
p = (IUmlProperty) elem_12;
Boolean pred_6 = null;
Long var1_7 = null;
String unArg_8 = null;
unArg_8 = p.getName();
var1_7 = new Long(unArg_8.length());
pred_6 = new Boolean(var1_7.intValue() == new Long(0).intValue());
if (pred_6.booleanValue()) {
res_s_4.add(p);
}
}
}
}
ownerEndSet = res_s_4;
Vector propSeq = null;
propSeq = (Vector) UTIL.ConvertToList(Util.SetToSeq(props));
IUmlProperty pOwnerEnd = null;
Vector unArg_17 = null;
unArg_17 = (Vector) UTIL.ConvertToList(Util.SetToSeq(ownerEndSet));
pOwnerEnd = (IUmlProperty) unArg_17.get(0);
Vector pTypeEnd = null;
{
Vector res_l_20 = new Vector();
HashSet resBind_s_22 = new HashSet();
HashSet riseq_26 = new HashSet();
int max_27 = propSeq.size();
for (int i_28 = 1; i_28 <= max_27; i_28++)
riseq_26.add(new Long(i_28));
resBind_s_22 = riseq_26;
Vector bind_l_21 = null;
bind_l_21 = UTIL.Sort(resBind_s_22);
Long i = null;
for (Iterator enm_40 = bind_l_21.iterator(); enm_40.hasNext(); ) {
Long e_24 = UTIL.NumberToLong(enm_40.next());
i = e_24;
Boolean pred_32 = null;
Long var1_33 = null;
String unArg_34 = null;
IUmlProperty obj_35 = null;
if ((1 <= i.intValue()) && (i.intValue() <= propSeq.size()))
obj_35 = (IUmlProperty) propSeq.get(i.intValue() - 1);
else
UTIL.RunTime("Run-Time Error:Illegal index");
unArg_34 = obj_35.getName();
var1_33 = new Long(unArg_34.length());
pred_32 = new Boolean((var1_33.intValue()) > (new Long(0).intValue()));
if (pred_32.booleanValue()) {
IUmlProperty reselem_29 = null;
if ((1 <= i.intValue()) && (i.intValue() <= propSeq.size()))
reselem_29 = (IUmlProperty) propSeq.get(i.intValue() - 1);
else
UTIL.RunTime("Run-Time Error:Illegal index");
res_l_20.add(reselem_29);
}
}
pTypeEnd = res_l_20;
}
String tmpVal_41 = null;
{
IUmlType tmpVal_43 = null;
tmpVal_43 = (IUmlType) pOwnerEnd.getType();
IUmlClassNameType t = null;
t = (IUmlClassNameType) tmpVal_43;
tmpVal_41 = t.getName();
}
String clName = null;
clName = tmpVal_41;
Vector endTypes = null;
HashSet par_45 = new HashSet();
HashSet res_s_46 = new HashSet();
{
HashSet e1_set_50 = new HashSet(pTypeEnd);
|
File |
Line |
org\overturetool\umltrans\vdm2uml\Uml2XmiEAxml.java |
1446
|
org\overturetool\umltrans\vdm2uml\Uml2XmiEclipseUml.java |
1055
|
protected void PrintAssociationMp (final IUmlMultiplicityElement me) throws CGException {
doc.StartE(new String("lowerValue"));
String par_6 = null;
Long par_7 = null;
par_7 = me.getLower();
par_6 = UTIL.ConvertToString(Util.ToString(par_7));
doc.StartA(new String("value"), par_6);
doc.StartA(ID_uTAG, GetNextId());
doc.StartA(new String("xmi:type"), new String("uml:LiteralInteger"));
doc.StopE(new String("lowerValue"));
Boolean cond_16 = null;
cond_16 = me.hasUpper();
if (cond_16.booleanValue()) {
doc.StartE(new String("upperValue"));
String par_34 = null;
Long par_35 = null;
par_35 = me.getUpper();
par_34 = UTIL.ConvertToString(Util.ToString(par_35));
doc.StartA(new String("value"), par_34);
doc.StartA(ID_uTAG, GetNextId());
doc.StartA(new String("xmi:type"), new String("uml:LiteralInteger"));
doc.StopE(new String("upperValue"));
}
else {
doc.StartE(new String("upperValue"));
doc.StartA(new String("value"), new String("*"));
doc.StartA(ID_uTAG, GetNextId());
doc.StartA(new String("xmi:type"), new String("uml:LiteralString"));
doc.StopE(new String("upperValue"));
}
}
// ***** VDMTOOLS END Name=PrintAssociationMp#1|IUmlMultiplicityElement
// ***** VDMTOOLS START Name=AddGeneralization#1|Vector KEEP=NO
protected void AddGeneralization (final Vector supers) throws CGException {
HashSet iset_2 = new HashSet();
HashSet set_10 = new HashSet();
Enumeration enm_11 = supers.elements();
while ( enm_11.hasMoreElements())
set_10.add(enm_11.nextElement());
iset_2 = set_10;
IUmlClassNameType a = null;
for (Iterator enm_27 = iset_2.iterator(); enm_27.hasNext(); ) {
IUmlClassNameType elem_3 = (IUmlClassNameType) enm_27.next();
a = (IUmlClassNameType) elem_3;
{
doc.StartE(new String("generalization"));
doc.StartA(new String("xmi:type"), new String("uml:Generalization"));
doc.StartA(ID_uTAG, GetNextId());
String par_22 = null;
String tmppar_24 = null;
tmppar_24 = a.getName();
par_22 = UTIL.ConvertToString(classes.get(tmppar_24));
doc.StartA(new String("general"), par_22);
doc.StopE(new String("generalization"));
}
}
}
// ***** VDMTOOLS END Name=AddGeneralization#1|Vector
// ***** VDMTOOLS START Name=PrintTemplates#1|IUmlTemplateSignature KEEP=NO
protected void PrintTemplates (final IUmlTemplateSignature tps) throws CGException {
|
File |
Line |
org\overturetool\umltrans\vdm2uml\Uml2XmiEAxml.java |
683
|
org\overturetool\umltrans\vdm2uml\Uml2XmiEclipseUml.java |
585
|
protected void PrintClass (final IUmlClass cl) throws CGException {
doc.StartE(oe);
String par_6 = null;
Boolean par_7 = null;
par_7 = cl.getIsAbstract();
par_6 = UTIL.ConvertToString(Util.ToStringBool(par_7));
doc.StartA(new String("isAbstract"), par_6);
String par_10 = null;
Boolean par_11 = null;
par_11 = cl.getIsActive();
par_10 = UTIL.ConvertToString(Util.ToStringBool(par_11));
doc.StartA(new String("isActive"), par_10);
doc.StartA(new String("isLeaf"), new String("false"));
String par_17 = null;
par_17 = cl.getName();
doc.StartA(new String("name"), par_17);
doc.StartA(new String("visibility"), new String("public"));
String par_23 = null;
String tmppar_25 = null;
tmppar_25 = cl.getName();
par_23 = UTIL.ConvertToString(classes.get(tmppar_25));
doc.StartA(ID_uTAG, par_23);
doc.StartA(new String("xmi:type"), new String("uml:Class"));
HashSet tmpArg_v_30 = new HashSet();
HashSet unArg_31 = new HashSet();
HashSet res_s_32 = new HashSet();
{
HashSet e_set_39 = new HashSet();
e_set_39 = cl.getClassBody();
IUmlDefinitionBlock df = null;
{
for (Iterator enm_41 = e_set_39.iterator(); enm_41.hasNext(); ) {
IUmlDefinitionBlock elem_40 = (IUmlDefinitionBlock) enm_41.next();
df = (IUmlDefinitionBlock) elem_40;
if ((df instanceof IUmlOwnedProperties)) {
HashSet res_s_33 = new HashSet();
{
IUmlOwnedProperties d = (IUmlOwnedProperties) df;
res_s_33 = d.getPropetityList();
}
res_s_32.add(res_s_33);
}
}
}
}
unArg_31 = res_s_32;
HashSet rduset_42 = new HashSet();
for (Iterator enm_44 = unArg_31.iterator(); enm_44.hasNext(); ) {
HashSet e_43 = (HashSet) enm_44.next();
rduset_42.addAll(e_43);
}
tmpArg_v_30 = rduset_42;
|
File |
Line |
org\overturetool\umltrans\vdm2uml\Uml2XmiEAxml.java |
403
|
org\overturetool\umltrans\vdm2uml\Uml2XmiEclipseUml.java |
258
|
private void PrintConstraint (final IUmlConstraint c) throws CGException {
doc.StartE(oe);
doc.StartA(new String("xmi:type"), new String("uml:Constraint"));
{
String constrainId = GetNextId();
{
extensionConstrainElem.add(constrainId);
doc.StartA(ID_uTAG, constrainId);
}
}
{
HashSet iset_14 = new HashSet();
iset_14 = c.getConstraintElements();
String a = null;
for (Iterator enm_27 = iset_14.iterator(); enm_27.hasNext(); ) {
String elem_15 = UTIL.ConvertToString(enm_27.next());
a = elem_15;
{
doc.StartE(new String("constrainedElement"));
doc.StartA(new String("xmi:idref"), UTIL.ConvertToString(associationIdMap.get(a)));
doc.StopE(new String("constrainedElement"));
}
}
}
doc.StartE(new String("specification"));
doc.StartA(new String("xmi:type"), new String("uml:OpaqueExpression"));
doc.StartA(ID_uTAG, GetNextId());
doc.StopE(new String("specification"));
doc.StartE(new String("body"));
String par_41 = null;
Boolean cond_43 = null;
IUmlValueSpecification obj_44 = null;
obj_44 = (IUmlValueSpecification) c.getSpecification();
cond_43 = new Boolean(obj_44 instanceof IUmlLiteralString);
if (cond_43.booleanValue()) {
IUmlLiteralString spec = null;
spec = (IUmlLiteralString) c.getSpecification();
par_41 = spec.getValue();
}
else
par_41 = new String("");
doc.StartD(par_41);
doc.StopE(new String("body"));
doc.StopE(new String("specification"));
doc.StopE(oe);
}
// ***** VDMTOOLS END Name=PrintConstraint#1|IUmlConstraint
// ***** VDMTOOLS START Name=PrintExstention KEEP=NO
private void PrintExstention () throws CGException {
|
File |
Line |
org\overturetool\umltrans\vdm2uml\Uml2XmiEAxml.java |
1515
|
org\overturetool\umltrans\vdm2uml\Uml2XmiEclipseUml.java |
1124
|
protected void PrintTemplates (final IUmlTemplateSignature tps) throws CGException {
doc.StartE(new String("ownedTemplateSignature"));
doc.StartA(new String("xmi:type"), new String("uml:TemplateSignature"));
doc.StartA(ID_uTAG, GetNextId());
{
HashSet iset_10 = new HashSet();
iset_10 = tps.getTemplateParameters();
IUmlTemplateParameter a = null;
for (Iterator enm_47 = iset_10.iterator(); enm_47.hasNext(); ) {
IUmlTemplateParameter elem_11 = (IUmlTemplateParameter) enm_47.next();
a = (IUmlTemplateParameter) elem_11;
{
String parameterId = GetNextId();
doc.StartE(new String("ownedParameter"));
doc.StartA(new String("xmi:type"), new String("uml:ClassifierTemplateParameter"));
doc.StartA(ID_uTAG, parameterId);
doc.StartE(new String("ownedElement"));
doc.StartA(new String("xmi:type"), new String("uml:Class"));
doc.StartA(ID_uTAG, GetNextId());
String par_32 = null;
par_32 = a.getName();
doc.StartA(new String("name"), par_32);
doc.StartA(new String("templateParameter"), parameterId);
doc.StopE(new String("ownedElement"));
doc.StopE(new String("ownedParameter"));
doc.StartE(new String("parameter"));
doc.StartA(new String("xmi:idref"), parameterId);
doc.StopE(new String("parameter"));
}
}
}
doc.StopE(new String("ownedTemplateSignature"));
}
|
File |
Line |
org\overturetool\umltrans\uml2vdm\Uml2Vdm.java |
614
|
org\overturetool\umltrans\uml2vdm\Uml2Vdm.java |
894
|
public IOmlFunctionDefinition build_uFunction (final IUmlOperation prop) throws CGException {
boolean succ_2;
Boolean asyncAccess = new Boolean(false);
Boolean statAccess = null;
statAccess = prop.getIsStatic();
IOmlScope scope = null;
IUmlVisibilityKind par_6 = null;
par_6 = (IUmlVisibilityKind) prop.getVisibility();
scope = (IOmlScope) ConvertVisibility((IUmlVisibilityKind) par_6);
OmlAccessDefinition access = (OmlAccessDefinition) new OmlAccessDefinition(asyncAccess, statAccess, scope);
Tuple tmpVal_11 = new Tuple(2);
Vector par_12 = null;
Boolean cond_14 = null;
cond_14 = prop.hasOwnedParameters();
if (cond_14.booleanValue()) {
IUmlParameters obj_15 = null;
obj_15 = (IUmlParameters) prop.getOwnedParameters();
par_12 = obj_15.getParameterList();
}
else
par_12 = new Vector();
Boolean par_16 = null;
par_16 = prop.getIsQuery();
tmpVal_11 = buildParameters(par_12, par_16);
IOmlType type = null;
Vector parms = null;
succ_2 = true;
{
Vector e_l_17 = new Vector();
for (int i_18 = 1; i_18 <= tmpVal_11.Length(); i_18++)
e_l_17.add(tmpVal_11.GetField(i_18));
if (succ_2 = (2 == e_l_17.size())) {
parms = (Vector) e_l_17.get(0);
type = (IOmlType) e_l_17.get(2 - 1);
}
}
if (!succ_2)
UTIL.RunTime("Run-Time Error:Pattern match did not succeed in value definition");
String name = null;
name = prop.getName();
|
File |
Line |
org\overturetool\umltrans\vdm2uml\Uml2XmiEAxml.java |
630
|
org\overturetool\umltrans\vdm2uml\Uml2XmiEclipseUml.java |
532
|
}
// ***** VDMTOOLS END Name=PrintClassDef#1|HashSet
// ***** VDMTOOLS START Name=GenerateClassIds#1|HashSet KEEP=NO
protected void GenerateClassIds (final HashSet defs) throws CGException {
HashSet iset_2 = new HashSet();
HashSet res_s_12 = new HashSet();
{
IUmlModelElement d = null;
{
for (Iterator enm_17 = defs.iterator(); enm_17.hasNext(); ) {
IUmlModelElement elem_16 = (IUmlModelElement) enm_17.next();
d = (IUmlModelElement) elem_16;
res_s_12.add(d);
}
}
}
iset_2 = res_s_12;
IUmlModelElement c = null;
for (Iterator enm_28 = iset_2.iterator(); enm_28.hasNext(); ) {
IUmlModelElement elem_3 = (IUmlModelElement) enm_28.next();
c = (IUmlModelElement) elem_3;
{
boolean succ_18 = true;
{
succ_18 = true;
if (!UTIL.equals(new Boolean(true), new Boolean(c instanceof IUmlClass)))
succ_18 = false;
if (succ_18) {
IUmlModelElement tmpVal_24 = null;
tmpVal_24 = (IUmlModelElement) c;
IUmlClass cl = null;
cl = (IUmlClass) tmpVal_24;
String md_26 = null;
md_26 = cl.getName();
classes.put(md_26, GetNextId());
}
}
}
}
}
// ***** VDMTOOLS END Name=GenerateClassIds#1|HashSet
// ***** VDMTOOLS START Name=PrintClass#1|IUmlClass KEEP=NO
protected void PrintClass (final IUmlClass cl) throws CGException {
|
File |
Line |
org\overturetool\umltrans\vdm2uml\Uml2XmiEAxml.java |
495
|
org\overturetool\umltrans\vdm2uml\Uml2XmiEclipseUml.java |
349
|
{
doc.StartE(new String("element"));
doc.StartA(new String("xmi:idref"), constrainId);
doc.StartA(new String("xmi:type"), new String("uml:Constraint"));
doc.StartA(new String("scope"), new String("public"));
doc.StartE(new String("properties"));
doc.StartA(new String("documentation"), new String("xor"));
doc.StartA(new String("isSpecification"), new String("false"));
doc.StartA(new String("sType"), new String("Constraint"));
doc.StartA(new String("nType"), new String("2"));
doc.StartA(new String("scope"), new String("public"));
doc.StopE(new String("properties"));
doc.StopE(new String("element"));
}
}
}
doc.StopE(new String("elements"));
doc.StartE(new String("diagrams"));
{
String constrainId = null;
for (Iterator enm_141 = extensionConstrainElem.iterator(); enm_141.hasNext(); ) {
|
File |
Line |
org\overturetool\umltrans\vdm2uml\Uml2XmiEAxml.java |
741
|
org\overturetool\umltrans\vdm2uml\Uml2XmiEclipseUml.java |
643
|
PrintPropeties(tmpArg_v_30);
HashSet tmpArg_v_46 = new HashSet();
HashSet unArg_47 = new HashSet();
HashSet res_s_48 = new HashSet();
{
HashSet e_set_55 = new HashSet();
e_set_55 = cl.getClassBody();
IUmlDefinitionBlock df = null;
{
for (Iterator enm_57 = e_set_55.iterator(); enm_57.hasNext(); ) {
IUmlDefinitionBlock elem_56 = (IUmlDefinitionBlock) enm_57.next();
df = (IUmlDefinitionBlock) elem_56;
if ((df instanceof IUmlOwnedOperations)) {
HashSet res_s_49 = new HashSet();
{
IUmlOwnedOperations d = (IUmlOwnedOperations) df;
res_s_49 = d.getOperationList();
}
res_s_48.add(res_s_49);
}
}
}
}
unArg_47 = res_s_48;
HashSet rduset_58 = new HashSet();
for (Iterator enm_60 = unArg_47.iterator(); enm_60.hasNext(); ) {
HashSet e_59 = (HashSet) enm_60.next();
rduset_58.addAll(e_59);
}
tmpArg_v_46 = rduset_58;
|
File |
Line |
org\overturetool\umltrans\vdm2uml\Uml2XmiEAxml.java |
533
|
org\overturetool\umltrans\vdm2uml\Uml2XmiEclipseUml.java |
387
|
doc.StartA(new String("name"), par_111);
doc.StartA(new String("type"), new String("Logical"));
doc.StopE(new String("properties"));
doc.StartE(new String("elements"));
doc.StartE(new String("element"));
doc.StartA(new String("geometry"), new String("Left=100;Top=100;Right=100;Bottom=100;"));
doc.StartA(new String("subject"), constrainId);
doc.StartA(new String("seqno"), new String("1"));
doc.StartA(new String("style"), new String("DUID=AE8AC20D;"));
doc.StopE(new String("element"));
doc.StopE(new String("elements"));
doc.StopE(new String("diagram"));
}
}
}
doc.StopE(new String("diagrams"));
doc.StartE(new String("connectors"));
{
String associationEndId = null;
for (Iterator enm_167 = extensionConectorNonNavigable.iterator(); enm_167.hasNext(); ) {
|
File |
Line |
org\overturetool\umltrans\uml\UmlOperation.java |
133
|
org\overturetool\umltrans\uml\UmlProperty.java |
161
|
setQualifier((IUmlType) p11);
setPosition(line, column);
}
}
// ***** VDMTOOLS END Name=UmlProperty#13|String|IUmlVisibilityKind|IUmlMultiplicityElement|IUmlType|Boolean|IUmlValueSpecification|Boolean|Boolean|Boolean|String|IUmlType|Long|Long
// ***** VDMTOOLS START Name=init#1|HashMap KEEP=NO
public void init (final HashMap data) throws CGException {
{
String fname = new String("name");
Boolean cond_4 = null;
cond_4 = new Boolean(data.containsKey(fname));
if (cond_4.booleanValue())
setName(UTIL.ConvertToString(data.get(fname)));
}
{
String fname = new String("visibility");
Boolean cond_13 = null;
cond_13 = new Boolean(data.containsKey(fname));
if (cond_13.booleanValue())
setVisibility((IUmlVisibilityKind) data.get(fname));
}
{
String fname = new String("multiplicity");
Boolean cond_22 = null;
cond_22 = new Boolean(data.containsKey(fname));
if (cond_22.booleanValue())
setMultiplicity((IUmlMultiplicityElement) data.get(fname));
}
{
String fname = new String("type");
|
File |
Line |
org\overturetool\tex\ClassExstractorFromTexFiles.java |
56
|
org\overturetool\tex\ClassExstractorFromTexFiles.java |
129
|
StringBuilder outputStream = new StringBuilder();
String inLine = null;
Boolean skip = true;
String currentClass = "";
Boolean enabled = false;
Boolean texTagsFound = false;
while ((inLine = inputStream.readLine()) != null)
{
if (inLine.trim().startsWith(CLASS_START))
{
String classString = inLine.trim().substring(
CLASS_START.length()).trim();
int indexOfInh = classString.indexOf(':');
int indexOfSpace = classString.indexOf(' ');
if (indexOfInh >= 0 || indexOfSpace >= 0)
{
if (indexOfInh >= 0)
currentClass = classString.substring(0, indexOfInh);
else
currentClass = classString.substring(0, indexOfSpace);
} else
currentClass = classString;
enabled = true;
texTagsFound = true;
// continue;
} else if (inLine.trim().startsWith(CLASS_END + currentClass))
{
outputStream.append("\n" + inLine);
|
File |
Line |
org\overturetool\umltrans\vdm2uml\Uml2XmiEAxml.java |
69
|
org\overturetool\umltrans\vdm2uml\Uml2XmiEclipseUml.java |
69
|
return "mk_Uml2XmiEclipseUml`QualifierInfo(" + UTIL.toString(AssociationId) + "," + UTIL.toString(ClassId) + "," + UTIL.toString(QualifierName) + ")";
}
public boolean equals (Object obj) {
if (!(obj instanceof QualifierInfo))
return false;
else {
QualifierInfo temp = (QualifierInfo) obj;
return UTIL.equals(AssociationId, temp.AssociationId) && UTIL.equals(ClassId, temp.ClassId) && UTIL.equals(QualifierName, temp.QualifierName);
}
}
public int hashCode () {
return (AssociationId == null ? 0 : AssociationId.hashCode()) + (ClassId == null ? 0 : ClassId.hashCode()) + (QualifierName == null ? 0 : QualifierName.hashCode());
}
}
|
File |
Line |
org\overturetool\umltrans\vdm2uml\Uml2XmiEclipseUml.java |
218
|
org\overturetool\umltrans\vdm2uml\Uml2XmiEclipseUml.java |
457
|
protected void PrintClassDef (final HashSet defs) throws CGException {
HashSet iset_2 = new HashSet();
HashSet res_s_12 = new HashSet();
{
IUmlModelElement d = null;
{
for (Iterator enm_17 = defs.iterator(); enm_17.hasNext(); ) {
IUmlModelElement elem_16 = (IUmlModelElement) enm_17.next();
d = (IUmlModelElement) elem_16;
res_s_12.add(d);
}
}
}
iset_2 = res_s_12;
IUmlModelElement c = null;
for (Iterator enm_25 = iset_2.iterator(); enm_25.hasNext(); ) {
IUmlModelElement elem_3 = (IUmlModelElement) enm_25.next();
c = (IUmlModelElement) elem_3;
{
boolean succ_18 = true;
{
succ_18 = true;
if (!UTIL.equals(new Boolean(true), new Boolean(c instanceof IUmlClass)))
|
File |
Line |
org\overturetool\umltrans\vdm2uml\Uml2XmiEAxml.java |
1613
|
org\overturetool\umltrans\vdm2uml\Uml2XmiEclipseUml.java |
1160
|
}
// ***** VDMTOOLS END Name=PrintTemplates#1|IUmlTemplateSignature
// ***** VDMTOOLS START Name=GetUmlPrimitiveTypeId#1|IUmlType KEEP=NO
protected String GetUmlPrimitiveTypeId (final IUmlType t) throws CGException {
boolean succ_2 = true;
{
succ_2 = true;
if (!UTIL.equals(new Boolean(true), new Boolean(t instanceof IUmlBoolType)))
succ_2 = false;
if (succ_2)
return UTIL.ConvertToString(primitiveTypes.get(new String("bool")));
else {
succ_2 = true;
if (!UTIL.equals(new Boolean(true), new Boolean(t instanceof IUmlIntegerType)))
succ_2 = false;
if (succ_2)
return UTIL.ConvertToString(primitiveTypes.get(new String("int")));
else {
succ_2 = true;
if (!UTIL.equals(new Boolean(true), new Boolean(t instanceof IUmlCharType)))
|
File |
Line |
org\overturetool\umltrans\vdm2uml\Uml2XmiEAxml.java |
471
|
org\overturetool\umltrans\vdm2uml\Uml2XmiEclipseUml.java |
326
|
String elem_12 = UTIL.ConvertToString(enm_41.next());
c = elem_12;
{
doc.StartE(new String("element"));
doc.StartA(new String("xmi:idref"), UTIL.ConvertToString(classes.get(c)));
doc.StartA(new String("xmi:type"), new String("uml:Class"));
doc.StartA(new String("name"), c);
doc.StartA(new String("scope"), new String("public"));
doc.StartE(new String("properties"));
doc.StartA(new String("sType"), new String("Class"));
doc.StartA(new String("nType"), new String("1"));
doc.StopE(new String("element"));
|
File |
Line |
org\overturetool\umltrans\vdm2uml\Uml2XmiEAxml.java |
1132
|
org\overturetool\umltrans\vdm2uml\Uml2XmiEclipseUml.java |
840
|
protected void PrintAssociation (final IUmlAssociation association) throws CGException {
doc.StartE(oe);
doc.StartA(new String("isAbstract"), new String("false"));
doc.StartA(new String("isDerived"), new String("false"));
doc.StartA(new String("isLeaf"), new String("false"));
doc.StartA(new String("name"), new String(""));
{
String associationId = GetNextId();
{
doc.StartA(ID_uTAG, associationId);
String md_22 = null;
md_22 = association.getId();
associationIdMap.put(md_22, associationId);
doc.StartA(new String("xmi:type"), new String("uml:Association"));
{
|
File |
Line |
org\overturetool\api\xml\XmlAttributeList.java |
153
|
org\overturetool\api\xml\XmlEntityList.java |
153
|
if ((cond_1 = new Boolean((new Long(entities.size()).intValue()) > (new Long(0).intValue()))).booleanValue())
cond_1 = new Boolean((index.intValue()) > (new Long(1).intValue()));
}
if (cond_1.booleanValue()) {
index = UTIL.NumberToLong(UTIL.clone(new Long(index.intValue() - new Long(1).intValue())));
return new Boolean(true);
}
else {
index = UTIL.NumberToLong(UTIL.clone(new Long(0)));
return new Boolean(false);
}
}
// ***** VDMTOOLS END Name=Previous
// ***** VDMTOOLS START Name=getEntity KEEP=NO
public XmlEntity getEntity () throws CGException {
|
File |
Line |
org\overturetool\umltrans\vdm2uml\Vdm2Uml.java |
1808
|
org\overturetool\umltrans\vdm2uml\Vdm2Uml.java |
1861
|
public void CreateAssociationFromPropertyUnionType (final IUmlProperty property, final IOmlType omlType) throws CGException {
String tmpVal_4 = null;
tmpVal_4 = property.getName();
String name = null;
name = tmpVal_4;
UmlProperty prop = (UmlProperty) property;
HashSet props = new HashSet();
HashSet unArg_7 = new HashSet();
HashSet res_s_8 = new HashSet();
{
HashSet e_set_15 = new HashSet();
e_set_15 = new HashSet();
e_set_15.add(omlType);
IOmlType p = null;
{
for (Iterator enm_18 = e_set_15.iterator(); enm_18.hasNext(); ) {
IOmlType elem_17 = (IOmlType) enm_18.next();
p = (IOmlType) elem_17;
if ((p instanceof IOmlUnionType)) {
|
File |
Line |
org\overturetool\umltrans\vdm2uml\Vdm2Uml.java |
1829
|
org\overturetool\umltrans\vdm2uml\Vdm2Uml.java |
1882
|
if ((p instanceof IOmlUnionType)) {
res_s_8.add(CreateEndProperty((IOmlType) p, name));
}
}
}
}
unArg_7 = res_s_8;
HashSet rduset_19 = new HashSet();
for (Iterator enm_21 = unArg_7.iterator(); enm_21.hasNext(); ) {
HashSet e_20 = (HashSet) enm_21.next();
rduset_19.addAll(e_20);
}
props = rduset_19;
{
prop.setName(new String(""));
if (((new Long(props.size()).intValue()) > (new Long(1).intValue()))) {
|
File |
Line |
org\overturetool\umltrans\uml2vdm\Uml2Vdm.java |
332
|
org\overturetool\umltrans\uml2vdm\Uml2Vdm.java |
429
|
HashSet valueProps = new HashSet();
HashSet res_s_5 = new HashSet();
{
IUmlProperty p = null;
{
for (Iterator enm_15 = props.iterator(); enm_15.hasNext(); ) {
IUmlProperty elem_14 = (IUmlProperty) enm_15.next();
p = (IUmlProperty) elem_14;
Boolean pred_7 = null;
Boolean var1_8 = null;
var1_8 = p.hasIsReadOnly();
{
if ((pred_7 = var1_8).booleanValue()) {
Boolean var2_9 = null;
Boolean var1_10 = null;
var1_10 = p.getIsReadOnly();
var2_9 = new Boolean(UTIL.equals(var1_10, new Boolean(false)));
|
File |
Line |
org\overturetool\umltrans\vdm2uml\Vdm2Uml.java |
1190
|
org\overturetool\umltrans\vdm2uml\Vdm2Uml.java |
1492
|
ops = opDef.getFunctionList();
UmlOwnedOperations rexpr_5 = null;
HashSet arg_6 = new HashSet();
HashSet res_s_7 = new HashSet();
{
HashSet e_set_14 = new HashSet();
HashSet riseq_16 = new HashSet();
int max_17 = ops.size();
for (int i_18 = 1; i_18 <= max_17; i_18++)
riseq_16.add(new Long(i_18));
e_set_14 = riseq_16;
Long i = null;
{
for (Iterator enm_20 = e_set_14.iterator(); enm_20.hasNext(); ) {
Long elem_19 = UTIL.NumberToLong(enm_20.next());
i = elem_19;
IUmlOperation res_s_8 = null;
|
File |
Line |
org\overturetool\umltrans\uml\UmlClassNameType.java |
84
|
org\overturetool\umltrans\uml\UmlTemplateParameter.java |
84
|
vdm_init_UmlTemplateParameter();
{
setName(p1);
setPosition(line, column);
}
}
// ***** VDMTOOLS END Name=UmlTemplateParameter#3|String|Long|Long
// ***** VDMTOOLS START Name=init#1|HashMap KEEP=NO
public void init (final HashMap data) throws CGException {
String fname = new String("name");
Boolean cond_4 = null;
cond_4 = new Boolean(data.containsKey(fname));
if (cond_4.booleanValue())
setName(UTIL.ConvertToString(data.get(fname)));
}
// ***** VDMTOOLS END Name=init#1|HashMap
// ***** VDMTOOLS START Name=getName KEEP=NO
public String getName () throws CGException {
return ivName;
}
// ***** VDMTOOLS END Name=getName
// ***** VDMTOOLS START Name=setName#1|String KEEP=NO
public void setName (final String parg) throws CGException {
ivName = UTIL.ConvertToString(UTIL.clone(parg));
}
// ***** VDMTOOLS END Name=setName#1|String
}
|
File |
Line |
org\overturetool\umltrans\vdm2uml\Vdm2Uml.java |
1243
|
org\overturetool\umltrans\vdm2uml\Vdm2Uml.java |
1545
|
shape = (IOmlExplicitFunction) op.getShape();
Boolean isStatic = null;
isStatic = access.getStaticAccess();
String name = null;
name = shape.getIdentifier();
IUmlVisibilityKind visibility = (IUmlVisibilityKind) (IUmlVisibilityKind) convertScopeToVisibility((IOmlScope) scope);
UmlMultiplicityElement multiplicity = (UmlMultiplicityElement) new UmlMultiplicityElement(new Boolean(false), new Boolean(false), new Long(1), new Long(1));
IUmlType type = null;
IOmlType par_18 = null;
par_18 = (IOmlType) shape.getType();
type = (IUmlType) Vdm2UmlType.convertType(par_18);
|
File |
Line |
org\overturetool\api\xml\XmlAttributeList.java |
116
|
org\overturetool\api\xml\XmlEntityList.java |
116
|
cond_1 = new Boolean((index.intValue()) < (new Long(entities.size()).intValue()));
}
if (cond_1.booleanValue()) {
index = UTIL.NumberToLong(UTIL.clone(new Long(index.intValue() + new Long(1).intValue())));
return new Boolean(true);
}
else {
index = UTIL.NumberToLong(UTIL.clone(new Long(0)));
return new Boolean(false);
}
}
// ***** VDMTOOLS END Name=Next
// ***** VDMTOOLS START Name=Last KEEP=NO
public Boolean Last () throws CGException {
if (((new Long(entities.size()).intValue()) > (new Long(0).intValue()))) {
|
File |
Line |
org\overturetool\api\xml\XmlAttributeList.java |
96
|
org\overturetool\api\xml\XmlEntityList.java |
96
|
if (((new Long(entities.size()).intValue()) > (new Long(0).intValue()))) {
index = UTIL.NumberToLong(UTIL.clone(new Long(1)));
return new Boolean(true);
}
else {
index = UTIL.NumberToLong(UTIL.clone(new Long(0)));
return new Boolean(false);
}
}
// ***** VDMTOOLS END Name=First
// ***** VDMTOOLS START Name=Next KEEP=NO
public Boolean Next () throws CGException {
Boolean cond_1 = null;
{
if ((cond_1 = new Boolean((new Long(entities.size()).intValue()) > (new Long(0).intValue()))).booleanValue())
|