[EMAIL PROTECTED] wrote: >A query to get the team name for a football player would be: > >(defquery team-search > (declare (max-background-rules 100)) > (PropertyValue rdf:type ?n football:FootballPlayer) > (PropertyValue football:team ?n ?a) > (PropertyValue rdf:value ?a ?s) ) > >Lets assume by running the query, we get a team name having value >"Buffalo_Bills" for the FootballPlayer "player:Adams_Sam". > >I would now like to add a defrule which states: >" A FootballPlayer can play for only one team." >So when somebody tries to assert that the player also plays >in another team..like this:
It's not clear to me if you're just using RDF or something more expressive, but note that the expressiveness necessary for this statement is within the range of most web-ontology languages. For example, you could say the following in a DAML ontology: type BadFoosBallPlayer daml:Restriction daml:maxCardinality BadFoosBallPlayer 1 daml:onProperty BadFoosBallPlayer football:team daml:subClassOf BadFoosBallPlayer daml:Nothing (an instance of daml:Nothing implies a contradiction so this would be cause an error) Equivalently, you could say: type BadFoosBallPlayer daml:Restriction daml:maxCardinality BadFoosBallPlayer 1 daml:onProperty BadFoosBallPlayer football:team daml:disjointWith BadFoosBallPlayer daml:Thing Or you could leave out the last statement and query for BadFoosballPlayers. DJKB supports the reasoning necessary for this. -- - joe kopena -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]' in the BODY of a message to [EMAIL PROTECTED], NOT to the list (use your own address!) List problems? Notify [EMAIL PROTECTED] --------------------------------------------------------------------
