This commit is contained in:
skidoodle 2024-03-13 00:33:46 +01:00
commit e124a47765
19374 changed files with 9806149 additions and 0 deletions

View file

@ -0,0 +1,33 @@
USES Common/std;
USES Common/Converters;
USES Common/CommonUtil;
USES Common/ModelDataRetreive;
USES Common/StringUtil;
proc main()
Init();
info = "UML check STARTED at \t"time()"\n";
AssocWithoutDescriptoins();
info = "UML check STOPPED at \t"time()"\n";
end proc
proc Init()
//Language
setLanguage("SQL");
mkdir([OutputDir]);
setOutput( [OutputDir] "/" "AssocWithoutDescriptoins.bat" );
info = "Output generatig into: " [OutputDir] "/" "AssocWithoutDescriptoins.bat\n";
end proc
proc AssocWithoutDescriptoins()
out = "@echo off\n";
loop (Instances -> MClass as StartClass Where( getStereotype([StartClass]) == "Entity" ) )
loop (StartClass -> Role as StartRole -> MAssociation as Assoc where ([Assoc.description] == "") )
loop (Assoc -> MAssociationEnd as EndRole -> MClass as PartnerClass Where ([StartRole.id] < [EndRole.id]) and (getStereotype([PartnerClass])== "Entity") )
info = "Assoc between [" [StartClass.name] "]{"[StartRole.name] "} [" [PartnerClass.name] "]{"[EndRole.name]"}\n";
out = "echo between [" [StartClass.name] "]{"[StartRole.name] "} [" [PartnerClass.name] "]{"[EndRole.name]"}\n";
GenerateEditorNavigation([Assoc.guid]);
end loop
end loop
end loop
end proc

View file

@ -0,0 +1,34 @@
USES Common/std;
USES Common/Converters;
USES Common/CommonUtil;
USES Common/ModelDataRetreive;
USES Common/StringUtil;
USES Common/DBUtil;
proc main()
Init();
info = "UML check STARTED at \t"time()"\n";
AttributesWithConstraints();
info = "UML check STOPPED at \t"time()"\n";
end proc
proc Init()
//Language
setLanguage("SQL");
mkdir([OutputDir]);
setOutput( [OutputDir] "/" "AttributesWithConstraints.bat" );
info = "Output generating into: " [OutputDir] "/" "AttributesWithConstraints.bat\n";
end proc
proc AttributesWithConstraints()
loop (Instances -> MClass as Entity Where(getStereotype([Entity]) == "Entity" ) )
loop ( Entity -> MAttribute )
if ( getConstraint([MAttribute]) != "" )
info = [Entity.name]"."[MAttribute.name] ":\n" getConstraint([MAttribute]) "\n";
out = "echo " [Entity.name]"."[MAttribute.name]"\n";
GenerateEditorNavigation([MAttribute.guid]);
end if
end loop
end loop
end proc

View file

@ -0,0 +1,41 @@
USES Common/std;
USES Common/Converters;
USES Common/CommonUtil;
USES Common/ModelDataRetreive;
USES Common/StringUtil;
proc main()
Init();
info = "UML check STARTED at \t"time()"\n";
AttributesWithoutTaggedValue();
info = "UML check STOPPED at \t"time()"\n";
end proc
proc Init()
//Language
setLanguage("SQL");
mkdir([OutputDir]);
setOutput( [OutputDir] "/" "AttributesWithoutTaggedValue.bat" );
info = "Output generating into: " [OutputDir] "/" "AttributesWithoutTaggedValue.bat\n";
end proc
proc AttributesWithoutTaggedValue()
local totalCount = 0;
loop (Instances -> MClass as Entity Where(getStereotype([Entity]) == "Entity" ) )
loop ( Entity -> MAttribute
Where ( ( [MAttribute.type] != "DictionaryItem" )
and ( [MAttribute.type] != "DateTime" )
and ( [MAttribute.type] != "Boolean" )
)
)
if ( loopCount (MAttribute -> TaggedValue ) == 0 )
[totalCount] = incr([totalCount]);
info = [Entity.name]"."[MAttribute.name] [taggedvalue] ":\n" ;
out = "echo " [Entity.name]"."[MAttribute.name] "\n";
GenerateEditorNavigation([MAttribute.guid]);
end if
end loop
end loop
info = "Totally " [totalCount] " attributes found.\n";
end proc

View file

