HTML and CSS Reference
In-Depth Information
Shorthand notation can be used for the following common predicates:
•
•
•
New classes and new properties can be defined in new vocabularies [132]. A class can be defined as Listing 7-56
because the
rdf:type
property is abbreviated as
a
in N3.
•
Listing 7-56.
An RDF Class in N3
:Sport a rdfs:Class.
An object of the class can be defined as shown in Listing 7-57.
Listing 7-57.
Declare an Object of a Class in N3
:Kayak a :Sport.
Objects can be in multiple classes. Relationships between classes can be written as shown in Listing 7-58.
Listing 7-58.
Class Relationships in N3
:Watersport a rdfs:Class; rdfs:subClassOf :Sport.
A property can be defined as shown in Listing 7-59.
Listing 7-59.
Property Declaration in N3
:paddle a rdf:Property.
Relationships between classes are not necessarily hierarchical relationships. You can see an example
in Listing 7-60.
Listing 7-60.
Nonhierarchical Relationships in N3
:paddle rdfs:domain :Sport;
rdfs:range :Watersport.
The person's Wikipedia page described in the previous section can be written in N3 as shown in Listing 7-61.
Listing 7-61.
A Wikipedia Page Description in N3
@prefix dc: <
http://purl.org/dc/elements/1.1/
>
.
dc:title "Rowan Atkinson";
dc:publisher "Wikipedia".
Notation3 has several subsets, including Turtle, N-Triples, N3 RDF, and N3 Rules. The most popular of them is
discussed in the next section.
Search WWH ::
Custom Search