First of all, introduce the basic knowledge of Semantic Web books, "Semantic Web Technology system" Guyuzhong, Hu Wei, Cheng. 2015
RDFS (Resource Description Framework Schema) is a glossary based on RDF that provides a "http://www.w3.org/2000/01/rdf-schema#" namespace As a standard for users to describe classes and attributes in a particular domain. Unlike XML Schema and XML, Rdfs is a special set of RDF words that define the terms used in RDF data and their semantics.
In RDF, a class is an abstraction of a set of individual resources, each of which is called an instance of a class. For example, "person" is a class, and the specific person "Zhang San" is an instance of the class "person". Rdfs:class is the class of all classes, and Rdfs:resource is the class of all resources. Rdfs:subclassof and rdfs:subpropertyof are used to denote inheritance between classes and attributes, such as class "Teacher" and "student" are subclasses of the class "human". Rdfs:domain and Rdfs:range, respectively, are used to describe the domain and range of the attribute's definition.
Rdfs lexical relations in the book Figure 3-2 (the side s indicates that subclassof,t represents the type):
Rdfs's core vocabulary
1. Core class
1) Rdfs:resource
The things described by RDF are called resources, and each resource is an instance of the class Rdfs:resource.
2) Rdfs:property
is a subset of RDF resources used to represent resource properties.
3) Rdfs:class
Similar to the concept of class in object-oriented. When you define a new class, the resource that represents the class must have a Rdf:type property with a property value of Rdfs:class, for example:
<rdf:Description rdf:ID=‘horse‘> <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/></rdf:Description>
Since a Rdfs class is an RDF resource, we can write the Rdfs class as a resource in a simpler and clearer way, as in the example above:
<rdfs:Class rdf:ID=‘horse‘></rdfs:Class>
2 Container Class
1) Rdf:seq, represents a container of an ordered list, that is, the object order is meaningful;
2) Rdf:bag, which represents a non-sequential list of containers, that is, the object order is irrelevant;
3) Rdf:alt, which represents the container of the option collection, which can only select one of several options as the object;
Rdf/xml serializes all elements of the container using the Rdf:li property, in the RDF diagram the elements are represented as rdf:_1,rdf:_2,..., the Rdf:_n form.
4) The superclass of Rdf:container, represented as all RDF containers 1), 2), and 3, allows the tagging of a resource as a list without explicitly stating the type.
3 to define the core properties of the contact
1) Rdf:type, which indicates that the resource described is a member of a class, so it has all the characteristics that a member of the class has. A resource can be an instance of more than one class.
2) Rdfs:subclassof, the Inter-class relationship is specified, and only Rdf:class instances can have rdf:subclassof properties.
3) rdfs:subpropertyof, is an example of Rdf:property, which indicates that a property is an materialization of another property.
4 is the core attribute of the constrained attribute
1) Rdfs:domain, which is an instance of Rdf:property, indicates the domain of the attribute's definition.
2) Rdfs:range, which is an instance of Rdf:property, indicates the domain value of the attribute.
5 Useful attributes for materialization
Rdf:subject, Rdf:predicate and Rdf:object respectively materialize the subject, predicate and object of an RDF ternary group. Rdf:statement is used to mark a materialized ternary group.
6 Feature Properties
1) Rdfs:seealso, points out that a resource may provide additional information to the main language resource, which may be the URL of a Web site or a URI that points to a piece of paper media.
2) Rdfs:isdefinedby is a sub-attribute of rdfs:seealso, and the resource of defining subject resource is pointed out.
3) Rdfs:label, provides a human readable resource name, which appends a resource with a more understandable name than a URI.
4) Rdf:comment, provides a human readable description of the resource.
An example of Rdfs is given below, shown in table 3-1, which includes the person, Animal, MaritalStatus class, SSN, age, maritalstatus attribute, and instances such as John, married, divorced, and so on. It is customary to use a capital letter to identify a class name, and a lowercase first letter to identify the property name.
1-3 rows define namespaces;
4-7 rows define the person class, where a is equivalent to Rdf:type;
8-9 line defines the MaritalStatus class;
10-14 lines describes the property ssn, which indicates that the attribute is a social security number;
15-22 lines describe the attributes age and maritalstatus, respectively;
Line 23-26 Describes an instance of the class person John;
27-30 Lines Describe the instance married, divorced.
Semantic Web-rdfs