- From: Jonas Liljegren <jonas@rit.se>
- Date: 02 Mar 2001 19:15:32 +0100
- To: Dave Reynolds <der@hplb.hpl.hp.com>
- Cc: www-rdf-logic@w3.org, Wraf development <rdf@uxn.nu>
I would first like to apology for my confused posting. I should have hold back one day more. My understanding of DAML is now much better. I have now found that searches can be done by defining a class. The search result will be the resources belonging to that class. One search form I am experimenting with is intended for finding object bleonging to one or more of the selected classes. In hidden fields in the search form, I put statements equivalent of: <Class rdf:resource="#gen1 daml:unionOf="#gen2" /> And the list of searchable classes, using Template Toolkit (for Perl), simplified: [% FOREACH type = types %] <p><input type="checkbox" name="li_subj #gen2" value="[% type.uri %]" /> [% type.label.value %] </p> [% END %] On Submit, the new statements is inserted in the RDF space. The container content is determined by the chosed checkboxes. The search result page simply views the objects for the class #gen1, simplified: <ul> [% FOREACH object = query.rev_type.list %] <li> [% object.label.value %] </li> [% END %] </ul> I guess that this will work for any type of search criterions. I think that I can find a way to include substring searches by just creating dynamic substring properties for the resources. All this, within the Wraf project: http://uxn.nu/wraf/ The templates above are a temporary solution. We will later crate a presentation layer in RDF using semantic presentation components, as a part of the agent/server conversation (session) context. Dave Reynolds <der@hplb.hpl.hp.com> writes: > > Has anyone here a suggestions on how to write those descriptions? > > You basicly have to insert a way to add ORs and NOTs. AND is the > > default. > > I may be misunderstanding the question but while "AND" is sort-of the > default for the RDF assertions, DAML+OIL is richer. It seems to me that AND is default also for DAML+OIL. I read about boolean combinations in: http://www.daml.org/2000/12/reference.html#Class The class C must be equivalent to the class defined by each of the boolean class expression, I would have prefered this to be clearer. But I guess that this means that if I have: <Class> <unionOf parseType="daml:collection"> <Class rdf:resource="#A"/> <Class rdf:resource="#B"/> </unionOf> <intersectionOf parseType="daml:collection"> <Class rdf:resource="#C"/> <Class rdf:resource="#D"/> </intersectionOf> </Class> it would be equivalent to: <Class> <intersectionOf parseType="daml:collection"> <Class> <unionOf parseType="daml:collection"> <Class rdf:resource="#A"/> <Class rdf:resource="#B"/> </unionOf> </Class> <Class> <intersectionOf parseType="daml:collection"> <Class rdf:resource="#C"/> <Class rdf:resource="#D"/> </intersectionOf> </Class> </intersectionOf> </Class> Is this correct? > Taking the approach of treating DAML+OIL as specifying descriptions > then the unionOf, intersectionOf, complementOf properties give you > AND, OR and NOT. You could generate a description of the things you > are trying to retrieve using these properties and then have a > reasoner/database retrieve those objects which are instances of your > specified class. Yes. That's what I found out after I actually read the documents and examples. :-) -- / Jonas Liljegren The Wraf project http://www.uxn.nu/wraf/ Sponsored by http://www.rit.se/
Received on Friday, 2 March 2001 13:14:11 UTC