4 Replies Latest reply on Aug 27, 2007 10:03 AM by 556961

    Question about Namespaces

    556961
      Hi again,
      i found this in the manual:

      The following default namespaces (namespace_id and namespace_val attributes)
      are used by the SDO_RDF_MATCH table function:

      ('rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#')
      ('rdfs', 'http://www.w3.org/2000/01/rdf-schema#')
      ('xsd', 'http://www.w3.org/2001/XMLSchema#')


      I cant find, where is stored this information, from the MDSYS.RDF_NAMESPACE$ i can call the full URI but not the abbreviation.
        • 1. Re: Question about Namespaces
          Mannamal-Oracle
          Hi,

          You do not need to worry about where it is stored. A query such as the following should work:

          SELECT x Male
          FROM TABLE(SDO_RDF_MATCH(
          '(?x rdf:type :Male)',
          SDO_RDF_Models('family'),
          null,
          SDO_RDF_Aliases(SDO_RDF_Alias('','http://www.example.org/family/')),
          null));

          You can see that 'rdf:type' is used in the query pattern. Perhaps I am not understanding your question correctly.

          Melli
          • 2. Re: Question about Namespaces
            556961
            Hi,
            I want to write a function, which lists all namespaces and their abbreviations.

            Best regards,
            bufka

            P.S. There is a way to add abbreviations for the newly added namespaces?
            • 3. Re: Question about Namespaces
              Mannamal-Oracle
              Hi Bufka,

              Unfortunately I do not think a function can be written to list all namespaces and their abbreviations. For performance reasons these are not stored in a database table, but are stored in static variables in the code.

              Currently there is no table-based interface for managing namespaces, so there is no way to add new namespaces and abbreviations. At query time, the SDO_RDF_Aliases parameter can be used in a SDO_RDF_MATCH query to specify an alias so that query writing can be simpler (the full URI would not have to be repeated in multiple patterns):

              SELECT x Male
              FROM TABLE(SDO_RDF_MATCH( '(?x rdf:type :Male)',
              SDO_RDF_Models('family'),
              null,
              SDO_RDF_Aliases(SDO_RDF_Alias('','http://www.example.org/family/')),
              null));

              Melli
              • 4. Re: Question about Namespaces
                556961
                Hello Melli,
                I am acquainted with the SDO_RDF_Alias, unfortunately, this procedure does not help me a lot. Thank you very much for your help!

                Greeting,
                buFka