This content has been marked as final. Show 9 replies
RDFLANG information can be retrieved as part of the SDO_RDF_MATCH query:
SELECT o, o$rdflang FROM TABLE(SDO_RDF_MATCH(......
The selected o$rdflang variable can be used to filter rows.
After 2 years I am testing again the Oracle 11G new features to validate it to our system integrations.
a) Multilingual support.
Is now possible to make sem_match questions about the lang ?.
I tried to use FILTER langMatches(lang(?Label),"es") for example to filter this.. but in the results are column with Label$rdflang in en/es/..
b) More information associated to statement. For example the position order for the property in the class (not the order clause).
What is the way to do it, with reifications ?
For question (a):
FILTER (langMatches(lang(?label), "es")) should work. However, there are some known issues with the implementation of langMatches() in 11g Release 2. The issues have been fixed in the latest patchset (Patch 9819833: SEMANTIC TECHNOLOGIES 11G R2 FIX BUNDLE 2) available from My Oracle Support.
As a workaround, you can use FILTER (lang(?label) = "es") or FILTER (REGEX(lang(?label), "...")) for more complex expressions.
For question (b):
I'm not sure I understand your question. Can you please clarify with an example.
Firstly thank you, the (a) part relative to multilingual access works fine.
In the (b) part I mean the treatment of n cardinality.
For example; a shopping cart that has any articles where the position is relevant.
myshopping_cart pos 0 hasArticle article1
myshopping_cart pos 1 hasArticle article2
myshopping_cart pos 2 hasArticle article3
This is, the triple (Subject, property, object) has other attributes. What is the way to do this, with reifications quads?
As I am quite new to semantic web technologies, I might not understand your question completely, but, I was wondering :
About your example : Isn't rdf:Seq sufficient ?
myshopping_cart hasArticles articles
articles rdf:type rdf:Seq
articles rdf:_1 article1
articles rdf:_2 article2
articles rdf:_3 article3
Or is your question a general question about reification and Oracle Semantic Technologies ?
If you want to maintain ordering information , you might also want to use rdf:List. To handle your example, you would use something like:
myshoppingcart hasArticles _:head.
_:head rdf:first article0.
_:head rdf:rest _:item1.
_:item1 rdf:first article1.
_:itemn rdf:rest rdf:nil.
Even though rdf:list and rdf:seq will work for you example, In the general case, you might need to user reification as you suggested if you want to associate generic information with triples.
You can read this for more information:
Oracle supports loading and querying reified triples (they are just like any other triples, with the exception of having to add 4 extra triples per original triple to reify it, so your data set size will increase).
Thank you for your response.
rdf:bag, rdf:sequence, rdf:list do not cover all the cases.
For example; the quantity
If you need to say ;
myShoopingCarg hasArticle article1 Qty 5
myShoopingCarg hasArticle article2 Qty 4
You can make a sequence to say the cardinality (position), but to say quantity ?
I know this;
Subject Property Object
ID1 myShoopingCarg hasArticle article1
ID2 ID1 hasPosition 1
ID3 ID1 hasQty 5
Is it possible to do this instead of reified quad, that need 4 triplas
Thanks for the input Julien.
As another alternative, you could use an intermediate node to facilitate a ternary relationship. For example,
:myshopping_cart hasArticle _:a1 .
_:a1 :pos 1 .
_:a1 :hasArticle :article1 .
:myshopping_cart hasArticle _:a2 .
_:a2 :pos 2 .
_:a2 :hasArticle :article2 .
:myshopping_cart hasArticle _:a3 .
_:a3 :pos 3 .
_:a3 :hasArticle :article3 .
In general, using a sequence or using this intermediate node strategy will most likely work better than reification in practice.
This is I need, thanks to all