OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

tag message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [tag] Issue Re: [tag] A tighter RDFS/OWL-DL representation


A roundtrip works quite well, to get an idea of how others
might use RDF/RDFS/OWL to represent the same Test Assertion
model/example. An export from the semantic wiki Halo project
(which imports well back into the wiki) looks like this for
the exact same example:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rdf:RDF[
	<!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
	<!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'>
	<!ENTITY owl 'http://www.w3.org/2002/07/owl#'>
	<!ENTITY smw 'http://smw.ontoware.org/2005/smw#'>
	<!ENTITY smwdt 'http://smw.ontoware.org/2005/smw-datatype#'>
	<!ENTITY wiki 'http://localhost/mediawiki/index.php/Special:URIResolver/'>
	<!ENTITY wikiurl 'http://localhost/mediawiki/index.php/'>
	<!ENTITY property  
'http://localhost/mediawiki/index.php/Special:URIResolver/Property-3A/'>
]>

<rdf:RDF
	xmlns:rdf="&rdf;"
	xmlns:rdfs="&rdfs;"
	xmlns:owl ="&owl;"
	xmlns:smw="&smw;"
	xmlns:wiki="&wiki;"
	xmlns:wikiurl="&wikiurl;"
	xmlns:property="&property;">
	<!-- Ontology header -->
	<owl:Ontology rdf:about="">
		<smw:exportDate  
rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime";>2008-01-28T10:00:16+00:00</smw:exportDate>
	</owl:Ontology>
	<!-- exported page data -->
	<smw:Thing rdf:about="&wiki;Widget_precondition1">
		<rdfs:label>Widget precondition1</rdfs:label>

		<smw:hasArticle rdf:resource="&wikiurl;Widget_precondition1"/>
		<rdfs:isDefinedBy  
rdf:resource="&wikiurl;Special:ExportRDF/Widget_precondition1"/>
		<rdf:type rdf:resource="&wiki;Category-3AWidget"/>
		<property:Property rdf:resource="&wiki;WidgetSize_Medium"/>
	</smw:Thing>
	<smw:Thing rdf:about="&wiki;Widget_ta001">
		<rdfs:label>Widget ta001</rdfs:label>
		<smw:hasArticle rdf:resource="&wikiurl;Widget_ta001"/>

		<rdfs:isDefinedBy rdf:resource="&wikiurl;Special:ExportRDF/Widget_ta001"/>
		<rdf:type rdf:resource="&wiki;Category-3AWidget"/>
		<property:Prose  
rdf:datatype="http://www.w3.org/2001/XMLSchema#string";>has a red  
button on top</property:Prose>
		<property:SpecRef  
rdf:datatype="http://www.w3.org/2001/XMLSchema#string";>101:1a</property:SpecRef>
		<property:Precondition rdf:resource="&wiki;Widget_precondition1"/>
	</smw:Thing>
	<!-- auxilliary definitions -->
	<owl:ObjectProperty rdf:about="&property;Precondition">

		<rdfs:label>Precondition</rdfs:label>
		<smw:hasArticle rdf:resource="&wikiurl;Property:Precondition"/>
		<rdfs:isDefinedBy  
rdf:resource="&wikiurl;Special:ExportRDF/Property:Precondition"/>
	</owl:ObjectProperty>
	<owl:DatatypeProperty rdf:about="&property;SpecRef">
		<rdfs:label>SpecRef</rdfs:label>
		<smw:hasArticle rdf:resource="&wikiurl;Property:SpecRef"/>
		<rdfs:isDefinedBy  
rdf:resource="&wikiurl;Special:ExportRDF/Property:SpecRef"/>

	</owl:DatatypeProperty>
	<owl:DatatypeProperty rdf:about="&property;Prose">
		<rdfs:label>Prose</rdfs:label>
		<smw:hasArticle rdf:resource="&wikiurl;Property:Prose"/>
		<rdfs:isDefinedBy rdf:resource="&wikiurl;Special:ExportRDF/Property:Prose"/>
	</owl:DatatypeProperty>
	<smw:Thing rdf:about="&wiki;WidgetSize_Medium">
		<rdfs:label>WidgetSize Medium</rdfs:label>

		<smw:hasArticle rdf:resource="&wikiurl;WidgetSize_Medium"/>
		<rdfs:isDefinedBy  
