init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,50 @@
|
|||
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";
|
||||
CustomMultiplicityCheck();
|
||||
info = "UML check STOPPED at \t"time()"\n";
|
||||
end proc
|
||||
|
||||
proc Init()
|
||||
//Language
|
||||
setLanguage("SQL");
|
||||
mkdir([OutputDir]);
|
||||
// setOutput( [OutputDir] "/" "CustomMultiplicityCheck.bat" );
|
||||
end proc
|
||||
|
||||
proc CustomMultiplicityCheck()
|
||||
info = "Start Roele multiplicity: "[StartRoleMultiplicity]"\n";
|
||||
info = "End Roele multiplicity: "[EndRoleMultiplicity]"\n";
|
||||
info = "Assoc Class indicator parameter: " [HasAssocClass] "\n";
|
||||
|
||||
if ( [HasAssocClass] != _False() and [HasAssocClass] != _True() )
|
||||
[HasAssocClass] = _False();
|
||||
end if
|
||||
info = "Assoc Class indicator: " [HasAssocClass] "\n";
|
||||
|
||||
info = "/////////////////////////////////////////////////////\n";
|
||||
|
||||
loop(Instances -> MClass as StartClass Where (getStereotype([StartClass])=="Entity" ) )
|
||||
loop( StartClass -> Role as StartRole Where([StartRole.multiplicity] == [StartRoleMultiplicity] ) )
|
||||
loop ( StartRole -> MAssociation as Assoc -> MAssociationEnd as EndRole Where ( ([EndRole.multiplicity] == [EndRoleMultiplicity]) and [StartRole.id] < [EndRole.id] ) )
|
||||
loop ( EndRole -> MClass as EndClass Where( getStereotype([EndClass]) == "Entity" ) )
|
||||
if ( [HasAssocClass] == _False() )
|
||||
if ( HasAssociationClass([Assoc]) == "" )
|
||||
info = "[" [StartClass.name] "{" [StartRole.name] ":" [StartRole.multiplicity] "}]" "[" [EndClass.name] "{" [EndRole.name]":" [EndRole.multiplicity] "}]\n";
|
||||
end if
|
||||
else
|
||||
if ( HasAssociationClass([Assoc]) != "" )
|
||||
info = "[" [StartClass.name] "{" [StartRole.name] ":" [StartRole.multiplicity] "}]" "["[Assoc.name]"]" "[" [EndClass.name] "{" [EndRole.name]":" [EndRole.multiplicity] "}]\n";
|
||||
end if
|
||||
end if
|
||||
end loop
|
||||
end loop
|
||||
end loop
|
||||
end loop
|
||||
end proc
|
|
@ -0,0 +1,39 @@
|
|||
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";
|
||||
DictionaryItems();
|
||||
info = "UML check STOPPED at \t"time()"\n";
|
||||
end proc
|
||||
|
||||
proc Init()
|
||||
//Language
|
||||
setLanguage("SQL");
|
||||
mkdir([OutputDir]);
|
||||
setOutput( [OutputDir] "/" "DictionaryItems.bat" );
|
||||
info = "Output generatig into: " [OutputDir] "/" "DictionaryItems.bat\n";
|
||||
|
||||
end proc
|
||||
|
||||
proc DictionaryItems()
|
||||
info = "Dictionary Item tipusú oszlopok listája.\n";
|
||||
loop (Instances -> MClass Where(getStereotype([MClass]) == "Entity" ) )
|
||||
loop( MClass -> MAttribute Where ([MAttribute.type] == "DictionaryItem"))
|
||||
info = ConvertNameToSQLTableName([MClass.name]) "." ConvertNameToSQLColumnName([MAttribute.name]) ":" [MAttribute.defaultValue] "\n";
|
||||
end loop
|
||||
end loop
|
||||
|
||||
local dictitems = GetDictionaryItemTypes();
|
||||
local itemcount = 0;
|
||||
info = "Dictionary Item típusok listája:\n";
|
||||
loop (Instances -> TokenSet([dictitems]) )
|
||||
[itemcount] = incr([itemcount]);
|
||||
info = [TokenSet.line] "\n";
|
||||
end loop
|
||||
info = "Dictionary Item típusok száma:" [itemcount] "\n";
|
||||
end proc
|
|
@ -0,0 +1,51 @@
|
|||
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";
|
||||
ManyMultiplicityCheck();
|
||||
info = "UML check STOPPED at \t"time()"\n";
|
||||
end proc
|
||||
|
||||
proc Init()
|
||||
//Language
|
||||
setLanguage("SQL");
|
||||
mkdir([OutputDir]);
|
||||
// setOutput( [OutputDir] "/" "EntitiesWithoutAttributes.bat" );
|
||||
end proc
|
||||
|
||||
proc ManyMultiplicityCheck()
|
||||
local many = 0;
|
||||
local zeromany = 0;
|
||||
// out = "@echo off\n";
|
||||
loop (Instances -> MClass as StartClass Where( getStereotype([StartClass]) == "Entity" ) )
|
||||
loop (StartClass -> Role as StartRole -> MAssociation as Assoc )
|
||||
loop (Assoc -> MAssociationEnd as EndRole -> MClass as PartnerClass Where ([StartRole.id] < [EndRole.id]) and (getStereotype([PartnerClass])== "Entity") )
|
||||
if ( [StartRole.multiplicity] == "*" )
|
||||
[many] = incr([many]);
|
||||
end if
|
||||
if ( [StartRole.multiplicity] == "0..*" )
|
||||
[zeromany] = incr([zeromany]);
|
||||
end if
|
||||
|
||||
if ( [EndRole.multiplicity] == "*" )
|
||||
[many] = incr([many]);
|
||||
end if
|
||||
if ( [EndRole.multiplicity] == "0..*" )
|
||||
[zeromany] = incr([zeromany]);
|
||||
end if
|
||||
// info = "Assoc between [" [StartClass.name] "] [" [PartnerClass.name] "]\n";
|
||||
// out = "echo between [" [StartClass.name] "] [" [PartnerClass.name] "]\n";
|
||||
// GenerateEditorNavigation([Assoc.guid]);
|
||||
end loop
|
||||
end loop
|
||||
end loop
|
||||
|
||||
// info = "* :" [many] "\n";
|
||||
// info = "0..* :" [zeromany] "\n";
|
||||
end proc
|
|
@ -0,0 +1,35 @@
|
|||
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";
|
||||
Szamossagok();
|
||||
info = "UML check STOPPED at \t"time()"\n";
|
||||
end proc
|
||||
|
||||
proc Init()
|
||||
//Language
|
||||
setLanguage("SQL");
|
||||
mkdir([OutputDir]);
|
||||
// setOutput( [OutputDir] "/" "Szamossagok.bat" );
|
||||
end proc
|
||||
|
||||
proc Szamossagok()
|
||||
local count = 0;
|
||||
loop ( Instances -> MClass Where ( getStereotype([MClass]) == "Entity" ) )
|
||||
local associd = "";
|
||||
loop ( MClass -> MAssociation )
|
||||
[associd] = [MAssociation.id];
|
||||
end loop
|
||||
|
||||
if ( [associd] != "" )
|
||||
[count] = incr([count]);
|
||||
end if
|
||||
end loop
|
||||
info = "Asszociációs osztályok száma: " [count] "\n";
|
||||
end proc
|
Loading…
Add table
Add a link
Reference in a new issue