- From: Simon Spero <sesuncedu@gmail.com>
- Date: Mon, 17 Nov 2014 11:45:44 -0500
- To: Pavel Klinov <pavel.klinov@uni-ulm.de>
- Cc: semantic-web@w3.org, Victor Porton <porton@narod.ru>
- Message-ID: <CADE8KM7RPhjq4YusdhDx=jOUWEpCkPOopf5JqgZ-v2Gxj+8=uA@mail.gmail.com>
I can think of a few other ways that may be more complicated in some aspects, but which would only require a single rdf triple query to find the declaration. That doesn't make them good ideas (the approach below is a bad idea). The good idea is to use the construct designed for this purpose. One approach: 1. We can create a data property whose range is integers greater than 0 and less than 2, and whose domain is the class Singleton. We then add an existential cardinality constraint on Singleton for this property. 2. We then declare that this property is a key on each specific singleton class, and declare that the specific singleton class is a subclass of Singleton. 3. Finally we assert that some anonymous individual is an instance of the specific singleton class. Step 1 creates a property that has a range of a single value (1),without explicitly stating that value. It then asserts that every instance of Singleton has at least one value of this property. Step 2 declares that any two names referring to instances of specific singleton class are referring to the same instance if each has some matching value of our data property. Adding the subclass assertion makes there be a matching value, and adds a marker. There can thus be at most one instance of classes marked singleton. Step 3 then creates an instance of the singleton class, so that there is at least one instance. Asserted Singleton classes can be identified by simply checking for the subclass triple in an RDF representation. NB: One can check whether an arbitrary class is logically a singleton by checking if making it a subclass of Nothing is inconsistent (at least one), and if declaring _:x and _:y as instances of the class and as different individuals is inconsistent (at most one). Simon On Nov 16, 2014 6:10 PM, "Pavel Klinov" <pavel.klinov@uni-ulm.de> wrote: > There's no simpler encoding. Nominals is the only feature in OWL 2 > which lets you say that a class has a single instance. And it has a > unique serialization in RDF. > > I don't think querying for this particular syntactic construct is complex. > > However, writing RDF queries for OWL ontologies serialized in RDF (be > that SPARQL or other RDF graph matching language) is usually not a > great idea. You'll often have to deal with specifics of the RDF > serialization which is complex for many OWL constructs (see [1]) > > Cheers, > Pavel > > [1] http://www.w3.org/TR/owl2-mapping-to-rdf/ > > On Sun, Nov 16, 2014 at 11:35 PM, Victor Porton <porton@narod.ru> wrote: > > Your solution has the same problem as Patrick Logan's one. (See my > previous email.) In fact your solution is the same as Patrick Logan's one. > > > > 17.11.2014, 00:28, "Pavel Klinov" <pavel.klinov@uni-ulm.de>: > >> Sorry, my previous email got sent too soon. > >> > >> Here's the link to the right place in the OWL 2 spec: > >> > >> http://www.w3.org/TR/owl2-syntax/#Enumeration_of_Individuals > >> > >> Cheers, > >> Pavel > >> > >> On Sun, Nov 16, 2014 at 10:52 PM, Victor Porton <porton@narod.ru> > wrote: > >>> Is there any advise on how to code in RDFS or OWL the following > statement? > >>> > >>> "The class X has exactly one element." > >>> > >>> -- > >>> Victor Porton - http://portonvictor.org > > > > -- > > Victor Porton - http://portonvictor.org > >
Received on Monday, 17 November 2014 16:46:16 UTC