@ -0,0 +1,29 @@
USES Common/std;
USES Common/Converters;
USES Common/CommonUtil;
USES Common/ModelDataRetreive;
USES Common/StringUtil;
proc main()
Init();
info = "UML check STARTED at \t"time()"\n";
ClassesWithoutStereotype();
info = "UML check STOPPED at \t"time()"\n";
end proc
proc Init()
//Language
setLanguage("SQL");
mkdir([OutputDir]);
setOutput( [OutputDir] "/" "ClassesWithoutStereotype.bat" );
info = "Output generatig into: " [OutputDir] "/" "ClassesWithoutStereotype.bat\n";
end proc
proc ClassesWithoutStereotype()
out = "@echo off\n";
loop (Instances -> MClass Where (getStereotype([MClass]) == "") )
info = "Class [" [MClass.name] "]{" getStereotype([MClass]) "}{" [MClass.id] "}\n";
out = "echo Class [" [MClass.name] "]\n";
GenerateEditorNavigation([MClass.guid]);
end loop
end proc

View file

@ -0,0 +1,36 @@
USES Common/std;
USES Common/Converters;
USES Common/CommonUtil;
USES Common/ModelDataRetreive;
USES Common/StringUtil;
proc main()
Init();
info = "UML check STARTED at \t"time()"\n";
EntitiesWithoutAttributes();
info = "UML check STOPPED at \t"time()"\n";
end proc
proc Init()
//Language
setLanguage("SQL");
mkdir([OutputDir]);
setOutput( [OutputDir] "/" "EntitiesWithoutAttributes.bat" );
info = "Output generatig into: " [OutputDir] "/" "EntitiesWithoutAttributes.bat\n";
end proc
proc EntitiesWithoutAttributes()
out = "@echo off\n";
loop (Instances -> MClass Where getStereotype([MClass]) == "Entity" )
local attribCount = 0;
loop (MClass -> MAttribute )
[attribCount] = incr([attribCount]);
end loop
if ( [attribCount] == "0" )
info = [MClass.name] "\n";
out = "echo " [MClass.name] "\n";
GenerateEditorNavigation([MClass.guid]);
end if
end loop
end proc

View file

@ -0,0 +1,40 @@
USES Common/std;
USES Common/Converters;
USES Common/CommonUtil;
USES Common/ModelDataRetreive;
USES Common/StringUtil;
proc main()
Init();
info = "UML check STARTED at \t"time()"\n";
AssocWithoutDescriptoins();
info = "UML check STOPPED at \t"time()"\n";
end proc
proc Init()
//Language
setLanguage("SQL");
mkdir([OutputDir]);
setOutput( [OutputDir] "/" "MissingAssocMultiplicites.bat" );
info = "Output generatig into: " [OutputDir] "/" "MissingAssocMultiplicites.bat\n";
end proc
proc AssocWithoutDescriptoins()
out = "@echo off\n";
loop (Instances -> MClass as StartClass Where( getStereotype([StartClass]) == "Entity" ) )
loop (StartClass -> Role as StartRole -> MAssociation as Assoc where ([Assoc.description] == "") )
loop (Assoc -> MAssociationEnd as EndRole -> MClass as PartnerClass Where ([StartRole.id] < [EndRole.id]) and (getStereotype([PartnerClass])== "Entity") )
if ( [StartRole.multiplicity] == "" )
info = "Assoc between [" [StartClass.name] "] [" [PartnerClass.name] "]\n";
out = "echo between [" [StartClass.name] "] [" [PartnerClass.name] "]\n";
GenerateEditorNavigation([StartRole.guid]);
end if
if ( [EndRole.multiplicity] == "" )
info = "Assoc between [" [StartClass.name] "] [" [PartnerClass.name] "]\n";
out = "echo between [" [StartClass.name] "] [" [PartnerClass.name] "]\n";
GenerateEditorNavigation([EndRole.guid]);
end if
end loop
end loop
end loop
end proc

View file

@ -0,0 +1,40 @@
USES Common/std;
USES Common/Converters;
USES Common/CommonUtil;
USES Common/ModelDataRetreive;
USES Common/StringUtil;
proc main()
Init();
info = "UML check STARTED at \t"time()"\n";
AssocWithoutDescriptoins();
info = "UML check STOPPED at \t"time()"\n";
end proc
proc Init()
//Language
setLanguage("SQL");
mkdir([OutputDir]);
setOutput( [OutputDir] "/" "MissingRoleNames.bat" );
info = "Output generatig into: " [OutputDir] "/" "MissingRoleNames.bat\n";
end proc
proc AssocWithoutDescriptoins()
out = "@echo off\n";
loop (Instances -> MClass as StartClass Where( getStereotype([StartClass]) == "Entity" ) )
loop (StartClass -> Role as StartRole -> MAssociation as Assoc where ([Assoc.description] == "") )
loop (Assoc -> MAssociationEnd as EndRole -> MClass as PartnerClass Where ([StartRole.id] < [EndRole.id]) and (getStereotype([PartnerClass])== "Entity") )
if ( [StartRole.name] == "" )
info = "Assoc between [" [StartClass.name] "] [" [PartnerClass.name] "]\n";
out = "echo between [" [StartClass.name] "] [" [PartnerClass.name] "]\n";
GenerateEditorNavigation([StartRole.guid]);
end if
if ( [EndRole.name] == "" )
info = "Assoc between [" [StartClass.name] "] [" [PartnerClass.name] "]\n";
out = "echo between [" [StartClass.name] "] [" [PartnerClass.name] "]\n";
GenerateEditorNavigation([EndRole.guid]);
end if
end loop
end loop
end loop
end proc

