7 Replies Latest reply on Oct 24, 2017 5:12 AM by 3526958

    RDFView and Jena Adapter

    3526958

      Hello everyone,

       

      I am developing a Semantic system with R2RML.

      Environment: Oracle Database 12c Release 12.2.0.1.0 - 64bit Production

      Plugin: rdf_semantic_graph_support_for_12c_and_jena310_protege_5.0_2017_01_19

       

      With a R2RML conversion, a RDFView can be established and SPQRAL can be execute on this view.

       

      The question is that when I want to use some Jena Adapter, mapping is not working. Jena always gets mapping model(Metadata) rather than instance model.

      Anyway, my final expectation is to use Jena function like :

      model.union(model m);
      model.intersection(model m);
      model.difference(model m);
      

       

      The Java Code I used is below:

      String szJdbcURL = "szJdbcURL";
      String szUser = "szUser";
      String szPasswd = "szPasswd";
      String szModelName_1 = "r2rmlmodel_01";
      String szModelName_2 = "r2rmlmodel_02";
      Oracle oracle = new Oracle(szJdbcURL, szUser, szPasswd);
      Model model1 = ModelOracleSem.createOracleSemModel( oracle, szModelName_1);
      Model model2 = ModelOracleSem.createOracleSemModel( oracle, szModelName_2);
      Model model_union = model1.union(model2);
      Model model_intersection = model1.intersection(model2);
      Model model_difference_1 = model1.difference(model2);
      Model model_difference_2 = model2.difference(model1);
      System.out.println("---Model01---");
      model1.write(System.out, "N3");
      System.out.println("---Model02---");
      model2.write(System.out, "N3");
      System.out.println("---Union---");
      model_union.write(System.out, "N3");
      System.out.println("---intersection---");
      model_intersection.write(System.out, "N3");
      System.out.println("---difference(01 to 02)---");
      model_difference_1.write(System.out, "N3");
      System.out.println("---difference(02 to 01)---");
      model_difference_2.write(System.out, "N3");
      

      The code passed test and worked correctly with Native RDF store.

       

      Any idea?

       

      Thanks

       

      Jason