help interpreting uml style data model

Hello

I have read about UML class diagrams but I am having trouble interpreting a UML style data model. Here is a link to the model.http://www.pageom.org/models/omg/v_1.0_b3/index.htm?goto=15


On this model you will see there is an abstract class called 'Locatable.' In this context it means something that can be assigned a location on a DNA sequence. These positions generally have 3 properties start, stop and strand. I wont explain strand as its unnecessary detail but a DNA sequence is just like a very long character string and the location of something is just its start and stop position in the string.

On this diagram there is a link between the abstract classes Locatable and Location with a role name '+is_treated_as' Is this link just a normal association between the 2 classes showing a many to many relationship? This association is navigable in one direction

If so, according to this diagram, something that is locatable can have many locations (this is ok in the real world as locatable things often have several possible ambiguous locations) and the same location could apply to many locatable things. Fair enough.

But the genomic_variation is a subclass of locatable and genomic_reference_location is a subclass of location but the relationship between genomic_variation and genomic_reference_location is not * to * but it is a 'subtype' of * to * so I presume thats acceptable. But it is navigable in both directions Doesn't this violate the relationship of the 'parent' classes which is only navigable in one direction?

thanks
andiejeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

marklorenzCommented:
Locatable is an interface.  It is similar to an abstract class except it is used across the class (type) hierarchy.  It merely defines a set of required behaviors (methods) for those classes "implementing" the interface.

Keep in mind that data models and well-designed UML models are not equivalent, so there may need to be some adaptation when going from the data view to the model view.

I'd recommend you read:
http://www.objectmentor.com/resources/articles/umlClassDiagrams.pdf
especially the part about interfaces.

Also, check out:
http://www.tdan.com/view-articles/9219
0
andiejeAuthor Commented:
HI

I had already read both of those pages before I posted the question but they don't help me answer this specific question.

The docs on that page say  Locatable and Location are abstract classes. WHy did you say they were interfaces? Which bit of the notation makes you think they are interfaces?

Would it be possible for you to answer the question about the fact the relationship between the classes is navigable in both directions
0
marklorenzCommented:
Location is an abstract class.  It must be subclassed with a concrete class to be able to instantiate.

Locatable is an interface.  It can also be subclassed, but only by other interfaces.  Interfaces can never be instantiated.  You can however declare a variable to be of type Locatable.  This allow multiple concrete instances to be referenced by that variable, as long as they implement the interface (i.e. they will respond to all the method signatures in the interface).

So, in your model, a Location (subclass) is an actual place to be referenced.  It implements Locatable, meaning that it has implemented all the methods in that "contract" and can be used in the ways that "places" can be used.  Loosely speaking, an interface gives you a "type" hierarchy that is outside the restrictions of the actual type hierarchy.

In UML, the lines between an interface and a class are dashed instead of solid. Whether this one is or not is a matter of whomever drew the diagram (i.e. they may not adhere to UML).  Also, it is a fact that interface names often end in "able", such as Printable, Drawable, Depositable, Refundable, ...

I believe, but is only a guess since I don't know the author's thinking, that the bi-directional arrows you asked about are only that he wants to be able to refer each way, such as through getter methods.

HTH, Mark
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Modeling Languages

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.