Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uaaltools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
universAAL
uaaltools
Commits
16beee83
Commit
16beee83
authored
11 years ago
by
Dott. Federico Volpini
Browse files
Options
Downloads
Patches
Plain Diff
Changed context for rule getElementProps (uml.Classifier)
Class names and Properties now trimmed before Unity check
parent
8230ab9e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
transformations/org.universaal.tools.transformationcommand/transformations/validateOntUML.m2t
+13
-20
13 additions, 20 deletions
....transformationcommand/transformations/validateOntUML.m2t
with
13 additions
and
20 deletions
transformations/org.universaal.tools.transformationcommand/transformations/validateOntUML.m2t
+
13
−
20
View file @
16beee83
...
...
@@ -52,6 +52,7 @@ texttransformation validateOntologyUml (in uml:"http://www.eclipse.org/uml2/3.0.
// Creates the Model Entity List
verbose("Building Model Class list and tree",false,true)
self.ownedElement->forEach(c : uml.Class) {
c.name = c.name.trim()
EntityList.add(c)
c.updategeneralEntityTreeHashtable()
}
...
...
@@ -159,6 +160,7 @@ texttransformation validateOntologyUml (in uml:"http://www.eclipse.org/uml2/3.0.
if(att.type == null) verbose(self.name+": Property "+att.name+" has UNDEFINED type",true,false)
else if(!att.isDataType()) verbose(self.name+": Property "+att.name+" has UNKNOWN type",true,false)
}
if(pList.isEmpty()){
...
...
@@ -173,7 +175,7 @@ texttransformation validateOntologyUml (in uml:"http://www.eclipse.org/uml2/3.0.
verbose("INFO: Element name:"+e.name+", element type:"+e.oclGetType(), false, false)
if(e.name.size() == 0) {
var parent:string
if(e.oclGetType()
==
'Class') parent = e.name
if(e.oclGetType()
.equals(
'Class')
)
parent = e.name
else parent = e.owner.name
verbose(parent+": Empty "+e.oclGetType()+" name not allowed",true,false)
return false
...
...
@@ -217,23 +219,21 @@ texttransformation validateOntologyUml (in uml:"http://www.eclipse.org/uml2/3.0.
return res
}
uml.Class::getElementProps():hashtable {
var pHash:hashtable
pHash.put('name',self.name);
pHash.put('type',self.oclGetType());
pHash.put('parent','');
return pHash
}
uml.Property::getElementProps():hashtable {
uml.Classifier::getElementProps(){
var pHash:hashtable
pHash.put('name',self.name);
pHash.put('type',self.oclGetType());
pHash.put('parent',self.class.name+': ');
if(self.oclGetType().equals('Class')){
pHash.put('parent','');
} else {
var prop:uml.Property
prop = self
pHash.put('parent',prop.class.name+': ');
}
return pHash
}
uml.Class::updateHashtableClass(pList:list) {
if (!pList.isEmpty()){
var pHash:hashtable
...
...
@@ -245,13 +245,6 @@ texttransformation validateOntologyUml (in uml:"http://www.eclipse.org/uml2/3.0.
}
}
// OLD: Create list of generic class that MUST BE DERIVED from all the other classes
/*uml.Model::createSuperentitiesList() {
listOfUpperOntologyEntities.add("Service")
listOfUpperOntologyEntities.add("Device")
listOfUpperOntologyEntities.add("ManagedIndividual")
}*/
// Create list of generic class that MUST BE DERIVED from all the other classes
uml.Model::createSuperentitiesList(){
self.packageImport->forEach(p:uml.PackageImport){
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment