With a named association to GenericParameter or with an explicit
extension to the abstract Parameter, I have the opportunity to use (at
least) an AtomicValue or a BooleanValue. If the parameter is, say,
"Length" then a value of "True" does not make a lot of sense,
particularly if the _unit is "Gallons". Alternatively if I use Atomic
value I could give a value of "fish". This all ends up with things which
my old physics teacher would not have liked :-) I could give length as
* 42 (no units)
* fish meters (wrong type)
* etc.
Why was Boolean singled out as a specially limited type. Why was there
no RealValue or IntegerValue subtype of Measurement?
If I extend to Parameter how do I control the type of its value? I have
experimented with manually editing the generated schema to use
xsd:restrict on the subtype. This seems to b what I need but inspection
of the Andromeda cartridge suggests that I cannot generate such a
subtype from MagicDraw.
Nigel
Have you managed to generate an XSD that you are happy with by using xsd:restriction? If so, I will see if I can work out what changes are needed to a cartridge to generate the XSD automatically.
In terms of FuGE, it was always assumed that datatypes and units would be checked by external validation beyond simple XSD checks. There are various other parts of the schema that require additional validation: correct use of CV terms, foreign key integrity - usage of units and datatypes was another one of these.
There is nothing to stop you further extending AtomicValue with the datatypes that you need, although it is not simple to override the association from Parameter to Measurement to ensure that only a certain value type is valid. I don't know if this can be done in XSD - have you found a way of doing this using restriction?
Cheers
Andy
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Fuge-devel mailing list
Fuge-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fuge-devel
to elaborate on what andy has said, there are often semantics in the UML model (here it is the Parameter associations DataType and Unit that are inherited by AtomicValue and BooleanValue) that can't be expressed by the XML Schema, OWl is an especially good case of this where an application like protégé is used to load an OWL XML document and reconstruct the semantics.
hopefully andy's suggestions will help because it is always a bonus when the XMLSchema can carry the semantics.
cheers,
michael
Michael Miller
Lead Software Developer
Rosetta Biosoftware Business Unit
www.rosettabio.com
Yes, I have effective xsd:restriction use (doe by hacking the xsd file)
, though I am not entirely sure that it is logically sound so I will
continue with that.
The other end of my problem is that I am unsure of the correct UML to
represent what I want. I believe that templates and bind associations
are appropriate. I could send diagrams by another route. I will continue
to look at that.
To comment on Michael's remark, we in Aber have of course always had a
problem with the untyped references (foreign keys) but I cannot
find/remember Andy's rationale for this. Limiting/checking of ontology
references is the other aspect of what we are trying to achieve.
Specifically that is, limiting acceptable values of
measurement/_unit/@Ontology_ref to a pre-defined list of acceptable
units for the measurement in question.
Nigel