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
da4b26f5
Commit
da4b26f5
authored
12 years ago
by
Ståle Walderhaug
Browse files
Options
Downloads
Patches
Plain Diff
merged with updated test2 (erlend)
parent
302f5817
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/serviceModelUML2Java.m2t
+20
-43
20 additions, 43 deletions
...formationcommand/transformations/serviceModelUML2Java.m2t
with
20 additions
and
43 deletions
transformations/org.universaal.tools.transformationcommand/transformations/serviceModelUML2Java.m2t
+
20
−
43
View file @
da4b26f5
...
...
@@ -74,6 +74,8 @@ uml.Interface::generateLevel2Interface() {
//create the operations for the level2 interface
self.generateLevel2InterfaceOperations()
//close the interface
'}'
}
/*
...
...
@@ -132,7 +134,7 @@ import org.universAAL.middleware.api.annotation.UniversAALService;'
'public interface ' self.name ' {\n'
//set the namespace based on the packagename reversed
'\n\
n
public final static String namespace = "http://' reverseDelimitedString(self.getFullOwnerPackageName(), ".") '/' self.name '.owl#";'
'\n\
t
public final static String namespace = "http://' reverseDelimitedString(self.getFullOwnerPackageName(), ".") '/' self.name '.owl#";'
}
...
...
@@ -222,10 +224,6 @@ import org.universAAL.ontology.phThing.PhysicalThing;
}
// Reuse from ontUML2JavaV2
//get the full name of the root package
uml.Classifier::getFullOwnerPackageName():String {
if (self.owner!=null) {
...
...
@@ -293,24 +291,31 @@ import org.universAAL.ontology.phThing.PhysicalThing;
' valueType = ' + ')\n'
// TODO: find what to use for value type
}
'
'
}
// Print the method signature
' public ' self.name
' public '
// Determine return type
if (outList.size() == 0) {
'void '
} else if (outList.size() > 1) {
'Object[] '
} else {
var returnParam:uml.Parameter =outList.first()
returnParam.name ' '
}
self.name
'('
'('
separator = ""
self.ownedParameter->forEach(par:uml.Parameter) {
if (par.direction == "out") {
if (par.direction == "in") {
separator + '@Input(name = "'par.name'") '+ par.type.name + ' ' par.name
separator = ", "
}
separator + par.direction + ' ' + par.type.name + ' ' par.name
separator = ", "
//uml.ParameterDirectionKind._getFeature("return")
}
')
')
'
}
uml.Operation::createEffectTypeMap() {
...
...
@@ -320,35 +325,7 @@ import org.universAAL.ontology.phThing.PhysicalThing;
}
//ORIG COMMENTED
/*
uml.Operation::generateAnnotated() {
'
@ServiceOperation
'
// Print any outputs
// Print any change effects
// Print the method signature
' public '
'('
self.ownedParameter->forEach(par:uml.Parameter) {
if (par.direction == "out") {
'!!'
}
par.direction + ' ' + par.type.name + ' ' par.name ','
//uml.ParameterDirectionKind._getFeature("return")
}
')
'
}
*/
}
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