2 Replies Latest reply on May 26, 2017 8:32 AM by SemanticGuy

    Why Protégé data properties are lost when commiting a new model?

    SemanticGuy

      Hi,

       

      When we create R2RML view model from views and we open the model using Protege and Oracle plugin, we can nicely see the columns as data properties of types. We can create an ontology using Protege on top of view and save it in a new model, and do many cool things.

       

      However, if we modify the view model (i.e. by modifying the ttl to expose a new mapped query), after committing changes in model, when the model is reopen from Protégé, it seems like the data properties doesn't exist anymore for any rdf:type.

       

      Is there any reason for such behaviour? We have reproduced the same issue from different models and different environments...

        • 1. Re: Why Protégé data properties are lost when commiting a new model?
          alwu-Oracle

          Hi,

           

          Trying to understand exactly what is sequence of actions here. Did you get a .ttl file, open it in Protege, perform edits, and save into an Oracle RDF model?

           

          Thanks,


          Zhe Wu

          • 2. Re: Why Protégé data properties are lost when commiting a new model?
            SemanticGuy

            Sorry for late answer... for some reason I've skip the notification email about the answer.

             

            I think I didn't explain it clearly. What we do is we open Oracle Model using Protege Plugin. Here is the sequence of actions.

             

            Given a model created on R2RML views (publishing Oracle Views as RDF triples), I can open such model with Protégé and I see the view the view as rdf:type and the columns as their data properties, what makes sense. We use this types and data properties to create Ontologies saved in a different model.

             

            We're trying to figure out about the maintenance of such models. As part of our experiments, we changed the data property of one of the views (using the ttl editor in SQL Developer Tool) and commit the changes. After doing that, when we reopen the model, the data properties has completly vanished. Even more, if we simply commit the changes, data properties are vanished as well. Maybe it's an expected behaviour, but we would like to know what's the best way to handle these models from Protege, or may be it's unexpected and our experience could help to fix an issue.

             

            So here is steps to reproduce the issue.

             

            1) Create a regular Relational Database EMP DEPT tables and fill them as described in https://docs.oracle.com/database/121/RDFRM/GUID-CEFE07FA-FAAB-4FF0-B70C-0BDA20306F87.htm#RDFRM661 (I don't copy it to reduce post size)

            2) Create two different Views:

            CREATE VIEW VIEWDEPT

            AS SELECT

                "DEPTNO" as "HasClassId"

                ,"DNAME" as "HasName"

                ,"LOC" as "IsLocatedIn"

            FROM

            DEPT;

             

            and

             

            CREATE VIEW VIEWEMP

            AS SELECT

                "EMPNO" as "HasClassId",

                "ENAME" as "IsCalled",

                "JOB" as "WorksAs",

                "DEPTNO" as "WorksIn"

            FROM EMP;

             

             

            2) Create a model MYNEWMODEL with following syntax:

             

             

            BEGIN

              sem_apis.create_rdfview_model(

                model_name => 'MYNEWMODEL',

                tables => SYS.ODCIVarchar2List('"SCOTT"."VIEWEMP"','"SCOTT"."VIEWDEPT"'),

                prefix => 'http://example.org/',

                options => ' KEY_BASED_REF_PROPERTY  CONFORMANCE=T ');

            END;

             

            3) Using Protege, with Oracle plugin open model:

            Oracle --> Open Database Ontology --> enter Oracle credentials and select MYNEWMODEL

             

            4) You should be able to see VIEWEMP and VIEWDEPT rdf:types (i.e. you could create a class PERSON and place VIEWEMP as subclass, but this is another topic)

            5) You should be able to see list of data properties as well:

            6) Now, using SQL Developer (in our case, 4.2.0.17.089), expand RDF Semantic Graph --> RDF Views --> Right Click on MyNewModel-->Edit R2RML Mapping --> and change predicate "WorksIn" by "EmployedBy". Commit Changes by pressing Commit Mapping to:

            to

             

            3) Using Protege, with Oracle plugin re-open model:

            Oracle --> Open Database Ontology --> enter Oracle credentials and select again MYNEWMODEL

             

            You can still seeing the rdf:Types:

             

            But DataProperties have gone: