4 Replies Latest reply on Jun 30, 2009 2:30 PM by 673499

    Helllpp meee.... Invalid Number.... Rule

    673499
      Hi everyone... i got this problem..
      i inserted 1 rule...

      INSERT INTO mdsys.semr_pariwisata_rb VALUES ('panas_rule',
      '
      (?x <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.owl-ontologies.com/Ontology1227225596.owl#Tempat>)
      (?x <http://www.owl-ontologies.com/Ontology1227225596.owl#punya_suhu> ?suhu)
      ',
      'suhu >= 25', '(?x <http://www.owl-ontologies.com/Ontology1227225596.owl#punya_kondisi> <panas^^<http://www.w3.org/2001/XMLSchema#string>)', null);


      ... the rule is when instance Tempat has suhu that greather Than and Equal 25 then it has panas value for punya_kondisi property... the type of punya_suhu is float...

      as directions on RDF_ORACLE.pdf,,, i have to delete my rule index and create a new one. I did that instruction..
      But Oracle gave me an errror message ....



      Error starting at line 1 in command:
      EXECUTE sem_apis.create_entailment('owltst', sem_models('pariwisata'), sem_rulebases('RDFS','pariwisata_rb'), null, null, 'USER_RULES=T');
      Error report:
      ORA-29532: Java call terminated by uncaught Java exception: oracle.jdbc.driver.OracleSQLException: ORA-01722: invalid number
      ORA-06512: at "MDSYS.SDO_SEM_INFERENCE", line 4840
      ORA-06512: at "MDSYS.RDF_APIS", line 11
      ORA-06512: at line 1



      anyone help me plizz....
        • 1. Re: Helllpp meee.... Invalid Number.... Rule
          alwu-Oracle
          Hi,

          It is very likely you have some incorrect data associated with the <http://www.owl-ontologies.com/Ontology1227225596.owl#punya_suhu> property.

          Next is my small test case... Note that the way you specify typed literal should be changed.

          create table owltst (triple sdo_rdf_triple_s) compress nologging;
          exec sem_apis.create_sem_model('pariwisata','owltst','triple');

          execute sem_apis.create_rulebase('pariwisata_rb');

          INSERT INTO mdsys.semr_pariwisata_rb VALUES ('panas_rule',
          '(?x <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.owl-ontologies.com/Ontology1227225596.owl#Tempat>)(?x <http://www.owl-ontologies.com/Ontology1227225596.owl#punya_suhu> ?suhu)',
          'suhu >= 25', '(?x <http://www.owl-ontologies.com/Ontology1227225596.owl#punya_kondisi> "panas"^^<http://www.w3.org/2001/XMLSchema#string>)', null);


          insert into owltst (triple) values (sdo_rdf_triple_s('pariwisata',
          '<urn:x1>','<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>', '<http://www.owl-ontologies.com/Ontology1227225596.owl#Tempat>'));

          insert into owltst (triple) values (sdo_rdf_triple_s('pariwisata',
          '<urn:x1>', '<http://www.owl-ontologies.com/Ontology1227225596.owl#punya_suhu>', '"26"^^<http://www.w3.org/2001/XMLSchema#integer>'));

          insert into owltst (triple) values (sdo_rdf_triple_s('pariwisata',
          '<urn:x2>','<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>', '<http://www.owl-ontologies.com/Ontology1227225596.owl#Tempat>'));

          insert into owltst (triple) values (sdo_rdf_triple_s('pariwisata',
          '<urn:x2>', '<http://www.owl-ontologies.com/Ontology1227225596.owl#punya_suhu>', '"24"^^<http://www.w3.org/2001/XMLSchema#integer>'));


          EXECUTE sem_apis.create_entailment('owltst', sem_models('pariwisata'), sem_rulebases('RDFS','pariwisata_rb'), null, null, 'USER_RULES=T');


          select s, o from table(sem_match( '(?s <http://www.owl-ontologies.com/Ontology1227225596.owl#punya_kondisi> ?o ) ', sem_models('pariwisata'), sem_rulebases('rdfs','pariwisata_rb'), null, null, null));

          S
          --------------------------------------------------------------------------------
          O
          --------------------------------------------------------------------------------
          urn:x1
          panas

          Cheers,

          Zhe Wu
          • 2. Re: Helllpp meee.... Invalid Number.... Rule
            673499
            Hmm...

            is Oracle not supported for float datatype?

            so, what data type that Oracle supports?


            I created my data on Protege, and load it into Oracle.

            Thanks
            • 3. Re: Helllpp meee.... Invalid Number.... Rule
              alwu-Oracle
              Hi,

              Oracle supports float.

              Continuing my previous example ...

              insert into owltst (triple) values (sdo_rdf_triple_s('pariwisata',
              '<urn:x3>','<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>', '<http://www.owl-ontologies.com/Ontology1227225596.owl#Tempat>'));

              insert into owltst (triple) values (sdo_rdf_triple_s('pariwisata',
              '<urn:x3>', '<http://www.owl-ontologies.com/Ontology1227225596.owl#punya_suhu>', '"25.1"^^<http://www.w3.org/2001/XMLSchema#float>'));

              EXECUTE sem_apis.create_entailment('owltst', sem_models('pariwisata'), sem_rulebases('RDFS','pariwisata_rb'), null, null, 'USER_RULES=T');

              select s, o from table(sem_match( '(?s <http://www.owl-ontologies.com/Ontology1227225596.owl#punya_kondisi> ?o ) ', sem_models('pariwisata'), sem_rulebases('rdfs','pariwisata_rb'), null, null, null));

              S
              --------------------------------------------------------------------------------
              O
              --------------------------------------------------------------------------------
              urn:x3
              panas

              urn:x1
              panas


              Can you try my example and see if there is any error reported?

              Thanks,

              Zhe Wu
              • 4. Re: Helllpp meee.... Invalid Number.... Rule
                673499
                Hi Zhe-Wu...


                Thanks for your reply...
                Your example works well...

                I dont know why my problem happened..

                I constructed my ontology on Protege, and convert owl file to n3
                then load it to oracle,


                thanks for your reply
                - -Khd- -