RE: UML class input to (eventual) JSON-LD output

Julie,
In a couple of weeks there will be an updated specification here: http://smif.modeldriven.org that will include a much more complete treatment of a mapping from UML (with a supporting profile) and OWL/RDF. That same specification should apply to Jason-LD.
To answer your specific point: An instance of a UML class is a resource (one thing) about which triples (3 things)  make statements. OWL/RDF Property definitions are typically derived from UML properties and associations. OWL/RDF class definitions are typically derived from UML classes and perhaps data types. UML operations are more complex.

As for language code, there are a couple of levels – there are, of course, Java & Python APIs for parsing Jason-LD and managing triples. Turning that into usable applications is another layer. For example, we are generating Java that would look more familiar to a Java programmer from the models and use that for information federation and processing. Such mappings have to take care of issues like support for multiple inheritance and multiple classification. We apply the MDA (model driven architecture) principles to separate concerns of what the model expresses and the many technologies that may have to deal with it. The best way to start is to try out a pattern manually and then automate it.

Note that this is our approach and one that is in-process of becoming an OMG standard, others may have other ideas.
-Cory Casanave


From: Julie Bielski <jbielski@rxmaker.com>
Sent: Wednesday, May 9, 2018 10:05 AM
To: Cory Casanave <cory-c@modeldriven.com>; public-linked-json@w3.org
Subject: Re: UML class input to (eventual) JSON-LD output

Thank you for your quick response Cory. I don’t mind doing the translation by hand to start with, I just need some guidance on how to do things like take a UML class and an attribute (two things) and express it as a triple (3 things). Or when to use RDFS vocab vs. RDF vocab and how are they expressed as JSON-LD.

To your questions on code, the code will be a web application that provides farm-related information that I hope to integrate with other applications that provide farm-related information in order to support decision making by agronomists. The language will likely be Python or Java.

Julie

From: Cory Casanave <cory-c@modeldriven.com<mailto:cory-c@modeldriven.com>>
Date: Tuesday, May 8, 2018 at 7:48 PM
To: Julie Bielski <jbielski@rxmaker.com<mailto:jbielski@rxmaker.com>>, "public-linked-json@w3.org<mailto:public-linked-json@w3.org>" <public-linked-json@w3.org<mailto:public-linked-json@w3.org>>
Subject: RE: UML class input to (eventual) JSON-LD output

Yes,
We have done mappings of UML (and other modeling/ontology languages) to/from RDF and application code in various languages for about 15 years. It may seem a bit like a black art, but it is very doable. We are actually preparing some open source that does just that but it isn’t out yet – we do use it in projects.
Note that Jason-LD –IS— RDF, it is an RDF syntax. Multiple tools will produce RDF/OWL (and other things) from UML, for example: https://www.nomagic.com/product-addons/magicdraw-addons/cameo-concept-modeler-plugin


The other question is your “code”, what code to do what in what language? The open source I described will produce a Java API for the application based on the ontology as modeled in UML or OWL, it uses a specific profile and metamodel: http://smif.modeldriven.org. The focus of this is information federation, translation and analytics.

I hope this helps!

-Cory Casanave

From: Julie Bielski <jbielski@rxmaker.com<mailto:jbielski@rxmaker.com>>
Sent: Tuesday, May 8, 2018 3:53 PM
To: public-linked-json@w3.org<mailto:public-linked-json@w3.org>
Subject: UML class input to (eventual) JSON-LD output

Hi,

Does anyone here have experience with starting with a UML class diagram of an application domain and getting to the point where your code
can output instances of the various classes, their attributes, and relationships to instances of other classes via JSON-LD? From the reading I’ve done,
seems like I’d first convert the UML class diagram to RDFS and then to RDF, which could be serialized as JSON-LD? Seems like this would be a
common activity in the move from siloed data interchange to linked data.

Thanks,

Julie

Received on Wednesday, 9 May 2018 16:12:41 UTC