The ECMs seem like a very powerful tool for expressing ontologies in
fedora, but I am still a bit
confused about how to use them.
How do we specify that a <owl:DatatypeProperty> in the ONTOLOGY
datastream has an XSD user-derived datatype that's
defined in an XSD schema in the manner described at
https://wiki.duraspace.org/display/FCREPO/DSCOMPOSITE-MODEL+and+Schemas
Here is an example of what I mean for a Content Model of a Person
<!-- PERSON/ONTOLOGY Datastream -->
<rdf:RDF
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<owl:Class rdf:about="info:fedora/demo:Person#class">
<rdfs:subClassOf>
<!-- At least one name -->
<owl:Restriction>
<owl:onProperty
rdf:resource="http://demo.org/demo-relations/#name"/>
<owl:minCardinality
rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1
</owl:minCardinality>
</owl:Restriction>
...
</owl:Class>
<!-- Note the use rdf:datatype attribute. Is this how we actually
specify an xsd user-defined datatype for a datatype property? -->
<owl:DatatypeProperty
rdf:about="http://demo.org/demo-relations/#name"
rdf:datatype="http://www.demo.org/XMLschema/person#Name"/>
...
</rdf:RDF>
<!-- PERSON/DS-COMPOSITE-MODEL -->
<dsTypeModel ID="ONTOLOGY-SCHEMA">
<form MIME="text/xml"/>
<extension name="SCHEMA">
<reference type="datastream" value="ONTOLOGY_SCHEMA"/>
</extension>
</dsTypeModel>
<!-- Person/ONTOLOGY_SCHEMA -->
<xsd:schema xmlns:per="http://www.demo.org/models/person#"
xmlns:c="http://www.demo.org/models/common#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.demo.org/models/person#"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xsd:import namespace="http://www.demo.org/models/common#"
schemaLocation="(URL of common.xsd
datastream)"/>
...
<xsd:complexType id="Name" name="Name">
<xsd:annotation>
<xsd:documentation>A person often has many different names
depending
on religious,
political, clan or social affiations. Cataloging name variants allows
properly defined biographical
entries according to customs.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
...
<xsd:attribute name="type" type="per:nameTypeAttr"
default="primaryName"/>
....
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:simpleType name="nameTypeAttr">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="primaryName"/>
<xsd:enumeration value="primaryTitle"/>
<xsd:enumeration value="personalName"/>
<xsd:enumeration value="title"/>
<xsd:enumeration value="familyName"/>
<xsd:enumeration value="firstOrdinationName"/>
<xsd:enumeration value="secretInitiatoryName"/>
<xsd:enumeration value="reversal"/>
<xsd:enumeration value="sanskrit"/>
<xsd:enumeration value="grammatical"/>
<xsd:enumeration value="variantOrthography"/>
<xsd:enumeration value="penName"/>
<xsd:enumeration value="gterStonTitle"/>
<xsd:enumeration value="chineseName"/>
<xsd:enumeration value="corporateName"/>
<xsd:enumeration value="bodhisattvaVowName"/>
<xsd:enumeration value="finalOrdinationName"/>
</xsd:restriction>
</xsd:simpleType>
There is also another complication: How would we specify the
attributes, such as nameTypeAttr in the
RELS-EXT of a data object?
<!-- Person_Object_1/RELS-EXT -->
<rdf:Description rdf:about="info:fedora/demo:Person_Object_1">
<fedora-model:hasModel rdf:resource="info:fedora/demo:Person"/>
<demo-relations:name xsd:type="primaryName">Some
Name</demo-relations:name>
<demo-relations:name xsd:type="title">Some Title</demo-relations:name>
<!-- The following relationship should be invalid -->
<demo-relations:name xsd:type="invalidType">Some
Value</demo-relations:name>
</rdf:Description>
=====
I don't think the example above is correct, but I hope it illustrates
my thinking.
My gut tells me there should be a straightforward way to use literals
with user-derived datatypes
for relations declared in the ONTOLOGY. Does anyone have any ideas or
suggestions? Looking through
the 3.4.1 source code and online documentation I couldn't find much on
using the ECMs with either
user-derived datatypes, or <owl:DatatypeProperty>.
Thank you,
Eugene Wolfson
P.S.
You might find these starting references to be helpful:
http://www.w3.org/TR/2006/NOTE-swbp-xsch-datatypes-20060314/#sec-userDefined
http://www.w3.org/TR/owl-ref/#rdf-datatype
https://wiki.duraspace.org/display/FCREPO/DSCOMPOSITE-MODEL+and+Schemas
http://sourceforge.net/apps/mediawiki/ecm/index.php?title=Ontology_Language and
https://wiki.duraspace.org/display/FCREPO/Ontologies
P.P.S.
The driving force behind my question is that I want to ask risearch
not only questions like:
select $parent $person from <#ri> where { $person hasParent $parent . }
but also questions like:
select $parent $person from <#ri> where { $parent hasChild $person .
$person <demo-relations:name type="primaryName"> "Tenzin" . }
or even:
select $parent $person from <#ri> where { $parent hasChild $person .
$person <demo-relations:name> "Tenzin" . }
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Fedora-commons-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users