View file

@ -0,0 +1,44 @@
USES Common/std;
USES Common/Converters;
USES Common/CommonUtil;
USES Common/ModelDataRetreive;
USES Common/StringUtil;
proc main()
Init();
info = "UML check STARTED at \t"time()"\n";
TrashItems();
info = "UML check STOPPED at \t"time()"\n";
end proc
proc Init()
//Language
setLanguage("SQL");
mkdir([OutputDir]);
setOutput( [OutputDir] "/" "TrashItems.bat" );
info = "Output generatig into: " [OutputDir] "/" "TrashItems.bat\n";
end proc
proc TrashItems()
loop (Instances -> MClass as Entity Where(getStereotype([Entity]) == "Entity" ) )
loop ( Entity -> Role as eRole -> MAssociation as Assoc where(getStereotype([Assoc])=="Uses" ) )
loop ( Assoc -> MAssociationEnd as rRole -> MClass as ROService where (getStereotype([ROService])=="ROService" ) )
local rolecount = 0;
local isAssocClass = _False();
loop ( Entity -> MAssociation )
[isAssocClass] = _True();
end loop
loop ( Entity -> Role)
[rolecount] = incr([rolecount]);
end loop
if ( [rolecount] == "1" )
if ( [isAssocClass] == _False() )
info = "[Entity:" [Entity.name] "][ROService:"[ROService.name]"]{"getStereotype([Assoc])"}\n";
GenerateEditorNavigation([Entity.guid]);
end if
end if
end loop
end loop
end loop
end proc

View file

@ -0,0 +1,41 @@
USES Common/std;
USES Common/Converters;
USES Common/CommonUtil;
USES Common/ModelDataRetreive;
USES Common/StringUtil;
proc main()
Init();
info = "UML check STARTED at \t"time()"\n";
UMLBug();
info = "UML check STOPPED at \t"time()"\n";
end proc
proc Init()
//Language
setLanguage("SQL");
// mkdir([OutputDir]);
// setOutput( [OutputDir] "/" "UMLBug.bat" );
// info = "Output generatig into: " [OutputDir] "/" "ClassesWithoutStereotype.bat\n";
end proc
proc UMLBug()
// out = "@echo off\n";
local classesInvestigated = "";
loop (Instances -> MClass as c)
if ( IsElementInTokenset([classesInvestigated], [c.name]) == _False() )
local count = 0;
local o = "";
loop (Instances -> MPackage-> MClass as alias Where( [alias.name] == [c.name]))
[count] = incr([count]);
[o] = [o] [MPackage.name] "::[" [alias.name] "]{" getStereotype([alias]) "}{" [alias.id] "}("[alias.stereotype]")\n";
end loop
if ( [count] != "1")
info = [o];
end if
[count] = 0;
[o] = "";
[classesInvestigated] = [classesInvestigated] [c.name] "\n";
end if
end loop
end proc

View file

@ -0,0 +1,31 @@
USES Common/std;
USES Common/Converters;
USES Common/CommonUtil;
USES Common/ModelDataRetreive;
USES Common/StringUtil;
proc main()
Init();
info = "UML check STARTED at \t"time()"\n";
UnspecifiedDictionaryItems();
info = "UML check STOPPED at \t"time()"\n";
end proc
proc Init()
//Language
setLanguage("SQL");
mkdir([OutputDir]);
setOutput( [OutputDir] "/" "UnSpecifiedDictionaryItems.bat" );
info = "Output generatig into: " [OutputDir] "/" "UnSpecifiedDictionaryItems.bat\n";
end proc
proc UnspecifiedDictionaryItems()
loop (Instances -> MClass Where(getStereotype([MClass]) == "Entity" ) )
loop( MClass -> MAttribute Where (([MAttribute.type] == "DictionaryItem") and ([MAttribute.defaultValue] == "") ) )
info = [MClass.name] "." [MAttribute.name] ":" [MAttribute.defaultValue]"\n";
out = "echo " [MClass.name] "." [MAttribute.name] "\n";
GenerateEditorNavigation([MAttribute.guid]);
end loop
end loop
end proc