rdf:resource="&wikiurl;Special:ExportRDF/WidgetSize_Medium"/>
	</smw:Thing>
	<owl:ObjectProperty rdf:about="&property;Property">
		<rdfs:label>Property</rdfs:label>
		<smw:hasArticle rdf:resource="&wikiurl;Property:Property"/>
		<rdfs:isDefinedBy  
rdf:resource="&wikiurl;Special:ExportRDF/Property:Property"/>
	</owl:ObjectProperty>

	<owl:Class rdf:about="&wiki;Category-3AWidget">
		<rdfs:label>Widget</rdfs:label>
		<smw:hasArticle rdf:resource="&wikiurl;Category:Widget"/>
		<rdfs:isDefinedBy  
rdf:resource="&wikiurl;Special:ExportRDF/Category:Widget"/>
	</owl:Class>
	<!-- reference to the Semantic MediaWiki schema -->
	<owl:AnnotationProperty rdf:about="&smw;hasArticle">
		<rdfs:isDefinedBy rdf:resource="http://smw.ontoware.org/2005/smw"/>

	</owl:AnnotationProperty>
	<owl:AnnotationProperty rdf:about="&smw;exportDate">
		<rdfs:isDefinedBy rdf:resource="http://smw.ontoware.org/2005/smw"/>
	</owl:AnnotationProperty>
	<owl:Class rdf:about="&smw;Thing">
		<rdfs:isDefinedBy rdf:resource="http://smw.ontoware.org/2005/smw"/>
	</owl:Class>
	<!-- Created with Semantic MediaWiki, http://ontoworld.org/wiki/SMW -->
</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



Quoting stephen.green@systml.co.uk:

