DAML-S
LocateBook
service is atomic, so we say
that its a subclass of an atomic process. We also limit its
cardinality to 1:
<daml:Class rdf:ID="LocateBook"> <rdfs:subClassOf rdf:resource="&process;#AtomicProcess"/> <rdfs:subClassOf> <daml:Restriction daml:cardinality="1"> <daml:onProperty rdf:resource="#bookName"/> </daml:Restriction> </rdfs:subClassOf> </daml:Class>
input
property tells us what the process takes as
input. If we want LocateBook
to take a book name
as input we say:
<rdf:Property rdf:ID="bookName"> <rdfs:subPropertyOf rdf:resource="&process;#input"/> <rdfs:domain rdf:resource="#LocateBook"/> <rdfs:range rdf:resource="&xsd;#string"/> </rdf:Property>
output
property will depend on whether
the call worked, and what it returns. Its what DAML-S calls
a ConditionalOutput
(class). LocateBook
is the
description of the book and the prices. If the book is not
in Congo's catalogs, then the output is a message to this
effect. The output of LocateBook
is thus
described as a conditional output. We illustrate the notion
of a conditional output below in terms of the
bookDescription. <rdf:Property rdf:ID="bookDescription"> <rdfs:subPropertyOf rdf:resource="&process;#conditionalOutput"/> <rdfs:domain rdf:resource="#LocateBook"/> <rdfs:range rdf:resource="InCatalogueBookDescription"/> </rdf:Property> <daml:Class rdf:ID="InCatalogueBookDescription"> <rdfs:subClassOf rdf:resource="&process;#ConditionalOutput"/> </daml:Class> <rdf:Property rdf:ID="condInCatalogueBookDescription"> <rdfs:subPropertyOf rdf:resource="&process;#coCondition"/> <rdfs:domain rdf:resource="#InCatalogueBookDescription"/> <rdfs:range rdf:resource="#InCatalogueBook"/> </rdf:Property> <rdf:Property rdf:ID="outInCatalogueBookDescription"> <rdfs:subPropertyOf rdf:resource="&process;#coOutput"/> <rdfs:domain rdf:resource="#InCatalogueBookDescription"/> <rdfs:range rdf:resource="#TextBookDescription"/> </rdf:Property> <daml:Class rdf:ID="TextBookDescription"> <rdfs:subClassOf rdf:resource="&daml;#Thing"/> </daml:Class>
17 of 26