简体   繁体   中英

How to associate data with owl object property to link individuals

I have following ontology

    <owl:Class rdf:about="http://www.semanticweb.org/POC#Person"/>
    <owl:Class rdf:about="http://www.semanticweb.org/POC#Vehicle"/>
    <owl:ObjectProperty rdf:about="http://www.semanticweb.org/POC#drives"/>

    <owl:Class rdf:about="http://www.semanticweb.org/POC#Driver">
        <owl:equivalentClass>
            <owl:Class>
                <owl:intersectionOf rdf:parseType="Collection">
                    <rdf:Description rdf:about="http://www.semanticweb.org/POC#Person"/>
                    <owl:Restriction>
                        <owl:onProperty rdf:resource="http://www.semanticweb.org/POC#drives"/>
                        <owl:someValuesFrom rdf:resource="http://www.semanticweb.org/POC#Vehicle"/>
                    </owl:Restriction>
                </owl:intersectionOf>
            </owl:Class>
        </owl:equivalentClass>
    </owl:Class>

The actual data is stored in relational database. (It could come from object database also in future.) I want to associate the data with the above ontology classes and perform reasoning over it to find out all the drivers.

I am able to connect person and car with the tables in the database. How do I associate data with "drives", which is stored in separate table with car id and person id as foreign keys, to associate the individuals of person and vehicle?

Well I got it. Basically I need to add a triple " POC#person/1 POC#drives POC#vehicle/7 ". I can use my many to many table to do this. In future if data is stored in object database I can use the reference in the similar fashion.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM