[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Widget Example Represented in OWL-Full
It's not nearly so cool in OWL (I had to use OWL-Full to get something up and running quickly - it works in Protegy though) but maybe OWL is more useful so you can create a knowledgebase of the TAs. Here is the same example as before (the medium sized widget) but in OWL-Full. (Apologies if my OWL isn't too clever here.) <?xml version="1.0"?> <rdf:RDF xmlns="http://www.example.org/owl/example/v0-2#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xml:base="http://www.example.org/owl/example/v0-2"> <owl:Ontology rdf:about="http://www.example.org/owl/example/v0-2"> <owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#string" >version 1.3</owl:versionInfo> </owl:Ontology> <owl:Class rdf:ID="TestAssertion"> <rdfs:label xml:lang="en">Test Assertion</rdfs:label> <rdfs:comment xml:lang="en">A test assertion as defined by OASIS Test Assertions Guidelines, January 2008. The object is a test assertion of a normative statement about the subject. The subject is the TestAssertionTarget</rdfs:comment> </owl:Class> <owl:Class rdf:ID="TestAssertionTarget"> <rdfs:comment xml:lang="en">A test assertion target as defined by OASIS Test Assertions Guidelines, January 2008.</rdfs:comment> <rdfs:label xml:lang="en">Test Assertion Target</rdfs:label> </owl:Class> <owl:ObjectProperty rdf:ID="preconditionWhen"> <rdfs:comment xml:lang="en">The object is a boolean expression representing a trigger which precedes and positively qualifies the behavior which is the subject as a preconditon.</rdfs:comment> <rdfs:domain rdf:resource="#TestAssertion"/> </owl:ObjectProperty> <owl:ObjectProperty rdf:ID="preconditionIfNot"> <rdfs:domain rdf:resource="#TestAssertion"/> <rdfs:comment xml:lang="en">The object is a boolean expression negatively qualifying the subject as a preconditon.</rdfs:comment> </owl:ObjectProperty> <owl:ObjectProperty rdf:ID="predicate"> <rdfs:domain rdf:resource="#TestAssertion"/> </owl:ObjectProperty> <owl:ObjectProperty rdf:ID="prerequisite"> <rdfs:domain rdf:resource="#TestAssertion"/> <rdfs:comment xml:lang="en">The object is a reference to a test assertion which is a prerequisite to the subject test assertion, qualifying it.</rdfs:comment> </owl:ObjectProperty> <owl:ObjectProperty rdf:ID="preconditionIf"> <rdfs:comment xml:lang="en">The object is a boolean expression positively qualifying the subject as a preconditon.</rdfs:comment> <rdfs:domain rdf:resource="#TestAssertion"/> </owl:ObjectProperty> <owl:ObjectProperty rdf:ID="specRef"> <rdfs:domain rdf:resource="#TestAssertion"/> <rdfs:comment xml:lang="en">The object is a specification normative reference from which the subject is derived.</rdfs:comment> </owl:ObjectProperty> <owl:ObjectProperty rdf:ID="preconditionWhenNot"> <rdfs:domain rdf:resource="#TestAssertion"/> <rdfs:comment xml:lang="en">The object is a boolean expression representing a trigger which precedes and negatively qualifies the behavior which is the subject as a preconditon.</rdfs:comment> </owl:ObjectProperty> <owl:FunctionalProperty rdf:ID="value"> <rdfs:subPropertyOf rdf:resource="#predicate"/> <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> </owl:FunctionalProperty> <owl:FunctionalProperty rdf:ID="property"> <rdfs:subPropertyOf rdf:resource="#predicate"/> <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> <rdfs:domain rdf:resource="#TestAssertion"/> </owl:FunctionalProperty> <owl:FunctionalProperty rdf:ID="TAId"> <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> <rdfs:comment xml:lang="en">The object uniquely identifies the test assertion which is the subject.</rdfs:comment> <rdfs:domain rdf:resource="#TestAssertion"/> </owl:FunctionalProperty> <owl:InverseFunctionalProperty rdf:ID="assertion"> <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> <rdfs:domain rdf:resource="#TestAssertionTarget"/> </owl:InverseFunctionalProperty> <TestAssertionTarget rdf:ID="Widget"> <assertion rdf:resource="#widgetTA001"/> <assertion rdf:resource="#widgetTA002"/> </TestAssertionTarget> <TestAssertion rdf:ID="widgetTA001"> <specRef rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI">http://www.example.org/spec/#001</specRef> <preconditionIf rdf:resource="#is_medium_sized"/> <predicate rdf:datatype="http://www.w3.org/2001/XMLSchema#string">has a red button on the top</predicate> </TestAssertion> <owl:Thing rdf:ID="is_medium_sized"/> <owl:Thing rdf:ID="number_of_AA_batteries_used"/> <TestAssertion rdf:ID="widgetTA002"> <specRef rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI">http://www.example.org/spec/#002</specRef> <preconditionIf rdf:resource="#is_medium_sized"/> <property rdf:resource="#number_of_AA_batteries_used"/> <value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1</value> </TestAssertion> </rdf:RDF> -- Stephen D. Green Partner SystML, http://www.systml.co.uk Tel: +44 (0) 117 9541606 http://www.biblegateway.com/passage/?search=matthew+22:37 .. and voice
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]