attributes without explicit mutliplicity now get multiplicity 1

git-svn-id: https://projects.brucker.ch/su4sml/svn/infsec-import/trunk/src/su4sml@4124 3260e6d1-4efc-4170-b0a7-36055960796d
This commit is contained in:
Jürgen Doser 2006-03-08 11:19:20 +00:00
parent 5ab79aa912
commit 69b426c531
1 changed files with 4 additions and 2 deletions

View File

@ -557,7 +557,7 @@ fun mkAttribute tree =
(XmlTree.follow "UML:StructuralFeature.type")) trees,
multiplicity = if XmlTree.exists "UML:StructuralFeature.multiplicity" trees
then (mkMultiplicity o hd o (XmlTree.follow "UML:StructuralFeature.multiplicity")) trees
else [(0,~1)]
else [(1,1)]
handle _ => [(1,1)],
targetScope = getTargetScopeMaybe atts,
ownerScope = getOwnerScopeMaybe atts,
@ -1044,8 +1044,10 @@ fun mkGeneralization tree =
(XmlTree.follow "UML:Generalization.child")) trees,
parent_id = (getXmiIdref o XmlTree.attributes_of o hd o
(XmlTree.follow "UML:Generalization.parent")) trees }
handle Empty => raise IllFormed ("Empty in mkGeneralization: "^getXmiId atts)
in XmlTree.apply_on "UML:Generalization" f tree
handle XmlTree.IllFormed msg => raise IllFormed ("in mkGeneralization: "^msg)
end
@ -1108,7 +1110,7 @@ fun mkPackage tree =
direct_childs)),
events = map mkEvent (filterEvents trees)
}
handle Empty => raise IllFormed ("Error Empty in mkPackage "^(getName atts))
(* handle Empty => raise IllFormed ("Error Empty in mkPackage "^(getName atts))*)
end
else raise IllFormed "did not find a UML:Model or UML: Package")
handle XmlTree.IllFormed msg => raise IllFormed ("in mkPackage: "^msg)