> Attached is a screen dump of how this representation looks in
> the semantic wiki. It revealed a few modeling issues...
>
> [Incidentally there was a missing spec ref - it should look like this:
>
>         <Widget rdf:ID="Widget_precondition1">
> 		<property>
> 			<WidgetSize rdf:ID="WidgetSize_Medium"/>
> 		</property>
> 	</Widget>
> 	<Widget rdf:ID="Widget_ta001">
> 		<specRef
> rdf:datatype="http://www.w3.org/2001/XMLSchema#string";>101:1a</specRef>
> 		<prose rdf:datatype="http://www.w3.org/2001/XMLSchema#string";>has a
> red button on top</prose>
> 		<precondition rdf:resource="#Widget_precondition1"/>
> 	</Widget>
> ]
>
> There is an issue to note, I think, with the use of a 'precondition'
> - it is a bit of a modeling problem in that the precondition actually
> functions as a restricted subclass of the test assertion or its predicate.
>
> * If the precondition is itself a predicate it needs everything
>     a test assertion needs except the spec ref. I.e. maybe it needs
>     its own ID so one precondition can be used in multiple predicates.
>
> * This then leads to some issues:
>
>   * Why not then just use an assertion?
>
>   * What then is the difference between precondition and prerequisite?
>
>   * Doesn't this logic mean that a test assertion actually amounts
>       an extension of a superclass which is an assertion (extended by
>       adding spec ref)?
>     * Then a prerequisite could be the equivalent of a precondition
>       in that both reference both assertions and test assertions (or
>       instantiate, rather than reference the assertion and test
>       assertion classes).
>
>   * So having a new superclass of test assertion called 'assertion'
>       could answer three problems:
>        1. no need for both prerequisites and preconditions
>        2. distinction between
>           a. test assertions and
>           b. assertions/predicates which aren't test assertions as such
>        3. a different target can be associated with the assertion/predicate
>           of the precondition/prerequisite - a different target to the TA's
>
> Another issue arose while trying to implement the model:
>
>  Does a TA have a target or does a target have a TA?
>
>  The latter proves to be most useful in my example (to allow grouping
>  of TAs under the category of a shared target or target class).
>
> Best regards
> - Steve
>
>> I tried the OWL-DL representation with WikiMedia's SemanticWiki
>> / Halo Project OWL extensions and found that it needed tightening
>> up a lot more (eliminating the redundant elements).
>>
>> This resulted in the representation below which seems quite satisfactory
>> as a mere demo of how a TA might be represented for the semantic web:
>>
>> <?xml version="1.0"?>
>> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
>> xmlns:owl="http://www.w3.org/2002/07/owl#"; xmlns="http://localhost#";
>> xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#";
>> xml:base="http://localhost";>
>> 	<owl:Ontology rdf:about=""/>
>> 	<owl:Class rdf:ID="Property"/>
>> 	<owl:Class rdf:ID="WidgetSize">
>> 		<rdfs:subClassOf>
>> 			<owl:Class rdf:ID="Size"/>
>> 		</rdfs:subClassOf>
>> 	</owl:Class>
>> 	<owl:Class rdf:ID="Target"/>
>> 	<owl:Class rdf:about="#Size">
>> 		<rdfs:subClassOf rdf:resource="#Property"/>
>> 	</owl:Class>
>> 	<owl:Class rdf:ID="Widget">
>> 		<rdfs:subClassOf rdf:resource="#Target"/>
>> 	</owl:Class>
>> 	<owl:ObjectProperty rdf:ID="precondition">
>> 		<rdfs:domain rdf:resource="#Target"/>
>> 	</owl:ObjectProperty>
>> 	<owl:DatatypeProperty rdf:ID="prerequisite">
>> 		<rdfs:domain rdf:resource="#Target"/>
>> 		<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
>> 	</owl:DatatypeProperty>
>> 	<owl:DatatypeProperty rdf:ID="specRef">
>> 		<rdfs:domain rdf:resource="#Target"/>
>> 		<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
>> 	</owl:DatatypeProperty>
>> 	<owl:FunctionalProperty rdf:ID="property">
>> 		<rdfs:domain rdf:resource="#Target"/>
>> 		<rdfs:range rdf:resource="#Property"/>
>> 		<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
>> 	</owl:FunctionalProperty>
>> 	<owl:FunctionalProperty rdf:ID="value">
>> 		<rdfs:domain rdf:resource="#Property"/>
>> 		<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
>> 		<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
>> 	</owl:FunctionalProperty>
>> 	<owl:FunctionalProperty rdf:ID="prose">
>> 		<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
>> 		<rdfs:domain rdf:resource="#Target"/>
>> 		<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
>> 	</owl:FunctionalProperty>
>> 	<Widget rdf:ID="Widget_precondition1">
>> 		<property>
>> 			<WidgetSize rdf:ID="WidgetSize_Medium"/>
>> 		</property>
>> 	</Widget>
>> 	<owl:AllDifferent/>
>> 	<Widget rdf:ID="Widget_ta001">
>> 		<specRef rdf:datatype="http://www.w3.org/2001/XMLSchema#string"/>
>> 		<prose rdf:datatype="http://www.w3.org/2001/XMLSchema#string";>has a
>> red button on top</prose>
>> 		<precondition rdf:resource="#Widget_precondition1"/>
>> 	</Widget>
>> </rdf:RDF>
>> <!-- Created with Protege (with OWL Plugin 3.3.1, Build 430)
>> http://protege.stanford.edu -->
>>
>>
>> -- 
>> 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
>>
>>
>>
>> Quoting stephen.green@systml.co.uk:
>>
>>> Second attempt after first seems to have got stuck (in filters?)
>>> This time with attachment as zip
>>>
>>> Contains two OWL files, one with a TA ontology - classes and properties,
>>> the other with an example individual TA in OWL-DL using the ontology.
>>>
>>> -- 
>>> 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]