Nowa wersja
|
Poprzednia wersja
|
pl:miw:miw08_xtt_rif:przyklad3 [2008/03/14 09:38] miw utworzono |
pl:miw:miw08_xtt_rif:przyklad3 [2019/06/27 15:50] (aktualna) |
====== Przykład 3 ====== | ====== Przykład 3a ====== |
<code>Używamy prefix'u bks jako skrótu dla http://example.com/books# | <code>a. Warunek |
oraz curr dla http://example.com/currencies# | Compact URI prefixes: |
| |
a. Warunek RIF | bks expands into http://example.com/books# |
| cpt expands into http://example.com/concepts# |
| curr expands into http://example.com/currencies# |
| |
And ( Exists ?Buyer ( purchase^^rif:local ( ?Buyer | RIF condition |
?Seller | |
book^^rif:local ( ?Author bks:LeRif^^rif:iri ) | And (Exists ?Buyer ("cpt:purchase"^^rif:iri(?Buyer |
curr:USD^^rif:iri ( 49^^xsd:integer ) ) | ?Seller |
| "cpt:book"^^rif:iri(?Author "bks:LeRif"^^rif:iri) |
| "curr:USD"^^rif:iri("49"^^xsd:integer))) |
?Seller=?Author ) | ?Seller=?Author ) |
</code><code xml> | </code><code xml> |
| |
<And> | <And> |
<formula> | <formula> |
<Exists> | <Exists> |
<declare><Var>Buyer</Var></declare> | <declare><Var>Buyer</Var></declare> |
<formula> | <formula> |
<Uniterm> | <Atom> |
<op><Const type="rif:local">purchase</Const></op> | <op><Const type="rif:iri">cpt:purchase</Const></op> |
<arg><Var>Buyer</Var></arg> | <arg><Var>Buyer</Var></arg> |
<arg><Var>Seller</Var></arg> | <arg><Var>Seller</Var></arg> |
<arg> | <arg> |
<Uniterm> | <Expr> |
<op><Const type="rif:local">book</Const></op> | <op><Const type="rif:iri">cpt:book</Const></op> |
<arg><Var>Author</Var></arg> | <arg><Var>Author</Var></arg> |
<arg><Const type="rif:iri">bks:LeRif</Const></arg> | <arg><Const type="rif:iri">bks:LeRif</Const></arg> |
</Uniterm> | </Expr> |
</arg> | </arg> |
<arg> | <arg> |
<Uniterm> | <Expr> |
<op><Const type="rif:iri">curr:USD</Const></op> | <op><Const type="rif:iri">curr:USD</Const></op> |
<arg><Const type="xsd:integer">49</Const></arg> | <arg><Const type="xsd:integer">49</Const></arg> |
</Uniterm> | </Expr> |
</arg> | </arg> |
</Uniterm> | </Atom> |
</formula> | </formula> |
</Exists> | </Exists> |
</formula> | </formula> |
<formula> | <formula> |
<Equal> | <Equal> |
<side><Var>Seller</Var></side> | <side><Var>Seller</Var></side> |
<side><Var>Author</Var></side> | <side><Var>Author</Var></side> |
</Equal> | </Equal> |
</formula> | </formula> |
</And></code> | </And></code> |
| [[pl:miw:miw08_xtt_rif|Powrót do dokumentu]] |