2 Replies Latest reply: Oct 10, 2013 5:48 PM by user571093 RSS

    how to just get the nodes without showing URI in sem_match?

    user571093

      Hi,


      I am trying to only retrieve all the individuals in a test rdf/xml ontology without displaying the uri. I tried strafter () and replace () functions in the filter clause in the sem_match query without a success. The uri won't go away. This is the query:

      select a

      from table(sem_match('{?a rdf:type :A. ?a :seqNumber ?n.

      filter (strafter(str(?a), "http://www.example.com/test.owl#"))

      }',

      sem_models('test'),

      null,

      sem_aliases(sem_alias('', 'http://www.example.com/test.owl#')),

      null)) order by a


      I changed strafter () with replace (). The result is still same.

      select a

      from table(sem_match('{?a rdf:type :A .

      filter(replace(str(?a), "http://www.example.com/test.owl#", ""))

      }',

      sem_models('test'),

      null,

      sem_aliases(sem_alias('', 'http://www.example.com/test.owl#')),

      null)) ORDER BY a


      This is the results:

      http://www.example.com/test.owl#a1

      http://www.example.com/test.owl#a2

      http://www.example.com/test.owl#a3

      http://www.example.com/test.owl#a4

      http://www.example.com/test.owl#a5

      http://www.example.com/test.owl#a6

      http://www.example.com/test.owl#a7

      http://www.example.com/test.owl#a8


      How can I just get the nodes without showing the uri? Where am I wrong in the query? I know I can add some annotations in the label so that I can just get the nodes. but that will make more data entry. Thanks a lot in advance.


      Hong