Defining properties

Properties relate to a class, so all resources pertaining to that class can define values for these.

ex:cromosomes a rdf:Property;
              rdfs:domain ex:Eukaryote;
              rdfs:range xsd:integer.

ex:unicellular a rdf:Property;
               rdfs:domain ex:Eukaryote;
               rdfs:range xsd:bool;

ex:dateOfBirth a rdf:Property;
               rdfs:domain ex:Mammal;
               rdfs:range xsd:dateTime;

The class the property belongs to is defined by rdfs:domain, while the data type contained is defined by rdfs:range. By convention all properties use lowerCamelCase names, although property names are not restricted. The allowed charset is UTF-8.

The following basic types are supported:

xsd:boolean

xsd:string

xsd:integerRanging from -2^63 to 2^63-1.

xsd:doubleAble to store a 8 byte IEEE floating point number.

xsd:date and xsd:dateTime Able to store dates and times since January 1, 1970 UTC, with millisecond resolution.

Of course, properties can also point to resources of the same or other classes, so stored resources can conform a graph:

ex:parent a rdf:Property;
          rdfs:domain ex:Mammal;
          rdfs:range ex:Mammal;

ex:pet a rdf:Property;
       rdfs:domain ex:Mammal;
       rdfs:range ex:Eukaryote;

There is also inheritance of properties, an example would be a property in a subclass concretizing a more generic property from a superclass.

ex:geneticInformation a rdf:Property;
                      rdfs:domain ex:Eukaryote;
                      rdfs:range xsd:string;

ex:dna a rdf:Property;
       rdfs:domain ex:Mammal;
       rdfs:range xsd:string;
       rdfs:subPropertyOf ex:geneticInformation.

SPARQL queries are expected to provide the same result when queried for a property or one of its superproperties.

# These two queries should provide the exact same result(s)
SELECT { ?animal a ex:Animal;
                 ex:geneticInformation "AGCT" }
SELECT { ?animal a ex:Animal;
                 ex:dna "AGCT" }