OntoUML / ontouml-js

Javascript library for manipulating OntoUML models.
Apache License 2.0
11 stars 8 forks source link

Add ontouml2owl service #91

Closed tgoprince closed 1 year ago

tgoprince commented 2 years ago

This PR adds a new model intelligence service for ontouml-js.

It serializes an OntoUML model as linked data by instantiating classes and properties from the OWL implementation of the ontouml-schema.

For instance, the class below:

{
    "id" : "c1",
    "type" : "Class",
    "name" : { 
        "en": "Person"
    },
    "description" : { 
        "en": "An animal that can show intelligent behaviour"
    },
    "stereotype" : "kind",
    "restrictedTo" : [ "functional-complex" ]
    "isAbstract" : false,
    "isDerived" : false,
    "isExtensional" : false,
    "isPowertype" : false,
    "order" : 1,
    "properties" : null
    "literals" : null,
    "propertyAssignments" : null,
  }

is serialized as:

:c1 rdf:type ontouml:Class .
    ontouml:name "Person"@en ;
    ontouml:description "An animal that can show intelligent behaviour"@en ;
    ontouml:stereotype ontouml:kind ;
    ontouml:restrictedTo ontouml:functionalComplex ;
    ontouml:isAbstract "false"^^xsd:boolean ;
    ontouml:isDerived "false"^^xsd:boolean ;
    ontouml:isExtensional "false"^^xsd:boolean ;
    ontouml:isPowertype "false"^^xsd:boolean ;
    ontouml:order "1"^^xsd:positiveInteger .